diff --git a/DEPS b/DEPS index f7da473..bedde56 100644 --- a/DEPS +++ b/DEPS
@@ -228,11 +228,11 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling Skia # and whatever else without interference from each other. - 'skia_revision': '1c5eb4b3713e9780cb1547ef321af5c38fd67832', + 'skia_revision': '5a6f1606cc6aaa9620fe2f892cf64055521ed85e', # 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': 'fbba2862f13eda82033d350aad441a4376373afb', + 'v8_revision': '01e6ffdd4f0efdd1e7e9381efaead3a9a5c3a672', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling ANGLE # 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': '25814bb53d2bdd7a622d27394f33528830685748', + 'catapult_revision': 'c62bb0f15931ce0e7d7cb0633bd32f10a76184a2', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling libFuzzer # and whatever else without interference from each other. @@ -303,7 +303,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling devtools-frontend # and whatever else without interference from each other. - 'devtools_frontend_revision': 'cd7c3815feebdf809f13cfb3190eae26d443b978', + 'devtools_frontend_revision': '1ab82801cdcab1799a9717e7ff52c7ed983a7400', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling libprotobuf-mutator # and whatever else without interference from each other. @@ -773,7 +773,7 @@ 'packages': [ { 'package': 'chromium/third_party/androidx', - 'version': 'zzVIaEA3uTWNbAiFgL34RFj52xan_NtxkXTFIZjsrroC', + 'version': 'esnQTh6IB0KM-t2F2AbAmiTNYdxM_WOyT5lLzYKt188C', }, ], 'condition': 'checkout_android', @@ -992,7 +992,7 @@ # Tools used when building Chrome for Chrome OS. This affects both the Simple # Chrome workflow, as well as the chromeos-chrome ebuild. 'src/third_party/chromite': { - 'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + 'ef2249cec33080a6f7bb4cff825383f3e410d280', + 'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + '3f85b083e297c59b04cb2b4c7c4d4d730884ccca', 'condition': 'checkout_chromeos', }, @@ -1012,7 +1012,7 @@ }, 'src/third_party/depot_tools': - Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + 'eff810e93d23a0ad00fe36e577324b67612b3ec4', + Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + 'b504ca40f3a8a444022d3e901c693a2050c8ab13', 'src/third_party/devtools-frontend/src': Var('chromium_git') + '/devtools/devtools-frontend' + '@' + Var('devtools_frontend_revision'), @@ -1398,7 +1398,7 @@ }, 'src/third_party/perfetto': - Var('android_git') + '/platform/external/perfetto.git' + '@' + '8f0fabf54bc923165ac47bc1b7de45b9eee0ff3d', + Var('android_git') + '/platform/external/perfetto.git' + '@' + '09e840c057c0fb891c3d29168ddc656d40b56e86', 'src/third_party/perl': { 'url': Var('chromium_git') + '/chromium/deps/perl.git' + '@' + '6f3e5028eb65d0b4c5fdd792106ac4c84eee1eb3', @@ -1565,7 +1565,7 @@ 'packages': [ { 'package': 'chromium/third_party/turbine', - 'version': 'n2quuVAecebwosy5EPRjDGSO5EQU94aFRBg_EdrYtpsC', + 'version': 'EIJ2nS3aoQlV-cKpmxr4hNR4E1Qs82brcidjG4A1I5QC', }, ], 'condition': 'checkout_android', @@ -1619,7 +1619,7 @@ Var('chromium_git') + '/external/github.com/gpuweb/cts.git' + '@' + '2a6a882c94af7ca19b2121fc268a7db1ea671df6', 'src/third_party/webrtc': - Var('webrtc_git') + '/src.git' + '@' + '9def99487e3b41a044ae4854ff620b8ff817f10f', + Var('webrtc_git') + '/src.git' + '@' + 'caef2b33b32d0923ae8aa096ea26df0d5b1285be', '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@f1ede5354069a2e5dd24983323ef922501887011', + 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@c38848c1f20148d8959da28f4181e018279a1d89', 'condition': 'checkout_src_internal', }, @@ -1696,7 +1696,7 @@ 'packages': [ { 'package': 'chromeos_internal/apps/help_app/app', - 'version': 'x06QwcnwVL-iaOSkD568uLVdi-GPivQLJPr_KHhWdvYC', + 'version': 'ZHPfsadLUIlNdt7O5wsqnAcOOUAudRB7ow5CRCL1uzkC', }, ], 'condition': 'checkout_chromeos and checkout_src_internal', @@ -1707,7 +1707,7 @@ 'packages': [ { 'package': 'chromeos_internal/apps/media_app/app', - 'version': 'P82ma8QEb13XX0wYJvLZrXvOkJHongqB0KXp0mXE6EMC', + 'version': 'gU29tOOlFGOxiOmH4X9OWGb25gEi1el0FCMiT4uG-DEC', }, ], 'condition': 'checkout_chromeos and checkout_src_internal',
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwZoomTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwZoomTest.java index fb25e176..a7dc882 100644 --- a/android_webview/javatests/src/org/chromium/android_webview/test/AwZoomTest.java +++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwZoomTest.java
@@ -21,7 +21,6 @@ import org.chromium.android_webview.AwSettings; import org.chromium.base.ThreadUtils; import org.chromium.base.test.util.Feature; -import org.chromium.base.test.util.FlakyTest; import java.util.Locale; @@ -169,7 +168,6 @@ @Test @SmallTest @Feature({"AndroidWebView"}) - @FlakyTest(message = "https://crbug.com/1239510") public void testMagnification() throws Throwable { mActivityTestRule.getAwSettingsOnUiThread(mAwContents).setSupportZoom(true); runMagnificationTest(); @@ -180,7 +178,6 @@ @Test @SmallTest @Feature({"AndroidWebView"}) - @FlakyTest(message = "https://crbug.com/1239510") public void testMagnificationWithZoomSupportOff() throws Throwable { mActivityTestRule.getAwSettingsOnUiThread(mAwContents).setSupportZoom(false); runMagnificationTest();
diff --git a/android_webview/tools/system_webview_shell/apk/src/org/chromium/webview_shell/WebViewBrowserActivity.java b/android_webview/tools/system_webview_shell/apk/src/org/chromium/webview_shell/WebViewBrowserActivity.java index 483d9262..6371458 100644 --- a/android_webview/tools/system_webview_shell/apk/src/org/chromium/webview_shell/WebViewBrowserActivity.java +++ b/android_webview/tools/system_webview_shell/apk/src/org/chromium/webview_shell/WebViewBrowserActivity.java
@@ -117,6 +117,7 @@ private View mFullscreenView; private String mWebViewVersion; private boolean mEnableTracing; + private boolean mIsStoppingTracing; // Each time we make a request, store it here with an int key. onRequestPermissionsResult will // look up the request in order to grant the approprate permissions. @@ -196,7 +197,7 @@ } } - private static class TracingLogger extends FileOutputStream { + private class TracingLogger extends FileOutputStream { private long mByteCount; private long mChunkCount; private final Activity mActivity; @@ -217,6 +218,7 @@ public void close() throws IOException { super.close(); showDialog(mByteCount); + mIsStoppingTracing = false; } private void showDialog(long nbBytes) { @@ -587,8 +589,12 @@ @Override public boolean onPrepareOptionsMenu(Menu menu) { - if (WebViewFeature.isFeatureSupported(WebViewFeature.TRACING_CONTROLLER_BASIC_USAGE)) { + if (WebViewFeature.isFeatureSupported(WebViewFeature.TRACING_CONTROLLER_BASIC_USAGE) + && !mIsStoppingTracing) { + menu.findItem(R.id.menu_enable_tracing).setEnabled(true); menu.findItem(R.id.menu_enable_tracing).setChecked(mEnableTracing); + } else { + menu.findItem(R.id.menu_enable_tracing).setEnabled(false); } if (WebViewFeature.isFeatureSupported(WebViewFeature.FORCE_DARK)) { int forceDarkState = WebSettingsCompat.getForceDark(mWebView.getSettings()); @@ -643,6 +649,7 @@ try { tracingController.stop(new TracingLogger(outFileName, this), Executors.newSingleThreadExecutor()); + mIsStoppingTracing = true; } catch (FileNotFoundException e) { throw new RuntimeException(e); }
diff --git a/ash/BUILD.gn b/ash/BUILD.gn index 68eaa66..070c08c4 100644 --- a/ash/BUILD.gn +++ b/ash/BUILD.gn
@@ -1925,6 +1925,7 @@ "//ash/login/resources:resources_grit", "//ash/public/cpp/ambient/proto", "//ash/quick_pair", + "//ash/quick_pair/feature_status_tracker", "//ash/quick_pair/keyed_service", "//ash/quick_pair/repository", "//ash/quick_pair/ui", @@ -2081,6 +2082,7 @@ allow_circular_includes_from = [ "//ash/app_list", "//ash/assistant/ui", + "//ash/quick_pair/feature_status_tracker", "//ash/quick_pair/ui", ]
diff --git a/ash/accelerators/accelerator_controller_impl.cc b/ash/accelerators/accelerator_controller_impl.cc index bb9c7000f..184cc28 100644 --- a/ash/accelerators/accelerator_controller_impl.cc +++ b/ash/accelerators/accelerator_controller_impl.cc
@@ -125,9 +125,9 @@ namespace { -using base::UserMetricsAction; -using chromeos::WindowStateType; -using chromeos::input_method::InputMethodManager; +using ::base::UserMetricsAction; +using ::chromeos::WindowStateType; +using input_method::InputMethodManager; // Toast id and duration for Assistant shortcuts. constexpr char kAssistantErrorToastId[] = "assistant_error";
diff --git a/ash/accelerators/accelerator_controller_impl.h b/ash/accelerators/accelerator_controller_impl.h index 46e9393..25d4689 100644 --- a/ash/accelerators/accelerator_controller_impl.h +++ b/ash/accelerators/accelerator_controller_impl.h
@@ -77,7 +77,7 @@ : public ui::AcceleratorTarget, public AcceleratorController, public SessionObserver, - public chromeos::input_method::InputMethodManager::Observer { + public input_method::InputMethodManager::Observer { public: // Some Chrome OS devices have volume up and volume down buttons on their // side. We want the button that's closer to the top/right to increase the @@ -183,8 +183,8 @@ // SessionObserver overrides: void OnActiveUserPrefServiceChanged(PrefService* pref_service) override; - // chromeos::input_method::InputMethodManager::Observer overrides: - void InputMethodChanged(chromeos::input_method::InputMethodManager* manager, + // input_method::InputMethodManager::Observer overrides: + void InputMethodChanged(input_method::InputMethodManager* manager, Profile* profile, bool show_message) override;
diff --git a/ash/accelerators/accelerator_controller_unittest.cc b/ash/accelerators/accelerator_controller_unittest.cc index b2f71601..c6cd647 100644 --- a/ash/accelerators/accelerator_controller_unittest.cc +++ b/ash/accelerators/accelerator_controller_unittest.cc
@@ -100,13 +100,11 @@ namespace ash { -using ::chromeos::WindowStateType; -using ::chromeos::input_method::InputMethodManager; -using ::chromeos::input_method::MockInputMethodManager; -using media_session::mojom::MediaSessionAction; - namespace { +using ::chromeos::WindowStateType; +using ::media_session::mojom::MediaSessionAction; + struct PrefToAcceleratorEntry { const char* pref_name; // If |notification_id| has been set to nullptr, then no notification is
diff --git a/ash/app_list/views/app_list_bubble_view.cc b/ash/app_list/views/app_list_bubble_view.cc index d9fd70da..8a8deb57d 100644 --- a/ash/app_list/views/app_list_bubble_view.cc +++ b/ash/app_list/views/app_list_bubble_view.cc
@@ -80,6 +80,7 @@ DCHECK(drag_and_drop_host); // Set up rounded corners and background blur, similar to TrayBubbleView. + // Layer color is set in OnThemeChanged(). SetPaintToLayer(ui::LAYER_SOLID_COLOR); layer()->SetRoundedCornerRadius( gfx::RoundedCornersF{kUnifiedTrayCornerRadius});
diff --git a/ash/app_list/views/app_list_bubble_view_unittest.cc b/ash/app_list/views/app_list_bubble_view_unittest.cc index e7e79ca..a42070b 100644 --- a/ash/app_list/views/app_list_bubble_view_unittest.cc +++ b/ash/app_list/views/app_list_bubble_view_unittest.cc
@@ -248,7 +248,8 @@ ShowAppList(); LeftClickOn(GetSearchBoxView()->assistant_button()); - // Assistant not have a background so the blurred launcher is visible. + // Assistant not have a background so the blurred launcher is visible + // underneath the AppListBubbleAssistantPage view. EXPECT_FALSE(GetAssistantPage()->GetBackground()); }
diff --git a/ash/app_list/views/apps_grid_view.cc b/ash/app_list/views/apps_grid_view.cc index 9196511..79f6d4c 100644 --- a/ash/app_list/views/apps_grid_view.cc +++ b/ash/app_list/views/apps_grid_view.cc
@@ -992,9 +992,9 @@ return drag_view_hider_ && drag_view_hider_->drag_view() == view; } -void AppsGridView::CalculateIdealBoundsForFolder() { +void AppsGridView::CalculateIdealBounds() { if (!folder_delegate_) { - CalculateIdealBounds(); + CalculateIdealBoundsForNonFolder(); return; } @@ -1032,7 +1032,7 @@ ConvertPointToTarget(this, items_container_, &visible_origin); visible_bounds.set_origin(visible_origin); - CalculateIdealBoundsForFolder(); + CalculateIdealBounds(); for (int i = 0; i < view_model_.view_size(); ++i) { AppListItemView* view = GetItemViewAt(i); const gfx::Rect& target = view_model_.ideal_bounds(i); @@ -2392,68 +2392,6 @@ return view_structure_.IsValidReorderTargetIndex(index); } -// TODO(crbug.com/1211608): Move to PagedAppsGridView. -void AppsGridView::CalculateIdealBounds() { - DCHECK(!folder_delegate_); - - // |view_structure_| should only be updated at the end of drag. So make a - // copy of it and only change the copy for calculating the ideal bounds of - // each item view. - PagedViewStructure copied_view_structure(this); - // Allow empty pages in the copied view structure so an app list page does - // not get removed when dragging the last item in the page. - copied_view_structure.AllowEmptyPages(); - - { - // Delay page overflow sanitization until both drag view was removed, and - // reorder placeholder was added to the view structure. - std::unique_ptr<PagedViewStructure::ScopedSanitizeLock> sanitize_lock = - copied_view_structure.GetSanitizeLock(); - copied_view_structure.LoadFromOther(view_structure_); - - // Remove the item view being dragged. - if (drag_view_) - copied_view_structure.Remove(drag_view_); - - // Leave a blank space in the grid for the current reorder placeholder. - if (IsValidIndex(reorder_placeholder_)) - copied_view_structure.Add(nullptr, reorder_placeholder_); - } - - // Convert visual index to ideal bounds. - const auto& pages = copied_view_structure.pages(); - int model_index = 0; - for (size_t i = 0; i < pages.size(); ++i) { - auto& page = pages[i]; - for (size_t j = 0; j < page.size(); ++j) { - if (page[j] == nullptr) - continue; - - // Skip the dragged view - if (view_model_.view_at(model_index) == drag_view_) - ++model_index; - - gfx::Rect tile_slot = GetExpectedTileBounds(GridIndex(i, j)); - tile_slot.Offset(CalculateTransitionOffset(i)); - view_model_.set_ideal_bounds(model_index, tile_slot); - ++model_index; - } - } - - // All pulsing blocks come after item views. - GridIndex pulsing_block_index = copied_view_structure.GetLastTargetIndex(); - for (int i = 0; i < pulsing_blocks_model_.view_size(); ++i) { - if (pulsing_block_index.slot == TilesPerPage(pulsing_block_index.page)) { - ++pulsing_block_index.page; - pulsing_block_index.slot = 0; - } - gfx::Rect tile_slot = GetExpectedTileBounds(pulsing_block_index); - tile_slot.Offset(CalculateTransitionOffset(pulsing_block_index.page)); - pulsing_blocks_model_.set_ideal_bounds(i, tile_slot); - ++pulsing_block_index.slot; - } -} - int AppsGridView::GetModelIndexOfItem(const AppListItem* item) const { const auto& entries = view_model_.entries(); const auto iter =
diff --git a/ash/app_list/views/apps_grid_view.h b/ash/app_list/views/apps_grid_view.h index 230fa24..de84d19 100644 --- a/ash/app_list/views/apps_grid_view.h +++ b/ash/app_list/views/apps_grid_view.h
@@ -394,10 +394,10 @@ virtual void SetFocusAfterEndDrag() = 0; // Calculates the item views' bounds for non-folder. - virtual void CalculateIdealBounds(); + virtual void CalculateIdealBoundsForNonFolder() = 0; - // Calculates the item views' bounds for folder. - void CalculateIdealBoundsForFolder(); + // Calculates the item views' bounds for both folder and non-folder. + void CalculateIdealBounds(); // Whether the provided view is hidden to facilitate drag operation (for // example, the drag view for which a drag icon proxy has been created). @@ -433,10 +433,10 @@ bool ignore_layout() const { return ignore_layout_; } views::BoundsAnimator* bounds_animator() { return bounds_animator_.get(); } views::View* items_container() { return items_container_; } - const views::ViewModelT<PulsingBlockView>& pulsing_blocks_model() { + views::ViewModelT<PulsingBlockView>& pulsing_blocks_model() { return pulsing_blocks_model_; } - int reorder_placeholder_slot() const { return reorder_placeholder_.slot; } + GridIndex reorder_placeholder() const { return reorder_placeholder_; } const gfx::Point& last_drag_point() const { return last_drag_point_; } void set_last_drag_point(const gfx::Point& p) { last_drag_point_ = p; } bool handling_keyboard_move() const { return handling_keyboard_move_; }
diff --git a/ash/app_list/views/apps_grid_view_unittest.cc b/ash/app_list/views/apps_grid_view_unittest.cc index 69861285..3517dd4 100644 --- a/ash/app_list/views/apps_grid_view_unittest.cc +++ b/ash/app_list/views/apps_grid_view_unittest.cc
@@ -3068,7 +3068,11 @@ paged_apps_grid_view_); EXPECT_TRUE(paged_apps_grid_view_->cardified_state_for_testing()); - EXPECT_EQ(2, paged_apps_grid_view_->BackgroundCardCountForTesting()); + + const int kExpectedBackgroundCardCount = + features::IsAppListBubbleEnabled() ? 1 : 2; + EXPECT_EQ(kExpectedBackgroundCardCount, + paged_apps_grid_view_->BackgroundCardCountForTesting()); EndDrag(paged_apps_grid_view_, false /*cancel*/); } @@ -3081,7 +3085,11 @@ InitiateDragForItemAtCurrentPageAt(AppsGridView::TOUCH, 0, 0, paged_apps_grid_view_); ASSERT_TRUE(paged_apps_grid_view_->cardified_state_for_testing()); - ASSERT_EQ(3, paged_apps_grid_view_->BackgroundCardCountForTesting()); + + const int kExpectedBackgroundCardCount = + features::IsAppListBubbleEnabled() ? 2 : 3; + ASSERT_EQ(kExpectedBackgroundCardCount, + paged_apps_grid_view_->BackgroundCardCountForTesting()); // Verify that all items in the current page fit within the background card. gfx::Rect background_card_bounds = @@ -3108,7 +3116,8 @@ UpdateDisplay("1024x768/r"); ASSERT_TRUE(paged_apps_grid_view_->cardified_state_for_testing()); - ASSERT_EQ(3, paged_apps_grid_view_->BackgroundCardCountForTesting()); + ASSERT_EQ(kExpectedBackgroundCardCount, + paged_apps_grid_view_->BackgroundCardCountForTesting()); // Verify that all items in the current page fit within the background card. background_card_bounds = @@ -3154,7 +3163,10 @@ paged_apps_grid_view_); ASSERT_TRUE(paged_apps_grid_view_->cardified_state_for_testing()); - ASSERT_EQ(3, paged_apps_grid_view_->BackgroundCardCountForTesting()); + const int kExpectedBackgroundCardCount = + features::IsAppListBubbleEnabled() ? 2 : 3; + ASSERT_EQ(kExpectedBackgroundCardCount, + paged_apps_grid_view_->BackgroundCardCountForTesting()); // Verify that all items in the current page fit within the background card. gfx::Rect background_card_bounds = @@ -3181,7 +3193,8 @@ UpdateDisplay("1024x768/r"); ASSERT_TRUE(paged_apps_grid_view_->cardified_state_for_testing()); - ASSERT_EQ(3, paged_apps_grid_view_->BackgroundCardCountForTesting()); + ASSERT_EQ(kExpectedBackgroundCardCount, + paged_apps_grid_view_->BackgroundCardCountForTesting()); // Verify that all items in the current page fit within the background card. background_card_bounds =
diff --git a/ash/app_list/views/assistant/assistant_page_view.cc b/ash/app_list/views/assistant/assistant_page_view.cc index cbc7106..dba5a22 100644 --- a/ash/app_list/views/assistant/assistant_page_view.cc +++ b/ash/app_list/views/assistant/assistant_page_view.cc
@@ -19,9 +19,11 @@ #include "ash/assistant/ui/colors/assistant_colors.h" #include "ash/assistant/ui/colors/assistant_colors_util.h" #include "ash/assistant/util/assistant_util.h" +#include "ash/constants/ash_features.h" #include "ash/public/cpp/app_list/app_list_config.h" #include "ash/public/cpp/assistant/assistant_state.h" #include "ash/public/cpp/assistant/controller/assistant_ui_controller.h" +#include "ash/public/cpp/style/color_provider.h" #include "ash/public/cpp/view_shadow.h" #include "ash/search_box/search_box_constants.h" #include "ash/strings/grit/ash_strings.h" @@ -33,6 +35,7 @@ #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/compositor/animation_throughput_reporter.h" #include "ui/compositor/layer.h" +#include "ui/compositor/layer_type.h" #include "ui/compositor/scoped_layer_animation_settings.h" #include "ui/compositor_extra/shadow.h" #include "ui/views/background.h" @@ -288,7 +291,8 @@ settings->GetAnimator(), metrics_util::ForSmoothness(base::BindRepeating([](int value) { base::UmaHistogramPercentageObsoleteDoNotUse( - assistant::ui::kAssistantResizePageViewHistogram, value); + "Ash.Assistant.AnimationSmoothness.ResizeAssistantPageView", + value); }))); layer()->SetClipRect(gfx::Rect(to_rect.size())); @@ -429,24 +433,37 @@ void AssistantPageView::OnThemeChanged() { views::View::OnThemeChanged(); - background()->SetNativeControlColor(ash::assistant::ResolveAssistantColor( - assistant_colors::ColorName::kBgAssistantPlate)); + if (features::IsAppListBubbleEnabled()) { + layer()->SetColor(ColorProvider::Get()->GetBaseLayerColor( + ColorProvider::BaseLayerType::kTransparent80)); + } else { + background()->SetNativeControlColor(ash::assistant::ResolveAssistantColor( + assistant_colors::ColorName::kBgAssistantPlate)); - // Changing color of a background object doesn't trigger a paint. - SchedulePaint(); + // Changing color of a background object doesn't trigger a paint. + SchedulePaint(); + } } void AssistantPageView::InitLayout() { - SetPaintToLayer(); - layer()->SetFillsBoundsOpaquely(false); + if (features::IsAppListBubbleEnabled()) { + // Use a solid color layer with blur. The color is set in OnThemeChanged(). + SetPaintToLayer(ui::LAYER_SOLID_COLOR); + layer()->SetFillsBoundsOpaquely(false); + layer()->SetBackgroundBlur(ColorProvider::kBackgroundBlurSigma); + layer()->SetBackdropFilterQuality(ColorProvider::kBackgroundBlurQuality); + } else { + SetPaintToLayer(); + layer()->SetFillsBoundsOpaquely(false); + SetBackground( + views::CreateSolidBackground(ash::assistant::ResolveAssistantColor( + assistant_colors::ColorName::kBgAssistantPlate))); + } view_shadow_ = std::make_unique<ViewShadow>(this, kShadowElevation); view_shadow_->SetRoundedCornerRadius( kSearchBoxBorderCornerRadiusSearchResult); - SetBackground( - views::CreateSolidBackground(ash::assistant::ResolveAssistantColor( - assistant_colors::ColorName::kBgAssistantPlate))); SetLayoutManager(std::make_unique<AssistantPageViewLayout>(this)); // |assistant_view_delegate_| could be nullptr in test.
diff --git a/ash/app_list/views/assistant/assistant_page_view_unittest.cc b/ash/app_list/views/assistant/assistant_page_view_unittest.cc index 1db2b46..43127ff 100644 --- a/ash/app_list/views/assistant/assistant_page_view_unittest.cc +++ b/ash/app_list/views/assistant/assistant_page_view_unittest.cc
@@ -22,6 +22,7 @@ #include "chromeos/services/assistant/public/cpp/assistant_service.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/skia/include/core/SkColor.h" +#include "ui/compositor/layer.h" #include "ui/compositor/scoped_animation_duration_scale_mode.h" #include "ui/events/event.h" #include "ui/views/background.h" @@ -942,12 +943,48 @@ /*is_dark_mode=*/true, /*use_debug_colors=*/false)); } -TEST_F(AssistantPageBubbleTest, AppListBubbleDoesNotHaveAssistantBackground) { +// AppListBubble only uses AssistantPageView in tablet mode. Clamshell mode uses +// AppListBubbleAssistantPage, which is tested in +// AppListBubbleViewTest.AssistantPageDoesNotHaveBackground. +TEST_F(AssistantPageBubbleTest, PageViewHasBackgroundBlurInTabletMode) { ASSERT_TRUE(features::IsAppListBubbleEnabled()); + SetTabletMode(true); ShowAssistantUi(); EXPECT_FALSE(page_view()->background()); + ui::Layer* page_view_layer = page_view()->layer(); + ASSERT_TRUE(page_view_layer); + EXPECT_FALSE(page_view_layer->fills_bounds_opaquely()); + EXPECT_EQ(page_view_layer->background_blur(), + ColorProvider::kBackgroundBlurSigma); + EXPECT_EQ(page_view_layer->GetTargetColor(), + ColorProvider::Get()->GetBaseLayerColor( + ColorProvider::BaseLayerType::kTransparent80)); +} + +TEST_F(AssistantPageBubbleTest, BackgroundColorInDarkLightMode) { + ASSERT_TRUE(features::IsAppListBubbleEnabled()); + + base::test::ScopedFeatureList scoped_feature_list(features::kDarkLightMode); + AshColorProvider::Get()->OnActiveUserPrefServiceChanged( + Shell::Get()->session_controller()->GetActivePrefService()); + ASSERT_FALSE(ColorProvider::Get()->IsDarkModeEnabled()); + + SetTabletMode(true); + ShowAssistantUi(); + + EXPECT_EQ(page_view()->layer()->GetTargetColor(), + ColorProvider::Get()->GetBaseLayerColor( + ColorProvider::BaseLayerType::kTransparent80)); + + Shell::Get()->session_controller()->GetActivePrefService()->SetBoolean( + prefs::kDarkModeEnabled, true); + ASSERT_TRUE(ColorProvider::Get()->IsDarkModeEnabled()); + + EXPECT_EQ(page_view()->layer()->GetTargetColor(), + ColorProvider::Get()->GetBaseLayerColor( + ColorProvider::BaseLayerType::kTransparent80)); } //------------------------------------------------------------------------------
diff --git a/ash/app_list/views/paged_apps_grid_view.cc b/ash/app_list/views/paged_apps_grid_view.cc index 79dc2ac6..0fdbb14 100644 --- a/ash/app_list/views/paged_apps_grid_view.cc +++ b/ash/app_list/views/paged_apps_grid_view.cc
@@ -482,7 +482,7 @@ if (fadeout_layer_delegate_) fadeout_layer_delegate_->layer()->SetBounds(layer()->bounds()); - CalculateIdealBoundsForFolder(); + CalculateIdealBounds(); for (int i = 0; i < view_model()->view_size(); ++i) { AppListItemView* view = GetItemViewAt(i); view->SetBoundsRect(view_model()->ideal_bounds(i)); @@ -589,6 +589,67 @@ // highlight that item. } +void PagedAppsGridView::CalculateIdealBoundsForNonFolder() { + DCHECK(!IsInFolder()); + + // |view_structure_| should only be updated at the end of drag. So make a + // copy of it and only change the copy for calculating the ideal bounds of + // each item view. + PagedViewStructure copied_view_structure(this); + // Allow empty pages in the copied view structure so an app list page does + // not get removed when dragging the last item in the page. + copied_view_structure.AllowEmptyPages(); + + { + // Delay page overflow sanitization until both drag view was removed, and + // reorder placeholder was added to the view structure. + std::unique_ptr<PagedViewStructure::ScopedSanitizeLock> sanitize_lock = + copied_view_structure.GetSanitizeLock(); + copied_view_structure.LoadFromOther(view_structure_); + + // Remove the item view being dragged. + if (drag_view_) + copied_view_structure.Remove(drag_view_); + + // Leave a blank space in the grid for the current reorder placeholder. + if (IsValidIndex(reorder_placeholder())) + copied_view_structure.Add(nullptr, reorder_placeholder()); + } + + // Convert visual index to ideal bounds. + const auto& pages = copied_view_structure.pages(); + int model_index = 0; + for (size_t i = 0; i < pages.size(); ++i) { + auto& page = pages[i]; + for (size_t j = 0; j < page.size(); ++j) { + if (page[j] == nullptr) + continue; + + // Skip the dragged view + if (view_model()->view_at(model_index) == drag_view_) + ++model_index; + + gfx::Rect tile_slot = GetExpectedTileBounds(GridIndex(i, j)); + tile_slot.Offset(CalculateTransitionOffset(i)); + view_model()->set_ideal_bounds(model_index, tile_slot); + ++model_index; + } + } + + // All pulsing blocks come after item views. + GridIndex pulsing_block_index = copied_view_structure.GetLastTargetIndex(); + for (int i = 0; i < pulsing_blocks_model().view_size(); ++i) { + if (pulsing_block_index.slot == TilesPerPage(pulsing_block_index.page)) { + ++pulsing_block_index.page; + pulsing_block_index.slot = 0; + } + gfx::Rect tile_slot = GetExpectedTileBounds(pulsing_block_index); + tile_slot.Offset(CalculateTransitionOffset(pulsing_block_index.page)); + pulsing_blocks_model().set_ideal_bounds(i, tile_slot); + ++pulsing_block_index.slot; + } +} + void PagedAppsGridView::RecordAppMovingTypeMetrics(AppListAppMovingType type) { UMA_HISTOGRAM_ENUMERATION("Apps.AppListAppMovingType", type, kMaxAppListAppMovingType); @@ -974,9 +1035,11 @@ RemoveAllBackgroundCards(); // Calculate background bounds for a normal grid so it animates from the // normal to the cardified bounds with the icons. - // Add an extra card for the peeking page in the last page. This hints users - // that apps can be dragged past the last existing page. - for (int i = 0; i < pagination_model_.total_pages() + 1; i++) + // Add an extra card for the peeking page in the last page if item drag is + // allowed to create new pages. This hints users that apps can be dragged past + // the last existing page. + const int peeking_card_count = features::IsAppListBubbleEnabled() ? 0 : 1; + for (int i = 0; i < pagination_model_.total_pages() + peeking_card_count; i++) AppendBackgroundCard(); cardified_state_ = true; UpdateTilePadding(); @@ -1010,7 +1073,7 @@ GetWidget()->LayoutRootViewIfNecessary(); } - CalculateIdealBounds(); + CalculateIdealBoundsForNonFolder(); // Cache the current item container position, as RecenterItemsContainer() may // change it. gfx::Point start_position = items_container()->origin();
diff --git a/ash/app_list/views/paged_apps_grid_view.h b/ash/app_list/views/paged_apps_grid_view.h index b0e24d8e51..84233391 100644 --- a/ash/app_list/views/paged_apps_grid_view.h +++ b/ash/app_list/views/paged_apps_grid_view.h
@@ -104,6 +104,7 @@ void HandleScrollFromAppListView(const gfx::Vector2d& offset, ui::EventType type) override; void SetFocusAfterEndDrag() override; + void CalculateIdealBoundsForNonFolder() override; void RecordAppMovingTypeMetrics(AppListAppMovingType type) override; int TilesPerPage(int page) const override; void UpdatePaging() override;
diff --git a/ash/app_list/views/scrollable_apps_grid_view.cc b/ash/app_list/views/scrollable_apps_grid_view.cc index 92410fa..c9fb714 100644 --- a/ash/app_list/views/scrollable_apps_grid_view.cc +++ b/ash/app_list/views/scrollable_apps_grid_view.cc
@@ -82,7 +82,7 @@ // TODO(crbug.com/1211608): Use FillLayout on the items container. items_container()->SetBoundsRect(GetContentsBounds()); - CalculateIdealBoundsForFolder(); + CalculateIdealBounds(); for (int i = 0; i < view_model()->view_size(); ++i) { AppListItemView* view = GetItemViewAt(i); view->SetBoundsRect(view_model()->ideal_bounds(i)); @@ -138,14 +138,14 @@ return true; } -void ScrollableAppsGridView::CalculateIdealBounds() { +void ScrollableAppsGridView::CalculateIdealBoundsForNonFolder() { DCHECK(!IsInFolder()); int grid_index = 0; int model_index = 0; for (const auto& entry : view_model()->entries()) { views::View* view = entry.view; - if (grid_index == reorder_placeholder_slot()) { + if (grid_index == reorder_placeholder().slot) { // Create space by incrementing the grid index. ++grid_index; }
diff --git a/ash/app_list/views/scrollable_apps_grid_view.h b/ash/app_list/views/scrollable_apps_grid_view.h index a604cb96..9bb080f 100644 --- a/ash/app_list/views/scrollable_apps_grid_view.h +++ b/ash/app_list/views/scrollable_apps_grid_view.h
@@ -50,7 +50,7 @@ int GetTotalPages() const override; int GetSelectedPage() const override; bool IsScrollAxisVertical() const override; - void CalculateIdealBounds() override; + void CalculateIdealBoundsForNonFolder() override; bool MaybeAutoScroll() override; void StopAutoScroll() override; void HandleScrollFromAppListView(const gfx::Vector2d& offset,
diff --git a/ash/app_list/views/search_result_tile_item_view.cc b/ash/app_list/views/search_result_tile_item_view.cc index 3c172651..9d72632 100644 --- a/ash/app_list/views/search_result_tile_item_view.cc +++ b/ash/app_list/views/search_result_tile_item_view.cc
@@ -435,7 +435,7 @@ } gfx::ImageSkia badge_icon_skia = - views::GetImageSkiaFromImageModel(badge_icon, GetNativeTheme()); + views::GetImageSkiaFromImageModel(badge_icon, GetColorProvider()); if (use_badge_icon_background) { badge_icon_skia =
diff --git a/ash/app_list/views/search_result_view.cc b/ash/app_list/views/search_result_view.cc index d16e09e..143af81 100644 --- a/ash/app_list/views/search_result_view.cc +++ b/ash/app_list/views/search_result_view.cc
@@ -562,7 +562,7 @@ if (result() && !result()->badge_icon().IsEmpty()) { const ui::ImageModel& badge_icon = result()->badge_icon(); gfx::ImageSkia badge_icon_skia = - views::GetImageSkiaFromImageModel(badge_icon, GetNativeTheme()); + views::GetImageSkiaFromImageModel(badge_icon, GetColorProvider()); if (result()->use_badge_icon_background()) badge_icon_skia =
diff --git a/ash/assistant/ui/assistant_ui_constants.h b/ash/assistant/ui/assistant_ui_constants.h index 81cc541a..d0fc3a3 100644 --- a/ash/assistant/ui/assistant_ui_constants.h +++ b/ash/assistant/ui/assistant_ui_constants.h
@@ -44,16 +44,6 @@ // The maximum number of user sessions in which to show Assistant onboarding. constexpr int kOnboardingMaxSessionsShown = 3; -// Histogram names for measuring animation performance. -constexpr char kAssistantCardElementHistogram[] = - "Ash.Assistant.AnimationSmoothness.CardElement"; -constexpr char kAssistantTextElementHistogram[] = - "Ash.Assistant.AnimationSmoothness.TextElement"; -constexpr char kAssistantResizePageViewHistogram[] = - "Ash.Assistant.AnimationSmoothness.ResizeAssistantPageView"; -constexpr char kAssistantSuggestionChipHistogram[] = - "Ash.Assistant.AnimationSmoothness.SuggestionChip"; - } // namespace ui } // namespace assistant
diff --git a/ash/assistant/ui/main_stage/assistant_card_element_view.cc b/ash/assistant/ui/main_stage/assistant_card_element_view.cc index aa42defe..b5bc775 100644 --- a/ash/assistant/ui/main_stage/assistant_card_element_view.cc +++ b/ash/assistant/ui/main_stage/assistant_card_element_view.cc
@@ -29,6 +29,9 @@ using assistant::util::DeepLinkParam; using assistant::util::DeepLinkType; +constexpr char kAssistantCardElementHistogram[] = + "Ash.Assistant.AnimationSmoothness.CardElement"; + // Helpers --------------------------------------------------------------------- void CreateAndSendMouseClick(aura::WindowTreeHost* host, @@ -198,7 +201,7 @@ std::unique_ptr<ElementAnimator> AssistantCardElementView::CreateAnimator() { return std::make_unique<AssistantUiElementViewAnimator>( - this, assistant::ui::kAssistantCardElementHistogram); + this, kAssistantCardElementHistogram); } } // namespace ash
diff --git a/ash/assistant/ui/main_stage/assistant_text_element_view.cc b/ash/assistant/ui/main_stage/assistant_text_element_view.cc index f2e5216..a032c87 100644 --- a/ash/assistant/ui/main_stage/assistant_text_element_view.cc +++ b/ash/assistant/ui/main_stage/assistant_text_element_view.cc
@@ -19,6 +19,13 @@ namespace ash { +namespace { + +constexpr char kAssistantTextElementHistogram[] = + "Ash.Assistant.AnimationSmoothness.TextElement"; + +} // namespace + // AssistantTextElementView ---------------------------------------------------- AssistantTextElementView::AssistantTextElementView( @@ -69,7 +76,7 @@ std::unique_ptr<ElementAnimator> AssistantTextElementView::CreateAnimator() { return std::make_unique<AssistantUiElementViewAnimator>( - this, assistant::ui::kAssistantTextElementHistogram); + this, kAssistantTextElementHistogram); } void AssistantTextElementView::OnThemeChanged() {
diff --git a/ash/assistant/ui/main_stage/suggestion_container_view.cc b/ash/assistant/ui/main_stage/suggestion_container_view.cc index 4799921..dbbcac7 100644 --- a/ash/assistant/ui/main_stage/suggestion_container_view.cc +++ b/ash/assistant/ui/main_stage/suggestion_container_view.cc
@@ -46,6 +46,10 @@ // Appearance. constexpr int kPreferredHeightDip = 48; +// Metrics. +constexpr char kAssistantSuggestionChipHistogram[] = + "Ash.Assistant.AnimationSmoothness.SuggestionChip"; + } // namespace // SuggestionChipAnimator ----------------------------------------------------- @@ -66,7 +70,7 @@ layer()->GetAnimator(), CreateAnimateInAnimation(), observer, base::BindRepeating<void(const std::string&, int)>( base::UmaHistogramPercentageObsoleteDoNotUse, - assistant::ui::kAssistantSuggestionChipHistogram)); + kAssistantSuggestionChipHistogram)); } void AnimateOut(ui::CallbackLayerAnimationObserver* observer) override { @@ -74,7 +78,7 @@ layer()->GetAnimator(), CreateAnimateOutAnimation(), observer, base::BindRepeating<void(const std::string&, int)>( base::UmaHistogramPercentageObsoleteDoNotUse, - assistant::ui::kAssistantSuggestionChipHistogram)); + kAssistantSuggestionChipHistogram)); } void FadeOut(ui::CallbackLayerAnimationObserver* observer) override {
diff --git a/ash/events/accessibility_event_rewriter.cc b/ash/events/accessibility_event_rewriter.cc index 5d6ddb6..d170b9f 100644 --- a/ash/events/accessibility_event_rewriter.cc +++ b/ash/events/accessibility_event_rewriter.cc
@@ -329,7 +329,7 @@ } void AccessibilityEventRewriter::InputMethodChanged( - chromeos::input_method::InputMethodManager* manager, + input_method::InputMethodManager* manager, Profile* profile, bool show_message) { try_rewriting_positional_keys_for_chromevox_ =
diff --git a/ash/events/accessibility_event_rewriter.h b/ash/events/accessibility_event_rewriter.h index 5c81d8c..a1a4472 100644 --- a/ash/events/accessibility_event_rewriter.h +++ b/ash/events/accessibility_event_rewriter.h
@@ -30,7 +30,7 @@ // extension is enabled. Continues dispatch of unhandled key events. class ASH_EXPORT AccessibilityEventRewriter : public ui::EventRewriter, - public chromeos::input_method::InputMethodManager::Observer { + public input_method::InputMethodManager::Observer { public: AccessibilityEventRewriter(ui::EventRewriterChromeOS* event_rewriter_chromeos, AccessibilityEventRewriterDelegate* delegate); @@ -91,8 +91,8 @@ const ui::Event& event, const Continuation continuation) override; - // chromeos::input_method::InputMethodManager::Observer: - void InputMethodChanged(chromeos::input_method::InputMethodManager* manager, + // input_method::InputMethodManager::Observer: + void InputMethodChanged(input_method::InputMethodManager* manager, Profile* profile, bool show_message) override; @@ -127,8 +127,8 @@ bool try_rewriting_positional_keys_for_chromevox_ = true; // Used to monitor input method changes. - base::ScopedObservation<chromeos::input_method::InputMethodManager, - chromeos::input_method::InputMethodManager::Observer> + base::ScopedObservation<input_method::InputMethodManager, + input_method::InputMethodManager::Observer> observation_{this}; };
diff --git a/ash/events/accessibility_event_rewriter_unittest.cc b/ash/events/accessibility_event_rewriter_unittest.cc index ebab215..356e9f89 100644 --- a/ash/events/accessibility_event_rewriter_unittest.cc +++ b/ash/events/accessibility_event_rewriter_unittest.cc
@@ -167,7 +167,7 @@ std::unique_ptr<AccessibilityEventRewriter> accessibility_event_rewriter_; - chromeos::input_method::FakeImeKeyboard fake_ime_keyboard_; + input_method::FakeImeKeyboard fake_ime_keyboard_; std::unique_ptr<ui::EventRewriterChromeOS> event_rewriter_chromeos_; private: @@ -560,7 +560,7 @@ EventCapturer event_capturer_; AccessibilityControllerImpl* controller_ = nullptr; std::unique_ptr<SwitchAccessTestDelegate> delegate_; - chromeos::input_method::FakeImeKeyboard fake_ime_keyboard_; + input_method::FakeImeKeyboard fake_ime_keyboard_; std::unique_ptr<AccessibilityEventRewriter> accessibility_event_rewriter_; std::unique_ptr<ui::EventRewriterChromeOS> event_rewriter_chromeos_; }; @@ -812,7 +812,7 @@ EventCapturer event_capturer_; AccessibilityControllerImpl* controller_ = nullptr; std::unique_ptr<MagnifierTestDelegate> delegate_; - chromeos::input_method::FakeImeKeyboard fake_ime_keyboard_; + input_method::FakeImeKeyboard fake_ime_keyboard_; std::unique_ptr<AccessibilityEventRewriter> accessibility_event_rewriter_; std::unique_ptr<ui::EventRewriterChromeOS> event_rewriter_chromeos_; };
diff --git a/ash/ime/ime_controller_impl.cc b/ash/ime/ime_controller_impl.cc index 9107ad2..e085b41 100644 --- a/ash/ime/ime_controller_impl.cc +++ b/ash/ime/ime_controller_impl.cc
@@ -245,13 +245,12 @@ client_->SetCapsLockEnabled(caps_enabled); } -void ImeControllerImpl::OverrideKeyboardKeyset( - chromeos::input_method::ImeKeyset keyset) { +void ImeControllerImpl::OverrideKeyboardKeyset(input_method::ImeKeyset keyset) { OverrideKeyboardKeyset(keyset, base::DoNothing()); } void ImeControllerImpl::OverrideKeyboardKeyset( - chromeos::input_method::ImeKeyset keyset, + input_method::ImeKeyset keyset, ImeControllerClient::OverrideKeyboardKeysetCallback callback) { if (client_) client_->OverrideKeyboardKeyset(keyset, std::move(callback)); @@ -265,7 +264,7 @@ const ui::Accelerator& accelerator) const { std::vector<std::string> candidate_ids; - using chromeos::extension_ime_util::GetInputMethodIDByEngineID; + using extension_ime_util::GetInputMethodIDByEngineID; std::vector<std::string> input_method_ids_to_switch; switch (accelerator.key_code()) { case ui::VKEY_CONVERT: // Henkan key on JP106 keyboard
diff --git a/ash/ime/ime_controller_impl.h b/ash/ime/ime_controller_impl.h index 74392161..5af9062 100644 --- a/ash/ime/ime_controller_impl.h +++ b/ash/ime/ime_controller_impl.h
@@ -87,9 +87,9 @@ void SwitchImeById(const std::string& ime_id, bool show_message); void ActivateImeMenuItem(const std::string& key); void SetCapsLockEnabled(bool caps_enabled); - void OverrideKeyboardKeyset(chromeos::input_method::ImeKeyset keyset); + void OverrideKeyboardKeyset(input_method::ImeKeyset keyset); void OverrideKeyboardKeyset( - chromeos::input_method::ImeKeyset keyset, + input_method::ImeKeyset keyset, ImeControllerClient::OverrideKeyboardKeysetCallback callback); // Returns true if the switch is allowed and the keystroke should be
diff --git a/ash/ime/ime_controller_impl_unittest.cc b/ash/ime/ime_controller_impl_unittest.cc index 48195056..c22a719 100644 --- a/ash/ime/ime_controller_impl_unittest.cc +++ b/ash/ime/ime_controller_impl_unittest.cc
@@ -247,7 +247,7 @@ EXPECT_FALSE(controller->CanSwitchImeWithAccelerator(wide_half_2)); // Install both a test IME and Japanese IMEs. - using chromeos::extension_ime_util::GetInputMethodIDByEngineID; + using extension_ime_util::GetInputMethodIDByEngineID; const std::string nacl_mozc_jp = GetInputMethodIDByEngineID("nacl_mozc_jp"); const std::string xkb_jp_jpn = GetInputMethodIDByEngineID("xkb:jp::jpn"); RefreshImes("ime1", {"ime1", nacl_mozc_jp, xkb_jp_jpn});
diff --git a/ash/ime/test_ime_controller_client.cc b/ash/ime/test_ime_controller_client.cc index d44e5bf9..e627d2a4 100644 --- a/ash/ime/test_ime_controller_client.cc +++ b/ash/ime/test_ime_controller_client.cc
@@ -36,7 +36,7 @@ } void TestImeControllerClient::OverrideKeyboardKeyset( - chromeos::input_method::ImeKeyset keyset, + input_method::ImeKeyset keyset, OverrideKeyboardKeysetCallback callback) { last_keyset_ = keyset; std::move(callback).Run();
diff --git a/ash/ime/test_ime_controller_client.h b/ash/ime/test_ime_controller_client.h index e7f64e3..dfefcf8 100644 --- a/ash/ime/test_ime_controller_client.h +++ b/ash/ime/test_ime_controller_client.h
@@ -25,7 +25,7 @@ void SwitchImeById(const std::string& id, bool show_message) override; void ActivateImeMenuItem(const std::string& key) override; void SetCapsLockEnabled(bool enabled) override; - void OverrideKeyboardKeyset(chromeos::input_method::ImeKeyset keyset, + void OverrideKeyboardKeyset(input_method::ImeKeyset keyset, OverrideKeyboardKeysetCallback callback) override; void UpdateMirroringState(bool enabled) override; void UpdateCastingState(bool enabled) override; @@ -37,8 +37,7 @@ int set_caps_lock_count_ = 0; std::string last_switch_ime_id_; bool last_show_message_ = false; - chromeos::input_method::ImeKeyset last_keyset_ = - chromeos::input_method::ImeKeyset::kNone; + input_method::ImeKeyset last_keyset_ = input_method::ImeKeyset::kNone; bool is_mirroring_ = false; bool is_casting_ = false; int show_mode_indicator_count_ = 0;
diff --git a/ash/keyboard/virtual_keyboard_controller.cc b/ash/keyboard/virtual_keyboard_controller.cc index 3a1ebd22..8def11e 100644 --- a/ash/keyboard/virtual_keyboard_controller.cc +++ b/ash/keyboard/virtual_keyboard_controller.cc
@@ -40,7 +40,7 @@ // extension from accidentally loading the default keyset while it's // shutting down. See https://crbug.com/875456. Shell::Get()->ime_controller()->OverrideKeyboardKeyset( - chromeos::input_method::ImeKeyset::kNone); + input_method::ImeKeyset::kNone); } } @@ -61,11 +61,11 @@ chromeos::features::kImeSystemEmojiPicker)) { ui::SetShowEmojiKeyboardCallback(base::BindRepeating( &VirtualKeyboardController::ForceShowKeyboardWithKeyset, - base::Unretained(this), chromeos::input_method::ImeKeyset::kEmoji)); + base::Unretained(this), input_method::ImeKeyset::kEmoji)); } ui::SetTabletModeShowEmojiKeyboardCallback(base::BindRepeating( &VirtualKeyboardController::ForceShowKeyboardWithKeyset, - base::Unretained(this), chromeos::input_method::ImeKeyset::kEmoji)); + base::Unretained(this), input_method::ImeKeyset::kEmoji)); keyboard::KeyboardUIController::Get()->AddObserver(this); bluetooth_devices_observer_ = @@ -88,7 +88,7 @@ } void VirtualKeyboardController::ForceShowKeyboardWithKeyset( - chromeos::input_method::ImeKeyset keyset) { + input_method::ImeKeyset keyset) { Shell::Get()->ime_controller()->OverrideKeyboardKeyset( keyset, base::BindOnce(&VirtualKeyboardController::ForceShowKeyboard, base::Unretained(this))); @@ -171,7 +171,7 @@ // TODO(shend/shuchen): Consider moving this logic to ImeController. // https://crbug.com/896284. Shell::Get()->ime_controller()->OverrideKeyboardKeyset( - chromeos::input_method::ImeKeyset::kNone); + input_method::ImeKeyset::kNone); } }
diff --git a/ash/keyboard/virtual_keyboard_controller.h b/ash/keyboard/virtual_keyboard_controller.h index 849cbef..01b5e80 100644 --- a/ash/keyboard/virtual_keyboard_controller.h +++ b/ash/keyboard/virtual_keyboard_controller.h
@@ -38,7 +38,7 @@ // Force enable the keyboard and show it with the given keyset: none, emoji, // handwriting or voice. Works even in laptop mode. - void ForceShowKeyboardWithKeyset(chromeos::input_method::ImeKeyset keyset); + void ForceShowKeyboardWithKeyset(input_method::ImeKeyset keyset); // TabletModeObserver: void OnTabletModeEventsBlockingChanged() override;
diff --git a/ash/keyboard/virtual_keyboard_controller_unittest.cc b/ash/keyboard/virtual_keyboard_controller_unittest.cc index d37befb..a0f307b 100644 --- a/ash/keyboard/virtual_keyboard_controller_unittest.cc +++ b/ash/keyboard/virtual_keyboard_controller_unittest.cc
@@ -102,11 +102,11 @@ // Should show the keyboard without messing with accessibility prefs. GetVirtualKeyboardController()->ForceShowKeyboardWithKeyset( - chromeos::input_method::ImeKeyset::kEmoji); + input_method::ImeKeyset::kEmoji); EXPECT_TRUE(accessibility_controller->virtual_keyboard().enabled()); // Keyset should be emoji. - EXPECT_EQ(chromeos::input_method::ImeKeyset::kEmoji, client.last_keyset_); + EXPECT_EQ(input_method::ImeKeyset::kEmoji, client.last_keyset_); // Simulate the keyboard hiding. if (keyboard_ui_controller()->HasObserver(GetVirtualKeyboardController())) { @@ -122,7 +122,7 @@ accessibility_controller->virtual_keyboard().SetEnabled(false); // Keyset should be reset to none. - EXPECT_EQ(chromeos::input_method::ImeKeyset::kNone, client.last_keyset_); + EXPECT_EQ(input_method::ImeKeyset::kNone, client.last_keyset_); Shell::Get()->ime_controller()->SetClient(nullptr); } @@ -139,14 +139,14 @@ KeyboardEnableFlag::kShelfEnabled)); GetVirtualKeyboardController()->ForceShowKeyboardWithKeyset( - chromeos::input_method::ImeKeyset::kEmoji); + input_method::ImeKeyset::kEmoji); EXPECT_TRUE(keyboard_ui_controller()->IsEnableFlagSet( KeyboardEnableFlag::kShelfEnabled)); EXPECT_TRUE(keyboard_ui_controller()->IsEnabled()); // Keyset should be emoji. - EXPECT_EQ(chromeos::input_method::ImeKeyset::kEmoji, client.last_keyset_); + EXPECT_EQ(input_method::ImeKeyset::kEmoji, client.last_keyset_); // Simulate the keyboard hiding. if (keyboard_ui_controller()->HasObserver(GetVirtualKeyboardController())) { @@ -161,7 +161,7 @@ KeyboardEnableFlag::kShelfEnabled)); // Keyset should be reset to none. - EXPECT_EQ(chromeos::input_method::ImeKeyset::kNone, client.last_keyset_); + EXPECT_EQ(input_method::ImeKeyset::kNone, client.last_keyset_); } TEST_F(VirtualKeyboardControllerTest, @@ -172,14 +172,14 @@ // Should show the keyboard by enabling it temporarily. GetVirtualKeyboardController()->ForceShowKeyboardWithKeyset( - chromeos::input_method::ImeKeyset::kEmoji); + input_method::ImeKeyset::kEmoji); EXPECT_TRUE(keyboard_ui_controller()->IsEnableFlagSet( KeyboardEnableFlag::kShelfEnabled)); EXPECT_TRUE(keyboard_ui_controller()->IsEnabled()); // Keyset should be emoji. - EXPECT_EQ(chromeos::input_method::ImeKeyset::kEmoji, client.last_keyset_); + EXPECT_EQ(input_method::ImeKeyset::kEmoji, client.last_keyset_); // Simulate the keyboard hiding temporarily. if (keyboard_ui_controller()->HasObserver(GetVirtualKeyboardController())) { @@ -194,7 +194,7 @@ EXPECT_TRUE(keyboard_ui_controller()->IsEnabled()); // Keyset should still be emoji. - EXPECT_EQ(chromeos::input_method::ImeKeyset::kEmoji, client.last_keyset_); + EXPECT_EQ(input_method::ImeKeyset::kEmoji, client.last_keyset_); } class VirtualKeyboardControllerAutoTest : public VirtualKeyboardControllerTest,
diff --git a/ash/public/cpp/app_list/app_list_features.cc b/ash/public/cpp/app_list/app_list_features.cc index e77bede..148d251a 100644 --- a/ash/public/cpp/app_list/app_list_features.cc +++ b/ash/public/cpp/app_list/app_list_features.cc
@@ -4,6 +4,7 @@ #include "ash/public/cpp/app_list/app_list_features.h" +#include "ash/constants/ash_features.h" #include "ash/public/cpp/app_list/app_list_switches.h" #include "base/feature_list.h" #include "base/metrics/field_trial_params.h" @@ -131,7 +132,9 @@ } bool IsCategoricalSearchEnabled() { - return base::FeatureList::IsEnabled(kCategoricalSearch); + // Force categorical search for the latest version of the launcher. + return ash::features::IsAppListBubbleEnabled() || + base::FeatureList::IsEnabled(kCategoricalSearch); } bool IsLauncherQueryHighlightingEnabled() {
diff --git a/ash/public/cpp/ime_controller_client.h b/ash/public/cpp/ime_controller_client.h index 485e485..2fdf4e0 100644 --- a/ash/public/cpp/ime_controller_client.h +++ b/ash/public/cpp/ime_controller_client.h
@@ -26,7 +26,7 @@ // Switches to an input method by |id|. Does nothing if the input method is // not installed. The ID is usually the output of a call like - // chromeos::extension_ime_util::GetInputMethodIDByEngineID("xkb:jp::jpn"), + // extension_ime_util::GetInputMethodIDByEngineID("xkb:jp::jpn"), // see that function for details. Shows a bubble with the input method short // name when |show_message| is true. virtual void SwitchImeById(const std::string& id, bool show_message) = 0; @@ -57,7 +57,7 @@ // any code that needs the keyset to be updated first must use the callback. using OverrideKeyboardKeysetCallback = base::OnceCallback<void()>; virtual void OverrideKeyboardKeyset( - chromeos::input_method::ImeKeyset keyset, + input_method::ImeKeyset keyset, OverrideKeyboardKeysetCallback callback) = 0; // Show the current mode.
diff --git a/ash/quick_pair/common/BUILD.gn b/ash/quick_pair/common/BUILD.gn index 1a17beb7..5a01be8 100644 --- a/ash/quick_pair/common/BUILD.gn +++ b/ash/quick_pair/common/BUILD.gn
@@ -21,6 +21,8 @@ "device.h", "fast_pair/fast_pair_decoder.cc", "fast_pair/fast_pair_decoder.h", + "fast_pair/fast_pair_feature_usage_metrics_logger.cc", + "fast_pair/fast_pair_feature_usage_metrics_logger.h", "fast_pair/fast_pair_metrics.cc", "fast_pair/fast_pair_metrics.h", "fast_pair/fast_pair_service_data_creator.cc", @@ -40,6 +42,7 @@ deps = [ "//ash/services/quick_pair/public/mojom", "//base", + "//chromeos/components/feature_usage", "//device/bluetooth/public/cpp", ] } @@ -68,12 +71,14 @@ sources = [ "fast_pair/fast_pair_decoder_unittest.cc", + "fast_pair/fast_pair_feature_usage_metrics_logger_unittest.cc", "logging_unittest.cc", ] deps = [ ":common", "//base/test:test_support", + "//chromeos/components/feature_usage", "//testing/gtest", ] }
diff --git a/ash/quick_pair/common/fast_pair/fast_pair_feature_usage_metrics_logger.cc b/ash/quick_pair/common/fast_pair/fast_pair_feature_usage_metrics_logger.cc new file mode 100644 index 0000000..3bd63188 --- /dev/null +++ b/ash/quick_pair/common/fast_pair/fast_pair_feature_usage_metrics_logger.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/quick_pair/common/fast_pair/fast_pair_feature_usage_metrics_logger.h" + +namespace { + +const char kFastPairUmaFeatureName[] = "FastPair"; + +} // namespace + +namespace ash { +namespace quick_pair { + +FastPairFeatureUsageMetricsLogger::FastPairFeatureUsageMetricsLogger() + : feature_usage_metrics_(kFastPairUmaFeatureName, this) {} + +FastPairFeatureUsageMetricsLogger::~FastPairFeatureUsageMetricsLogger() = + default; + +void FastPairFeatureUsageMetricsLogger::RecordUsage(bool success) { + feature_usage_metrics_.RecordUsage(success); +} + +bool FastPairFeatureUsageMetricsLogger::IsEligible() const { + // Fast Pair is supported on all Chromebooks. + return true; +} + +bool FastPairFeatureUsageMetricsLogger::IsEnabled() const { + // crbug/1250479: Update SFUL IsEnabled to support settings toggle + return true; +} + +} // namespace quick_pair +} // namespace ash
diff --git a/ash/quick_pair/common/fast_pair/fast_pair_feature_usage_metrics_logger.h b/ash/quick_pair/common/fast_pair/fast_pair_feature_usage_metrics_logger.h new file mode 100644 index 0000000..38a1003 --- /dev/null +++ b/ash/quick_pair/common/fast_pair/fast_pair_feature_usage_metrics_logger.h
@@ -0,0 +1,39 @@ +// 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_QUICK_PAIR_COMMON_FAST_PAIR_FAST_PAIR_FEATURE_USAGE_METRICS_LOGGER_H_ +#define ASH_QUICK_PAIR_COMMON_FAST_PAIR_FAST_PAIR_FEATURE_USAGE_METRICS_LOGGER_H_ + +#include "base/component_export.h" +#include "chromeos/components/feature_usage/feature_usage_metrics.h" + +namespace ash { +namespace quick_pair { + +// Tracks Fast Pair feature usage for the Standard Feature Usage Logging +// (SFUL) framework. +class COMPONENT_EXPORT(QUICK_PAIR_COMMON) + FastPairFeatureUsageMetricsLogger final + : public feature_usage::FeatureUsageMetrics::Delegate { + public: + FastPairFeatureUsageMetricsLogger(); + FastPairFeatureUsageMetricsLogger(const FastPairFeatureUsageMetricsLogger&) = + delete; + FastPairFeatureUsageMetricsLogger& operator=( + const FastPairFeatureUsageMetricsLogger&) = delete; + ~FastPairFeatureUsageMetricsLogger() override; + + // feature_usage::FeatureUsageMetrics::Delegate: + bool IsEligible() const override; + bool IsEnabled() const override; + void RecordUsage(bool success); + + private: + feature_usage::FeatureUsageMetrics feature_usage_metrics_; +}; + +} // namespace quick_pair +} // namespace ash + +#endif // ASH_QUICK_PAIR_COMMON_FAST_PAIR_FAST_PAIR_FEATURE_USAGE_METRICS_LOGGER_H_
diff --git a/ash/quick_pair/common/fast_pair/fast_pair_feature_usage_metrics_logger_unittest.cc b/ash/quick_pair/common/fast_pair/fast_pair_feature_usage_metrics_logger_unittest.cc new file mode 100644 index 0000000..d1ecc46 --- /dev/null +++ b/ash/quick_pair/common/fast_pair/fast_pair_feature_usage_metrics_logger_unittest.cc
@@ -0,0 +1,66 @@ +// 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 <memory> + +#include "ash/quick_pair/common/fast_pair/fast_pair_feature_usage_metrics_logger.h" + +#include "base/test/metrics/histogram_tester.h" +#include "base/test/task_environment.h" +#include "chromeos/components/feature_usage/feature_usage_metrics.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace ash { +namespace quick_pair { + +class FastPairFeatureUsageMetricsLoggerTest : public ::testing::Test { + protected: + FastPairFeatureUsageMetricsLoggerTest() = default; + ~FastPairFeatureUsageMetricsLoggerTest() override = default; + + void SetUp() override {} + + base::test::TaskEnvironment task_environment_; +}; + +TEST_F(FastPairFeatureUsageMetricsLoggerTest, IsEligible) { + FastPairFeatureUsageMetricsLogger feature_usage_metrics; + EXPECT_TRUE(feature_usage_metrics.IsEligible()); +} + +TEST_F(FastPairFeatureUsageMetricsLoggerTest, IsEnabled) { + FastPairFeatureUsageMetricsLogger feature_usage_metrics; + EXPECT_TRUE(feature_usage_metrics.IsEnabled()); +} + +TEST_F(FastPairFeatureUsageMetricsLoggerTest, RecordUsage) { + FastPairFeatureUsageMetricsLogger feature_usage_metrics; + + base::HistogramTester histograms; + histograms.ExpectBucketCount( + "ChromeOS.FeatureUsage.FastPair", + feature_usage::FeatureUsageMetrics::Event::kUsedWithSuccess, 0); + histograms.ExpectBucketCount( + "ChromeOS.FeatureUsage.FastPair", + feature_usage::FeatureUsageMetrics::Event::kUsedWithFailure, 0); + + feature_usage_metrics.RecordUsage(/*success=*/true); + histograms.ExpectBucketCount( + "ChromeOS.FeatureUsage.FastPair", + feature_usage::FeatureUsageMetrics::Event::kUsedWithSuccess, 1); + histograms.ExpectBucketCount( + "ChromeOS.FeatureUsage.FastPair", + feature_usage::FeatureUsageMetrics::Event::kUsedWithFailure, 0); + + feature_usage_metrics.RecordUsage(/*success=*/false); + histograms.ExpectBucketCount( + "ChromeOS.FeatureUsage.FastPair", + feature_usage::FeatureUsageMetrics::Event::kUsedWithSuccess, 1); + histograms.ExpectBucketCount( + "ChromeOS.FeatureUsage.FastPair", + feature_usage::FeatureUsageMetrics::Event::kUsedWithFailure, 1); +} + +} // namespace quick_pair +} // namespace ash
diff --git a/ash/quick_pair/feature_status_tracker/BUILD.gn b/ash/quick_pair/feature_status_tracker/BUILD.gn index f2ae4a4..a6618c3 100644 --- a/ash/quick_pair/feature_status_tracker/BUILD.gn +++ b/ash/quick_pair/feature_status_tracker/BUILD.gn
@@ -22,6 +22,8 @@ "quick_pair_feature_status_tracker.h", "quick_pair_feature_status_tracker_impl.cc", "quick_pair_feature_status_tracker_impl.h", + "screen_state_enabled_provider.cc", + "screen_state_enabled_provider.h", ] deps = [ @@ -31,6 +33,8 @@ "//components/user_manager", "//device/bluetooth", "//google_apis", + "//ui/display", + "//ui/display/manager", ] } @@ -49,6 +53,8 @@ "mock_logged_in_user_enabled_provider.h", "mock_quick_pair_feature_status_tracker.cc", "mock_quick_pair_feature_status_tracker.h", + "mock_screen_state_enabled_provider.cc", + "mock_screen_state_enabled_provider.h", "quick_pair_feature_status_tracker.h", ] @@ -68,11 +74,13 @@ "base_enabled_provider_unittest.cc", "bluetooth_enabled_provider_unittest.cc", "fast_pair_enabled_provider_unittest.cc", + "screen_state_enabled_provider_unittest.cc", ] deps = [ ":feature_status_tracker", ":test_support", + "//ash:test_support", "//ash/constants", "//ash/quick_pair/common", "//base/test:test_support", @@ -80,5 +88,6 @@ "//device/bluetooth", "//device/bluetooth:mocks", "//testing/gtest", + "//ui/display/fake", ] }
diff --git a/ash/quick_pair/feature_status_tracker/fast_pair_enabled_provider.cc b/ash/quick_pair/feature_status_tracker/fast_pair_enabled_provider.cc index 726977e..017dc8e 100644 --- a/ash/quick_pair/feature_status_tracker/fast_pair_enabled_provider.cc +++ b/ash/quick_pair/feature_status_tracker/fast_pair_enabled_provider.cc
@@ -18,11 +18,13 @@ std::unique_ptr<BluetoothEnabledProvider> bluetooth_enabled_provider, std::unique_ptr<LoggedInUserEnabledProvider> logged_in_user_enabled_provider, + std::unique_ptr<ScreenStateEnabledProvider> screen_state_enabled_provider, std::unique_ptr<GoogleApiKeyAvailabilityProvider> google_api_key_availability_provider) : bluetooth_enabled_provider_(std::move(bluetooth_enabled_provider)), logged_in_user_enabled_provider_( std::move(logged_in_user_enabled_provider)), + screen_state_enabled_provider_(std::move(screen_state_enabled_provider)), google_api_key_availability_provider_( std::move(google_api_key_availability_provider)) { // If the flag isn't enabled or if the API keys aren't available, @@ -37,6 +39,10 @@ &FastPairEnabledProvider::OnSubProviderEnabledChanged, weak_factory_.GetWeakPtr())); + screen_state_enabled_provider_->SetCallback(base::BindRepeating( + &FastPairEnabledProvider::OnSubProviderEnabledChanged, + weak_factory_.GetWeakPtr())); + SetEnabledAndInvokeCallback(AreSubProvidersEnabled()); } } @@ -50,12 +56,15 @@ << google_api_key_availability_provider_->is_enabled() << " Logged in User:" << logged_in_user_enabled_provider_->is_enabled() + << " Screen State:" + << screen_state_enabled_provider_->is_enabled() << " Bluetooth:" << bluetooth_enabled_provider_->is_enabled(); return base::FeatureList::IsEnabled(features::kFastPair) && google_api_key_availability_provider_->is_enabled() && logged_in_user_enabled_provider_->is_enabled() && - bluetooth_enabled_provider_->is_enabled(); + bluetooth_enabled_provider_->is_enabled() && + screen_state_enabled_provider_->is_enabled(); } void FastPairEnabledProvider::OnSubProviderEnabledChanged(bool) {
diff --git a/ash/quick_pair/feature_status_tracker/fast_pair_enabled_provider.h b/ash/quick_pair/feature_status_tracker/fast_pair_enabled_provider.h index 3e38d44..34958b8 100644 --- a/ash/quick_pair/feature_status_tracker/fast_pair_enabled_provider.h +++ b/ash/quick_pair/feature_status_tracker/fast_pair_enabled_provider.h
@@ -9,6 +9,7 @@ #include "ash/quick_pair/feature_status_tracker/bluetooth_enabled_provider.h" #include "ash/quick_pair/feature_status_tracker/google_api_key_availability_provider.h" #include "ash/quick_pair/feature_status_tracker/logged_in_user_enabled_provider.h" +#include "ash/quick_pair/feature_status_tracker/screen_state_enabled_provider.h" #include "base/memory/weak_ptr.h" namespace ash { @@ -22,6 +23,7 @@ std::unique_ptr<BluetoothEnabledProvider> bluetooth_enabled_provider, std::unique_ptr<LoggedInUserEnabledProvider> logged_in_user_enabled_provider, + std::unique_ptr<ScreenStateEnabledProvider> screen_state_enabled_provider, std::unique_ptr<GoogleApiKeyAvailabilityProvider> google_api_key_availability_provider); ~FastPairEnabledProvider() override; @@ -32,6 +34,7 @@ std::unique_ptr<BluetoothEnabledProvider> bluetooth_enabled_provider_; std::unique_ptr<LoggedInUserEnabledProvider> logged_in_user_enabled_provider_; + std::unique_ptr<ScreenStateEnabledProvider> screen_state_enabled_provider_; std::unique_ptr<GoogleApiKeyAvailabilityProvider> google_api_key_availability_provider_; base::WeakPtrFactory<FastPairEnabledProvider> weak_factory_{this};
diff --git a/ash/quick_pair/feature_status_tracker/fast_pair_enabled_provider_unittest.cc b/ash/quick_pair/feature_status_tracker/fast_pair_enabled_provider_unittest.cc index 97af806..4a72be3 100644 --- a/ash/quick_pair/feature_status_tracker/fast_pair_enabled_provider_unittest.cc +++ b/ash/quick_pair/feature_status_tracker/fast_pair_enabled_provider_unittest.cc
@@ -13,6 +13,9 @@ #include "ash/quick_pair/feature_status_tracker/mock_bluetooth_enabled_provider.h" #include "ash/quick_pair/feature_status_tracker/mock_google_api_key_availability_provider.h" #include "ash/quick_pair/feature_status_tracker/mock_logged_in_user_enabled_provider.h" +#include "ash/quick_pair/feature_status_tracker/mock_screen_state_enabled_provider.h" +#include "ash/quick_pair/feature_status_tracker/screen_state_enabled_provider.h" +#include "ash/test/ash_test_base.h" #include "base/callback.h" #include "base/memory/ptr_util.h" #include "base/memory/scoped_refptr.h" @@ -22,14 +25,15 @@ #include "components/user_manager/scoped_user_manager.h" #include "device/bluetooth/bluetooth_adapter_factory.h" #include "testing/gtest/include/gtest/gtest-param-test.h" -#include "testing/gtest/include/gtest/gtest.h" namespace ash { namespace quick_pair { -class FastPairEnabledProviderTest : public testing::Test { +class FastPairEnabledProviderTest : public AshTestBase { public: void SetUp() override { + AshTestBase::SetUp(); + adapter_ = base::MakeRefCounted<FakeBluetoothAdapter>(); device::BluetoothAdapterFactory::SetAdapterForTesting(adapter_); scoped_user_manager_ = std::make_unique<user_manager::ScopedUserManager>( @@ -51,6 +55,10 @@ ON_CALL(*logged_in_user_enabled_provider, is_enabled) .WillByDefault(testing::Return(true)); + auto* screen_state_enabled_provider = new MockScreenStateEnabledProvider(); + ON_CALL(*screen_state_enabled_provider, is_enabled) + .WillByDefault(testing::Return(true)); + auto* google_api_key_availability_provider = new MockGoogleApiKeyAvailabilityProvider(); ON_CALL(*google_api_key_availability_provider, is_enabled) @@ -59,6 +67,7 @@ auto provider = std::make_unique<FastPairEnabledProvider>( std::make_unique<BluetoothEnabledProvider>(), base::WrapUnique(logged_in_user_enabled_provider), + base::WrapUnique(screen_state_enabled_provider), base::WrapUnique(google_api_key_availability_provider)); provider->SetCallback(callback.Get()); @@ -67,8 +76,8 @@ } // Represents: <is_flag_enabled, is_bt_enabled, is_user_logged_in, -// is_google_api_keys_available> -using TestParam = std::tuple<bool, bool, bool, bool>; +// is_screen_state_on, is_google_api_keys_available> +using TestParam = std::tuple<bool, bool, bool, bool, bool>; class FastPairEnabledProviderTestWithParams : public FastPairEnabledProviderTest, @@ -78,7 +87,8 @@ bool is_flag_enabled = std::get<0>(GetParam()); bool is_bt_enabled = std::get<1>(GetParam()); bool is_user_logged_in = std::get<2>(GetParam()); - bool is_google_api_keys_available = std::get<3>(GetParam()); + bool is_screen_state_on = std::get<3>(GetParam()); + bool is_google_api_keys_available = std::get<4>(GetParam()); base::test::ScopedFeatureList feature_list; feature_list.InitWithFeatureState(features::kFastPair, is_flag_enabled); @@ -91,6 +101,10 @@ ON_CALL(*logged_in_user_enabled_provider, is_enabled) .WillByDefault(testing::Return(is_user_logged_in)); + auto* screen_state_enabled_provider = new MockScreenStateEnabledProvider(); + ON_CALL(*screen_state_enabled_provider, is_enabled) + .WillByDefault(testing::Return(is_screen_state_on)); + auto* google_api_key_availability_provider = new MockGoogleApiKeyAvailabilityProvider(); ON_CALL(*google_api_key_availability_provider, is_enabled) @@ -100,10 +114,13 @@ std::unique_ptr<BluetoothEnabledProvider>(bluetooth_enabled_provider), std::unique_ptr<LoggedInUserEnabledProvider>( logged_in_user_enabled_provider), + std::unique_ptr<ScreenStateEnabledProvider>( + screen_state_enabled_provider), base::WrapUnique(google_api_key_availability_provider)); bool all_are_enabled = is_flag_enabled && is_bt_enabled && - is_user_logged_in && is_google_api_keys_available; + is_user_logged_in && is_screen_state_on && + is_google_api_keys_available; EXPECT_EQ(provider->is_enabled(), all_are_enabled); } @@ -113,6 +130,7 @@ testing::Combine(testing::Bool(), testing::Bool(), testing::Bool(), + testing::Bool(), testing::Bool())); } // namespace quick_pair
diff --git a/ash/quick_pair/feature_status_tracker/mock_screen_state_enabled_provider.cc b/ash/quick_pair/feature_status_tracker/mock_screen_state_enabled_provider.cc new file mode 100644 index 0000000..53a843a --- /dev/null +++ b/ash/quick_pair/feature_status_tracker/mock_screen_state_enabled_provider.cc
@@ -0,0 +1,15 @@ +// 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/quick_pair/feature_status_tracker/mock_screen_state_enabled_provider.h" + +namespace ash { +namespace quick_pair { + +MockScreenStateEnabledProvider::MockScreenStateEnabledProvider() = default; + +MockScreenStateEnabledProvider::~MockScreenStateEnabledProvider() = default; + +} // namespace quick_pair +} // namespace ash \ No newline at end of file
diff --git a/ash/quick_pair/feature_status_tracker/mock_screen_state_enabled_provider.h b/ash/quick_pair/feature_status_tracker/mock_screen_state_enabled_provider.h new file mode 100644 index 0000000..8ff220b --- /dev/null +++ b/ash/quick_pair/feature_status_tracker/mock_screen_state_enabled_provider.h
@@ -0,0 +1,29 @@ +// 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_QUICK_PAIR_FEATURE_STATUS_TRACKER_MOCK_SCREEN_STATE_ENABLED_PROVIDER_H_ +#define ASH_QUICK_PAIR_FEATURE_STATUS_TRACKER_MOCK_SCREEN_STATE_ENABLED_PROVIDER_H_ + +#include "ash/quick_pair/feature_status_tracker/screen_state_enabled_provider.h" +#include "testing/gmock/include/gmock/gmock.h" + +namespace ash { +namespace quick_pair { + +class MockScreenStateEnabledProvider : public ScreenStateEnabledProvider { + public: + MockScreenStateEnabledProvider(); + MockScreenStateEnabledProvider(const MockScreenStateEnabledProvider&) = + delete; + MockScreenStateEnabledProvider& operator=( + const MockScreenStateEnabledProvider&) = delete; + ~MockScreenStateEnabledProvider() override; + + MOCK_METHOD(bool, is_enabled, (), (override)); +}; + +} // namespace quick_pair +} // namespace ash + +#endif // ASH_QUICK_PAIR_FEATURE_STATUS_TRACKER_MOCK_SCREEN_STATE_ENABLED_PROVIDER_H_ \ No newline at end of file
diff --git a/ash/quick_pair/feature_status_tracker/quick_pair_feature_status_tracker_impl.cc b/ash/quick_pair/feature_status_tracker/quick_pair_feature_status_tracker_impl.cc index 90c3c9e..3cbe64c1 100644 --- a/ash/quick_pair/feature_status_tracker/quick_pair_feature_status_tracker_impl.cc +++ b/ash/quick_pair/feature_status_tracker/quick_pair_feature_status_tracker_impl.cc
@@ -10,6 +10,7 @@ #include "ash/quick_pair/feature_status_tracker/fast_pair_enabled_provider.h" #include "ash/quick_pair/feature_status_tracker/google_api_key_availability_provider.h" #include "ash/quick_pair/feature_status_tracker/logged_in_user_enabled_provider.h" +#include "ash/quick_pair/feature_status_tracker/screen_state_enabled_provider.h" #include "base/bind.h" namespace ash { @@ -19,6 +20,7 @@ : fast_pair_enabled_provider_(std::make_unique<FastPairEnabledProvider>( std::make_unique<BluetoothEnabledProvider>(), std::make_unique<LoggedInUserEnabledProvider>(), + std::make_unique<ScreenStateEnabledProvider>(), std::make_unique<GoogleApiKeyAvailabilityProvider>())) { fast_pair_enabled_provider_->SetCallback( base::BindRepeating(&FeatureStatusTrackerImpl::OnFastPairEnabledChanged,
diff --git a/ash/quick_pair/feature_status_tracker/screen_state_enabled_provider.cc b/ash/quick_pair/feature_status_tracker/screen_state_enabled_provider.cc new file mode 100644 index 0000000..56d2050 --- /dev/null +++ b/ash/quick_pair/feature_status_tracker/screen_state_enabled_provider.cc
@@ -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. + +#include "ash/quick_pair/feature_status_tracker/screen_state_enabled_provider.h" + +#include "ash/shell.h" +#include "ui/display/types/display_mode.h" +#include "ui/display/types/display_snapshot.h" + +namespace ash { +namespace quick_pair { + +ScreenStateEnabledProvider::ScreenStateEnabledProvider() { + auto* configurator = Shell::Get()->display_configurator(); + DCHECK(configurator); + + configurator_observation_.Observe(configurator); + // IsDisplayOn() is true for a screen with brightness 0 but in practice + // that edge case does not occur at initialization. We cover that edge + // case later but we don't have access to a DisplayStateList here. + SetEnabledAndInvokeCallback(configurator->IsDisplayOn()); +} + +ScreenStateEnabledProvider::~ScreenStateEnabledProvider() = default; + +void ScreenStateEnabledProvider::OnDisplayModeChanged( + const display::DisplayConfigurator::DisplayStateList& display_states) { + for (const display::DisplaySnapshot* state : display_states) { + // If a display has current_mode, then it is (1) an external monitor or (2) + // the internal display with non-zero brightness and an open laptop lid. + if (state->current_mode()) { + SetEnabledAndInvokeCallback(true); + return; + } + } + + SetEnabledAndInvokeCallback(false); +} + +} // namespace quick_pair +} // namespace ash \ No newline at end of file
diff --git a/ash/quick_pair/feature_status_tracker/screen_state_enabled_provider.h b/ash/quick_pair/feature_status_tracker/screen_state_enabled_provider.h new file mode 100644 index 0000000..ae328f0 --- /dev/null +++ b/ash/quick_pair/feature_status_tracker/screen_state_enabled_provider.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 ASH_QUICK_PAIR_FEATURE_STATUS_TRACKER_SCREEN_STATE_ENABLED_PROVIDER_H_ +#define ASH_QUICK_PAIR_FEATURE_STATUS_TRACKER_SCREEN_STATE_ENABLED_PROVIDER_H_ + +#include "ash/quick_pair/feature_status_tracker/base_enabled_provider.h" +#include "base/scoped_observation.h" +#include "ui/display/manager/display_configurator.h" + +namespace ash { +namespace quick_pair { + +// Observes whether the screen state of any display is on. +class ScreenStateEnabledProvider + : public BaseEnabledProvider, + public display::DisplayConfigurator::Observer { + public: + ScreenStateEnabledProvider(); + ~ScreenStateEnabledProvider() override; + + // display::DisplayConfigurator::Observer + void OnDisplayModeChanged( + const display::DisplayConfigurator::DisplayStateList& display_states) + override; + + private: + base::ScopedObservation<display::DisplayConfigurator, + display::DisplayConfigurator::Observer> + configurator_observation_{this}; +}; + +} // namespace quick_pair +} // namespace ash + +#endif // ASH_QUICK_PAIR_FEATURE_STATUS_TRACKER_SCREEN_STATE_ENABLED_PROVIDER_H_ \ No newline at end of file
diff --git a/ash/quick_pair/feature_status_tracker/screen_state_enabled_provider_unittest.cc b/ash/quick_pair/feature_status_tracker/screen_state_enabled_provider_unittest.cc new file mode 100644 index 0000000..b1f77e4 --- /dev/null +++ b/ash/quick_pair/feature_status_tracker/screen_state_enabled_provider_unittest.cc
@@ -0,0 +1,148 @@ +// 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/quick_pair/feature_status_tracker/screen_state_enabled_provider.h" + +#include <memory> + +#include "ash/test/ash_test_base.h" +#include "base/test/mock_callback.h" +#include "ui/display/fake/fake_display_snapshot.h" +#include "ui/display/manager/display_manager.h" +#include "ui/display/types/display_constants.h" + +namespace ash { +namespace quick_pair { + +namespace { + +constexpr gfx::Size kDisplaySize{1024, 768}; + +} // namespace + +class ScreenStateEnabledProviderTest : public AshTestBase { + public: + void SetUp() override { + AshTestBase::SetUp(); + InitDisplaySnapshots(); + provider_ = std::make_unique<ScreenStateEnabledProvider>(); + } + + void InitDisplaySnapshots() { + internal_on_snapshot_ = + display::FakeDisplaySnapshot::Builder() + .SetId(123u) + .SetType(display::DISPLAY_CONNECTION_TYPE_INTERNAL) + .SetNativeMode(kDisplaySize) + .SetCurrentMode(kDisplaySize) + .Build(); + // Null current_mode() is the signal for a disconnected internal display. + EXPECT_TRUE(internal_on_snapshot_->current_mode() != nullptr); + + internal_off_snapshot_ = + display::FakeDisplaySnapshot::Builder() + .SetId(123u) + .SetType(display::DISPLAY_CONNECTION_TYPE_INTERNAL) + .SetNativeMode(kDisplaySize) + .Build(); + EXPECT_FALSE(internal_off_snapshot_->current_mode() != nullptr); + + external_snapshot_ = display::FakeDisplaySnapshot::Builder() + .SetId(456u) + .SetType(display::DISPLAY_CONNECTION_TYPE_HDMI) + .SetNativeMode(kDisplaySize) + .AddMode(kDisplaySize) + .Build(); + external_snapshot_->set_current_mode(external_snapshot_->native_mode()); + EXPECT_TRUE(external_snapshot_->current_mode() != nullptr); + } + + void UpdateDisplays(bool external_on, bool internal_on) { + std::vector<display::DisplaySnapshot*> outputs; + + if (internal_on) { + outputs.push_back(internal_on_snapshot_.get()); + } else { + outputs.push_back(internal_off_snapshot_.get()); + } + + if (external_on) { + outputs.push_back(external_snapshot_.get()); + } + + provider_->OnDisplayModeChanged(outputs); + } + + void TearDown() override { + // Ensure our provider is destroyed before Ash TearDown + provider_.reset(); + internal_on_snapshot_.reset(); + internal_off_snapshot_.reset(); + external_snapshot_.reset(); + + AshTestBase::TearDown(); + } + + protected: + std::unique_ptr<display::DisplaySnapshot> internal_on_snapshot_; + std::unique_ptr<display::DisplaySnapshot> internal_off_snapshot_; + std::unique_ptr<display::DisplaySnapshot> external_snapshot_; + std::unique_ptr<ScreenStateEnabledProvider> provider_; +}; + +TEST_F(ScreenStateEnabledProviderTest, IsInitallyEnabled) { + base::MockCallback<base::RepeatingCallback<void(bool)>> callback; + EXPECT_CALL(callback, Run).Times(0); + provider_->SetCallback(callback.Get()); + + EXPECT_TRUE(provider_->is_enabled()); +} + +TEST_F(ScreenStateEnabledProviderTest, ExternalOffInternalOff) { + base::MockCallback<base::RepeatingCallback<void(bool)>> callback; + EXPECT_CALL(callback, Run(false)); + provider_->SetCallback(callback.Get()); + + UpdateDisplays(/*external_on=*/false, /*internal_on=*/false); + EXPECT_FALSE(provider_->is_enabled()); +} + +TEST_F(ScreenStateEnabledProviderTest, ExternalOnInternalOff) { + // Start with screens disabled. + UpdateDisplays(/*external_on=*/false, /*internal_on=*/false); + EXPECT_FALSE(provider_->is_enabled()); + base::MockCallback<base::RepeatingCallback<void(bool)>> callback; + EXPECT_CALL(callback, Run(true)); + provider_->SetCallback(callback.Get()); + + UpdateDisplays(/*external_on=*/true, /*internal_on=*/false); + EXPECT_TRUE(provider_->is_enabled()); +} + +TEST_F(ScreenStateEnabledProviderTest, ExternalOffInternalOn) { + // Start with screens disabled. + UpdateDisplays(/*external_on=*/false, /*internal_on=*/false); + EXPECT_FALSE(provider_->is_enabled()); + base::MockCallback<base::RepeatingCallback<void(bool)>> callback; + EXPECT_CALL(callback, Run(true)); + provider_->SetCallback(callback.Get()); + + UpdateDisplays(/*external_on=*/false, /*internal_on=*/true); + EXPECT_TRUE(provider_->is_enabled()); +} + +TEST_F(ScreenStateEnabledProviderTest, ExternalOnInternalOn) { + // Start with screens disabled. + UpdateDisplays(/*external_on=*/false, /*internal_on=*/false); + EXPECT_FALSE(provider_->is_enabled()); + base::MockCallback<base::RepeatingCallback<void(bool)>> callback; + EXPECT_CALL(callback, Run(true)); + provider_->SetCallback(callback.Get()); + + UpdateDisplays(/*external_on=*/true, /*internal_on=*/true); + EXPECT_TRUE(provider_->is_enabled()); +} + +} // namespace quick_pair +} // namespace ash
diff --git a/ash/quick_pair/keyed_service/quick_pair_mediator_unittest.cc b/ash/quick_pair/keyed_service/quick_pair_mediator_unittest.cc index 4568d66..cfad250 100644 --- a/ash/quick_pair/keyed_service/quick_pair_mediator_unittest.cc +++ b/ash/quick_pair/keyed_service/quick_pair_mediator_unittest.cc
@@ -21,6 +21,7 @@ #include "ash/quick_pair/ui/ui_broker.h" #include "ash/services/quick_pair/quick_pair_process_manager_impl.h" #include "base/memory/scoped_refptr.h" +#include "base/test/task_environment.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/abseil-cpp/absl/types/optional.h" @@ -70,6 +71,7 @@ MockPairerBroker* mock_pairer_broker_; MockUIBroker* mock_ui_broker_; std::unique_ptr<Mediator> mediator_; + base::test::SingleThreadTaskEnvironment task_environment_; }; TEST_F(MediatorTest, TogglesScanningWhenFastPairEnabledChanges) {
diff --git a/ash/quick_pair/keyed_service/quick_pair_metrics_logger.cc b/ash/quick_pair/keyed_service/quick_pair_metrics_logger.cc index 340f5c2..aa19d138 100644 --- a/ash/quick_pair/keyed_service/quick_pair_metrics_logger.cc +++ b/ash/quick_pair/keyed_service/quick_pair_metrics_logger.cc
@@ -5,15 +5,17 @@ #include "ash/quick_pair/keyed_service/quick_pair_metrics_logger.h" #include "ash/quick_pair/common/device.h" +#include "ash/quick_pair/common/fast_pair/fast_pair_feature_usage_metrics_logger.h" #include "ash/quick_pair/common/fast_pair/fast_pair_metrics.h" -#include "ash/quick_pair/common/logging.h" namespace ash { namespace quick_pair { QuickPairMetricsLogger::QuickPairMetricsLogger(ScannerBroker* scanner_broker, PairerBroker* pairer_broker, - UIBroker* ui_broker) { + UIBroker* ui_broker) + : feature_usage_metrics_logger_( + std::make_unique<FastPairFeatureUsageMetricsLogger>()) { scanner_broker_observation_.Observe(scanner_broker); pairer_broker_observation_.Observe(pairer_broker); ui_broker_observation_.Observe(ui_broker); @@ -26,6 +28,7 @@ case Protocol::kFastPair: RecordFastPairEngagementFlow( FastPairEngagementFlowEvent::kPairingSucceeded); + feature_usage_metrics_logger_->RecordUsage(/*success=*/true); break; } } @@ -35,6 +38,7 @@ switch (device->protocol) { case Protocol::kFastPair: RecordFastPairEngagementFlow(FastPairEngagementFlowEvent::kPairingFailed); + feature_usage_metrics_logger_->RecordUsage(/*success=*/false); break; } } @@ -52,6 +56,7 @@ case DiscoveryAction::kDismissed: RecordFastPairEngagementFlow( FastPairEngagementFlowEvent::kDiscoveryUiDismissed); + feature_usage_metrics_logger_->RecordUsage(/*success=*/true); break; } break;
diff --git a/ash/quick_pair/keyed_service/quick_pair_metrics_logger.h b/ash/quick_pair/keyed_service/quick_pair_metrics_logger.h index 4a1e4a98..2f780106 100644 --- a/ash/quick_pair/keyed_service/quick_pair_metrics_logger.h +++ b/ash/quick_pair/keyed_service/quick_pair_metrics_logger.h
@@ -15,6 +15,7 @@ namespace quick_pair { struct Device; +class FastPairFeatureUsageMetricsLogger; // Observes pairing, scanning and UI events and logs corresponding metrics. class QuickPairMetricsLogger : public PairerBroker::Observer, @@ -50,6 +51,8 @@ void OnDeviceFound(scoped_refptr<Device> device) override; void OnDeviceLost(scoped_refptr<Device> device) override; + std::unique_ptr<FastPairFeatureUsageMetricsLogger> + feature_usage_metrics_logger_; base::ScopedObservation<ScannerBroker, ScannerBroker::Observer> scanner_broker_observation_{this}; base::ScopedObservation<PairerBroker, PairerBroker::Observer>
diff --git a/ash/quick_pair/repository/BUILD.gn b/ash/quick_pair/repository/BUILD.gn index c33cfe4..32ccd82b 100644 --- a/ash/quick_pair/repository/BUILD.gn +++ b/ash/quick_pair/repository/BUILD.gn
@@ -17,6 +17,8 @@ "fast_pair/fast_pair_image_decoder.h", "fast_pair/footprints_fetcher.cc", "fast_pair/footprints_fetcher.h", + "fast_pair/pairing_metadata.cc", + "fast_pair/pairing_metadata.h", "fast_pair/saved_device_registry.cc", "fast_pair/saved_device_registry.h", "fast_pair_repository.cc",
diff --git a/ash/quick_pair/repository/fake_fast_pair_repository.cc b/ash/quick_pair/repository/fake_fast_pair_repository.cc index fbfc3c62..94f0ccb 100644 --- a/ash/quick_pair/repository/fake_fast_pair_repository.cc +++ b/ash/quick_pair/repository/fake_fast_pair_repository.cc
@@ -45,8 +45,8 @@ void FakeFastPairRepository::CheckAccountKeys( const AccountKeyFilter& account_key_filter, - DeviceMetadataCallback callback) { - std::move(callback).Run(nullptr); + CheckAccountKeysCallback callback) { + std::move(callback).Run(absl::nullopt); } void FakeFastPairRepository::AssociateAccountKey(
diff --git a/ash/quick_pair/repository/fake_fast_pair_repository.h b/ash/quick_pair/repository/fake_fast_pair_repository.h index a426b4c..d89e943 100644 --- a/ash/quick_pair/repository/fake_fast_pair_repository.h +++ b/ash/quick_pair/repository/fake_fast_pair_repository.h
@@ -41,7 +41,7 @@ void IsValidModelId(const std::string& hex_model_id, base::OnceCallback<void(bool)> callback) override; void CheckAccountKeys(const AccountKeyFilter& account_key_filter, - DeviceMetadataCallback callback) override; + CheckAccountKeysCallback callback) override; void AssociateAccountKey(const Device& device, const std::string& account_key) override; void DeleteAssociatedDevice(const device::BluetoothDevice* device) override;
diff --git a/ash/quick_pair/repository/fast_pair/pairing_metadata.cc b/ash/quick_pair/repository/fast_pair/pairing_metadata.cc new file mode 100644 index 0000000..b797b1a --- /dev/null +++ b/ash/quick_pair/repository/fast_pair/pairing_metadata.cc
@@ -0,0 +1,18 @@ +// 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/quick_pair/repository/fast_pair/pairing_metadata.h" + +namespace ash { +namespace quick_pair { + +PairingMetadata::PairingMetadata(const DeviceMetadata* device_metadata, + const std::vector<uint8_t> account_key) + : device_metadata(device_metadata), account_key(std::move(account_key)) {} + +PairingMetadata::PairingMetadata(PairingMetadata&&) = default; +PairingMetadata::~PairingMetadata() = default; + +} // namespace quick_pair +} // namespace ash
diff --git a/ash/quick_pair/repository/fast_pair/pairing_metadata.h b/ash/quick_pair/repository/fast_pair/pairing_metadata.h new file mode 100644 index 0000000..9049670 --- /dev/null +++ b/ash/quick_pair/repository/fast_pair/pairing_metadata.h
@@ -0,0 +1,33 @@ +// 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_QUICK_PAIR_REPOSITORY_FAST_PAIR_PAIRING_METADATA_H_ +#define ASH_QUICK_PAIR_REPOSITORY_FAST_PAIR_PAIRING_METADATA_H_ + +#include <vector> + +#include "base/component_export.h" + +namespace ash { +namespace quick_pair { + +struct DeviceMetadata; + +// Thin wrapper around Account Key + decoded metadata for a Fast Pair device +// which has already been paired. +struct COMPONENT_EXPORT(QUICK_PAIR_REPOSITORY) PairingMetadata { + explicit PairingMetadata(const DeviceMetadata* device_metadata, + const std::vector<uint8_t> account_key); + PairingMetadata(const PairingMetadata&) = delete; + PairingMetadata(PairingMetadata&&); + ~PairingMetadata(); + + const DeviceMetadata* device_metadata; + const std::vector<uint8_t> account_key; +}; + +} // namespace quick_pair +} // namespace ash + +#endif // ASH_QUICK_PAIR_REPOSITORY_FAST_PAIR_PAIRING_METADATA_H_
diff --git a/ash/quick_pair/repository/fast_pair_repository.h b/ash/quick_pair/repository/fast_pair_repository.h index 044e2f7..8ff7da7 100644 --- a/ash/quick_pair/repository/fast_pair_repository.h +++ b/ash/quick_pair/repository/fast_pair_repository.h
@@ -8,6 +8,7 @@ #include "ash/quick_pair/common/device.h" #include "ash/quick_pair/proto/fastpair.pb.h" #include "ash/quick_pair/repository/fast_pair/device_metadata.h" +#include "ash/quick_pair/repository/fast_pair/pairing_metadata.h" #include "base/callback.h" #include "base/containers/flat_map.h" #include "third_party/abseil-cpp/absl/types/optional.h" @@ -21,6 +22,8 @@ class AccountKeyFilter; +using CheckAccountKeysCallback = + base::OnceCallback<void(absl::optional<PairingMetadata>)>; using DeviceMetadataCallback = base::OnceCallback<void(DeviceMetadata*)>; using ValidModelIdCallback = base::OnceCallback<void(bool)>; @@ -47,7 +50,7 @@ // given filter. If a match is found, metadata for the associated device will // be returned through the callback. virtual void CheckAccountKeys(const AccountKeyFilter& account_key_filter, - DeviceMetadataCallback callback) = 0; + CheckAccountKeysCallback callback) = 0; // Stores the given |account_key| for a |device| on the server. virtual void AssociateAccountKey(const Device& device,
diff --git a/ash/quick_pair/repository/fast_pair_repository_impl.cc b/ash/quick_pair/repository/fast_pair_repository_impl.cc index ad79a4f0..164e1b86 100644 --- a/ash/quick_pair/repository/fast_pair_repository_impl.cc +++ b/ash/quick_pair/repository/fast_pair_repository_impl.cc
@@ -94,14 +94,14 @@ void FastPairRepositoryImpl::CheckAccountKeys( const AccountKeyFilter& account_key_filter, - DeviceMetadataCallback callback) { + CheckAccountKeysCallback callback) { CheckAccountKeysImpl(account_key_filter, std::move(callback), /*refresh_cache_on_miss=*/true); } void FastPairRepositoryImpl::CheckAccountKeysImpl( const AccountKeyFilter& account_key_filter, - DeviceMetadataCallback callback, + CheckAccountKeysCallback callback, bool refresh_cache_on_miss) { QP_LOG(INFO) << __func__; for (const auto& info : user_devices_cache_.fast_pair_info()) { @@ -114,7 +114,11 @@ if (device.ParseFromString(info.device().discovery_item_bytes())) { QP_LOG(INFO) << "Account key matched with a paired device: " << device.title(); - GetDeviceMetadata(device.id(), std::move(callback)); + GetDeviceMetadata( + device.id(), + base::BindOnce(&FastPairRepositoryImpl::CompleteAccountKeyLookup, + weak_ptr_factory_.GetWeakPtr(), + std::move(callback), std::move(binary_key))); return; } } @@ -130,15 +134,15 @@ return; } - std::move(callback).Run(nullptr); + std::move(callback).Run(absl::nullopt); } void FastPairRepositoryImpl::RetryCheckAccountKeys( const AccountKeyFilter& account_key_filter, - DeviceMetadataCallback callback, + CheckAccountKeysCallback callback, absl::optional<nearby::fastpair::UserReadDevicesResponse> user_devices) { if (!user_devices) { - std::move(callback).Run(nullptr); + std::move(callback).Run(absl::nullopt); return; } @@ -147,6 +151,17 @@ /*refresh_cache_on_miss=*/false); } +void FastPairRepositoryImpl::CompleteAccountKeyLookup( + CheckAccountKeysCallback callback, + const std::vector<uint8_t> account_key, + DeviceMetadata* device_metadata) { + if (!device_metadata) { + std::move(callback).Run(absl::nullopt); + } + std::move(callback).Run( + PairingMetadata(device_metadata, std::move(account_key))); +} + void FastPairRepositoryImpl::UpdateUserDevicesCache( absl::optional<nearby::fastpair::UserReadDevicesResponse> user_devices) { if (user_devices) {
diff --git a/ash/quick_pair/repository/fast_pair_repository_impl.h b/ash/quick_pair/repository/fast_pair_repository_impl.h index c604d9b..41a6cda 100644 --- a/ash/quick_pair/repository/fast_pair_repository_impl.h +++ b/ash/quick_pair/repository/fast_pair_repository_impl.h
@@ -46,14 +46,14 @@ void IsValidModelId(const std::string& hex_model_id, base::OnceCallback<void(bool)> callback) override; void CheckAccountKeys(const AccountKeyFilter& account_key_filter, - DeviceMetadataCallback callback) override; + CheckAccountKeysCallback callback) override; void AssociateAccountKey(const Device& device, const std::string& account_key) override; void DeleteAssociatedDevice(const device::BluetoothDevice* device) override; private: void CheckAccountKeysImpl(const AccountKeyFilter& account_key_filter, - DeviceMetadataCallback callback, + CheckAccountKeysCallback callback, bool refresh_cache_on_miss); void OnMetadataFetched( const std::string& normalized_model_id, @@ -65,10 +65,13 @@ gfx::Image image); void RetryCheckAccountKeys( const AccountKeyFilter& account_key_filter, - DeviceMetadataCallback callback, + CheckAccountKeysCallback callback, absl::optional<nearby::fastpair::UserReadDevicesResponse> user_devices); void UpdateUserDevicesCache( absl::optional<nearby::fastpair::UserReadDevicesResponse> user_devices); + void CompleteAccountKeyLookup(CheckAccountKeysCallback callback, + const std::vector<uint8_t> account_key, + DeviceMetadata* device_metadata); std::unique_ptr<DeviceMetadataFetcher> device_metadata_fetcher_; std::unique_ptr<FootprintsFetcher> footprints_fetcher_;
diff --git a/ash/shell.cc b/ash/shell.cc index d3749549..e42b1609 100644 --- a/ash/shell.cc +++ b/ash/shell.cc
@@ -584,10 +584,6 @@ tray_bluetooth_helper_ = std::make_unique<TrayBluetoothHelperLegacy>(); } - if (base::FeatureList::IsEnabled(features::kFastPair)) { - quick_pair_mediator_ = quick_pair::Mediator::Factory::Create(); - } - PowerStatus::Initialize(); session_controller_->AddObserver(this); @@ -1021,6 +1017,12 @@ // display manager was properly initialized. privacy_screen_controller_ = std::make_unique<PrivacyScreenController>(); + // Fast Pair depends on the display manager, so initialize it after + // display manager was properly initialized. + if (base::FeatureList::IsEnabled(features::kFastPair)) { + quick_pair_mediator_ = quick_pair::Mediator::Factory::Create(); + } + // The WindowModalityController needs to be at the front of the input event // pretarget handler list to ensure that it processes input events when modal // windows are active.
diff --git a/ash/system/holding_space/holding_space_tray.cc b/ash/system/holding_space/holding_space_tray.cc index 743b973..63d1aac8 100644 --- a/ash/system/holding_space/holding_space_tray.cc +++ b/ash/system/holding_space/holding_space_tray.cc
@@ -39,6 +39,7 @@ #include "ui/base/dragdrop/mojom/drag_drop_types.mojom.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/metadata/metadata_impl_macros.h" +#include "ui/color/color_id.h" #include "ui/compositor/layer.h" #include "ui/compositor/scoped_layer_animation_settings.h" #include "ui/gfx/paint_vector_icon.h" @@ -517,14 +518,14 @@ static_cast<int>(HoldingSpaceCommandId::kHidePreviews), l10n_util::GetStringUTF16( IDS_ASH_HOLDING_SPACE_CONTEXT_MENU_HIDE_PREVIEWS), - ui::ImageModel::FromVectorIcon(kVisibilityOffIcon, /*color_id=*/-1, + ui::ImageModel::FromVectorIcon(kVisibilityOffIcon, ui::kColorMenuIcon, kHoldingSpaceIconSize)); } else { context_menu_model->AddItemWithIcon( static_cast<int>(HoldingSpaceCommandId::kShowPreviews), l10n_util::GetStringUTF16( IDS_ASH_HOLDING_SPACE_CONTEXT_MENU_SHOW_PREVIEWS), - ui::ImageModel::FromVectorIcon(kVisibilityIcon, /*color_id=*/-1, + ui::ImageModel::FromVectorIcon(kVisibilityIcon, ui::kColorMenuIcon, kHoldingSpaceIconSize)); }
diff --git a/ash/system/holding_space/holding_space_view_delegate.cc b/ash/system/holding_space/holding_space_view_delegate.cc index 7468b6c..b5e2cea 100644 --- a/ash/system/holding_space/holding_space_view_delegate.cc +++ b/ash/system/holding_space/holding_space_view_delegate.cc
@@ -28,6 +28,7 @@ #include "ui/base/dragdrop/os_exchange_data_provider.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/models/simple_menu_model.h" +#include "ui/color/color_id.h" #include "ui/views/controls/menu/menu_runner.h" #include "ui/views/vector_icons.h" #include "ui/views/view.h" @@ -601,7 +602,7 @@ context_menu_model_->AddItemWithIcon( static_cast<int>(HoldingSpaceCommandId::kPauseItem), l10n_util::GetStringUTF16(IDS_ASH_HOLDING_SPACE_CONTEXT_MENU_PAUSE), - ui::ImageModel::FromVectorIcon(kPauseIcon, /*color_id=*/-1, + ui::ImageModel::FromVectorIcon(kPauseIcon, ui::kColorMenuIcon, kHoldingSpaceIconSize)); } @@ -609,7 +610,7 @@ context_menu_model_->AddItemWithIcon( static_cast<int>(HoldingSpaceCommandId::kResumeItem), l10n_util::GetStringUTF16(IDS_ASH_HOLDING_SPACE_CONTEXT_MENU_RESUME), - ui::ImageModel::FromVectorIcon(kResumeIcon, /*color_id=*/-1, + ui::ImageModel::FromVectorIcon(kResumeIcon, ui::kColorMenuIcon, kHoldingSpaceIconSize)); } @@ -617,7 +618,7 @@ context_menu_model_->AddItemWithIcon( static_cast<int>(HoldingSpaceCommandId::kCancelItem), l10n_util::GetStringUTF16(IDS_ASH_HOLDING_SPACE_CONTEXT_MENU_CANCEL), - ui::ImageModel::FromVectorIcon(kCancelIcon, /*color_id=*/-1, + ui::ImageModel::FromVectorIcon(kCancelIcon, ui::kColorMenuIcon, kHoldingSpaceIconSize)); } @@ -632,7 +633,7 @@ static_cast<int>(HoldingSpaceCommandId::kShowInFolder), l10n_util::GetStringUTF16( IDS_ASH_HOLDING_SPACE_CONTEXT_MENU_SHOW_IN_FOLDER), - ui::ImageModel::FromVectorIcon(kFolderIcon, /*color_id=*/-1, + ui::ImageModel::FromVectorIcon(kFolderIcon, ui::kColorMenuIcon, kHoldingSpaceIconSize)); std::string mime_type; @@ -648,7 +649,7 @@ static_cast<int>(HoldingSpaceCommandId::kCopyImageToClipboard), l10n_util::GetStringUTF16( IDS_ASH_HOLDING_SPACE_CONTEXT_MENU_COPY_IMAGE_TO_CLIPBOARD), - ui::ImageModel::FromVectorIcon(kCopyIcon, /*color_id=*/-1, + ui::ImageModel::FromVectorIcon(kCopyIcon, ui::kColorMenuIcon, kHoldingSpaceIconSize)); } } @@ -658,13 +659,13 @@ context_menu_model_->AddItemWithIcon( static_cast<int>(HoldingSpaceCommandId::kPinItem), l10n_util::GetStringUTF16(IDS_ASH_HOLDING_SPACE_CONTEXT_MENU_PIN), - ui::ImageModel::FromVectorIcon(views::kPinIcon, /*color_id=*/-1, + ui::ImageModel::FromVectorIcon(views::kPinIcon, ui::kColorMenuIcon, kHoldingSpaceIconSize)); } else { context_menu_model_->AddItemWithIcon( static_cast<int>(HoldingSpaceCommandId::kUnpinItem), l10n_util::GetStringUTF16(IDS_ASH_HOLDING_SPACE_CONTEXT_MENU_UNPIN), - ui::ImageModel::FromVectorIcon(views::kUnpinIcon, /*color_id=*/-1, + ui::ImageModel::FromVectorIcon(views::kUnpinIcon, ui::kColorMenuIcon, kHoldingSpaceIconSize)); } } @@ -674,7 +675,8 @@ static_cast<int>(HoldingSpaceCommandId::kRemoveItem), l10n_util::GetStringUTF16(IDS_ASH_HOLDING_SPACE_CONTEXT_MENU_REMOVE), ui::ImageModel::FromVectorIcon(kCancelCircleOutlineIcon, - /*color_id=*/-1, kHoldingSpaceIconSize)); + ui::kColorMenuIcon, + kHoldingSpaceIconSize)); } return context_menu_model_.get();
diff --git a/ash/system/ime_menu/ime_menu_tray.cc b/ash/system/ime_menu/ime_menu_tray.cc index 5aa7996c..b38331f 100644 --- a/ash/system/ime_menu/ime_menu_tray.cc +++ b/ash/system/ime_menu/ime_menu_tray.cc
@@ -188,7 +188,7 @@ ~ImeButtonsView() override = default; - void KeysetButtonPressed(chromeos::input_method::ImeKeyset keyset) { + void KeysetButtonPressed(input_method::ImeKeyset keyset) { // TODO(dcheng): When https://crbug.com/742517 is fixed, Mojo will generate // a constant for the number of values in the enum. For now, we just define // it here and keep it in sync with the enum. @@ -227,7 +227,7 @@ handwriting_button_ = new SystemMenuButton( base::BindRepeating(&ImeButtonsView::KeysetButtonPressed, base::Unretained(this), - chromeos::input_method::ImeKeyset::kHandwriting), + input_method::ImeKeyset::kHandwriting), kImeMenuWriteIcon, IDS_ASH_STATUS_TRAY_IME_HANDWRITING); AddChildView(handwriting_button_); } @@ -236,7 +236,7 @@ voice_button_ = new SystemMenuButton( base::BindRepeating(&ImeButtonsView::KeysetButtonPressed, base::Unretained(this), - chromeos::input_method::ImeKeyset::kVoice), + input_method::ImeKeyset::kVoice), kImeMenuMicrophoneIcon, IDS_ASH_STATUS_TRAY_IME_VOICE); AddChildView(voice_button_); } @@ -379,8 +379,7 @@ SetIsActive(true); } -void ImeMenuTray::ShowKeyboardWithKeyset( - chromeos::input_method::ImeKeyset keyset) { +void ImeMenuTray::ShowKeyboardWithKeyset(input_method::ImeKeyset keyset) { CloseBubble(); Shell::Get() @@ -534,7 +533,7 @@ // For ARC IMEs, we use the globe icon instead of the short name of the active // IME. - if (chromeos::extension_ime_util::IsArcIME(current_ime.id)) { + if (extension_ime_util::IsArcIME(current_ime.id)) { CreateImageView(); image_view_->SetImage(gfx::CreateVectorIcon( kShelfGlobeIcon,
diff --git a/ash/system/ime_menu/ime_menu_tray.h b/ash/system/ime_menu/ime_menu_tray.h index 6b075920..22e8ca1c 100644 --- a/ash/system/ime_menu/ime_menu_tray.h +++ b/ash/system/ime_menu/ime_menu_tray.h
@@ -43,7 +43,7 @@ // Shows the virtual keyboard with the given keyset: emoji, handwriting or // voice. - void ShowKeyboardWithKeyset(chromeos::input_method::ImeKeyset keyset); + void ShowKeyboardWithKeyset(input_method::ImeKeyset keyset); // Returns true if the menu should show emoji, handwriting and voice buttons // on the bottom. Otherwise, the menu will show a 'Customize...' bottom row
diff --git a/ash/system/ime_menu/ime_menu_tray_unittest.cc b/ash/system/ime_menu/ime_menu_tray_unittest.cc index 3b89836..7d47e31 100644 --- a/ash/system/ime_menu/ime_menu_tray_unittest.cc +++ b/ash/system/ime_menu/ime_menu_tray_unittest.cc
@@ -324,7 +324,7 @@ TestImeControllerClient client; Shell::Get()->ime_controller()->SetClient(&client); - GetTray()->ShowKeyboardWithKeyset(chromeos::input_method::ImeKeyset::kEmoji); + GetTray()->ShowKeyboardWithKeyset(input_method::ImeKeyset::kEmoji); // The menu should be hidden. EXPECT_FALSE(IsBubbleShown());
diff --git a/ash/test/ash_test_helper.cc b/ash/test/ash_test_helper.cc index 177734ce..6dba837 100644 --- a/ash/test/ash_test_helper.cc +++ b/ash/test/ash_test_helper.cc
@@ -187,7 +187,7 @@ // their own override, and in that case we shouldn't call Shutdown // otherwise the global state will be deleted twice. if (input_method_manager_) { - chromeos::input_method::InputMethodManager::Shutdown(); + input_method::InputMethodManager::Shutdown(); input_method_manager_ = nullptr; } } @@ -228,8 +228,7 @@ if (!input_method::InputMethodManager::Get()) { // |input_method_manager_| is not owned and is cleaned up in TearDown() // by calling InputMethodManager::Shutdown(). - input_method_manager_ = - new chromeos::input_method::MockInputMethodManager(); + input_method_manager_ = new input_method::MockInputMethodManager(); input_method::InputMethodManager::Initialize(input_method_manager_); }
diff --git a/ash/test/ash_test_helper.h b/ash/test/ash_test_helper.h index ea53e36..9965272 100644 --- a/ash/test/ash_test_helper.h +++ b/ash/test/ash_test_helper.h
@@ -27,12 +27,6 @@ class Window; } -namespace chromeos { -namespace input_method { -class MockInputMethodManager; -} // namespace input_method -} // namespace chromeos - namespace display { class Display; } @@ -53,6 +47,10 @@ class TestNewWindowDelegateProvider; class TestWallpaperControllerClient; +namespace input_method { +class MockInputMethodManager; +} + // A helper class that does common initialization required for Ash. Creates a // root window and an ash::Shell instance with a test delegate. class AshTestHelper : public aura::test::AuraTestHelper { @@ -166,8 +164,7 @@ // InputMethodManager is not owned by this class. It is stored in a // global that is registered via InputMethodManager::Initialize(). - chromeos::input_method::MockInputMethodManager* input_method_manager_ = - nullptr; + input_method::MockInputMethodManager* input_method_manager_ = nullptr; }; } // namespace ash
diff --git a/ash/webui/diagnostics_ui/backend/input_data_provider.cc b/ash/webui/diagnostics_ui/backend/input_data_provider.cc index fd6d044..9b4866c 100644 --- a/ash/webui/diagnostics_ui/backend/input_data_provider.cc +++ b/ash/webui/diagnostics_ui/backend/input_data_provider.cc
@@ -197,7 +197,7 @@ } else { // External keyboards generally don't tell us what layout they have, so // assume the layout the user has currently selected. - layout_name = chromeos::input_method::InputMethodManager::Get() + layout_name = input_method::InputMethodManager::Get() ->GetActiveIMEState() ->GetCurrentInputMethod() .keyboard_layout();
diff --git a/ash/webui/diagnostics_ui/backend/routine_log.cc b/ash/webui/diagnostics_ui/backend/routine_log.cc index 1e778f4..1052a33 100644 --- a/ash/webui/diagnostics_ui/backend/routine_log.cc +++ b/ash/webui/diagnostics_ui/backend/routine_log.cc
@@ -7,7 +7,6 @@ #include <sstream> #include <string> -#include "base/files/file_path.h" #include "base/i18n/time_formatting.h" #include "base/logging.h" #include "base/sequenced_task_runner.h" @@ -51,10 +50,19 @@ return routineName.substr(1, routineName.size() - 1); } +// Get the category for the routine `type`. +std::string GetRoutineCategory(mojom::RoutineType type) { + switch (type) { + // TODO(zentaro): Implement categorization. + default: + return "all"; + }; +} + } // namespace -RoutineLog::RoutineLog(const base::FilePath& routine_log_file_path) - : log_(routine_log_file_path) {} +RoutineLog::RoutineLog(const base::FilePath& log_base_path) + : log_base_path_(log_base_path) {} RoutineLog::~RoutineLog() = default; @@ -63,7 +71,7 @@ log_line << GetCurrentDateTimeAsString() << kSeparator << getRoutineTypeString(type) << kSeparator << kStartedDescription << kNewline; - log_.Append(log_line.str()); + Append(type, log_line.str()); } void RoutineLog::LogRoutineCompleted(mojom::RoutineType type, @@ -72,18 +80,48 @@ log_line << GetCurrentDateTimeAsString() << kSeparator << getRoutineTypeString(type) << kSeparator << getRoutineResultString(result) << kNewline; - log_.Append(log_line.str()); + Append(type, log_line.str()); } -void RoutineLog::LogRoutineCancelled() { +void RoutineLog::LogRoutineCancelled(mojom::RoutineType type) { std::stringstream log_line; log_line << GetCurrentDateTimeAsString() << kSeparator << kCancelledDescription << kNewline; - log_.Append(log_line.str()); + Append(type, log_line.str()); } -std::string RoutineLog::GetContents() const { - return log_.GetContents(); +std::string RoutineLog::GetContentsForCategory( + const std::string& category) const { + // TODO(zentaro): Remove DCHECK once categories are implemented. + DCHECK_EQ("all", category); + + const auto iter = logs_.find(category); + if (iter == logs_.end()) { + return ""; + } + + return iter->second->GetContents(); +} + +void RoutineLog::Append(mojom::RoutineType type, const std::string& text) { + std::string category = GetRoutineCategory(type); + + // TODO(zentaro): Remove DCHECK once categories are implemented. + DCHECK_EQ("all", category); + + // Insert a new log if it doesn't exist then append to it. + base::FilePath log_path = GetCategoryLogFilePath(category); + auto iter = logs_.find(category); + if (iter == logs_.end()) { + iter = logs_.emplace(category, std::make_unique<AsyncLog>(log_path)).first; + } + + iter->second->Append(text); +} + +base::FilePath RoutineLog::GetCategoryLogFilePath(const std::string& category) { + std::string name = "diagnostics_routines_" + category + ".log"; + return log_base_path_.Append(name); } } // namespace diagnostics
diff --git a/ash/webui/diagnostics_ui/backend/routine_log.h b/ash/webui/diagnostics_ui/backend/routine_log.h index 690768d..d78fa73 100644 --- a/ash/webui/diagnostics_ui/backend/routine_log.h +++ b/ash/webui/diagnostics_ui/backend/routine_log.h
@@ -5,25 +5,25 @@ #ifndef ASH_WEBUI_DIAGNOSTICS_UI_BACKEND_ROUTINE_LOG_H_ #define ASH_WEBUI_DIAGNOSTICS_UI_BACKEND_ROUTINE_LOG_H_ +#include <memory> #include <string> #include "ash/webui/diagnostics_ui/backend/async_log.h" #include "ash/webui/diagnostics_ui/mojom/system_routine_controller.mojom.h" - -namespace base { -class FilePath; -} +#include "base/containers/flat_map.h" +#include "base/files/file_path.h" namespace ash { namespace diagnostics { // RoutineLog is used to record the status and outcome of Diagnostics Routines. // Each time `LogRoutineStarted()` or `LogRoutineCompleted()` is called, a new -// line is appended to `routine_log_file_path`. The file is created before the -// first write if it does not exist. +// line is add to the log for the routine's category. `log_base_path` +// is the directory used to write the category logs which have the name +// "diagnostics_routines_{category_name}.log". class RoutineLog { public: - explicit RoutineLog(const base::FilePath& routine_log_file_path); + explicit RoutineLog(const base::FilePath& log_base_path); ~RoutineLog(); RoutineLog(const RoutineLog&) = delete; @@ -35,13 +35,23 @@ void LogRoutineStarted(mojom::RoutineType type); void LogRoutineCompleted(mojom::RoutineType type, mojom::StandardRoutineResult result); - void LogRoutineCancelled(); + void LogRoutineCancelled(mojom::RoutineType type); // Returns the current RoutineLog as a string. - std::string GetContents() const; + std::string GetContentsForCategory(const std::string& category) const; private: - AsyncLog log_; + // Append `text` to the category corresponding to `type`. + void Append(mojom::RoutineType type, const std::string& text); + + // Get the path to the log file for `category`. + base::FilePath GetCategoryLogFilePath(const std::string& category); + + // The base directory for storing logs. + const base::FilePath log_base_path_; + + // A map of log files where the key is the category. + base::flat_map<std::string, std::unique_ptr<AsyncLog>> logs_; }; } // namespace diagnostics
diff --git a/ash/webui/diagnostics_ui/backend/routine_log_unittest.cc b/ash/webui/diagnostics_ui/backend/routine_log_unittest.cc index 5f3734d..3d881c34 100644 --- a/ash/webui/diagnostics_ui/backend/routine_log_unittest.cc +++ b/ash/webui/diagnostics_ui/backend/routine_log_unittest.cc
@@ -49,7 +49,7 @@ task_environment_.RunUntilIdle(); EXPECT_FALSE(base::PathExists(log_path_)); - EXPECT_TRUE(log.GetContents().empty()); + EXPECT_TRUE(log.GetContentsForCategory("all").empty()); } TEST_F(RoutineLogTest, Basic) { @@ -62,7 +62,7 @@ EXPECT_TRUE(base::PathExists(log_path_)); - const std::string contents = log.GetContents(); + const std::string contents = log.GetContentsForCategory("all"); const std::string first_line = GetLogLines(contents)[0]; const std::vector<std::string> first_line_contents = GetLogLineContents(first_line); @@ -84,7 +84,7 @@ EXPECT_TRUE(base::PathExists(log_path_)); - const std::string contents = log.GetContents(); + const std::string contents = log.GetContentsForCategory("all"); const std::vector<std::string> log_lines = GetLogLines(contents); const std::string first_line = log_lines[0]; const std::vector<std::string> first_line_contents = @@ -107,14 +107,14 @@ RoutineLog log(log_path_); log.LogRoutineStarted(mojom::RoutineType::kMemory); - log.LogRoutineCancelled(); + log.LogRoutineCancelled(mojom::RoutineType::kMemory); // Ensure pending tasks complete. task_environment_.RunUntilIdle(); EXPECT_TRUE(base::PathExists(log_path_)); - const std::string contents = log.GetContents(); + const std::string contents = log.GetContentsForCategory("all"); LOG(ERROR) << contents; const std::vector<std::string> log_lines = GetLogLines(contents);
diff --git a/ash/webui/diagnostics_ui/backend/session_log_handler.cc b/ash/webui/diagnostics_ui/backend/session_log_handler.cc index 01df6ca..8a48f4e 100644 --- a/ash/webui/diagnostics_ui/backend/session_log_handler.cc +++ b/ash/webui/diagnostics_ui/backend/session_log_handler.cc
@@ -122,7 +122,9 @@ bool SessionLogHandler::CreateSessionLog(const base::FilePath& file_path) { // Fetch RoutineLog - const std::string routine_log_contents = routine_log_->GetContents(); + // TODO(zentaro): Update when categories are supported. + const std::string routine_log_contents = + routine_log_->GetContentsForCategory("all"); // Fetch TelemetryLog const std::string telemetry_log_contents = telemetry_log_->GetContents();
diff --git a/ash/webui/diagnostics_ui/backend/system_routine_controller.cc b/ash/webui/diagnostics_ui/backend/system_routine_controller.cc index 990c587..922b27d 100644 --- a/ash/webui/diagnostics_ui/backend/system_routine_controller.cc +++ b/ash/webui/diagnostics_ui/backend/system_routine_controller.cc
@@ -124,8 +124,8 @@ diagnostics_service_->GetRoutineUpdate( inflight_routine_id_, healthd::DiagnosticRoutineCommandEnum::kCancel, /*should_include_output=*/false, base::DoNothing()); - if (IsLoggingEnabled()) { - routine_log_ptr_->LogRoutineCancelled(); + if (IsLoggingEnabled() && inflight_routine_type_.has_value()) { + routine_log_ptr_->LogRoutineCancelled(inflight_routine_type_.value()); } } @@ -351,6 +351,7 @@ DCHECK_EQ(kInvalidRoutineId, inflight_routine_id_); inflight_routine_id_ = response_ptr->id; + inflight_routine_type_ = routine_type; // Sleep for the length of the test using a one-shot timer, then start // querying again for status. @@ -372,6 +373,7 @@ DCHECK_EQ(kInvalidRoutineId, inflight_routine_id_); inflight_routine_id_ = response_ptr->id; + inflight_routine_type_ = routine_type; ContinuePowerRoutine(routine_type); } @@ -660,6 +662,7 @@ inflight_routine_runner_->OnRoutineResult(std::move(result_info)); inflight_routine_runner_.reset(); inflight_routine_id_ = kInvalidRoutineId; + inflight_routine_type_.reset(); } void SystemRoutineController::BindCrosHealthdDiagnosticsServiceIfNeccessary() { @@ -701,8 +704,8 @@ // Reset `inflight_routine_id_` to maintain invariant. inflight_routine_id_ = kInvalidRoutineId; - if (IsLoggingEnabled()) { - routine_log_ptr_->LogRoutineCancelled(); + if (IsLoggingEnabled() && inflight_routine_type_.has_value()) { + routine_log_ptr_->LogRoutineCancelled(inflight_routine_type_.value()); } }
diff --git a/ash/webui/diagnostics_ui/backend/system_routine_controller.h b/ash/webui/diagnostics_ui/backend/system_routine_controller.h index 81152bff..8f13adf 100644 --- a/ash/webui/diagnostics_ui/backend/system_routine_controller.h +++ b/ash/webui/diagnostics_ui/backend/system_routine_controller.h
@@ -18,6 +18,7 @@ #include "services/data_decoder/public/cpp/data_decoder.h" #include "services/device/public/mojom/wake_lock.mojom.h" #include "services/device/public/mojom/wake_lock_provider.mojom.h" +#include "third_party/abseil-cpp/absl/types/optional.h" namespace base { class OneShotTimer; @@ -136,6 +137,10 @@ // routine. int32_t inflight_routine_id_ = kInvalidRoutineId; + // The currently inflight routine (if any). This is used to correctly + // attribute cancellations. + absl::optional<mojom::RoutineType> inflight_routine_type_; + // Records the number of routines that a user attempts to run during one // session in the app. Emitted when the app is closed. uint16_t routine_count_ = 0;
diff --git a/ash/webui/diagnostics_ui/backend/system_routine_controller_unittest.cc b/ash/webui/diagnostics_ui/backend/system_routine_controller_unittest.cc index c6af2de9..2e6e2db 100644 --- a/ash/webui/diagnostics_ui/backend/system_routine_controller_unittest.cc +++ b/ash/webui/diagnostics_ui/backend/system_routine_controller_unittest.cc
@@ -735,7 +735,8 @@ EXPECT_TRUE(routine_runner.result.is_null()); // Verify that the Running status appears in the log. - std::vector<std::string> log_lines = GetLogLines(log.GetContents()); + std::vector<std::string> log_lines = + GetLogLines(log.GetContentsForCategory("all")); EXPECT_EQ(1u, log_lines.size()); std::vector<std::string> log_line_contents = GetLogLineContents(log_lines[0]); @@ -755,7 +756,7 @@ mojom::StandardRoutineResult::kTestPassed); // Verify that the Passed status appears in the log. - log_lines = GetLogLines(log.GetContents()); + log_lines = GetLogLines(log.GetContentsForCategory("all")); EXPECT_EQ(2u, log_lines.size()); log_line_contents = GetLogLineContents(log_lines[1]); @@ -779,7 +780,7 @@ routine_runner_2.reset(); task_environment_.RunUntilIdle(); - log_lines = GetLogLines(log.GetContents()); + log_lines = GetLogLines(log.GetContentsForCategory("all")); EXPECT_EQ(4u, log_lines.size()); log_line_contents = GetLogLineContents(log_lines[3]);
diff --git a/ash/webui/diagnostics_ui/diagnostics_ui.cc b/ash/webui/diagnostics_ui/diagnostics_ui.cc index 40d70557..60c3a9fe 100644 --- a/ash/webui/diagnostics_ui/diagnostics_ui.cc +++ b/ash/webui/diagnostics_ui/diagnostics_ui.cc
@@ -144,8 +144,6 @@ IDS_DIAGNOSTICS_INTERNET_CONNECTIVITY_GROUP_LABEL}, {"ipConfigInfoDrawerGateway", IDS_NETWORK_DIAGNOSTICS_IP_CONFIG_INFO_DRAWER_GATEWAY}, - {"ipConfigInfoDrawerMacAddress", - IDS_NETWORK_DIAGNOSTICS_IP_CONFIG_INFO_DRAWER_MAC_ADDRESS}, {"ipConfigInfoDrawerSubnetMask", IDS_NETWORK_DIAGNOSTICS_IP_CONFIG_INFO_DRAWER_SUBNET_MASK}, {"ipConfigInfoDrawerTitle", @@ -155,6 +153,7 @@ {"learnMore", IDS_DIANOSTICS_LEARN_MORE_LABEL}, {"learnMoreShort", IDS_DIAGNOSTICS_LEARN_MORE_LABEL_SHORT}, {"localNetworkGroupLabel", IDS_DIAGNOSTICS_LOCAL_NETWORK_GROUP_LABEL}, + {"macAddressLabel", IDS_NETWORK_DIAGNOSTICS_MAC_ADDRESS_LABEL}, {"memoryAvailable", IDS_DIAGNOSTICS_MEMORY_AVAILABLE_TEXT}, {"memoryBannerMessage", IDS_DIAGNOSTICS_MEMORY_BANNER_MESSAGE}, {"memoryRoutineText", IDS_DIAGNOSTICS_MEMORY_ROUTINE_TEXT}, @@ -163,8 +162,6 @@ {"networkAuthenticationLabel", IDS_NETWORK_DIAGNOSTICS_AUTHENTICATION}, {"networkBssidLabel", IDS_ONC_WIFI_BSSID}, {"networkChannelLabel", IDS_NETWORK_DIAGNOSTICS_CHANNEL}, - {"networkDefaultConnectionLabel", - IDS_NETWORK_DIAGNOSTICS_DEFAULT_CONNECTION}, {"networkDnsNotConfigured", IDS_NETWORK_DIAGNOSTICS_DNS_NOT_CONFIGURED}, {"networkEidLabel", IDS_DIAGNOSTICS_EID_LABEL}, {"networkEthernetAuthentication8021xLabel", IDS_ONC_WIFI_SECURITY_EAP},
diff --git a/ash/webui/diagnostics_ui/resources/connectivity_card.html b/ash/webui/diagnostics_ui/resources/connectivity_card.html index b35e202..3a7b183 100644 --- a/ash/webui/diagnostics_ui/resources/connectivity_card.html +++ b/ash/webui/diagnostics_ui/resources/connectivity_card.html
@@ -1,18 +1,16 @@ <style include="diagnostics-shared diagnostics-fonts"> - #defaultConnectionChip { - background-color: var(--google-blue-50); - color: var(--google-blue-600); - } </style> <diagnostics-card is-networking-card="true"> <!-- TODO(michaelcheco): Add localized strings. --> <div id="cardTitle" slot="title"> - [[getNetworkCardTitle_(networkType_, networkState_, macAddress_)]] + [[getNetworkCardTitle_(networkType_, networkState_)]] </div> - <div id="defaultConnectionChip" slot="chip" class="diagnostics-chip" - aria-hidden="true"> - [[i18n('networkDefaultConnectionLabel')]] - </div> + <template is="dom-if" if="[[macAddress_]]"> + <div id="macAddressChip" slot="chip" class="diagnostics-chip" + aria-hidden="true"> + [[getMacAddress_(macAddress_)]] + </div> + </template> <network-info network="[[network]]" slot="body"></network-info> <routine-section slot="left-panel" routines="[[routineGroups_]]" test-suite-status="{{testSuiteStatus}}"
diff --git a/ash/webui/diagnostics_ui/resources/connectivity_card.js b/ash/webui/diagnostics_ui/resources/connectivity_card.js index f60d1871..37cd019 100644 --- a/ash/webui/diagnostics_ui/resources/connectivity_card.js +++ b/ash/webui/diagnostics_ui/resources/connectivity_card.js
@@ -14,7 +14,7 @@ import {html, Polymer} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; import {Network, NetworkHealthProviderInterface, NetworkStateObserverInterface, NetworkStateObserverReceiver, NetworkType, RoutineType} from './diagnostics_types.js'; -import {getNetworkState, getNetworkType, getRoutineGroups} from './diagnostics_utils.js'; +import {formatMacAddress, getNetworkState, getNetworkType, getRoutineGroups} from './diagnostics_utils.js'; import {getNetworkHealthProvider} from './mojo_interface_provider.js'; import {RoutineGroup} from './routine_group.js'; import {TestSuiteStatus} from './routine_list_executor.js'; @@ -156,7 +156,7 @@ /** @protected */ getNetworkCardTitle_() { - return `${this.networkType_} [${this.macAddress_}] (${this.networkState_})`; + return `${this.networkType_} (${this.networkState_})`; }, /** @@ -188,4 +188,15 @@ this.getRoutineSectionElem_().runTests(); } }, + + /** + * @protected + * @return {string} + */ + getMacAddress_() { + if (!this.macAddress_) { + return ''; + } + return formatMacAddress(this.macAddress_); + }, });
diff --git a/ash/webui/diagnostics_ui/resources/diagnostics_utils.js b/ash/webui/diagnostics_ui/resources/diagnostics_utils.js index c98cf7d..1c70a43 100644 --- a/ash/webui/diagnostics_ui/resources/diagnostics_utils.js +++ b/ash/webui/diagnostics_ui/resources/diagnostics_utils.js
@@ -192,3 +192,12 @@ export function isNavEnabled() { return loadTimeData.getBoolean('isNetworkingEnabled'); } + + +/** + * @param {string} macAddress + * @return {string} + */ +export function formatMacAddress(macAddress) { + return `${loadTimeData.getString('macAddressLabel')}: ${macAddress}`; +}
diff --git a/ash/webui/diagnostics_ui/resources/network_card.html b/ash/webui/diagnostics_ui/resources/network_card.html index d31552d..4990808 100644 --- a/ash/webui/diagnostics_ui/resources/network_card.html +++ b/ash/webui/diagnostics_ui/resources/network_card.html
@@ -11,8 +11,14 @@ </network-troubleshooting> </template> <div id="cardTitle" slot="title"> - [[getNetworkCardTitle_(networkType_, networkState_, macAddress_)]] + [[getNetworkCardTitle_(networkType_, networkState_)]] </div> + <template is="dom-if" if="[[macAddress_]]"> + <div id="macAddressChip" slot="chip" class="diagnostics-chip" + aria-hidden="true"> + [[getMacAddress_(macAddress_)]] + </div> + </template> <template is="dom-if" if="[[showNetworkDataPoints_]]"> <network-info slot="body" guid="[[guid]]" network="[[network]]"> </network-info>
diff --git a/ash/webui/diagnostics_ui/resources/network_card.js b/ash/webui/diagnostics_ui/resources/network_card.js index 512a21e..1473854ba7 100644 --- a/ash/webui/diagnostics_ui/resources/network_card.js +++ b/ash/webui/diagnostics_ui/resources/network_card.js
@@ -13,7 +13,7 @@ import {html, Polymer} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; import {Network, NetworkHealthProviderInterface, NetworkState, NetworkStateObserverInterface, NetworkStateObserverReceiver, NetworkType} from './diagnostics_types.js'; -import {getNetworkState, getNetworkType} from './diagnostics_utils.js'; +import {formatMacAddress, getNetworkState, getNetworkType} from './diagnostics_utils.js'; import {getNetworkHealthProvider} from './mojo_interface_provider.js'; /** @@ -132,7 +132,7 @@ * @return {string} */ getNetworkCardTitle_() { - return `${this.networkType_} [${this.macAddress_}] (${this.networkState_})`; + return `${this.networkType_} (${this.networkState_})`; }, /** @@ -182,4 +182,15 @@ isNetworkDisabled_() { return this.network.state === NetworkState.kDisabled; }, + + /** + * @protected + * @return {string} + */ + getMacAddress_() { + if (!this.macAddress_) { + return ''; + } + return formatMacAddress(this.macAddress_); + }, });
diff --git a/ash/webui/shimless_rma/resources/BUILD.gn b/ash/webui/shimless_rma/resources/BUILD.gn index 003e74c8..7a3c1b9c 100644 --- a/ash/webui/shimless_rma/resources/BUILD.gn +++ b/ash/webui/shimless_rma/resources/BUILD.gn
@@ -27,6 +27,7 @@ "onboarding_verify_rsu_page.js", "onboarding_wp_disable_complete_page.js", "reimaging_calibration_page.js", + "reimaging_calibration_run_page.js", "reimaging_calibration_setup_page.js", "reimaging_device_information_page.js", "reimaging_firmware_update_page.js", @@ -81,6 +82,7 @@ ":onboarding_wait_for_manual_wp_disable_page", ":onboarding_wp_disable_complete_page", ":reimaging_calibration_page", + ":reimaging_calibration_run_page", ":reimaging_calibration_setup_page", ":reimaging_device_information_page", ":reimaging_firmware_update_page", @@ -111,6 +113,7 @@ ":onboarding_wait_for_manual_wp_disable_page", ":onboarding_wp_disable_complete_page", ":reimaging_calibration_page", + ":reimaging_calibration_run_page", ":reimaging_calibration_setup_page", ":reimaging_device_information_page", ":reimaging_firmware_update_page", @@ -292,6 +295,17 @@ ] } +js_library("reimaging_calibration_run_page") { + deps = [ + ":base_page", + ":icons", + ":mojo_interface_provider", + ":shimless_rma_types", + "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled", + "//ui/webui/resources/js:assert.m", + ] +} + js_library("reimaging_firmware_update_page") { deps = [ ":base_page",
diff --git a/ash/webui/shimless_rma/resources/fake_data.js b/ash/webui/shimless_rma/resources/fake_data.js index f8a61c9..ca2649b 100644 --- a/ash/webui/shimless_rma/resources/fake_data.js +++ b/ash/webui/shimless_rma/resources/fake_data.js
@@ -99,8 +99,12 @@ canGoBack: true, error: RmadErrorCode.kOk }, - // TODO(gavindodd): RmaState.kSetupCalibration - // TODO(gavindodd): RmaState.kRunCalibration + { + state: RmaState.kRunCalibration, + canCancel: true, + canGoBack: true, + error: RmadErrorCode.kOk + }, { state: RmaState.kProvisionDevice, canCancel: true,
diff --git a/ash/webui/shimless_rma/resources/fake_shimless_rma_service.js b/ash/webui/shimless_rma/resources/fake_shimless_rma_service.js index 857b29f5..107a337 100644 --- a/ash/webui/shimless_rma/resources/fake_shimless_rma_service.js +++ b/ash/webui/shimless_rma/resources/fake_shimless_rma_service.js
@@ -651,12 +651,69 @@ this.triggerCalibrationObserver( { component: ComponentType.kBaseAccelerometer, + status: CalibrationStatus.kCalibrationWaiting, + progress: 0.0 + }, + 1000); + this.triggerCalibrationObserver( + { + component: ComponentType.kBaseAccelerometer, + status: CalibrationStatus.kCalibrationInProgress, + progress: 0.2 + }, + 2000); + this.triggerCalibrationObserver( + { + component: ComponentType.kBaseAccelerometer, + status: CalibrationStatus.kCalibrationInProgress, + progress: 0.4 + }, + 3000); + this.triggerCalibrationObserver( + { + component: ComponentType.kBaseAccelerometer, + status: CalibrationStatus.kCalibrationInProgress, + progress: 0.6 + }, + 4000); + this.triggerCalibrationObserver( + { + component: ComponentType.kBaseAccelerometer, + status: CalibrationStatus.kCalibrationInProgress, + progress: 0.8 + }, + 5000); + this.triggerCalibrationObserver( + { + component: ComponentType.kLidAccelerometer, + status: CalibrationStatus.kCalibrationWaiting, + progress: 0.0 + }, + 6000); + this.triggerCalibrationObserver( + { + component: ComponentType.kBaseAccelerometer, status: CalibrationStatus.kCalibrationComplete, + progress: 0.5 + }, + 7000); + this.triggerCalibrationObserver( + { + component: ComponentType.kBaseAccelerometer, + status: CalibrationStatus.kCalibrationFailed, progress: 1.0 }, - 1500); + 8000); + this.triggerCalibrationObserver( + { + component: ComponentType.kGyroscope, + status: CalibrationStatus.kCalibrationSkip, + progress: 1.0 + }, + 9000); this.triggerCalibrationOverallObserver( - CalibrationOverallStatus.kCalibrationOverallComplete, 3000); + CalibrationOverallStatus.kCalibrationOverallCurrentRoundComplete, + 10000); } }
diff --git a/ash/webui/shimless_rma/resources/reimaging_calibration_run_page.html b/ash/webui/shimless_rma/resources/reimaging_calibration_run_page.html new file mode 100644 index 0000000..f52dbedb --- /dev/null +++ b/ash/webui/shimless_rma/resources/reimaging_calibration_run_page.html
@@ -0,0 +1,21 @@ +<style include="cr-shared-style shimless-rma-shared"> + iron-icon { + width: 300px; + height: 200px; + } +</style> + +<base-page orientation="column"> + <div slot="header"> + <!-- TODO(gavindodd): update for i18n --> + <h1>Calibrating device components</h1> + <div id="calibration"> + <span>[[calibrationStatusMessage_]]</span> + </div> + <span hidden$="[[!calibrationComplete_]]">Completed</span> + </div> + <div slot="body"> + <!-- TODO(gavindodd): Replace with accelerometer calibration image --> + <iron-icon icon="shimless:shimless-placeholder"></iron-icon> + </div> +</base-page>
diff --git a/ash/webui/shimless_rma/resources/reimaging_calibration_run_page.js b/ash/webui/shimless_rma/resources/reimaging_calibration_run_page.js new file mode 100644 index 0000000..cb51b7d5b --- /dev/null +++ b/ash/webui/shimless_rma/resources/reimaging_calibration_run_page.js
@@ -0,0 +1,127 @@ +// 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 'chrome://resources/cr_elements/icons.m.js'; +import 'chrome://resources/polymer/v3_0/iron-icon/iron-icon.js'; +import './shimless_rma_shared_css.js'; +import './base_page.js'; +import './icons.js'; + +import {html, PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; + +import {ComponentTypeToName} from './data.js'; +import {getShimlessRmaService} from './mojo_interface_provider.js'; +import {CalibrationComponentStatus, CalibrationObserverInterface, CalibrationObserverReceiver, CalibrationOverallStatus, CalibrationStatus, ShimlessRmaServiceInterface, StateResult} from './shimless_rma_types.js'; + +/** + * @fileoverview + * 'reimaging-calibration-page' is for recalibration of the + * various components during the reimaging process. + */ +export class ReimagingCalibrationRunPageElement extends PolymerElement { + static get is() { + return 'reimaging-calibration-run-page'; + } + + static get template() { + return html`{__html_template__}`; + } + + static get properties() { + return { + /** + * @protected + */ + calibrationComplete_: { + type: Boolean, + value: false, + }, + + /** + * @protected + */ + calibrationStatusMessage_: { + type: String, + // TODO(gavindodd): update for i18n + value: 'Calibration starting...', + } + }; + } + + constructor() { + super(); + /** @private {ShimlessRmaServiceInterface} */ + this.shimlessRmaService_ = getShimlessRmaService(); + /** @private {!CalibrationObserverReceiver} */ + this.calibrationObserverReceiver_ = new CalibrationObserverReceiver( + /** @type {!CalibrationObserverInterface} */ (this)); + + this.shimlessRmaService_.observeCalibrationProgress( + this.calibrationObserverReceiver_.$.bindNewPipeAndPassRemote()); + } + + /** @return {!Promise<!StateResult>} */ + onNextButtonClick() { + if (this.calibrationComplete_) { + return this.shimlessRmaService_.calibrationComplete(); + } + return Promise.reject(new Error('Calibration is not complete.')); + } + + /** + * Implements CalibrationObserver.onCalibrationUpdated() + * @param {!CalibrationComponentStatus} componentStatus + */ + onCalibrationUpdated(componentStatus) { + this.calibrationStatusMessage_ = + this.getCalibrationStatusString_(componentStatus); + } + + /** + * Implements CalibrationObserver.onCalibrationUpdated() + * @param {!CalibrationOverallStatus} status + */ + onCalibrationStepComplete(status) { + switch (status) { + case CalibrationOverallStatus.kCalibrationOverallComplete: + this.calibrationComplete_ = true; + break; + case CalibrationOverallStatus.kCalibrationOverallCurrentRoundComplete: + case CalibrationOverallStatus.kCalibrationOverallCurrentRoundFailed: + case CalibrationOverallStatus.kCalibrationOverallInitializationFailed: + this.shimlessRmaService_.continueCalibration().then( + (state) => this.dispatchEvent(new CustomEvent( + 'load-next-state', + {bubbles: true, composed: true, detail: state}, + ))); + break; + } + } + + /** + * @private + * @return {string} + * @param {!CalibrationComponentStatus} status + */ + getCalibrationStatusString_(status) { + let componentType = ComponentTypeToName[status.component]; + let percent = Math.round(status.progress * 100.0); + // TODO(gavindodd): update for i18n + const statusMessage = { + [CalibrationStatus.kCalibrationWaiting]: + `Waiting to calibrate ${componentType}`, + [CalibrationStatus.kCalibrationInProgress]: + `Calibrating ${componentType} ${percent}% complete`, + [CalibrationStatus.kCalibrationComplete]: `Calibrated ${componentType}`, + [CalibrationStatus.kCalibrationFailed]: + `Failed to calibrated ${componentType}`, + [CalibrationStatus.kCalibrationFailed]: + `Skipped calibrating ${componentType}`, + }; + return statusMessage[status.status]; + } +}; + +customElements.define( + ReimagingCalibrationRunPageElement.is, ReimagingCalibrationRunPageElement);
diff --git a/ash/webui/shimless_rma/resources/shimless_rma.js b/ash/webui/shimless_rma/resources/shimless_rma.js index e4cbcc3..6c621073 100644 --- a/ash/webui/shimless_rma/resources/shimless_rma.js +++ b/ash/webui/shimless_rma/resources/shimless_rma.js
@@ -13,6 +13,7 @@ import './onboarding_verify_rsu_page.js'; import './onboarding_wp_disable_complete_page.js'; import './reimaging_calibration_page.js'; +import './reimaging_calibration_run_page.js'; import './reimaging_calibration_setup_page.js'; import './reimaging_device_information_page.js'; import './reimaging_firmware_update_page.js'; @@ -137,13 +138,18 @@ buttonCancel: ButtonState.HIDDEN, buttonBack: ButtonState.HIDDEN, }, + [RmaState.kRunCalibration]: { + componentIs: 'reimaging-calibration-run-page', + buttonNext: ButtonState.VISIBLE, + buttonCancel: ButtonState.HIDDEN, + buttonBack: ButtonState.HIDDEN, + }, [RmaState.kSetupCalibration]: { componentIs: 'reimaging-calibration-setup-page', buttonNext: ButtonState.VISIBLE, buttonCancel: ButtonState.HIDDEN, buttonBack: ButtonState.VISIBLE, }, - // TODO(gavindodd): kRunCalibration [RmaState.kProvisionDevice]: { componentIs: 'reimaging-provisioning-page', btnNext: ButtonState.VISIBLE,
diff --git a/ash/wm/desks/desks_unittests.cc b/ash/wm/desks/desks_unittests.cc index 72dfa0a..9dad052 100644 --- a/ash/wm/desks/desks_unittests.cc +++ b/ash/wm/desks/desks_unittests.cc
@@ -3657,7 +3657,8 @@ session->Move(/*reverse=*/false); } - chromeos::input_method::FakeImeKeyboard fake_ime_keyboard_; + private: + input_method::FakeImeKeyboard fake_ime_keyboard_; }; namespace {
diff --git a/base/metrics/persistent_histogram_allocator.h b/base/metrics/persistent_histogram_allocator.h index 52efae1e..886c1f3b 100644 --- a/base/metrics/persistent_histogram_allocator.h +++ b/base/metrics/persistent_histogram_allocator.h
@@ -18,6 +18,7 @@ #include "base/process/process_handle.h" #include "base/strings/string_piece.h" #include "base/synchronization/lock.h" +#include "build/build_config.h" namespace base { @@ -365,7 +366,7 @@ // exist, the allocator will use and add to its contents, ignoring the passed // size in favor of the existing size. Returns whether the global allocator // was set. If |exclusive_write| is true, the file will be opened in a mode - // that disallows multiple concurrent writers. + // that disallows multiple concurrent writers (no effect on non-Windows). static bool CreateWithFile(const FilePath& file_path, size_t size, uint64_t id,
diff --git a/base/test/android/junit/src/org/chromium/base/test/util/DisableIfTest.java b/base/test/android/junit/src/org/chromium/base/test/util/DisableIfTest.java index 257736f..df39141 100644 --- a/base/test/android/junit/src/org/chromium/base/test/util/DisableIfTest.java +++ b/base/test/android/junit/src/org/chromium/base/test/util/DisableIfTest.java
@@ -18,12 +18,12 @@ /** Unit tests for the DisableIf annotation and its SkipCheck implementation. */ @RunWith(BaseRobolectricTestRunner.class) -@Config(manifest = Config.NONE, sdk = 21) +@Config(manifest = Config.NONE, sdk = 29) public class DisableIfTest { @Test public void testSdkIsLessThanAndIsLessThan() { TestCase sdkIsLessThan = new TestCase("sdkIsLessThan") { - @DisableIf.Build(sdk_is_less_than = 22) + @DisableIf.Build(sdk_is_less_than = 30) public void sdkIsLessThan() {} }; Assert.assertTrue(new DisableIfSkipCheck().shouldSkip(sdkIsLessThan)); @@ -32,7 +32,7 @@ @Test public void testSdkIsLessThanButIsEqual() { TestCase sdkIsEqual = new TestCase("sdkIsEqual") { - @DisableIf.Build(sdk_is_less_than = 21) + @DisableIf.Build(sdk_is_less_than = 29) public void sdkIsEqual() {} }; Assert.assertFalse(new DisableIfSkipCheck().shouldSkip(sdkIsEqual)); @@ -41,7 +41,7 @@ @Test public void testSdkIsLessThanButIsGreaterThan() { TestCase sdkIsGreaterThan = new TestCase("sdkIsGreaterThan") { - @DisableIf.Build(sdk_is_less_than = 20) + @DisableIf.Build(sdk_is_less_than = 28) public void sdkIsGreaterThan() {} }; Assert.assertFalse(new DisableIfSkipCheck().shouldSkip(sdkIsGreaterThan)); @@ -50,7 +50,7 @@ @Test public void testSdkIsGreaterThanButIsLessThan() { TestCase sdkIsLessThan = new TestCase("sdkIsLessThan") { - @DisableIf.Build(sdk_is_greater_than = 22) + @DisableIf.Build(sdk_is_greater_than = 30) public void sdkIsLessThan() {} }; Assert.assertFalse(new DisableIfSkipCheck().shouldSkip(sdkIsLessThan)); @@ -59,7 +59,7 @@ @Test public void testSdkIsGreaterThanButIsEqual() { TestCase sdkIsEqual = new TestCase("sdkIsEqual") { - @DisableIf.Build(sdk_is_greater_than = 21) + @DisableIf.Build(sdk_is_greater_than = 29) public void sdkIsEqual() {} }; Assert.assertFalse(new DisableIfSkipCheck().shouldSkip(sdkIsEqual)); @@ -68,7 +68,7 @@ @Test public void testSdkIsGreaterThanAndIsGreaterThan() { TestCase sdkIsGreaterThan = new TestCase("sdkIsGreaterThan") { - @DisableIf.Build(sdk_is_greater_than = 20) + @DisableIf.Build(sdk_is_greater_than = 28) public void sdkIsGreaterThan() {} }; Assert.assertTrue(new DisableIfSkipCheck().shouldSkip(sdkIsGreaterThan)); @@ -194,7 +194,7 @@ @Test public void testTwoConditionsBothMet() { TestCase twoConditionsBothMet = new TestCase("twoConditionsBothMet") { - @DisableIf.Build(sdk_is_greater_than = 20, supported_abis_includes = "foo") + @DisableIf.Build(sdk_is_greater_than = 28, supported_abis_includes = "foo") public void twoConditionsBothMet() {} }; String[] originalAbis = Build.SUPPORTED_ABIS; @@ -210,7 +210,7 @@ @Test public void testTwoConditionsFirstMet() { TestCase twoConditionsFirstMet = new TestCase("twoConditionsFirstMet") { - @DisableIf.Build(sdk_is_greater_than = 20, supported_abis_includes = "baz") + @DisableIf.Build(sdk_is_greater_than = 28, supported_abis_includes = "baz") public void twoConditionsFirstMet() {} }; String[] originalAbis = Build.SUPPORTED_ABIS; @@ -226,7 +226,7 @@ @Test public void testTwoConditionsSecondMet() { TestCase twoConditionsSecondMet = new TestCase("twoConditionsSecondMet") { - @DisableIf.Build(sdk_is_greater_than = 22, supported_abis_includes = "foo") + @DisableIf.Build(sdk_is_greater_than = 30, supported_abis_includes = "foo") public void twoConditionsSecondMet() {} }; String[] originalAbis = Build.SUPPORTED_ABIS; @@ -242,7 +242,7 @@ @Test public void testTwoConditionsNeitherMet() { TestCase twoConditionsNeitherMet = new TestCase("twoConditionsNeitherMet") { - @DisableIf.Build(sdk_is_greater_than = 22, supported_abis_includes = "baz") + @DisableIf.Build(sdk_is_greater_than = 30, supported_abis_includes = "baz") public void twoConditionsNeitherMet() {} }; String[] originalAbis = Build.SUPPORTED_ABIS; @@ -259,7 +259,7 @@ public void testTwoAnnotationsBothMet() { TestCase twoAnnotationsBothMet = new TestCase("twoAnnotationsBothMet") { @DisableIf.Build(supported_abis_includes = "foo") - @DisableIf.Build(sdk_is_greater_than = 20) + @DisableIf.Build(sdk_is_greater_than = 28) public void twoAnnotationsBothMet() {} }; String[] originalAbis = Build.SUPPORTED_ABIS; @@ -276,7 +276,7 @@ public void testTwoAnnotationsFirstMet() { TestCase twoAnnotationsFirstMet = new TestCase("twoAnnotationsFirstMet") { @DisableIf.Build(supported_abis_includes = "foo") - @DisableIf.Build(sdk_is_greater_than = 22) + @DisableIf.Build(sdk_is_greater_than = 30) public void twoAnnotationsFirstMet() {} }; String[] originalAbis = Build.SUPPORTED_ABIS; @@ -293,7 +293,7 @@ public void testTwoAnnotationsSecondMet() { TestCase twoAnnotationsSecondMet = new TestCase("twoAnnotationsSecondMet") { @DisableIf.Build(supported_abis_includes = "baz") - @DisableIf.Build(sdk_is_greater_than = 20) + @DisableIf.Build(sdk_is_greater_than = 28) public void twoAnnotationsSecondMet() {} }; String[] originalAbis = Build.SUPPORTED_ABIS; @@ -310,7 +310,7 @@ public void testTwoAnnotationsNeitherMet() { TestCase testTwoAnnotationsNeitherMet = new TestCase("testTwoAnnotationsNeitherMet") { @DisableIf.Build(supported_abis_includes = "baz") - @DisableIf.Build(sdk_is_greater_than = 22) + @DisableIf.Build(sdk_is_greater_than = 30) public void testTwoAnnotationsNeitherMet() {} }; String[] originalAbis = Build.SUPPORTED_ABIS;
diff --git a/cc/raster/gpu_raster_buffer_provider.cc b/cc/raster/gpu_raster_buffer_provider.cc index 2af2773..5c0ad160 100644 --- a/cc/raster/gpu_raster_buffer_provider.cc +++ b/cc/raster/gpu_raster_buffer_provider.cc
@@ -34,6 +34,7 @@ #include "gpu/command_buffer/client/shared_image_interface.h" #include "gpu/command_buffer/common/shared_image_trace_utils.h" #include "gpu/command_buffer/common/shared_image_usage.h" +#include "gpu/config/gpu_finch_features.h" #include "skia/ext/legacy_display_globals.h" #include "third_party/skia/include/core/SkPictureRecorder.h" #include "third_party/skia/include/core/SkSurface.h" @@ -67,8 +68,11 @@ uint32_t flags = gpu::SHARED_IMAGE_USAGE_DISPLAY | gpu::SHARED_IMAGE_USAGE_RASTER | gpu::SHARED_IMAGE_USAGE_OOP_RASTERIZATION; - if (texture_is_overlay_candidate) + if (texture_is_overlay_candidate) { flags |= gpu::SHARED_IMAGE_USAGE_SCANOUT; + } else if (features::IsUsingRawDraw()) { + flags |= gpu::SHARED_IMAGE_USAGE_RAW_DRAW; + } *mailbox = sii->CreateSharedImage( resource_format, resource_size, color_space, kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, flags, gpu::kNullSurfaceHandle);
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java index 70f672dc..d75abe0d 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java
@@ -3978,6 +3978,7 @@ @DisableIf.Build(supported_abis_includes = "arm64-v8a", message = "crbug.com/1240342") @Feature({"ContextualSearch"}) public void testRelatedSearchesItemNotSelected() throws Exception { + FeatureList.setTestFeatures(ENABLE_RELATED_SEARCHES_IN_BAR); mPolicy.overrideAllowSendingPageUrlForTesting(true); FakeResolveSearch fakeSearch = simulateResolveSearch("intelligence"); Assert.assertFalse("Related Searches should have been requested but were not!", @@ -3999,6 +4000,7 @@ @DisableIf.Build(sdk_is_greater_than = Build.VERSION_CODES.O, message = "crbug.com/1182040") @DisableIf.Build(supported_abis_includes = "arm64-v8a", message = "crbug.com/1240342") public void testRelatedSearchesItemSelected() throws Exception { + FeatureList.setTestFeatures(ENABLE_RELATED_SEARCHES_IN_BAR); mFakeServer.reset(); FakeResolveSearch fakeSearch = simulateResolveSearch("intelligence"); ResolvedSearchTerm resolvedSearchTerm = fakeSearch.getResolvedSearchTerm();
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogTest.java index c81c424..69ed11f 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogTest.java
@@ -7,6 +7,7 @@ import static androidx.test.espresso.Espresso.onView; import static androidx.test.espresso.assertion.ViewAssertions.matches; import static androidx.test.espresso.matcher.ViewMatchers.Visibility.GONE; +import static androidx.test.espresso.matcher.ViewMatchers.Visibility.VISIBLE; import static androidx.test.espresso.matcher.ViewMatchers.isChecked; import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed; import static androidx.test.espresso.matcher.ViewMatchers.isNotChecked; @@ -102,6 +103,7 @@ }); Map<String, Boolean> features = new HashMap<>(); features.put(ChromeFeatureList.SMART_SUGGESTION_FOR_LARGE_DOWNLOADS, false); + features.put(ChromeFeatureList.INCOGNITO_DOWNLOADS_WARNING, true); FeatureList.setTestFeatures(features); setDownloadPromptStatus(DownloadPromptStatus.SHOW_INITIAL); @@ -136,12 +138,11 @@ when(mPrefService.getBoolean(Pref.PROMPT_FOR_DOWNLOAD)).thenReturn(promptForPolicy); } - // TODO(crbug/1248017): Add LocationDialog tests for Incognito mode. - private void showDialog( - long totalBytes, @DownloadLocationDialogType int dialogType, String suggestedPath) { + private void showDialog(long totalBytes, @DownloadLocationDialogType int dialogType, + String suggestedPath, boolean isIncognito) { TestThreadUtils.runOnUiThreadBlocking(() -> { mDialogCoordinator.showDialog(getActivity(), mModalDialogManager, totalBytes, - dialogType, suggestedPath, mProfileMock.isOffTheRecord()); + dialogType, suggestedPath, isIncognito); }); } @@ -168,74 +169,108 @@ } } + private void assertIncognitoWarningShown(boolean shown) { + onView(withId(R.id.incognito_warning)) + .check(matches(withEffectiveVisibility(shown ? VISIBLE : GONE))); + } + @Test @MediumTest public void testDefaultLocationDialog() throws Exception { - showDialog(TOTAL_BYTES, DownloadLocationDialogType.DEFAULT, SUGGESTED_PATH); + showDialog(TOTAL_BYTES, DownloadLocationDialogType.DEFAULT, SUGGESTED_PATH, false); assertTitle(R.string.download_location_dialog_title); assertSubtitle(DownloadUtils.getStringForBytes(getActivity(), TOTAL_BYTES)); + assertIncognitoWarningShown(false); assertDontShowAgainCheckbox(true); } @Test @MediumTest + public void testDefaultLocationDialogIncognito() { + showDialog(TOTAL_BYTES, DownloadLocationDialogType.DEFAULT, SUGGESTED_PATH, true); + assertTitle(R.string.download_location_dialog_title); + assertSubtitle(DownloadUtils.getStringForBytes(getActivity(), TOTAL_BYTES)); + assertIncognitoWarningShown(true); + assertDontShowAgainCheckbox(null); + } + + @Test + @MediumTest public void testDefaultLocationDialogUnchecked() throws Exception { setDownloadPromptStatus(DownloadPromptStatus.SHOW_PREFERENCE); - showDialog(TOTAL_BYTES, DownloadLocationDialogType.DEFAULT, SUGGESTED_PATH); + showDialog(TOTAL_BYTES, DownloadLocationDialogType.DEFAULT, SUGGESTED_PATH, false); assertTitle(R.string.download_location_dialog_title); assertSubtitle(DownloadUtils.getStringForBytes(getActivity(), TOTAL_BYTES)); + assertIncognitoWarningShown(false); assertDontShowAgainCheckbox(false); } @Test @MediumTest public void testLocationFull() throws Exception { - showDialog(TOTAL_BYTES, DownloadLocationDialogType.LOCATION_FULL, SUGGESTED_PATH); + showDialog(TOTAL_BYTES, DownloadLocationDialogType.LOCATION_FULL, SUGGESTED_PATH, false); assertTitle(R.string.download_location_not_enough_space); assertSubtitle(getActivity().getResources().getString( R.string.download_location_download_to_default_folder)); + assertIncognitoWarningShown(false); assertDontShowAgainCheckbox(null); } @Test @MediumTest public void testLocationNotFound() throws Exception { - showDialog(TOTAL_BYTES, DownloadLocationDialogType.LOCATION_NOT_FOUND, SUGGESTED_PATH); + showDialog( + TOTAL_BYTES, DownloadLocationDialogType.LOCATION_NOT_FOUND, SUGGESTED_PATH, false); assertTitle(R.string.download_location_no_sd_card); assertSubtitle(getActivity().getResources().getString( R.string.download_location_download_to_default_folder)); + assertIncognitoWarningShown(false); assertDontShowAgainCheckbox(null); } @Test @MediumTest public void testNameTooLong() throws Exception { - showDialog(TOTAL_BYTES, DownloadLocationDialogType.NAME_TOO_LONG, SUGGESTED_PATH); + showDialog(TOTAL_BYTES, DownloadLocationDialogType.NAME_TOO_LONG, SUGGESTED_PATH, false); assertTitle(R.string.download_location_rename_file); assertSubtitle( getActivity().getResources().getString(R.string.download_location_name_too_long)); + assertIncognitoWarningShown(false); assertDontShowAgainCheckbox(null); } @Test @MediumTest public void testNameConflict() throws Exception { - showDialog(TOTAL_BYTES, DownloadLocationDialogType.NAME_CONFLICT, SUGGESTED_PATH); + showDialog(TOTAL_BYTES, DownloadLocationDialogType.NAME_CONFLICT, SUGGESTED_PATH, false); assertTitle(R.string.download_location_download_again); assertSubtitle( getActivity().getResources().getString(R.string.download_location_name_exists)); + assertIncognitoWarningShown(false); assertDontShowAgainCheckbox(true); } @Test @MediumTest + public void testNameConflictIncognito() throws Exception { + showDialog(TOTAL_BYTES, DownloadLocationDialogType.NAME_CONFLICT, SUGGESTED_PATH, true); + assertTitle(R.string.download_location_download_again); + assertSubtitle( + getActivity().getResources().getString(R.string.download_location_name_exists)); + assertIncognitoWarningShown(true); + assertDontShowAgainCheckbox(null); + } + + @Test + @MediumTest public void testForceShowEnterprisePolicy() throws Exception { when(mDownloadDialogBridgeJniMock.isLocationDialogManaged()).thenReturn(true); setPromptForPolicy(true); setDownloadPromptStatus(DownloadPromptStatus.SHOW_PREFERENCE); - showDialog(TOTAL_BYTES, DownloadLocationDialogType.DEFAULT, SUGGESTED_PATH); + showDialog(TOTAL_BYTES, DownloadLocationDialogType.DEFAULT, SUGGESTED_PATH, false); assertTitle(R.string.download_location_dialog_title_confirm_download); assertSubtitle(DownloadUtils.getStringForBytes(getActivity(), TOTAL_BYTES)); + assertIncognitoWarningShown(false); assertDontShowAgainCheckbox(null); } }
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index 8738232..8ce178f 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd
@@ -10382,6 +10382,9 @@ Other Tab </message> </if> + <message name="IDS_DESKTOP_MEDIA_PICKER_EMPTY_PREVIEW" desc="Text shown instead of a preview image of a tab when the user hasn't yet selected a tab to screenshare." > + Select a tab to preview + </message> <message name="IDS_TAB_CAPTURE_TERMINATED_BY_POLICY_TITLE" desc="Title for a confirmation dialog shown on the captured tab when capture of that tab is terminated due to enterprise policy."> Screen sharing has ended
diff --git a/chrome/app/generated_resources_grd/IDS_DESKTOP_MEDIA_PICKER_EMPTY_PREVIEW.png.sha1 b/chrome/app/generated_resources_grd/IDS_DESKTOP_MEDIA_PICKER_EMPTY_PREVIEW.png.sha1 new file mode 100644 index 0000000..57a2c3cc --- /dev/null +++ b/chrome/app/generated_resources_grd/IDS_DESKTOP_MEDIA_PICKER_EMPTY_PREVIEW.png.sha1
@@ -0,0 +1 @@ +8f6bb6a387a7e2a21d5df8b20d4bb466f1911b55 \ No newline at end of file
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn index d9f6692..22b0ea92 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn
@@ -714,6 +714,7 @@ "media/webrtc/capture_policy_utils.h", "media/webrtc/chrome_camera_pan_tilt_zoom_permission_context_delegate.cc", "media/webrtc/chrome_camera_pan_tilt_zoom_permission_context_delegate.h", + "media/webrtc/desktop_media_list.cc", "media/webrtc/desktop_media_list.h", "media/webrtc/desktop_media_list_base.cc", "media/webrtc/desktop_media_list_base.h", @@ -5515,7 +5516,6 @@ "//chrome/browser/enterprise/connectors/device_trust/attestation/common/proto:attestation_ca_proto", "//chrome/browser/enterprise/connectors/device_trust/attestation/common/proto:google_key_proto", "//chrome/browser/enterprise/connectors/device_trust/attestation/common/proto:interface_proto", - "//chrome/browser/enterprise/connectors/device_trust/attestation/common/proto:keystore_proto", "//chrome/browser/enterprise/connectors/device_trust/attestation/desktop:elevated_command_support", ] }
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index 4f2708a..8d4f17e3 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc
@@ -7723,6 +7723,10 @@ FEATURE_VALUE_TYPE( autofill::features::kAutofillEnableOfferNotificationForPromoCodes)}, + {"u2f-permission-prompt", flag_descriptions::kU2FPermissionPromptName, + flag_descriptions::kU2FPermissionPromptDescription, kOsDesktop, + FEATURE_VALUE_TYPE(device::kU2fPermissionPrompt)}, + // NOTE: Adding a new flag requires adding a corresponding entry to enum // "LoginCustomFlags" in tools/metrics/histograms/enums.xml. See "Flag // Histograms" in tools/metrics/histograms/README.md (run the
diff --git a/chrome/browser/apps/app_service/menu_util.cc b/chrome/browser/apps/app_service/menu_util.cc index f96f2d7..ec9907d 100644 --- a/chrome/browser/apps/app_service/menu_util.cc +++ b/chrome/browser/apps/app_service/menu_util.cc
@@ -19,6 +19,7 @@ #include "content/public/common/content_features.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/models/image_model.h" +#include "ui/color/color_id.h" #include "ui/gfx/image/image_skia.h" #include "ui/gfx/vector_icon_types.h" @@ -171,7 +172,7 @@ std::move(get_vector_icon).Run(item->command_id, item->string_id); model->AddItemWithStringIdAndIcon( item->command_id, item->string_id, - ui::ImageModel::FromVectorIcon(icon, /*color_id=*/-1, + ui::ImageModel::FromVectorIcon(icon, ui::kColorMenuIcon, ash::kAppContextMenuIconSize)); break; } @@ -182,7 +183,7 @@ std::move(get_vector_icon).Run(item->command_id, item->string_id); model->AddActionableSubmenuWithStringIdAndIcon( item->command_id, item->string_id, submenu, - ui::ImageModel::FromVectorIcon(icon, /*color_id=*/-1, + ui::ImageModel::FromVectorIcon(icon, ui::kColorMenuIcon, ash::kAppContextMenuIconSize)); } break;
diff --git a/chrome/browser/ash/accessibility/accessibility_manager.h b/chrome/browser/ash/accessibility/accessibility_manager.h index 9ac44962..1ea5553 100644 --- a/chrome/browser/ash/accessibility/accessibility_manager.h +++ b/chrome/browser/ash/accessibility/accessibility_manager.h
@@ -110,7 +110,7 @@ public extensions::api::braille_display_private::BrailleObserver, public extensions::ExtensionRegistryObserver, public user_manager::UserManager::UserSessionStateObserver, - public chromeos::input_method::InputMethodManager::Observer, + public input_method::InputMethodManager::Observer, public CrasAudioHandler::AudioObserver, public ProfileObserver, public speech::SodaInstaller::Observer { @@ -466,7 +466,7 @@ void OnShutdown(extensions::ExtensionRegistry* registry) override; // InputMethodManager::Observer - void InputMethodChanged(chromeos::input_method::InputMethodManager* manager, + void InputMethodChanged(input_method::InputMethodManager* manager, Profile* profile, bool show_message) override;
diff --git a/chrome/browser/ash/accessibility/accessibility_manager_browsertest.cc b/chrome/browser/ash/accessibility/accessibility_manager_browsertest.cc index 7a54243..6d8b57d8 100644 --- a/chrome/browser/ash/accessibility/accessibility_manager_browsertest.cc +++ b/chrome/browser/ash/accessibility/accessibility_manager_browsertest.cc
@@ -46,21 +46,19 @@ #include "ui/compositor/scoped_animation_duration_scale_mode.h" #include "ui/message_center/message_center.h" -namespace extension_ime_util = chromeos::extension_ime_util; -using chromeos::input_method::InputMethodDescriptors; -using chromeos::input_method::InputMethodManager; -using chromeos::input_method::InputMethodUtil; -using content::BrowserThread; -using extensions::api::braille_display_private::BrailleObserver; -using extensions::api::braille_display_private::DisplayState; -using extensions::api::braille_display_private::KeyEvent; -using extensions::api::braille_display_private::MockBrailleController; -using testing::WithParamInterface; - namespace ash { namespace { +using ::content::BrowserThread; +using ::extensions::api::braille_display_private::BrailleObserver; +using ::extensions::api::braille_display_private::DisplayState; +using ::extensions::api::braille_display_private::KeyEvent; +using ::extensions::api::braille_display_private::MockBrailleController; +using input_method::InputMethodDescriptors; +using input_method::InputMethodManager; +using ::testing::WithParamInterface; + // Use a real domain to avoid policy loading problems. constexpr char kTestUserName[] = "owner@gmail.com"; constexpr char kTestUserGaiaId[] = "9876543210";
diff --git a/chrome/browser/ash/accessibility/dictation.cc b/chrome/browser/ash/accessibility/dictation.cc index 07e0aea..b75b61ec 100644 --- a/chrome/browser/ash/accessibility/dictation.cc +++ b/chrome/browser/ash/accessibility/dictation.cc
@@ -55,7 +55,7 @@ input_method_ids.push_back( profile->GetPrefs()->GetString(::prefs::kLanguageCurrentInputMethod)); std::vector<std::string> languages; - chromeos::input_method::InputMethodManager::Get() + input_method::InputMethodManager::Get() ->GetInputMethodUtil() ->GetLanguageCodesFromInputMethodIds(input_method_ids, &languages);
diff --git a/chrome/browser/ash/app_restore/arc_window_utils.cc b/chrome/browser/ash/app_restore/arc_window_utils.cc index 49f8886e4..eff4355 100644 --- a/chrome/browser/ash/app_restore/arc_window_utils.cc +++ b/chrome/browser/ash/app_restore/arc_window_utils.cc
@@ -4,9 +4,14 @@ #include "chrome/browser/ash/app_restore/arc_window_utils.h" +#include "chrome/browser/ash/app_restore/full_restore_prefs.h" +#include "chrome/browser/ash/profiles/profile_helper.h" +#include "chrome/browser/profiles/profile.h" #include "components/app_restore/features.h" #include "components/arc/arc_util.h" #include "components/exo/wm_helper.h" +#include "components/prefs/pref_service.h" +#include "components/user_manager/user_manager.h" #include "third_party/skia/include/core/SkColor.h" #include "ui/display/display.h" #include "ui/display/screen.h" @@ -31,8 +36,20 @@ namespace full_restore { bool IsArcGhostWindowEnabled() { - return ::full_restore::features::IsArcGhostWindowEnabled() && - arc::IsArcVmEnabled() && exo::WMHelper::HasInstance(); + if (!::full_restore::features::IsArcGhostWindowEnabled() || + !arc::IsArcVmEnabled() || !exo::WMHelper::HasInstance()) { + return false; + } + + auto* user_manager = user_manager::UserManager::Get(); + // Check `user_manager`, which might be null for test cases. + if (!user_manager || !user_manager->GetPrimaryUser()) + return true; + + Profile* profile = ProfileHelper::Get()->GetProfileByAccountId( + user_manager->GetPrimaryUser()->GetAccountId()); + DCHECK(profile); + return profile->GetPrefs()->GetBoolean(kGhostWindowEnabled); } absl::optional<double> GetDisplayScaleFactor(int64_t display_id) {
diff --git a/chrome/browser/ash/app_restore/arc_window_utils_unittest.cc b/chrome/browser/ash/app_restore/arc_window_utils_unittest.cc index 09dd5c17..68b17199 100644 --- a/chrome/browser/ash/app_restore/arc_window_utils_unittest.cc +++ b/chrome/browser/ash/app_restore/arc_window_utils_unittest.cc
@@ -5,9 +5,11 @@ #include "chrome/browser/ash/app_restore/arc_window_utils.h" #include "base/test/scoped_feature_list.h" +#include "chrome/browser/ash/login/users/fake_chrome_user_manager.h" #include "components/app_restore/features.h" #include "components/exo/wm_helper.h" #include "components/exo/wm_helper_chromeos.h" +#include "components/user_manager/scoped_user_manager.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/display/display.h" #include "ui/display/test/test_screen.h" @@ -24,7 +26,8 @@ class ArcWindowUtilsTest : public testing::Test { protected: - ArcWindowUtilsTest() { + ArcWindowUtilsTest() + : user_manager_enabler_(std::make_unique<FakeChromeUserManager>()) { const display::Display test_display = test_screen_.GetPrimaryDisplay(); display::Display display(test_display); display.set_id(TEST_DISPLAY_ID); @@ -58,6 +61,7 @@ display::test::TestScreen test_screen_; base::test::ScopedFeatureList scoped_feature_list_; std::unique_ptr<exo::WMHelper> wm_helper_; + user_manager::ScopedUserManager user_manager_enabler_; }; TEST_F(ArcWindowUtilsTest, ArcWindowInfoInvalidDisplayValidBoundsTest) {
diff --git a/chrome/browser/ash/app_restore/full_restore_policy_browsertest.cc b/chrome/browser/ash/app_restore/full_restore_policy_browsertest.cc new file mode 100644 index 0000000..8fddb90 --- /dev/null +++ b/chrome/browser/ash/app_restore/full_restore_policy_browsertest.cc
@@ -0,0 +1,96 @@ +// 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 <memory> + +#include "ash/constants/ash_switches.h" +#include "base/test/scoped_feature_list.h" +#include "chrome/browser/ash/app_restore/full_restore_arc_task_handler.h" +#include "chrome/browser/ash/app_restore/full_restore_prefs.h" +#include "chrome/browser/ash/app_restore/full_restore_service.h" +#include "chrome/browser/ash/arc/arc_util.h" +#include "chrome/browser/ash/arc/session/arc_session_manager.h" +#include "chrome/browser/policy/policy_test_utils.h" +#include "chrome/browser/profiles/profile.h" +#include "chrome/browser/ui/browser.h" +#include "components/app_restore/features.h" +#include "components/arc/test/arc_util_test_support.h" +#include "components/exo/wm_helper_chromeos.h" +#include "components/policy/policy_constants.h" +#include "components/prefs/pref_service.h" +#include "content/public/test/browser_test.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace ash { +namespace full_restore { + +class FullRestorePolicyBrowserTest + : public policy::PolicyTest, + public testing::WithParamInterface<std::tuple<bool, bool>> { + public: + // policy::PolicyTest: + void SetUpCommandLine(base::CommandLine* command_line) override { + scoped_feature_list_.InitWithFeatures( + {::full_restore::features::kFullRestore, + ::full_restore::features::kArcGhostWindow}, + {}); + arc::SetArcAvailableCommandLineForTesting(command_line); + command_line->AppendSwitch(chromeos::switches::kEnableArcVm); + } + + void SetUpInProcessBrowserTestFixture() override { + PolicyTest::SetUpInProcessBrowserTestFixture(); + arc::ArcSessionManager::SetUiEnabledForTesting(false); + wm_helper_ = std::make_unique<exo::WMHelperChromeOS>(); + + policy::PolicyMap policies; + policies.Set(policy::key::kFullRestoreEnabled, + policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER, + policy::POLICY_SOURCE_CLOUD, + base::Value(full_restore_enabled()), nullptr); + policies.Set(policy::key::kGhostWindowEnabled, + policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER, + policy::POLICY_SOURCE_CLOUD, + base::Value(ghost_window_enabled()), nullptr); + provider_.UpdateChromePolicy(policies); + } + + void SetUpOnMainThread() override { PolicyTest::SetUpOnMainThread(); } + + void TearDownOnMainThread() override { + PolicyTest::TearDownOnMainThread(); + wm_helper_.reset(); + } + + bool full_restore_enabled() const { return std::get<0>(GetParam()); } + + bool ghost_window_enabled() const { return std::get<1>(GetParam()); } + + private: + base::test::ScopedFeatureList scoped_feature_list_; + std::unique_ptr<exo::WMHelper> wm_helper_; +}; + +IN_PROC_BROWSER_TEST_P(FullRestorePolicyBrowserTest, + DefaultEnableFullRestoreAndGhostWindow) { + if (full_restore_enabled()) + ASSERT_TRUE(FullRestoreService::GetForProfile(browser()->profile())); + else + ASSERT_FALSE(FullRestoreService::GetForProfile(browser()->profile())); + + if (ghost_window_enabled()) { + ASSERT_TRUE(FullRestoreArcTaskHandler::GetForProfile(browser()->profile()) + ->window_handler()); + } else { + ASSERT_FALSE(FullRestoreArcTaskHandler::GetForProfile(browser()->profile()) + ->window_handler()); + } +} + +INSTANTIATE_TEST_SUITE_P(All, + FullRestorePolicyBrowserTest, + testing::Combine(testing::Bool(), testing::Bool())); + +} // namespace full_restore +} // namespace ash
diff --git a/chrome/browser/ash/app_restore/full_restore_prefs.cc b/chrome/browser/ash/app_restore/full_restore_prefs.cc index f299427..29772a2 100644 --- a/chrome/browser/ash/app_restore/full_restore_prefs.cc +++ b/chrome/browser/ash/app_restore/full_restore_prefs.cc
@@ -14,11 +14,18 @@ namespace ash { namespace full_restore { +// Prefs to define whether the features are enabled by policy. +const char kRestoreAppsEnabled[] = "settings.restore_apps_enabled"; +const char kGhostWindowEnabled[] = "settings.ghost_window_enabled"; + // An integer pref to define whether restore apps and web pages on startup. // Refer to |RestoreOption|. const char kRestoreAppsAndPagesPrefName[] = "settings.restore_apps_and_pages"; void RegisterProfilePrefs(PrefRegistrySimple* registry) { + registry->RegisterBooleanPref(kRestoreAppsEnabled, true); + registry->RegisterBooleanPref(kGhostWindowEnabled, true); + if (!::full_restore::features::IsFullRestoreEnabled()) return;
diff --git a/chrome/browser/ash/app_restore/full_restore_prefs.h b/chrome/browser/ash/app_restore/full_restore_prefs.h index 4d7522a..7a0d59a 100644 --- a/chrome/browser/ash/app_restore/full_restore_prefs.h +++ b/chrome/browser/ash/app_restore/full_restore_prefs.h
@@ -26,6 +26,8 @@ kMaxValue = kDoNotRestore, }; +extern const char kRestoreAppsEnabled[]; +extern const char kGhostWindowEnabled[]; extern const char kRestoreAppsAndPagesPrefName[]; // Registers the restore pref |kRestoreAppsAndPagesPrefName|.
diff --git a/chrome/browser/ash/app_restore/full_restore_service_factory.cc b/chrome/browser/ash/app_restore/full_restore_service_factory.cc index 01b9c90..2ef28b8 100644 --- a/chrome/browser/ash/app_restore/full_restore_service_factory.cc +++ b/chrome/browser/ash/app_restore/full_restore_service_factory.cc
@@ -6,6 +6,7 @@ #include "chrome/browser/app_mode/app_mode_utils.h" #include "chrome/browser/apps/app_service/app_service_proxy_factory.h" +#include "chrome/browser/ash/app_restore/full_restore_prefs.h" #include "chrome/browser/ash/app_restore/full_restore_service.h" #include "chrome/browser/ash/login/demo_mode/demo_session.h" #include "chrome/browser/ash/profiles/profile_helper.h" @@ -13,6 +14,7 @@ #include "chrome/browser/profiles/profile.h" #include "components/app_restore/features.h" #include "components/keyed_service/content/browser_context_dependency_manager.h" +#include "components/prefs/pref_service.h" namespace ash { namespace full_restore { @@ -35,7 +37,7 @@ return false; } - return true; + return profile->GetPrefs()->GetBoolean(kRestoreAppsEnabled); } // static
diff --git a/chrome/browser/ash/arc/input_method_manager/arc_input_method_manager_service.cc b/chrome/browser/ash/arc/input_method_manager/arc_input_method_manager_service.cc index d636fea..a55412e0 100644 --- a/chrome/browser/ash/arc/input_method_manager/arc_input_method_manager_service.cc +++ b/chrome/browser/ash/arc/input_method_manager/arc_input_method_manager_service.cc
@@ -59,10 +59,10 @@ // IME switching code below can be removed. LOG(ERROR) << "Switch the active IME to \"" << ime_id << "\"(component_id=\"" << component_id << "\") failed"; - auto* imm = chromeos::input_method::InputMethodManager::Get(); + auto* imm = ash::input_method::InputMethodManager::Get(); if (imm && imm->GetActiveIMEState()) { for (const auto& id : imm->GetActiveIMEState()->GetActiveInputMethodIds()) { - if (!chromeos::extension_ime_util::IsArcIME(id)) { + if (!ash::extension_ime_util::IsArcIME(id)) { imm->GetActiveIMEState()->ChangeInputMethod(id, false /* show_message */); return; @@ -124,7 +124,7 @@ return is_command_line_flag_enabled || is_normal_vk_enabled; } - chromeos::input_method::InputMethodDescriptor BuildInputMethodDescriptor( + ash::input_method::InputMethodDescriptor BuildInputMethodDescriptor( const mojom::ImeInfoPtr& info) const override { // We don't care too much about |layout| at this point since the feature is // for tablet mode. @@ -133,17 +133,17 @@ // Set the fake language so that the IME is shown in the special section in // chrome://settings. const std::vector<std::string> languages{ - chromeos::extension_ime_util::kArcImeLanguage}; + ash::extension_ime_util::kArcImeLanguage}; const std::string display_name = info->display_name; const std::string proxy_ime_extension_id = crx_file::id_util::GenerateId(kArcIMEProxyExtensionName); const std::string& input_method_id = - chromeos::extension_ime_util::GetArcInputMethodID( - proxy_ime_extension_id, info->ime_id); + ash::extension_ime_util::GetArcInputMethodID(proxy_ime_extension_id, + info->ime_id); // TODO(yhanada): Set the indicator string after the UI spec is finalized. - return chromeos::input_method::InputMethodDescriptor( + return ash::input_method::InputMethodDescriptor( input_method_id, display_name, std::string() /* indicator */, layout, languages, false /* is_login_keyboard */, GURL(info->settings_url), GURL() /* input_view_url */); @@ -193,7 +193,7 @@ ~InputMethodEngineObserver() override = default; - // chromeos::InputMethodEngineBase::Observer overrides: + // ash::input_method::InputMethodEngineBase::Observer overrides: void OnActivate(const std::string& engine_id) override { owner_->is_arc_ime_active_ = true; // TODO(yhanada): Remove this line after we migrate to SPM completely. @@ -405,7 +405,7 @@ if (ash::TabletMode::Get()) ash::TabletMode::Get()->RemoveObserver(tablet_mode_observer_.get()); - auto* imm = chromeos::input_method::InputMethodManager::Get(); + auto* imm = ash::input_method::InputMethodManager::Get(); imm->RemoveImeMenuObserver(this); imm->RemoveObserver(this); } @@ -414,10 +414,10 @@ const std::string& ime_id) { if (ime_id == kChromeOSIMEIdInArcContainer) { // Chrome OS Keyboard is selected in Android side. - auto* imm = chromeos::input_method::InputMethodManager::Get(); + auto* imm = ash::input_method::InputMethodManager::Get(); // Create a list of active Chrome OS IMEs. auto active_imes = imm->GetActiveIMEState()->GetActiveInputMethodIds(); - base::EraseIf(active_imes, chromeos::extension_ime_util::IsArcIME); + base::EraseIf(active_imes, ash::extension_ime_util::IsArcIME); DCHECK(!active_imes.empty()); imm->GetActiveIMEState()->ChangeInputMethod(active_imes[0], false /* show_message */); @@ -425,10 +425,10 @@ } // an ARC IME is selected. - auto* imm = chromeos::input_method::InputMethodManager::Get(); + auto* imm = ash::input_method::InputMethodManager::Get(); imm->GetActiveIMEState()->ChangeInputMethod( - chromeos::extension_ime_util::GetArcInputMethodID(proxy_ime_extension_id_, - ime_id), + ash::extension_ime_util::GetArcInputMethodID(proxy_ime_extension_id_, + ime_id), false /* show_message */); } @@ -449,9 +449,8 @@ } void ArcInputMethodManagerService::UpdateInputMethodEntryWithImeInfo() { - using chromeos::input_method::InputMethodDescriptor; - using chromeos::input_method::InputMethodDescriptors; - using chromeos::input_method::InputMethodManager; + using ::ash::input_method::InputMethodDescriptors; + using ::ash::input_method::InputMethodManager; InputMethodManager* imm = InputMethodManager::Get(); if (!imm || !imm->GetActiveIMEState()) { @@ -514,7 +513,7 @@ if (is_updating_imm_entry_) return; - auto* manager = chromeos::input_method::InputMethodManager::Get(); + auto* manager = ash::input_method::InputMethodManager::Get(); if (!manager || !manager->GetActiveIMEState()) { LOG(WARNING) << "InputMethodManager is not ready yet"; return; @@ -528,9 +527,7 @@ std::copy_if( new_active_ime_ids.begin(), new_active_ime_ids.end(), std::inserter(new_arc_active_ime_ids, new_arc_active_ime_ids.end()), - [](const auto& id) { - return chromeos::extension_ime_util::IsArcIME(id); - }); + [](const auto& id) { return ash::extension_ime_util::IsArcIME(id); }); // TODO(yhanada|yusukes): Instead of observing ImeMenuListChanged(), it's // probably better to just observe the pref (and not disabling ones still @@ -565,7 +562,7 @@ } void ArcInputMethodManagerService::InputMethodChanged( - chromeos::input_method::InputMethodManager* manager, + ash::input_method::InputMethodManager* manager, Profile* /* profile */, bool /* show_message */) { // Ignore input method change while updating the entry in |OnImeInfoChanged| @@ -573,14 +570,13 @@ if (is_updating_imm_entry_) return; - scoped_refptr<chromeos::input_method::InputMethodManager::State> state = + scoped_refptr<ash::input_method::InputMethodManager::State> state = manager->GetActiveIMEState(); if (!state) return; SwitchImeTo(state->GetCurrentInputMethod().id()); - if (chromeos::extension_ime_util::IsArcIME( - state->GetCurrentInputMethod().id())) { + if (ash::extension_ime_util::IsArcIME(state->GetCurrentInputMethod().id())) { // Disable fallback virtual keyboard while Android IME is activated. SetKeyboardDisabled(true); } else { @@ -633,7 +629,7 @@ void ArcInputMethodManagerService::EnableIme(const std::string& ime_id, bool enable) { auto component_id = - chromeos::extension_ime_util::GetComponentIDByInputMethodID(ime_id); + ash::extension_ime_util::GetComponentIDByInputMethodID(ime_id); // TODO(yhanada): Disable the IME in Chrome OS side if it fails. imm_bridge_->SendEnableIme( @@ -649,10 +645,10 @@ } void ArcInputMethodManagerService::SwitchImeTo(const std::string& ime_id) { - namespace ceiu = chromeos::extension_ime_util; + namespace aeiu = ::ash::extension_ime_util; - std::string component_id = ceiu::GetComponentIDByInputMethodID(ime_id); - if (!ceiu::IsArcIME(ime_id)) + std::string component_id = aeiu::GetComponentIDByInputMethodID(ime_id); + if (!aeiu::IsArcIME(ime_id)) component_id = kChromeOSIMEIdInArcContainer; imm_bridge_->SendSwitchImeTo( component_id, base::BindOnce(&SwitchImeToCallback, ime_id, component_id)); @@ -698,7 +694,7 @@ // the policy. The better way to do this is to add a dedicated event to // language_settings_private.idl and send the new event to the JS side // instead. - auto* manager = chromeos::input_method::InputMethodManager::Get(); + auto* manager = ash::input_method::InputMethodManager::Get(); if (!manager) return; if (is_tablet_mode)
diff --git a/chrome/browser/ash/arc/input_method_manager/arc_input_method_manager_service.h b/chrome/browser/ash/arc/input_method_manager/arc_input_method_manager_service.h index fc7491d..9acefdc 100644 --- a/chrome/browser/ash/arc/input_method_manager/arc_input_method_manager_service.h +++ b/chrome/browser/ash/arc/input_method_manager/arc_input_method_manager_service.h
@@ -35,8 +35,8 @@ class ArcInputMethodManagerService : public KeyedService, public ArcInputMethodManagerBridge::Delegate, - public chromeos::input_method::InputMethodManager::ImeMenuObserver, - public chromeos::input_method::InputMethodManager::Observer, + public ash::input_method::InputMethodManager::ImeMenuObserver, + public ash::input_method::InputMethodManager::Observer, public ui::IMEBridgeObserver { public: class Observer : public base::CheckedObserver { @@ -79,16 +79,16 @@ void OnImeInfoChanged(std::vector<mojom::ImeInfoPtr> ime_info_array) override; void OnConnectionClosed() override; - // chromeos::input_method::InputMethodManager::ImeMenuObserver overrides: + // ash::input_method::InputMethodManager::ImeMenuObserver overrides: void ImeMenuListChanged() override; void ImeMenuActivationChanged(bool is_active) override {} void ImeMenuItemsChanged( const std::string& engine_id, - const std::vector<chromeos::input_method::InputMethodManager::MenuItem>& - items) override {} + const std::vector<ash::input_method::InputMethodManager::MenuItem>& items) + override {} - // chromeos::input_method::InputMethodManager::Observer overrides: - void InputMethodChanged(chromeos::input_method::InputMethodManager* manager, + // ash::input_method::InputMethodManager::Observer overrides: + void InputMethodChanged(ash::input_method::InputMethodManager* manager, Profile* profile, bool show_message) override; @@ -113,7 +113,7 @@ void EnableIme(const std::string& ime_id, bool enable); void SwitchImeTo(const std::string& ime_id); - chromeos::input_method::InputMethodDescriptor BuildInputMethodDescriptor( + ash::input_method::InputMethodDescriptor BuildInputMethodDescriptor( const mojom::ImeInfo* info); void Focus(int input_context_id); void Blur();
diff --git a/chrome/browser/ash/arc/input_method_manager/arc_input_method_manager_service_unittest.cc b/chrome/browser/ash/arc/input_method_manager/arc_input_method_manager_service_unittest.cc index 19b3336..365edbc 100644 --- a/chrome/browser/ash/arc/input_method_manager/arc_input_method_manager_service_unittest.cc +++ b/chrome/browser/ash/arc/input_method_manager/arc_input_method_manager_service_unittest.cc
@@ -42,7 +42,7 @@ namespace arc { namespace { -namespace im = ::chromeos::input_method; +namespace im = ::ash::input_method; using ::ash::AccessibilityNotificationType; mojom::ImeInfoPtr GenerateImeInfo(const std::string& id, @@ -270,8 +270,7 @@ void SetUp() override { ui::IMEBridge::Initialize(); input_method_manager_ = new TestInputMethodManager(); - chromeos::input_method::InputMethodManager::Initialize( - input_method_manager_); + im::InputMethodManager::Initialize(input_method_manager_); profile_ = std::make_unique<TestingProfile>(); tablet_mode_controller_ = std::make_unique<FakeTabletMode>(); @@ -296,7 +295,7 @@ input_method_bounds_tracker_.reset(); tablet_mode_controller_.reset(); profile_.reset(); - chromeos::input_method::InputMethodManager::Shutdown(); + im::InputMethodManager::Shutdown(); ui::IMEBridge::Shutdown(); } @@ -320,7 +319,7 @@ } // anonymous namespace TEST_F(ArcInputMethodManagerServiceTest, EnableIme) { - namespace ceiu = chromeos::extension_ime_util; + namespace aeiu = ::ash::extension_ime_util; using crx_file::id_util::GenerateId; ToggleTabletMode(true); @@ -328,12 +327,12 @@ ASSERT_EQ(0u, bridge()->enable_ime_calls_.size()); const std::string extension_ime_id = - ceiu::GetInputMethodID(GenerateId("test.extension.ime"), "us"); + aeiu::GetInputMethodID(GenerateId("test.extension.ime"), "us"); const std::string component_extension_ime_id = - ceiu::GetComponentInputMethodID( + aeiu::GetComponentInputMethodID( GenerateId("test.component.extension.ime"), "us"); const std::string arc_ime_id = - ceiu::GetArcInputMethodID(GenerateId("test.arc.ime"), "us"); + aeiu::GetArcInputMethodID(GenerateId("test.arc.ime"), "us"); // EnableIme is called only when ARC IME is enable or disabled. imm()->state()->AddActiveInputMethodId(extension_ime_id); @@ -348,7 +347,7 @@ imm()->state()->AddActiveInputMethodId(arc_ime_id); service()->ImeMenuListChanged(); ASSERT_EQ(1u, bridge()->enable_ime_calls_.size()); - EXPECT_EQ(ceiu::GetComponentIDByInputMethodID(arc_ime_id), + EXPECT_EQ(aeiu::GetComponentIDByInputMethodID(arc_ime_id), std::get<std::string>(bridge()->enable_ime_calls_[0])); EXPECT_TRUE(std::get<bool>(bridge()->enable_ime_calls_[0])); @@ -356,7 +355,7 @@ imm()->state()->RemoveActiveInputMethodId(arc_ime_id); service()->ImeMenuListChanged(); ASSERT_EQ(2u, bridge()->enable_ime_calls_.size()); - EXPECT_EQ(ceiu::GetComponentIDByInputMethodID(arc_ime_id), + EXPECT_EQ(aeiu::GetComponentIDByInputMethodID(arc_ime_id), std::get<std::string>(bridge()->enable_ime_calls_[1])); EXPECT_FALSE(std::get<bool>(bridge()->enable_ime_calls_[1])); @@ -367,7 +366,7 @@ } TEST_F(ArcInputMethodManagerServiceTest, EnableIme_WithPrefs) { - namespace ceiu = chromeos::extension_ime_util; + namespace aeiu = ::ash::extension_ime_util; using crx_file::id_util::GenerateId; ToggleTabletMode(true); @@ -375,10 +374,10 @@ ASSERT_EQ(0u, bridge()->enable_ime_calls_.size()); const std::string component_extension_ime_id = - ceiu::GetComponentInputMethodID( + aeiu::GetComponentInputMethodID( GenerateId("test.component.extension.ime"), "us"); const std::string arc_ime_id = - ceiu::GetArcInputMethodID(GenerateId("test.arc.ime"), "us"); + aeiu::GetArcInputMethodID(GenerateId("test.arc.ime"), "us"); imm()->state()->AddActiveInputMethodId(component_extension_ime_id); service()->ImeMenuListChanged(); @@ -402,7 +401,7 @@ } TEST_F(ArcInputMethodManagerServiceTest, SwitchImeTo) { - namespace ceiu = chromeos::extension_ime_util; + namespace aeiu = ::ash::extension_ime_util; using crx_file::id_util::GenerateId; const std::string arc_ime_service_id = @@ -413,11 +412,11 @@ ASSERT_EQ(0u, bridge()->switch_ime_to_calls_.size()); const std::string extension_ime_id = - ceiu::GetInputMethodID(GenerateId("test.extension.ime"), "us"); + aeiu::GetInputMethodID(GenerateId("test.extension.ime"), "us"); const std::string component_extension_ime_id = - ceiu::GetComponentInputMethodID( + aeiu::GetComponentInputMethodID( GenerateId("test.component.extension.ime"), "us"); - const std::string arc_ime_id = ceiu::GetArcInputMethodID( + const std::string arc_ime_id = aeiu::GetArcInputMethodID( GenerateId("test.arc.ime"), "ime.id.in.arc.container"); // Set active input method to the extension ime. @@ -442,7 +441,7 @@ } TEST_F(ArcInputMethodManagerServiceTest, OnImeDisabled) { - namespace ceiu = chromeos::extension_ime_util; + namespace aeiu = ::ash::extension_ime_util; constexpr char kNonArcIme[] = "ime_a"; constexpr char kArcImeX[] = "arc_ime_x"; @@ -453,9 +452,9 @@ const std::string proxy_ime_extension_id = crx_file::id_util::GenerateId(kArcIMEProxyExtensionName); const std::string arc_ime_x_component = - ceiu::GetArcInputMethodID(proxy_ime_extension_id, kArcImeX); + aeiu::GetArcInputMethodID(proxy_ime_extension_id, kArcImeX); const std::string arc_ime_y_component = - ceiu::GetArcInputMethodID(proxy_ime_extension_id, kArcImeY); + aeiu::GetArcInputMethodID(proxy_ime_extension_id, kArcImeY); mojom::ImeInfoPtr arc_ime_x = GenerateImeInfo(kArcImeX, "", "", false, false); mojom::ImeInfoPtr arc_ime_y = GenerateImeInfo(kArcImeY, "", "", false, false); @@ -516,7 +515,7 @@ } TEST_F(ArcInputMethodManagerServiceTest, OnImeInfoChanged) { - namespace ceiu = chromeos::extension_ime_util; + namespace aeiu = ::ash::extension_ime_util; ToggleTabletMode(true); @@ -533,9 +532,8 @@ mojom::ImeInfoPtr info2 = GenerateImeInfo(android_ime_id2, display_name2, settings_url2, true, false); - std::vector< - std::tuple<std::string, chromeos::input_method::InputMethodDescriptors, - ui::IMEEngineHandlerInterface*>>& added_extensions = + std::vector<std::tuple<std::string, im::InputMethodDescriptors, + ui::IMEEngineHandlerInterface*>>& added_extensions = imm()->state()->added_input_method_extensions_; ASSERT_EQ(0u, added_extensions.size()); @@ -553,11 +551,11 @@ service()->OnImeInfoChanged(std::move(info_array)); ASSERT_EQ(1u, added_extensions.size()); ASSERT_EQ(1u, std::get<1>(added_extensions[0]).size()); - EXPECT_EQ(android_ime_id1, ceiu::GetComponentIDByInputMethodID( + EXPECT_EQ(android_ime_id1, aeiu::GetComponentIDByInputMethodID( std::get<1>(added_extensions[0])[0].id())); EXPECT_EQ(display_name1, std::get<1>(added_extensions[0])[0].name()); ASSERT_EQ(1u, std::get<1>(added_extensions[0])[0].language_codes().size()); - EXPECT_TRUE(chromeos::extension_ime_util::IsArcIME( + EXPECT_TRUE(ash::extension_ime_util::IsArcIME( std::get<1>(added_extensions[0])[0].id())); // Emulate enabling ARC IME from chrome://settings. @@ -583,10 +581,10 @@ // The ARC IMEs should be registered as two IMEs in one extension. ASSERT_EQ(1u, added_extensions.size()); ASSERT_EQ(2u, std::get<1>(added_extensions[0]).size()); - EXPECT_EQ(android_ime_id1, ceiu::GetComponentIDByInputMethodID( + EXPECT_EQ(android_ime_id1, aeiu::GetComponentIDByInputMethodID( std::get<1>(added_extensions[0])[0].id())); EXPECT_EQ(display_name1, std::get<1>(added_extensions[0])[0].name()); - EXPECT_EQ(android_ime_id2, ceiu::GetComponentIDByInputMethodID( + EXPECT_EQ(android_ime_id2, aeiu::GetComponentIDByInputMethodID( std::get<1>(added_extensions[0])[1].id())); EXPECT_EQ(display_name2, std::get<1>(added_extensions[0])[1].name()); @@ -600,22 +598,22 @@ } TEST_F(ArcInputMethodManagerServiceTest, EnableArcIMEsOnlyInTabletMode) { - namespace ceiu = chromeos::extension_ime_util; + namespace aeiu = ::ash::extension_ime_util; using crx_file::id_util::GenerateId; constexpr char kArcIMEProxyExtensionName[] = "org.chromium.arc.inputmethod.proxy"; const std::string extension_ime_id = - ceiu::GetInputMethodID(GenerateId("test.extension.ime"), "us"); + aeiu::GetInputMethodID(GenerateId("test.extension.ime"), "us"); const std::string component_extension_ime_id = - ceiu::GetComponentInputMethodID( + aeiu::GetComponentInputMethodID( GenerateId("test.component.extension.ime"), "us"); const std::string proxy_ime_extension_id = crx_file::id_util::GenerateId(kArcIMEProxyExtensionName); const std::string android_ime_id = "test.arc.ime"; const std::string arc_ime_id = - ceiu::GetArcInputMethodID(proxy_ime_extension_id, android_ime_id); + aeiu::GetArcInputMethodID(proxy_ime_extension_id, android_ime_id); // Start from tablet mode. ToggleTabletMode(true); @@ -709,22 +707,22 @@ TEST_F(ArcInputMethodManagerServiceTest, RemoveArcIMEsWhenAccessibilityKeyboardEnabled) { - namespace ceiu = chromeos::extension_ime_util; + namespace aeiu = ::ash::extension_ime_util; using crx_file::id_util::GenerateId; constexpr char kArcIMEProxyExtensionName[] = "org.chromium.arc.inputmethod.proxy"; const std::string extension_ime_id = - ceiu::GetInputMethodID(GenerateId("test.extension.ime"), "us"); + aeiu::GetInputMethodID(GenerateId("test.extension.ime"), "us"); const std::string component_extension_ime_id = - ceiu::GetComponentInputMethodID( + aeiu::GetComponentInputMethodID( GenerateId("test.component.extension.ime"), "us"); const std::string proxy_ime_extension_id = crx_file::id_util::GenerateId(kArcIMEProxyExtensionName); const std::string android_ime_id = "test.arc.ime"; const std::string arc_ime_id = - ceiu::GetArcInputMethodID(proxy_ime_extension_id, android_ime_id); + aeiu::GetArcInputMethodID(proxy_ime_extension_id, android_ime_id); // Start from tablet mode. ToggleTabletMode(true); @@ -805,22 +803,22 @@ TEST_F(ArcInputMethodManagerServiceTest, AllowArcIMEsWhileCommandLineFlagIsSet) { - namespace ceiu = chromeos::extension_ime_util; + namespace aeiu = ::ash::extension_ime_util; using crx_file::id_util::GenerateId; constexpr char kArcIMEProxyExtensionName[] = "org.chromium.arc.inputmethod.proxy"; const std::string extension_ime_id = - ceiu::GetInputMethodID(GenerateId("test.extension.ime"), "us"); + aeiu::GetInputMethodID(GenerateId("test.extension.ime"), "us"); const std::string component_extension_ime_id = - ceiu::GetComponentInputMethodID( + aeiu::GetComponentInputMethodID( GenerateId("test.component.extension.ime"), "us"); const std::string proxy_ime_extension_id = crx_file::id_util::GenerateId(kArcIMEProxyExtensionName); const std::string android_ime_id = "test.arc.ime"; const std::string arc_ime_id = - ceiu::GetArcInputMethodID(proxy_ime_extension_id, android_ime_id); + aeiu::GetArcInputMethodID(proxy_ime_extension_id, android_ime_id); // Add '--enable-virtual-keyboard' flag. base::test::ScopedCommandLine scoped_command_line; @@ -915,11 +913,10 @@ // Enable the ARC IME. ui::IMEBridge::Get()->SetCurrentEngineHandler(engine_handler); - engine_handler->Enable( - chromeos::extension_ime_util::GetComponentIDByInputMethodID( - std::get<1>(imm()->state()->added_input_method_extensions_.at(0)) - .at(0) - .id())); + engine_handler->Enable(ash::extension_ime_util::GetComponentIDByInputMethodID( + std::get<1>(imm()->state()->added_input_method_extensions_.at(0)) + .at(0) + .id())); mock_input_method.SetFocusedTextInputClient(&dummy_text_input_client); ASSERT_EQ(0, bridge()->focus_calls_count_); @@ -932,17 +929,17 @@ } TEST_F(ArcInputMethodManagerServiceTest, DisableFallbackVirtualKeyboard) { - namespace ceiu = chromeos::extension_ime_util; + namespace aeiu = ::ash::extension_ime_util; using crx_file::id_util::GenerateId; ToggleTabletMode(true); const std::string extension_ime_id = - ceiu::GetInputMethodID(GenerateId("test.extension.ime"), "us"); + aeiu::GetInputMethodID(GenerateId("test.extension.ime"), "us"); const std::string component_extension_ime_id = - ceiu::GetComponentInputMethodID( + aeiu::GetComponentInputMethodID( GenerateId("test.component.extension.ime"), "us"); - const std::string arc_ime_id = ceiu::GetArcInputMethodID( + const std::string arc_ime_id = aeiu::GetArcInputMethodID( GenerateId("test.arc.ime"), "ime.id.in.arc.container"); // Set active input method to the extension ime. @@ -1004,11 +1001,10 @@ // Enable the ARC IME. ui::IMEBridge::Get()->SetCurrentEngineHandler(engine_handler); - engine_handler->Enable( - chromeos::extension_ime_util::GetComponentIDByInputMethodID( - std::get<1>(imm()->state()->added_input_method_extensions_.at(0)) - .at(0) - .id())); + engine_handler->Enable(ash::extension_ime_util::GetComponentIDByInputMethodID( + std::get<1>(imm()->state()->added_input_method_extensions_.at(0)) + .at(0) + .id())); mock_input_method.SetFocusedTextInputClient(&dummy_text_input_client); @@ -1073,11 +1069,10 @@ // Enable the ARC IME. ui::IMEBridge::Get()->SetCurrentEngineHandler(engine_handler); - engine_handler->Enable( - chromeos::extension_ime_util::GetComponentIDByInputMethodID( - std::get<1>(imm()->state()->added_input_method_extensions_.at(0)) - .at(0) - .id())); + engine_handler->Enable(ash::extension_ime_util::GetComponentIDByInputMethodID( + std::get<1>(imm()->state()->added_input_method_extensions_.at(0)) + .at(0) + .id())); mock_input_method.SetFocusedTextInputClient(&dummy_text_input_client); // Notify non-empty bounds should cause a visibility changed event now.
diff --git a/chrome/browser/ash/arc/input_method_manager/arc_input_method_state.cc b/chrome/browser/ash/arc/input_method_manager/arc_input_method_state.cc index 0ae06e5..f8b7f3cb 100644 --- a/chrome/browser/ash/arc/input_method_manager/arc_input_method_state.cc +++ b/chrome/browser/ash/arc/input_method_manager/arc_input_method_state.cc
@@ -17,8 +17,8 @@ namespace arc { -using InputMethodDescriptor = ::chromeos::input_method::InputMethodDescriptor; -using InputMethodDescriptors = ::chromeos::input_method::InputMethodDescriptors; +using InputMethodDescriptor = ::ash::input_method::InputMethodDescriptor; +using InputMethodDescriptors = ::ash::input_method::InputMethodDescriptors; ArcInputMethodState::ArcInputMethodState(const Delegate* const delegate) : delegate_(delegate) {}
diff --git a/chrome/browser/ash/arc/input_method_manager/arc_input_method_state.h b/chrome/browser/ash/arc/input_method_manager/arc_input_method_state.h index 3eb36f15..7fd16c3 100644 --- a/chrome/browser/ash/arc/input_method_manager/arc_input_method_state.h +++ b/chrome/browser/ash/arc/input_method_manager/arc_input_method_state.h
@@ -22,8 +22,8 @@ public: virtual ~Delegate() = default; virtual bool ShouldArcIMEAllowed() const = 0; - virtual chromeos::input_method::InputMethodDescriptor - BuildInputMethodDescriptor(const mojom::ImeInfoPtr& info) const = 0; + virtual ash::input_method::InputMethodDescriptor BuildInputMethodDescriptor( + const mojom::ImeInfoPtr& info) const = 0; }; explicit ArcInputMethodState(const Delegate* const delegate); @@ -39,9 +39,9 @@ void DisableInputMethod(const std::string& ime_id); // Return the InputMethodDescriptors which are installed and allowed. - chromeos::input_method::InputMethodDescriptors GetActiveInputMethods() const; + ash::input_method::InputMethodDescriptors GetActiveInputMethods() const; // Return the InputMethodDescriptors which are enabled and allowed. - chromeos::input_method::InputMethodDescriptors GetEnabledInputMethods() const; + ash::input_method::InputMethodDescriptors GetEnabledInputMethods() const; private: class InputMethodEntry { @@ -49,7 +49,7 @@ std::string ime_id_; bool enabled_{false}; bool always_allowed_{false}; - chromeos::input_method::InputMethodDescriptor descriptor_; + ash::input_method::InputMethodDescriptor descriptor_; }; void SetInputMethodEnabled(const std::string& ime_id, bool enabled);
diff --git a/chrome/browser/ash/arc/input_method_manager/arc_input_method_state_unittest.cc b/chrome/browser/ash/arc/input_method_manager/arc_input_method_state_unittest.cc index 7b48c10..1dce857 100644 --- a/chrome/browser/ash/arc/input_method_manager/arc_input_method_state_unittest.cc +++ b/chrome/browser/ash/arc/input_method_manager/arc_input_method_state_unittest.cc
@@ -17,12 +17,11 @@ namespace arc { -using ::chromeos::extension_ime_util::GetArcInputMethodID; -using ::chromeos::input_method::InputMethodDescriptor; -using ::chromeos::input_method::InputMethodDescriptors; - namespace { +using ::ash::input_method::InputMethodDescriptor; +using ::ash::input_method::InputMethodDescriptors; + mojom::ImeInfoPtr GenerateImeInfo(const std::string& id, bool enabled, bool always_allowed) {
diff --git a/chrome/browser/ash/arc/input_method_manager/input_connection_impl_unittest.cc b/chrome/browser/ash/arc/input_method_manager/input_connection_impl_unittest.cc index be5363e03..571c9ca 100644 --- a/chrome/browser/ash/arc/input_method_manager/input_connection_impl_unittest.cc +++ b/chrome/browser/ash/arc/input_method_manager/input_connection_impl_unittest.cc
@@ -65,15 +65,13 @@ }; class TestInputMethodManager - : public chromeos::input_method::MockInputMethodManager { + : public ash::input_method::MockInputMethodManager { public: TestInputMethodManager() : state_(base::MakeRefCounted< - chromeos::input_method::MockInputMethodManager::State>()) {} - + ash::input_method::MockInputMethodManager::State>()) {} TestInputMethodManager(const TestInputMethodManager&) = delete; TestInputMethodManager& operator=(const TestInputMethodManager&) = delete; - ~TestInputMethodManager() override = default; scoped_refptr<InputMethodManager::State> GetActiveIMEState() override { @@ -198,7 +196,7 @@ void SetUp() override { ui::IMEBridge::Initialize(); - chromeos::input_method::InputMethodManager::Initialize( + ash::input_method::InputMethodManager::Initialize( new TestInputMethodManager); bridge_ = std::make_unique<TestInputMethodManagerBridge>(); engine_ = std::make_unique<ash::input_method::InputMethodEngine>(); @@ -218,7 +216,7 @@ ui::IMEBridge::Get()->SetInputContextHandler(nullptr); engine_.reset(); bridge_.reset(); - chromeos::input_method::InputMethodManager::Shutdown(); + ash::input_method::InputMethodManager::Shutdown(); ui::IMEBridge::Shutdown(); }
diff --git a/chrome/browser/ash/arc/input_method_manager/input_method_prefs.cc b/chrome/browser/ash/arc/input_method_manager/input_method_prefs.cc index baf5b1a8..a0ac37f 100644 --- a/chrome/browser/ash/arc/input_method_manager/input_method_prefs.cc +++ b/chrome/browser/ash/arc/input_method_manager/input_method_prefs.cc
@@ -14,8 +14,8 @@ namespace arc { -namespace ce = ::chromeos::extension_ime_util; -using ::chromeos::input_method::InputMethodDescriptors; +namespace ce = ::ash::extension_ime_util; +using ::ash::input_method::InputMethodDescriptors; InputMethodPrefs::InputMethodPrefs(Profile* profile) : profile_(profile) {} InputMethodPrefs::~InputMethodPrefs() = default; @@ -30,7 +30,7 @@ enabled_ime_ids, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY); base::EraseIf(enabled_ime_list, [](const auto& id) { - return chromeos::extension_ime_util::IsArcIME(id); + return ash::extension_ime_util::IsArcIME(id); }); for (const auto& descriptor : enabled_arc_imes) enabled_ime_list.push_back(descriptor.id());
diff --git a/chrome/browser/ash/arc/input_method_manager/input_method_prefs.h b/chrome/browser/ash/arc/input_method_manager/input_method_prefs.h index 2c00088..2961582 100644 --- a/chrome/browser/ash/arc/input_method_manager/input_method_prefs.h +++ b/chrome/browser/ash/arc/input_method_manager/input_method_prefs.h
@@ -25,7 +25,7 @@ // Updates input method related prefs according to the passed enabled ARC IME // list. void UpdateEnabledImes( - chromeos::input_method::InputMethodDescriptors enabled_arc_imes); + ash::input_method::InputMethodDescriptors enabled_arc_imes); // Returns the list of IMEs on the pref. std::set<std::string> GetEnabledImes() const;
diff --git a/chrome/browser/ash/arc/input_method_manager/input_method_prefs_unittest.cc b/chrome/browser/ash/arc/input_method_manager/input_method_prefs_unittest.cc index 29ce891..a56eb387 100644 --- a/chrome/browser/ash/arc/input_method_manager/input_method_prefs_unittest.cc +++ b/chrome/browser/ash/arc/input_method_manager/input_method_prefs_unittest.cc
@@ -33,14 +33,14 @@ } TEST_F(InputMethodPrefsTest, GetEnabledImes) { - namespace ceiu = chromeos::extension_ime_util; + namespace aeiu = ::ash::extension_ime_util; using crx_file::id_util::GenerateId; const std::string component_extension_ime_id = - ceiu::GetComponentInputMethodID( + aeiu::GetComponentInputMethodID( GenerateId("test.component.extension.ime"), "us"); const std::string arc_ime_id = - ceiu::GetArcInputMethodID(GenerateId("test.arc.ime"), "us"); + aeiu::GetArcInputMethodID(GenerateId("test.arc.ime"), "us"); profile()->GetPrefs()->SetString( prefs::kLanguageEnabledImes, @@ -55,17 +55,17 @@ } TEST_F(InputMethodPrefsTest, UpdateEnabledImes) { - namespace ceiu = chromeos::extension_ime_util; - using chromeos::input_method::InputMethodDescriptor; + namespace aeiu = ::ash::extension_ime_util; + using ::ash::input_method::InputMethodDescriptor; using crx_file::id_util::GenerateId; const std::string component_extension_ime_id = - ceiu::GetComponentInputMethodID( + aeiu::GetComponentInputMethodID( GenerateId("test.component.extension.ime"), "us"); const std::string arc_ime_id1 = - ceiu::GetArcInputMethodID(GenerateId("test.arc.ime"), "us"); + aeiu::GetArcInputMethodID(GenerateId("test.arc.ime"), "us"); const std::string arc_ime_id2 = - ceiu::GetArcInputMethodID(GenerateId("test.arc.ime2"), "us"); + aeiu::GetArcInputMethodID(GenerateId("test.arc.ime2"), "us"); PrefService* pref_service = profile()->GetPrefs();
diff --git a/chrome/browser/ash/arc/intent_helper/arc_external_protocol_dialog.cc b/chrome/browser/ash/arc/intent_helper/arc_external_protocol_dialog.cc index 87bd2bd..11e792b 100644 --- a/chrome/browser/ash/arc/intent_helper/arc_external_protocol_dialog.cc +++ b/chrome/browser/ash/arc/intent_helper/arc_external_protocol_dialog.cc
@@ -34,8 +34,8 @@ #include "third_party/skia/include/core/SkColor.h" #include "ui/base/models/image_model.h" #include "ui/base/window_open_disposition.h" +#include "ui/color/color_id.h" #include "ui/gfx/paint_vector_icon.h" -#include "ui/native_theme/native_theme.h" #include "url/gurl.h" using content::WebContents; @@ -68,8 +68,7 @@ const gfx::VectorIcon& icon = device_type == sync_pb::SyncEnums::TYPE_TABLET ? kTabletIcon : kHardwareSmartphoneIcon; - return ui::ImageModel::FromVectorIcon( - icon, ui::NativeTheme::kColorId_DefaultIconColor, kDeviceIconSize); + return ui::ImageModel::FromVectorIcon(icon, ui::kColorIcon, kDeviceIconSize); } // Adds |devices| to |picker_entries| and returns the new list. The devices are
diff --git a/chrome/browser/ash/arc/tracing/arc_tracing_bridge.cc b/chrome/browser/ash/arc/tracing/arc_tracing_bridge.cc index c284cd52..3f382c01 100644 --- a/chrome/browser/ash/arc/tracing/arc_tracing_bridge.cc +++ b/chrome/browser/ash/arc/tracing/arc_tracing_bridge.cc
@@ -33,11 +33,6 @@ namespace { -// The maximum size used to store one trace event. The ad hoc trace format for -// atrace is 1024 bytes. Here we add additional size as we're using JSON and -// have additional data fields. -constexpr size_t kArcTraceMessageLength = 1024 + 512; - // The prefix of the categories to be shown on the trace selection UI. // The space at the end of the string is intentional as the separator between // the prefix and the real categories. @@ -97,7 +92,7 @@ // Make sure we don't continue to wait for any of the bridge's callbacks. OnTracingStartedOnUI(false /*success*/); - OnTraceDataOnUI(std::string() /*data*/); + OnTracingStoppedOnUI(); } private: @@ -188,13 +183,13 @@ if (bridge->state() != ArcTracingBridge::State::kEnabled) continue; // |this| never gets destructed, so it's OK to bind an unretained pointer. - bridge->StopAndFlush(base::BindOnce( - &ArcTracingDataSource::OnTraceDataOnUI, base::Unretained(this))); + bridge->StopTracing(base::BindOnce( + &ArcTracingDataSource::OnTracingStoppedOnUI, base::Unretained(this))); } // There may not have been any bridges left in State::kEnabled. This will // call the callback if all bridges are already stopped. - OnTraceDataOnUI(std::string()); + OnTracingStoppedOnUI(); } // Called by each bridge when it has started tracing. Also called when a @@ -208,7 +203,7 @@ // Called by each bridge when it has stopped tracing. Also called when a // bridge is unregisted. Records the supplied |data| into the // |producer_on_ui_thread_|'s buffer. - void OnTraceDataOnUI(const std::string& data) { + void OnTracingStoppedOnUI() { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); // When a bridge unregisters, we may not actually be stopping. @@ -217,18 +212,6 @@ DCHECK(producer_on_ui_thread_); - if (!data.empty()) { - if (!trace_writer_) { - trace_writer_ = - std::make_unique<tracing::SystemTraceWriter<std::string>>( - producer_on_ui_thread_, data_source_config_.target_buffer(), - tracing::SystemTraceWriter<std::string>::TraceType::kJson); - } else { - trace_writer_->WriteData(","); - } - trace_writer_->WriteData(data); - } - if (AreAllBridgesStopped()) { if (!trace_writer_) { OnTraceDataCommittedOnUI(); @@ -295,11 +278,16 @@ return ArcTracingBridgeFactory::GetForBrowserContext(context); } +// static +ArcTracingBridge* ArcTracingBridge::GetForBrowserContextForTesting( + content::BrowserContext* context) { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + return ArcTracingBridgeFactory::GetForBrowserContextForTesting(context); +} + ArcTracingBridge::ArcTracingBridge(content::BrowserContext* context, ArcBridgeService* bridge_service) - : arc_bridge_service_(bridge_service), - agent_(this), - reader_(std::make_unique<ArcTracingReader>()) { + : arc_bridge_service_(bridge_service), agent_(this) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); arc_bridge_service_->tracing()->AddObserver(this); ArcTracingDataSource::GetInstance()->RegisterBridgeOnUI(this); @@ -309,9 +297,6 @@ DCHECK_CURRENTLY_ON(content::BrowserThread::UI); ArcTracingDataSource::GetInstance()->UnregisterBridgeOnUI(this); arc_bridge_service_->tracing()->RemoveObserver(this); - - // Delete the reader on the IO thread. - content::GetIOThreadTaskRunner({})->DeleteSoon(FROM_HERE, reader_.release()); } void ArcTracingBridge::GetCategories(std::set<std::string>* category_set) { @@ -345,7 +330,7 @@ } void ArcTracingBridge::StartTracing(const std::string& config, - SuccessCallback callback) { + StartCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); if (state_ != State::kDisabled) { @@ -357,11 +342,7 @@ base::trace_event::TraceConfig trace_config(config); - base::ScopedFD write_fd, read_fd; - bool success = - trace_config.IsSystraceEnabled() && CreateSocketPair(&read_fd, &write_fd); - - if (!success) { + if (!trace_config.IsSystraceEnabled()) { OnArcTracingStarted(std::move(callback), false /*success*/); return; } @@ -383,19 +364,12 @@ } tracing_instance->StartTracing( - selected_categories, mojo::WrapPlatformFile(std::move(write_fd)), + selected_categories, mojo::ScopedHandle(), base::BindOnce(&ArcTracingBridge::OnArcTracingStarted, weak_ptr_factory_.GetWeakPtr(), std::move(callback))); - - // |reader_| will be destroyed after us on the IO thread, so it's OK to use an - // unretained pointer. - content::GetIOThreadTaskRunner({})->PostTask( - FROM_HERE, - base::BindOnce(&ArcTracingReader::StartTracing, - base::Unretained(reader_.get()), std::move(read_fd))); } -void ArcTracingBridge::OnArcTracingStarted(SuccessCallback callback, +void ArcTracingBridge::OnArcTracingStarted(StartCallback callback, bool success) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); DCHECK_EQ(State::kStarting, state_); @@ -403,12 +377,12 @@ std::move(callback).Run(success); } -void ArcTracingBridge::StopAndFlush(TraceDataCallback callback) { +void ArcTracingBridge::StopTracing(StopCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); if (state_ != State::kEnabled) { DLOG(WARNING) << "Cannot stop tracing, it is not enabled."; - std::move(callback).Run(std::string()); + std::move(callback).Run(); return; } state_ = State::kStopping; @@ -424,32 +398,14 @@ weak_ptr_factory_.GetWeakPtr(), std::move(callback))); } -void ArcTracingBridge::OnArcTracingStopped( - TraceDataCallback tracing_stopped_callback, - bool success) { - DCHECK_CURRENTLY_ON(content::BrowserThread::UI); - DCHECK_EQ(State::kStopping, state_); - if (!success) { - DLOG(WARNING) << "Failed to stop ARC tracing, closing file anyway."; - } - // |reader_| will be destroyed after us on the IO thread, so it's OK to use an - // unretained pointer. - content::GetIOThreadTaskRunner({})->PostTaskAndReplyWithResult( - FROM_HERE, - base::BindOnce(&ArcTracingReader::StopTracing, - base::Unretained(reader_.get())), - base::BindOnce(&ArcTracingBridge::OnTracingReaderStopped, - weak_ptr_factory_.GetWeakPtr(), - std::move(tracing_stopped_callback))); -} - -void ArcTracingBridge::OnTracingReaderStopped( - TraceDataCallback tracing_stopped_callback, - const std::string& data) { +void ArcTracingBridge::OnArcTracingStopped(StopCallback callback, + bool success) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); DCHECK_EQ(State::kStopping, state_); state_ = State::kDisabled; - std::move(tracing_stopped_callback).Run(data); + if (!success) + LOG(ERROR) << "Failed to stop tracing"; + std::move(callback).Run(); } ArcTracingBridge::ArcTracingAgent::ArcTracingAgent(ArcTracingBridge* bridge) @@ -462,68 +418,5 @@ bridge_->GetCategories(category_set); } -ArcTracingBridge::ArcTracingReader::ArcTracingReader() = default; - -ArcTracingBridge::ArcTracingReader::~ArcTracingReader() { - DCHECK(!fd_watcher_); -} - -void ArcTracingBridge::ArcTracingReader::StartTracing(base::ScopedFD read_fd) { - DCHECK_CURRENTLY_ON(content::BrowserThread::IO); - read_fd_ = std::move(read_fd); - // We own |fd_watcher_|, so it's OK to use an unretained pointer. - fd_watcher_ = base::FileDescriptorWatcher::WatchReadable( - read_fd_.get(), - base::BindRepeating(&ArcTracingReader::OnTraceDataAvailable, - base::Unretained(this))); -} - -void ArcTracingBridge::ArcTracingReader::OnTraceDataAvailable() { - DCHECK_CURRENTLY_ON(content::BrowserThread::IO); - - char buf[kArcTraceMessageLength]; - std::vector<base::ScopedFD> unused_fds; - ssize_t n = base::UnixDomainSocket::RecvMsg( - read_fd_.get(), buf, kArcTraceMessageLength, &unused_fds); - if (n < 0) { - DPLOG(WARNING) << "Unexpected error while reading trace from client."; - // Do nothing here as StopTracing will do the clean up and the existing - // trace logs will be returned. - return; - } - - if (n == 0) { - // When EOF is reached, stop listening for changes since there's never - // going to be any more data to be read. The rest of the cleanup will be - // done in StopTracing. - fd_watcher_.reset(); - return; - } - - if (n > static_cast<ssize_t>(kArcTraceMessageLength)) { - DLOG(WARNING) << "Unexpected data size when reading trace from client."; - return; - } - ring_buffer_.SaveToBuffer(std::string(buf, n)); -} - -std::string ArcTracingBridge::ArcTracingReader::StopTracing() { - DCHECK_CURRENTLY_ON(content::BrowserThread::IO); - fd_watcher_.reset(); - read_fd_.reset(); - - bool append_comma = false; - std::string data; - for (auto it = ring_buffer_.Begin(); it; ++it) { - if (append_comma) - data.append(","); - else - append_comma = true; - data.append(**it); - } - ring_buffer_.Clear(); - - return data; -} } // namespace arc
diff --git a/chrome/browser/ash/arc/tracing/arc_tracing_bridge.h b/chrome/browser/ash/arc/tracing/arc_tracing_bridge.h index ba59630..b097bce 100644 --- a/chrome/browser/ash/arc/tracing/arc_tracing_bridge.h +++ b/chrome/browser/ash/arc/tracing/arc_tracing_bridge.h
@@ -11,10 +11,6 @@ #include <vector> #include "base/callback_forward.h" -#include "base/containers/ring_buffer.h" -#include "base/files/file_descriptor_watcher_posix.h" -#include "base/files/scoped_file.h" -#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/synchronization/lock.h" #include "base/thread_annotations.h" @@ -39,6 +35,8 @@ // or nullptr if the browser |context| is not allowed to use ARC. static ArcTracingBridge* GetForBrowserContext( content::BrowserContext* context); + static ArcTracingBridge* GetForBrowserContextForTesting( + content::BrowserContext* context); ArcTracingBridge(content::BrowserContext* context, ArcBridgeService* bridge_service); @@ -57,16 +55,15 @@ enum class State { kDisabled, kStarting, kEnabled, kStopping }; State state() const { return state_; } - using SuccessCallback = base::OnceCallback<void(bool)>; - using TraceDataCallback = base::OnceCallback<void(const std::string& data)>; + using StartCallback = base::OnceCallback<void(bool)>; + using StopCallback = base::OnceCallback<void()>; // Starts tracing and calls |callback| when started indicating whether tracing // was started successfully via its parameter. - void StartTracing(const std::string& config, SuccessCallback callback); + void StartTracing(const std::string& config, StartCallback callback); - // Stops tracing and calls |callback| with the recorded trace data once - // stopped. If unsuccessful, calls |callback| with an empty data string. - void StopAndFlush(TraceDataCallback callback); + // Stops tracing and calls |callback| when stopped. + void StopTracing(StopCallback callback); private: // TODO(crbug.com/839086): Remove once we have replaced the legacy tracing @@ -87,45 +84,13 @@ ArcTracingBridge* const bridge_; }; - // A helper class for reading trace data from the client side. We separate - // this from |ArcTracingAgentImpl| to isolate the logic that runs on browser's - // IO thread. All the functions in this class except for constructor are - // expected to be run on browser's IO thread. - class ArcTracingReader { - public: - ArcTracingReader(); - - ArcTracingReader(const ArcTracingReader&) = delete; - ArcTracingReader& operator=(const ArcTracingReader&) = delete; - - ~ArcTracingReader(); - - // Starts reading trace data from the given file descriptor. - void StartTracing(base::ScopedFD read_fd); - // Stops reading and returns the collected trace data. - std::string StopTracing(); - - private: - void OnTraceDataAvailable(); - - // Number of events for the ring buffer. - static constexpr size_t kTraceEventBufferSize = 64000; - - base::ScopedFD read_fd_; - std::unique_ptr<base::FileDescriptorWatcher::Controller> fd_watcher_; - base::RingBuffer<std::string, kTraceEventBufferSize> ring_buffer_; - }; - struct Category; // Callback for QueryAvailableCategories. void OnCategoriesReady(const std::vector<std::string>& categories); - void OnArcTracingStarted(SuccessCallback callback, bool success); - void OnArcTracingStopped(TraceDataCallback tracing_stopped_callback, - bool success); - void OnTracingReaderStopped(TraceDataCallback tracing_stopped_callback, - const std::string& data); + void OnArcTracingStarted(StartCallback callback, bool success); + void OnArcTracingStopped(StopCallback callback, bool success); ArcBridgeService* const arc_bridge_service_; // Owned by ArcServiceManager. @@ -135,8 +100,6 @@ ArcTracingAgent agent_; - std::unique_ptr<ArcTracingReader> reader_; - State state_ = State::kDisabled; // NOTE: Weak pointers must be invalidated before all other member variables
diff --git a/chrome/browser/ash/arc/tracing/arc_tracing_bridge_unittest.cc b/chrome/browser/ash/arc/tracing/arc_tracing_bridge_unittest.cc new file mode 100644 index 0000000..d7d1f5bd --- /dev/null +++ b/chrome/browser/ash/arc/tracing/arc_tracing_bridge_unittest.cc
@@ -0,0 +1,93 @@ +// 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 <memory> + +#include "base/bind.h" +#include "base/trace_event/trace_event.h" +#include "chrome/browser/ash/arc/tracing/arc_tracing_bridge.h" +#include "chrome/test/base/testing_browser_process.h" +#include "chrome/test/base/testing_profile_manager.h" +#include "components/arc/session/arc_bridge_service.h" +#include "components/arc/test/connection_holder_util.h" +#include "components/arc/test/fake_tracing_instance.h" +#include "content/public/test/browser_task_environment.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace arc { + +namespace { + +std::string GetTracingConfig() { + base::trace_event::TraceConfig config("-*,exo,viz,toplevel,gpu", + base::trace_event::RECORD_CONTINUOUSLY); + config.EnableSystrace(); + return config.ToString(); +} + +} // namespace + +class ArcTracingBridgeTest : public testing::Test { + public: + ArcTracingBridgeTest() = default; + ~ArcTracingBridgeTest() override = default; + + ArcTracingBridgeTest(const ArcTracingBridgeTest&) = delete; + ArcTracingBridgeTest& operator=(const ArcTracingBridgeTest&) = delete; + + void SetUp() override { + profile_manager_ = std::make_unique<TestingProfileManager>( + TestingBrowserProcess::GetGlobal()); + ASSERT_TRUE(profile_manager_->SetUp()); + profile_ = profile_manager_->CreateTestingProfile("test-user"); + + tracing_bridge_ = + std::make_unique<ArcTracingBridge>(profile_, &bridge_service_); + bridge_service_.tracing()->SetInstance(&fake_tracing_instance_); + WaitForInstanceReady(bridge_service_.tracing()); + } + + void TearDown() override { + bridge_service_.tracing()->CloseInstance(&fake_tracing_instance_); + tracing_bridge_.reset(); + profile_manager_.reset(); + } + + protected: + ArcTracingBridge* tracing_bridge() { return tracing_bridge_.get(); } + const FakeTracingInstance& tracing_instance() const { + return fake_tracing_instance_; + } + + private: + content::BrowserTaskEnvironment task_environment_; + std::unique_ptr<TestingProfileManager> profile_manager_; + Profile* profile_ = nullptr; + + ArcBridgeService bridge_service_; + std::unique_ptr<ArcTracingBridge> tracing_bridge_; + FakeTracingInstance fake_tracing_instance_; +}; + +TEST_F(ArcTracingBridgeTest, Creation) { + ASSERT_TRUE(tracing_bridge()); +} + +TEST_F(ArcTracingBridgeTest, Tracing) { + EXPECT_EQ(ArcTracingBridge::State::kDisabled, tracing_bridge()->state()); + EXPECT_EQ(0, tracing_instance().start_count()); + EXPECT_EQ(0, tracing_instance().stop_count()); + tracing_bridge()->StartTracing( + GetTracingConfig(), + base::BindOnce([](bool success) { EXPECT_TRUE(success); })); + EXPECT_EQ(ArcTracingBridge::State::kEnabled, tracing_bridge()->state()); + EXPECT_EQ(1, tracing_instance().start_count()); + EXPECT_EQ(0, tracing_instance().stop_count()); + tracing_bridge()->StopTracing(base::BindOnce([]() {})); + EXPECT_EQ(ArcTracingBridge::State::kDisabled, tracing_bridge()->state()); + EXPECT_EQ(1, tracing_instance().start_count()); + EXPECT_EQ(1, tracing_instance().stop_count()); +} + +} // namespace arc
diff --git a/chrome/browser/ash/base/locale_util.cc b/chrome/browser/ash/base/locale_util.cc index 69d13d4..967061c3 100644 --- a/chrome/browser/ash/base/locale_util.cc +++ b/chrome/browser/ash/base/locale_util.cc
@@ -77,10 +77,9 @@ extension_l10n_util::SetPreferredLocale(data->result.requested_locale); if (data->enable_locale_keyboard_layouts) { - auto* manager = chromeos::input_method::InputMethodManager::Get(); - scoped_refptr<chromeos::input_method::InputMethodManager::State> - ime_state = UserSessionManager::GetInstance()->GetDefaultIMEState( - data->profile); + auto* manager = input_method::InputMethodManager::Get(); + scoped_refptr<input_method::InputMethodManager::State> ime_state = + UserSessionManager::GetInstance()->GetDefaultIMEState(data->profile); if (data->login_layouts_only) { // Enable the hardware keyboard layouts and locale-specific layouts // suitable for use on the login screen. This will also switch to the @@ -98,8 +97,8 @@ // Enable all locale-specific layouts. std::vector<std::string> input_methods; manager->GetInputMethodUtil()->GetInputMethodIdsFromLanguageCode( - data->result.loaded_locale, - chromeos::input_method::kKeyboardLayoutsOnly, &input_methods); + data->result.loaded_locale, input_method::kKeyboardLayoutsOnly, + &input_methods); for (std::vector<std::string>::const_iterator it = input_methods.begin(); it != input_methods.end(); ++it) { ime_state->EnableInputMethod(*it);
diff --git a/chrome/browser/ash/crostini/crostini_unsupported_action_notifier.cc b/chrome/browser/ash/crostini/crostini_unsupported_action_notifier.cc index 37ad2ba..bc3c5b6 100644 --- a/chrome/browser/ash/crostini/crostini_unsupported_action_notifier.cc +++ b/chrome/browser/ash/crostini/crostini_unsupported_action_notifier.cc
@@ -67,7 +67,7 @@ // Testing on using Debian/stretch on Eve shows Crostini supports all tested xkb // IMEs but no non-xkb IMEs. bool CrostiniUnsupportedActionNotifier::IsIMESupportedByCrostini( - const chromeos::input_method::InputMethodDescriptor& method) { + const ash::input_method::InputMethodDescriptor& method) { return method.id().find("xkb:") != std::string::npos; } @@ -83,7 +83,7 @@ } void CrostiniUnsupportedActionNotifier::InputMethodChanged( - chromeos::input_method::InputMethodManager* manager, + ash::input_method::InputMethodManager* manager, Profile* profile, bool show_message) { ShowIMEUnsupportedNotificationIfNeeded(); @@ -164,9 +164,9 @@ static_cast<int>(ash::AppType::CROSTINI_APP)); } -chromeos::input_method::InputMethodDescriptor +ash::input_method::InputMethodDescriptor CrostiniUnsupportedActionNotifier::Delegate::GetCurrentInputMethod() { - return chromeos::input_method::InputMethodManager::Get() + return ash::input_method::InputMethodManager::Get() ->GetActiveIMEState() ->GetCurrentInputMethod(); } @@ -182,8 +182,8 @@ std::string CrostiniUnsupportedActionNotifier::Delegate::GetLocalizedDisplayName( - const chromeos::input_method::InputMethodDescriptor& descriptor) { - return chromeos::input_method::InputMethodManager::Get() + const ash::input_method::InputMethodDescriptor& descriptor) { + return ash::input_method::InputMethodManager::Get() ->GetInputMethodUtil() ->GetLocalizedDisplayName(descriptor); } @@ -227,13 +227,13 @@ } void CrostiniUnsupportedActionNotifier::Delegate::AddInputMethodObserver( - chromeos::input_method::InputMethodManager::Observer* observer) { - chromeos::input_method::InputMethodManager::Get()->AddObserver(observer); + ash::input_method::InputMethodManager::Observer* observer) { + ash::input_method::InputMethodManager::Get()->AddObserver(observer); } void CrostiniUnsupportedActionNotifier::Delegate::RemoveInputMethodObserver( - chromeos::input_method::InputMethodManager::Observer* observer) { - chromeos::input_method::InputMethodManager::Get()->RemoveObserver(observer); + ash::input_method::InputMethodManager::Observer* observer) { + ash::input_method::InputMethodManager::Get()->RemoveObserver(observer); } void CrostiniUnsupportedActionNotifier::Delegate::AddKeyboardControllerObserver(
diff --git a/chrome/browser/ash/crostini/crostini_unsupported_action_notifier.h b/chrome/browser/ash/crostini/crostini_unsupported_action_notifier.h index 0363da8..415da35 100644 --- a/chrome/browser/ash/crostini/crostini_unsupported_action_notifier.h +++ b/chrome/browser/ash/crostini/crostini_unsupported_action_notifier.h
@@ -24,7 +24,7 @@ class CrostiniUnsupportedActionNotifier : public ash::TabletModeObserver, public aura::client::FocusChangeObserver, - public chromeos::input_method::InputMethodManager::Observer, + public ash::input_method::InputMethodManager::Observer, public ash::KeyboardControllerObserver { public: // Adapter around external integrations which we can mock out for testing, @@ -41,8 +41,7 @@ virtual bool IsFocusedWindowCrostini(); // Gets the descriptor for the currently active input method. - virtual chromeos::input_method::InputMethodDescriptor - GetCurrentInputMethod(); + virtual ash::input_method::InputMethodDescriptor GetCurrentInputMethod(); // Is the current virtual keyboard visible. virtual bool IsVirtualKeyboardVisible(); @@ -53,7 +52,7 @@ // Gets a human-friendly name for the given input method descriptor // in the current display language. virtual std::string GetLocalizedDisplayName( - const chromeos::input_method::InputMethodDescriptor& descriptor); + const ash::input_method::InputMethodDescriptor& descriptor); // How long in milliseconds toasts should be displayed for. Timing varies // depending on e.g. whether screen magnification is enabled. @@ -65,9 +64,9 @@ virtual void AddTabletModeObserver(ash::TabletModeObserver* observer); virtual void RemoveTabletModeObserver(ash::TabletModeObserver* observer); virtual void AddInputMethodObserver( - chromeos::input_method::InputMethodManager::Observer* observer); + ash::input_method::InputMethodManager::Observer* observer); virtual void RemoveInputMethodObserver( - chromeos::input_method::InputMethodManager::Observer* observer); + ash::input_method::InputMethodManager::Observer* observer); virtual void AddKeyboardControllerObserver( ash::KeyboardControllerObserver* observer); virtual void RemoveKeyboardControllerObserver( @@ -92,8 +91,8 @@ void OnWindowFocused(aura::Window* gained_focus, aura::Window* lost_focus) override; - // chromeos::input_method::InputMethodManager::Observer: - void InputMethodChanged(chromeos::input_method::InputMethodManager* manager, + // ash::input_method::InputMethodManager::Observer: + void InputMethodChanged(ash::input_method::InputMethodManager* manager, Profile* profile, bool show_message) override; @@ -116,7 +115,7 @@ void ShowIMEUnsupportedNotificationIfNeeded(); bool IsIMESupportedByCrostini( - const chromeos::input_method::InputMethodDescriptor& method); + const ash::input_method::InputMethodDescriptor& method); std::unique_ptr<Delegate> delegate_; bool virtual_keyboard_unsupported_message_shown_ = false;
diff --git a/chrome/browser/ash/crostini/crostini_unsupported_action_notifier_unittest.cc b/chrome/browser/ash/crostini/crostini_unsupported_action_notifier_unittest.cc index 291e4ec..b42c183 100644 --- a/chrome/browser/ash/crostini/crostini_unsupported_action_notifier_unittest.cc +++ b/chrome/browser/ash/crostini/crostini_unsupported_action_notifier_unittest.cc
@@ -13,6 +13,7 @@ namespace crostini { +using ::ash::input_method::InputMethodDescriptor; using ::testing::_; using ::testing::Bool; using ::testing::Combine; @@ -20,8 +21,6 @@ using ::testing::Return; using ::testing::Truly; -using chromeos::input_method::InputMethodDescriptor; - class MockDelegate : public CrostiniUnsupportedActionNotifier::Delegate { public: MOCK_METHOD(bool, IsInTabletMode, (), (override)); @@ -52,11 +51,11 @@ (override)); MOCK_METHOD(void, AddInputMethodObserver, - (chromeos::input_method::InputMethodManager::Observer * observer), + (ash::input_method::InputMethodManager::Observer * observer), (override)); MOCK_METHOD(void, RemoveInputMethodObserver, - (chromeos::input_method::InputMethodManager::Observer * observer), + (ash::input_method::InputMethodManager::Observer * observer), (override)); MOCK_METHOD(void, AddKeyboardControllerObserver,
diff --git a/chrome/browser/ash/events/event_rewriter_unittest.cc b/chrome/browser/ash/events/event_rewriter_unittest.cc index bdfef84..c519836 100644 --- a/chrome/browser/ash/events/event_rewriter_unittest.cc +++ b/chrome/browser/ash/events/event_rewriter_unittest.cc
@@ -363,7 +363,7 @@ sync_preferences::TestingPrefServiceSyncable prefs_; std::unique_ptr<EventRewriterDelegateImpl> delegate_; - chromeos::input_method::FakeImeKeyboard fake_ime_keyboard_; + input_method::FakeImeKeyboard fake_ime_keyboard_; std::unique_ptr<ui::EventRewriterChromeOS> rewriter_; DeprecationNotificationController* deprecation_controller_; // Not owned. message_center::FakeMessageCenter message_center_; @@ -3836,7 +3836,7 @@ private: std::unique_ptr<EventRewriterDelegateImpl> delegate_; - chromeos::input_method::FakeImeKeyboard fake_ime_keyboard_; + input_method::FakeImeKeyboard fake_ime_keyboard_; std::unique_ptr<ui::EventRewriterChromeOS> rewriter_; EventBuffer buffer_; @@ -4635,7 +4635,7 @@ protected: sync_preferences::TestingPrefServiceSyncable prefs_; - chromeos::input_method::FakeImeKeyboard fake_ime_keyboard_; + input_method::FakeImeKeyboard fake_ime_keyboard_; std::unique_ptr<ui::EventRewriterChromeOS> event_rewriter_chromeos_; private:
diff --git a/chrome/browser/ash/file_manager/web_file_tasks.cc b/chrome/browser/ash/file_manager/web_file_tasks.cc index 7919d0d..7ac9b059 100644 --- a/chrome/browser/ash/file_manager/web_file_tasks.cc +++ b/chrome/browser/ash/file_manager/web_file_tasks.cc
@@ -71,12 +71,11 @@ DCHECK( apps::AppServiceProxyFactory::IsAppServiceAvailableForProfile(profile)); + // No event flags means the launch container will be based on the app + // settings. apps::AppServiceProxyFactory::GetForProfile(profile)->LaunchAppWithFiles( - task.app_id, - apps::GetEventFlags(apps::mojom::LaunchContainer::kLaunchContainerTab, - WindowOpenDisposition::NEW_FOREGROUND_TAB, - /* preferred_containner=*/false), - apps::mojom::LaunchSource::kFromFileManager, std::move(launch_files)); + task.app_id, ui::EF_NONE, apps::mojom::LaunchSource::kFromFileManager, + std::move(launch_files)); // In a multiprofile session, web apps always open on the current desktop, // regardless of which profile owns the files being opened, so use
diff --git a/chrome/browser/ash/input_method/input_method_manager_impl.h b/chrome/browser/ash/input_method/input_method_manager_impl.h index ed1f423..8fc570e 100644 --- a/chrome/browser/ash/input_method/input_method_manager_impl.h +++ b/chrome/browser/ash/input_method/input_method_manager_impl.h
@@ -147,7 +147,7 @@ bool menu_activated = false; protected: - friend base::RefCounted<chromeos::input_method::InputMethodManager::State>; + friend base::RefCounted<input_method::InputMethodManager::State>; ~StateImpl() override; private:
diff --git a/chrome/browser/ash/login/configuration_based_oobe_browsertest.cc b/chrome/browser/ash/login/configuration_based_oobe_browsertest.cc index 179b1e6..6e67047 100644 --- a/chrome/browser/ash/login/configuration_based_oobe_browsertest.cc +++ b/chrome/browser/ash/login/configuration_based_oobe_browsertest.cc
@@ -168,8 +168,7 @@ LoadConfiguration(); OobeScreenWaiter(NetworkScreenView::kScreenId).Wait(); - chromeos::input_method::InputMethodManager* imm = - chromeos::input_method::InputMethodManager::Get(); + auto* imm = input_method::InputMethodManager::Get(); // Configuration specified in TestSwitchLanguageIME.json sets non-default // input method fo German (xkb:de:neo:ger) to ensure that input method value
diff --git a/chrome/browser/ash/login/lock/lock_screen_browsertest.cc b/chrome/browser/ash/login/lock/lock_screen_browsertest.cc index 2e5a515..4f94ec92 100644 --- a/chrome/browser/ash/login/lock/lock_screen_browsertest.cc +++ b/chrome/browser/ash/login/lock/lock_screen_browsertest.cc
@@ -30,7 +30,7 @@ void SetUpOnMainThread() override { LoginManagerTest::SetUpOnMainThread(); - chromeos::input_method::InputMethodManager::Get()->MigrateInputMethods( + input_method::InputMethodManager::Get()->MigrateInputMethods( &user_input_methods_); } @@ -195,7 +195,7 @@ policy_helper_.RefreshPolicyAndWaitUntilDeviceSettingsUpdated( {chromeos::kDeviceLoginScreenInputMethods}); - chromeos::input_method::InputMethodManager::Get()->MigrateInputMethods( + input_method::InputMethodManager::Get()->MigrateInputMethods( &allowed_input_method); }
diff --git a/chrome/browser/ash/login/lock_screen_utils.cc b/chrome/browser/ash/login/lock_screen_utils.cc index 87c828f..9a55870 100644 --- a/chrome/browser/ash/login/lock_screen_utils.cc +++ b/chrome/browser/ash/login/lock_screen_utils.cc
@@ -26,7 +26,7 @@ bool SetUserInputMethodImpl( const std::string& user_input_method, input_method::InputMethodManager::State* ime_state) { - if (!chromeos::input_method::InputMethodManager::Get()->IsLoginKeyboard( + if (!input_method::InputMethodManager::Get()->IsLoginKeyboard( user_input_method)) { LOG(WARNING) << "SetUserInputMethod: stored user last input method '" << user_input_method @@ -133,8 +133,7 @@ if (input_method_entry.is_string()) allowed_input_methods.push_back(input_method_entry.GetString()); } - chromeos::input_method::InputMethodManager* imm = - chromeos::input_method::InputMethodManager::Get(); + auto* imm = input_method::InputMethodManager::Get(); imm->GetActiveIMEState()->SetAllowedInputMethods(allowed_input_methods, true); if (ImeControllerClientImpl::Get()) // Can be null in tests. ImeControllerClientImpl::Get()->SetImesManagedByPolicy(true); @@ -143,8 +142,7 @@ void StopEnforcingPolicyInputMethods() { // Empty means all input methods are allowed std::vector<std::string> allowed_input_methods; - chromeos::input_method::InputMethodManager* imm = - chromeos::input_method::InputMethodManager::Get(); + auto* imm = input_method::InputMethodManager::Get(); imm->GetActiveIMEState()->SetAllowedInputMethods(allowed_input_methods, true); if (ImeControllerClientImpl::Get()) // Can be null in tests. ImeControllerClientImpl::Get()->SetImesManagedByPolicy(false);
diff --git a/chrome/browser/ash/login/login_ui_keyboard_browsertest.cc b/chrome/browser/ash/login/login_ui_keyboard_browsertest.cc index 42998632..f75f883 100644 --- a/chrome/browser/ash/login/login_ui_keyboard_browsertest.cc +++ b/chrome/browser/ash/login/login_ui_keyboard_browsertest.cc
@@ -53,7 +53,7 @@ void Append_en_US_InputMethod(std::vector<std::string>* out) { out->push_back("xkb:us::eng"); - chromeos::input_method::InputMethodManager::Get()->MigrateInputMethods(out); + input_method::InputMethodManager::Get()->MigrateInputMethods(out); } void Append_en_US_InputMethods(std::vector<std::string>* out) { @@ -68,7 +68,7 @@ out->push_back("xkb:us:colemak:eng"); out->push_back("xkb:us:workman:eng"); out->push_back("xkb:us:workman-intl:eng"); - chromeos::input_method::InputMethodManager::Get()->MigrateInputMethods(out); + input_method::InputMethodManager::Get()->MigrateInputMethods(out); } } // anonymous namespace @@ -87,7 +87,7 @@ user_input_methods.push_back("xkb:fr::fra"); user_input_methods.push_back("xkb:de::ger"); - chromeos::input_method::InputMethodManager::Get()->MigrateInputMethods( + input_method::InputMethodManager::Get()->MigrateInputMethods( &user_input_methods); LoginManagerTest::SetUpOnMainThread(); @@ -241,7 +241,7 @@ user_input_methods.push_back("xkb:de::ger"); user_input_methods.push_back("xkb:pl::pol"); - chromeos::input_method::InputMethodManager::Get()->MigrateInputMethods( + input_method::InputMethodManager::Get()->MigrateInputMethods( &user_input_methods); scoped_testing_cros_settings_.device_settings()->Set( @@ -368,7 +368,7 @@ ASSERT_EQ(imm->GetActiveIMEState()->GetAllowedInputMethods().size(), 1U); ASSERT_EQ(imm->GetActiveIMEState()->GetNumActiveInputMethods(), 1U); - chromeos::input_method::InputMethodManager::Get()->MigrateInputMethods( + input_method::InputMethodManager::Get()->MigrateInputMethods( &allowed_input_method); ASSERT_EQ(imm->GetActiveIMEState()->GetCurrentInputMethod().id(), allowed_input_method.front()); @@ -413,7 +413,7 @@ std::vector<std::string> allowed_input_method{"xkb:de::ger"}; SetAllowedInputMethod(allowed_input_method.front()); - chromeos::input_method::InputMethodManager::Get()->MigrateInputMethods( + input_method::InputMethodManager::Get()->MigrateInputMethods( &allowed_input_method); test::ShowUserAddingScreen();
diff --git a/chrome/browser/ash/login/oobe_configuration.cc b/chrome/browser/ash/login/oobe_configuration.cc index 9e9990a..5f277df 100644 --- a/chrome/browser/ash/login/oobe_configuration.cc +++ b/chrome/browser/ash/login/oobe_configuration.cc
@@ -102,8 +102,7 @@ auto* ime_value = configuration_->FindKeyOfType(configuration::kInputMethod, base::Value::Type::STRING); if (ime_value) { - chromeos::input_method::InputMethodManager* imm = - chromeos::input_method::InputMethodManager::Get(); + auto* imm = input_method::InputMethodManager::Get(); configuration_->SetKey( configuration::kInputMethod, base::Value(imm->GetInputMethodUtil()->MigrateInputMethod(
diff --git a/chrome/browser/ash/notifications/request_system_proxy_credentials_view.cc b/chrome/browser/ash/notifications/request_system_proxy_credentials_view.cc index 4b268f5..8cca1ac7 100644 --- a/chrome/browser/ash/notifications/request_system_proxy_credentials_view.cc +++ b/chrome/browser/ash/notifications/request_system_proxy_credentials_view.cc
@@ -21,6 +21,7 @@ #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/base/models/image_model.h" #include "ui/base/resource/resource_bundle.h" +#include "ui/color/color_id.h" #include "ui/events/event.h" #include "ui/gfx/color_palette.h" #include "ui/gfx/paint_vector_icon.h" @@ -187,8 +188,7 @@ auto error_icon = std::make_unique<views::ImageView>(); const int kIconSize = 18; error_icon->SetImage(ui::ImageModel::FromVectorIcon( - vector_icons::kInfoOutlineIcon, - ui::NativeTheme::kColorId_AlertSeverityHigh, kIconSize)); + vector_icons::kInfoOutlineIcon, ui::kColorAlertHighSeverity, kIconSize)); error_icon->SetImageSize(gfx::Size(kIconSize, kIconSize)); error_icon->SetVisible(show_error_label_); layout->AddView(std::move(error_icon));
diff --git a/chrome/browser/ash/policy/core/device_local_account_browsertest.cc b/chrome/browser/ash/policy/core/device_local_account_browsertest.cc index 2f41b154..a621671 100644 --- a/chrome/browser/ash/policy/core/device_local_account_browsertest.cc +++ b/chrome/browser/ash/policy/core/device_local_account_browsertest.cc
@@ -397,7 +397,7 @@ DeviceLocalAccountTest() : public_session_input_method_id_( base::StringPrintf(kPublicSessionInputMethodIDTemplate, - chromeos::extension_ime_util::kXkbExtensionId)), + ash::extension_ime_util::kXkbExtensionId)), contents_(NULL), verifier_format_override_(crx_file::VerifierFormat::CRX3) { set_exit_when_last_browser_closes(false); @@ -678,12 +678,11 @@ static std::string GetDefaultKeyboardIdFromLanguageCode( const std::string& language_code) { - chromeos::input_method::InputMethodManager* input_method_manager = - chromeos::input_method::InputMethodManager::Get(); + auto* input_method_manager = ash::input_method::InputMethodManager::Get(); std::vector<std::string> layouts_from_locale; input_method_manager->GetInputMethodUtil() ->GetInputMethodIdsFromLanguageCode( - language_code, chromeos::input_method::kKeyboardLayoutsOnly, + language_code, ash::input_method::kKeyboardLayoutsOnly, &layouts_from_locale); EXPECT_FALSE(layouts_from_locale.empty()); if (layouts_from_locale.empty()) @@ -691,8 +690,7 @@ return layouts_from_locale.front(); } void VerifyKeyboardLayoutMatchesLocale() { - chromeos::input_method::InputMethodManager* input_method_manager = - chromeos::input_method::InputMethodManager::Get(); + auto* input_method_manager = ash::input_method::InputMethodManager::Get(); EXPECT_EQ(GetDefaultKeyboardIdFromLanguageCode( g_browser_process->GetApplicationLocale()), input_method_manager->GetActiveIMEState() @@ -1704,7 +1702,7 @@ EXPECT_EQ(l10n_util::GetLanguage(kPublicSessionLocale), icu::Locale::getDefault().getLanguage()); EXPECT_EQ(public_session_input_method_id_, - chromeos::input_method::InputMethodManager::Get() + ash::input_method::InputMethodManager::Get() ->GetActiveIMEState() ->GetCurrentInputMethod() .id()); @@ -1916,7 +1914,7 @@ EXPECT_EQ(l10n_util::GetLanguage(kPublicSessionLocale), icu::Locale::getDefault().getLanguage()); EXPECT_EQ(public_session_input_method_id_, - chromeos::input_method::InputMethodManager::Get() + ash::input_method::InputMethodManager::Get() ->GetActiveIMEState() ->GetCurrentInputMethod() .id()); @@ -1952,7 +1950,7 @@ RunWithRecommendedLocale(kSingleLocaleWithIME, base::size(kSingleLocaleWithIME)); - EXPECT_GT(chromeos::input_method::InputMethodManager::Get() + EXPECT_GT(ash::input_method::InputMethodManager::Get() ->GetActiveIMEState() ->GetNumActiveInputMethods(), 1u); @@ -1964,7 +1962,7 @@ RunWithRecommendedLocale(kSingleLocaleWithNoIME, base::size(kSingleLocaleWithNoIME)); - EXPECT_EQ(1u, chromeos::input_method::InputMethodManager::Get() + EXPECT_EQ(1u, ash::input_method::InputMethodManager::Get() ->GetActiveIMEState() ->GetNumActiveInputMethods()); } @@ -2052,7 +2050,7 @@ EXPECT_EQ(l10n_util::GetLanguage(kPublicSessionLocale), icu::Locale::getDefault().getLanguage()); EXPECT_EQ(public_session_input_method_id_, - chromeos::input_method::InputMethodManager::Get() + ash::input_method::InputMethodManager::Get() ->GetActiveIMEState() ->GetCurrentInputMethod() .id()); @@ -2072,7 +2070,7 @@ EXPECT_EQ(l10n_util::GetLanguage(kPublicSessionLocale), icu::Locale::getDefault().getLanguage()); EXPECT_EQ(public_session_input_method_id_, - chromeos::input_method::InputMethodManager::Get() + ash::input_method::InputMethodManager::Get() ->GetActiveIMEState() ->GetCurrentInputMethod() .id());
diff --git a/chrome/browser/autofill/autofill_browsertest.cc b/chrome/browser/autofill/autofill_browsertest.cc index 8106daa..f0a409fa 100644 --- a/chrome/browser/autofill/autofill_browsertest.cc +++ b/chrome/browser/autofill/autofill_browsertest.cc
@@ -639,20 +639,17 @@ }; // Test that autofill available state is correctly set on accessibility node. -// crbug.com/1162484 -IN_PROC_BROWSER_TEST_F(AutofillAccessibilityTest, DISABLED_TestAutofillState) { +IN_PROC_BROWSER_TEST_F(AutofillAccessibilityTest, TestAutofillState) { content::BrowserAccessibilityState::GetInstance()->EnableAccessibility(); - // Navigate to url. + // Navigate to url and wait for accessibility notification. GURL url = embedded_test_server()->GetURL("/autofill/duplicate_profiles_test.html"); NavigateParams params(browser(), url, ui::PAGE_TRANSITION_LINK); - params.disposition = WindowOpenDisposition::NEW_FOREGROUND_TAB; - ui_test_utils::NavigateToURL(¶ms); - - // Wait for accessibility notification. + params.disposition = WindowOpenDisposition::CURRENT_TAB; content::AccessibilityNotificationWaiter layout_waiter_one( web_contents(), ui::kAXModeComplete, ax::mojom::Event::kLoadComplete); + ui_test_utils::NavigateToURL(¶ms); layout_waiter_one.WaitForNotification(); // Focus target form field. @@ -690,9 +687,9 @@ ASSERT_EQ(1u, personal_data_manager()->GetProfiles().size()); // Reload page. - ui_test_utils::NavigateToURL(¶ms); content::AccessibilityNotificationWaiter layout_waiter_two( web_contents(), ui::kAXModeComplete, ax::mojom::Event::kLoadComplete); + ui_test_utils::NavigateToURL(¶ms); layout_waiter_two.WaitForNotification(); // Focus target form field. @@ -713,24 +710,16 @@ // Test that autocomplete available string attribute is correctly set on // accessibility node. Test autocomplete in this file since it uses the same // infrastructure as autofill. -// TODO(crbug.com/1240687): Flaky on Linux. -#if defined(OS_LINUX) -#define MAYBE_TestAutocompleteState DISABLED_TestAutocompleteState -#else -#define MAYBE_TestAutocompleteState TestAutocompleteState -#endif -IN_PROC_BROWSER_TEST_F(AutofillAccessibilityTest, MAYBE_TestAutocompleteState) { +IN_PROC_BROWSER_TEST_F(AutofillAccessibilityTest, TestAutocompleteState) { content::BrowserAccessibilityState::GetInstance()->EnableAccessibility(); - // Navigate to url. + // Navigate to url and wait for accessibility notification GURL url = embedded_test_server()->GetURL("/autofill/duplicate_profiles_test.html"); NavigateParams params(browser(), url, ui::PAGE_TRANSITION_LINK); - params.disposition = WindowOpenDisposition::NEW_FOREGROUND_TAB; - ui_test_utils::NavigateToURL(¶ms); - - // Wait for accessibility notification. + params.disposition = WindowOpenDisposition::CURRENT_TAB; content::AccessibilityNotificationWaiter layout_waiter_one( web_contents(), ui::kAXModeComplete, ax::mojom::Event::kLoadComplete); + ui_test_utils::NavigateToURL(¶ms); layout_waiter_one.WaitForNotification(); // Focus target form field. @@ -764,9 +753,9 @@ ASSERT_EQ(0u, personal_data_manager()->GetProfiles().size()); // Reload page. - ui_test_utils::NavigateToURL(¶ms); content::AccessibilityNotificationWaiter layout_waiter_two( web_contents(), ui::kAXModeComplete, ax::mojom::Event::kLoadComplete); + ui_test_utils::NavigateToURL(¶ms); layout_waiter_two.WaitForNotification(); // Focus target form field.
diff --git a/chrome/browser/badging/OWNERS b/chrome/browser/badging/OWNERS index d2b902d1..ec2968c2 100644 --- a/chrome/browser/badging/OWNERS +++ b/chrome/browser/badging/OWNERS
@@ -1,4 +1,6 @@ cmp@chromium.org dmurph@chromium.org -msw@chromium.org +ericwilligers@chromium.org +glenrob@chromium.org mgiuca@chromium.org +msw@chromium.org
diff --git a/chrome/browser/cart/cart_features.h b/chrome/browser/cart/cart_features.h index f777def..e25cdd1 100644 --- a/chrome/browser/cart/cart_features.h +++ b/chrome/browser/cart/cart_features.h
@@ -14,6 +14,11 @@ // This regex does not match anything. "\\b\\B"}; +// Default value is 6 hours. +constexpr base::FeatureParam<base::TimeDelta> kDiscountFetchDelayParam( + &ntp_features::kNtpChromeCartModule, + "discount-fetch-delay", + base::TimeDelta::FromHours(6)); } // namespace cart_features #endif // CHROME_BROWSER_CART_CART_FEATURES_H_
diff --git a/chrome/browser/cart/cart_handler_unittest.cc b/chrome/browser/cart/cart_handler_unittest.cc index 2514a8e..8d39abaf 100644 --- a/chrome/browser/cart/cart_handler_unittest.cc +++ b/chrome/browser/cart/cart_handler_unittest.cc
@@ -466,6 +466,10 @@ // Test OnDiscountConsentAcknowledged can update status in CartService. TEST_F(CartHandlerNtpModuleDiscountTest, TestOnDiscountConsentAcknowledged) { + // Update fetch timestamp to avoid fetching triggered by consent + // acknowledgement. + profile_.GetPrefs()->SetTime(prefs::kCartDiscountLastFetchedTime, + base::Time::Now()); CartDB* cart_db = service_->GetDB(); base::RunLoop run_loop[4]; // Add a partner cart.
diff --git a/chrome/browser/cart/cart_service.cc b/chrome/browser/cart/cart_service.cc index 451c650..f0a4b5ef 100644 --- a/chrome/browser/cart/cart_service.cc +++ b/chrome/browser/cart/cart_service.cc
@@ -12,7 +12,6 @@ #include "chrome/browser/cart/cart_db_content.pb.h" #include "chrome/browser/cart/cart_discount_metric_collector.h" #include "chrome/browser/cart/cart_features.h" -#include "chrome/browser/cart/fetch_discount_worker.h" #include "chrome/browser/history/history_service_factory.h" #include "chrome/browser/optimization_guide/optimization_guide_keyed_service.h" #include "chrome/browser/optimization_guide/optimization_guide_keyed_service_factory.h" @@ -37,7 +36,6 @@ namespace { constexpr char kFakeDataPrefix[] = "Fake:"; -const int kDelayStartMs = 10; constexpr char kNoRbdUtmTag[] = "chrome_cart_no_rbd"; constexpr char kRbdUtmTag[] = "chrome_cart_rbd"; @@ -151,6 +149,7 @@ registry->RegisterBooleanPref(prefs::kCartDiscountAcknowledged, false); registry->RegisterBooleanPref(prefs::kCartDiscountEnabled, false); registry->RegisterDictionaryPref(prefs::kCartUsedDiscounts); + registry->RegisterTimePref(prefs::kCartDiscountLastFetchedTime, base::Time()); } GURL CartService::AppendUTM(const GURL& base_url, bool is_discount_enabled) { @@ -852,6 +851,19 @@ DCHECK(!fetch_discount_worker_) << "fetch_discount_worker_ should not be valid at this point."; + base::Time last_fetched_time = + profile_->GetPrefs()->GetTime(prefs::kCartDiscountLastFetchedTime); + base::TimeDelta fetch_delay = cart_features::kDiscountFetchDelayParam.Get() - + (base::Time::Now() - last_fetched_time); + if (last_fetched_time == base::Time() || fetch_delay < base::TimeDelta()) { + fetch_delay = base::TimeDelta(); + } + + if (fetch_discount_worker_for_testing_) { + fetch_discount_worker_for_testing_->Start(fetch_delay); + return; + } + fetch_discount_worker_ = std::make_unique<FetchDiscountWorker>( profile_->GetDefaultStoragePartition() ->GetURLLoaderFactoryForBrowserProcess(), @@ -860,8 +872,7 @@ IdentityManagerFactory::GetForProfile(profile_), profile_->GetVariationsClient()); - fetch_discount_worker_->Start( - base::TimeDelta::FromMilliseconds(kDelayStartMs)); + fetch_discount_worker_->Start(fetch_delay); } bool CartService::IsDiscountUsed(const std::string& rule_id) { @@ -870,6 +881,11 @@ ->FindBoolKey(rule_id) != absl::nullopt; } +void CartService::RecordFetchTimestamp() { + profile_->GetPrefs()->SetTime(prefs::kCartDiscountLastFetchedTime, + base::Time::Now()); +} + void CartService::CacheUsedDiscounts( const cart_db::ChromeCartContentProto& proto) { if (!proto.has_discount_info() || @@ -919,3 +935,8 @@ std::unique_ptr<CartDiscountLinkFetcher> discount_link_fetcher) { discount_link_fetcher_ = std::move(discount_link_fetcher); } + +void CartService::SetFetchDiscountWorkerForTesting( + std::unique_ptr<FetchDiscountWorker> fetch_discount_worker) { + fetch_discount_worker_for_testing_ = std::move(fetch_discount_worker); +}
diff --git a/chrome/browser/cart/cart_service.h b/chrome/browser/cart/cart_service.h index cd85e6e..a1182f6 100644 --- a/chrome/browser/cart/cart_service.h +++ b/chrome/browser/cart/cart_service.h
@@ -15,6 +15,7 @@ #include "chrome/browser/cart/cart_metrics_tracker.h" #include "chrome/browser/cart/cart_service_factory.h" #include "chrome/browser/cart/discount_url_loader.h" +#include "chrome/browser/cart/fetch_discount_worker.h" #include "chrome/browser/profiles/profile.h" #include "components/history/core/browser/history_service.h" #include "components/history/core/browser/history_service_observer.h" @@ -116,6 +117,8 @@ const history::DeletionInfo& deletion_info) override; // Returns whether a discount with |rule_id| is used or not. bool IsDiscountUsed(const std::string& rule_id); + // Records timestamp of the latest fetch for discount. + void RecordFetchTimestamp(); // KeyedService: void Shutdown() override; @@ -124,6 +127,7 @@ friend class CartServiceTest; friend class CartServiceDiscountTest; friend class CartServiceBrowserDiscountTest; + friend class CartServiceDiscountFetchTest; FRIEND_TEST_ALL_PREFIXES(CartHandlerNtpModuleFakeDataTest, TestEnableFakeData); @@ -184,6 +188,9 @@ // Set discount_link_fetcher_ for testing purpose. void SetCartDiscountLinkFetcherForTesting( std::unique_ptr<CartDiscountLinkFetcher> discount_link_fetcher); + // Set fetch_discount_worker_ for testing purpose. + void SetFetchDiscountWorkerForTesting( + std::unique_ptr<FetchDiscountWorker> fetch_discount_worker); // Returns whether a URL should be skipped based on server-side bloom filter. bool ShouldSkip(const GURL& url); void CacheUsedDiscounts(const cart_db::ChromeCartContentProto& proto); @@ -199,6 +206,7 @@ absl::optional<base::Value> domain_name_mapping_; absl::optional<base::Value> domain_cart_url_mapping_; std::unique_ptr<FetchDiscountWorker> fetch_discount_worker_; + std::unique_ptr<FetchDiscountWorker> fetch_discount_worker_for_testing_; std::unique_ptr<CartDiscountLinkFetcher> discount_link_fetcher_; optimization_guide::OptimizationGuideDecider* optimization_guide_decider_; std::unique_ptr<CartMetricsTracker> metrics_tracker_;
diff --git a/chrome/browser/cart/cart_service_unittest.cc b/chrome/browser/cart/cart_service_unittest.cc index 2412be3..efcecba 100644 --- a/chrome/browser/cart/cart_service_unittest.cc +++ b/chrome/browser/cart/cart_service_unittest.cc
@@ -6,13 +6,17 @@ #include "chrome/browser/cart/cart_db_content.pb.h" #include "chrome/browser/cart/cart_service_factory.h" +#include "chrome/browser/cart/fetch_discount_worker.h" #include "chrome/browser/history/history_service_factory.h" #include "chrome/browser/persisted_state_db/profile_proto_db.h" #include "chrome/browser/persisted_state_db/profile_proto_db_factory.h" +#include "chrome/browser/signin/identity_manager_factory.h" #include "chrome/common/pref_names.h" #include "chrome/test/base/testing_profile.h" #include "components/prefs/pref_service.h" #include "components/search/ntp_features.h" +#include "content/public/browser/browser_task_traits.h" +#include "content/public/browser/browser_thread.h" #include "content/public/test/browser_task_environment.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" @@ -125,7 +129,7 @@ class CartServiceTest : public testing::Test { public: CartServiceTest() - : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP) {} + : task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {} void SetUp() override { testing::Test::SetUp(); @@ -1644,3 +1648,112 @@ EXPECT_EQ(GURL("https://www.foo.com?utm_source=chrome_cart_rbd"), CartService::AppendUTM(GURL(kMockMerchantURLA), true)); } + +class FakeFetchDiscountWorker : public FetchDiscountWorker { + public: + FakeFetchDiscountWorker( + scoped_refptr<network::SharedURLLoaderFactory> + browserProcessURLLoaderFactory, + std::unique_ptr<CartDiscountFetcherFactory> fetcher_factory, + std::unique_ptr<CartServiceDelegate> cart_service_delegate, + signin::IdentityManager* const identity_manager, + variations::VariationsClient* const chrome_variations_client) + : FetchDiscountWorker(browserProcessURLLoaderFactory, + std::move(fetcher_factory), + std::move(cart_service_delegate), + identity_manager, + chrome_variations_client) {} + + // Simulate FetchDiscountWorker posting a task to fetch, except that here we + // only record fetch timestamp instead of actually fetching. + void Start(base::TimeDelta delay) override { + content::GetUIThreadTaskRunner({base::TaskPriority::BEST_EFFORT}) + ->PostDelayedTask(FROM_HERE, + base::BindOnce(&FakeFetchDiscountWorker::FakeFetch, + weak_ptr_factory_.GetWeakPtr()), + delay); + } + + private: + void FakeFetch() { cart_service_delegate_->RecordFetchTimestamp(); } + + base::WeakPtrFactory<FakeFetchDiscountWorker> weak_ptr_factory_{this}; +}; + +class CartServiceDiscountFetchTest : public CartServiceTest { + public: + CartServiceDiscountFetchTest() { + // This needs to be called before any tasks that run on other threads check + // if a feature is enabled. + features_.InitAndEnableFeatureWithParameters( + ntp_features::kNtpChromeCartModule, + {{"NtpChromeCartModuleAbandonedCartDiscountParam", "true"}, + {"discount-fetch-delay", "2s"}}); + } + + void SetUp() override { + CartServiceTest::SetUp(); + profile_.GetPrefs()->SetBoolean(prefs::kCartDiscountEnabled, true); + // Only initialize CartServiceDelegate which is relevant to this test. + fetch_discount_worker_ = std::make_unique<FakeFetchDiscountWorker>( + nullptr, nullptr, std::make_unique<CartServiceDelegate>(service_), + nullptr, nullptr); + service_->SetFetchDiscountWorkerForTesting( + std::move(fetch_discount_worker_)); + } + + void TearDown() override { + // Reset the last fetch timestamp. + profile_.GetPrefs()->SetTime(prefs::kCartDiscountLastFetchedTime, + base::Time()); + // Reset FetchDiscountWorker for testing. + service_->SetFetchDiscountWorkerForTesting(nullptr); + } + + void StartGettingDiscount() { service_->StartGettingDiscount(); } + + private: + std::unique_ptr<FakeFetchDiscountWorker> fetch_discount_worker_; +}; + +TEST_F(CartServiceDiscountFetchTest, TestFreshFetch) { + EXPECT_EQ(profile_.GetPrefs()->GetTime(prefs::kCartDiscountLastFetchedTime), + base::Time()); + StartGettingDiscount(); + task_environment_.RunUntilIdle(); + EXPECT_NE(profile_.GetPrefs()->GetTime(prefs::kCartDiscountLastFetchedTime), + base::Time()); +} + +TEST_F(CartServiceDiscountFetchTest, TestFetchWhenBeyondEnforcedDelay) { + // Set last fetch timestamp so that the current time is beyond the enforced + // delay. + base::Time last_fetch_time = + base::Time::Now() - base::TimeDelta::FromSeconds(20); + profile_.GetPrefs()->SetTime(prefs::kCartDiscountLastFetchedTime, + last_fetch_time); + StartGettingDiscount(); + task_environment_.RunUntilIdle(); + EXPECT_NE(profile_.GetPrefs()->GetTime(prefs::kCartDiscountLastFetchedTime), + last_fetch_time); +} + +TEST_F(CartServiceDiscountFetchTest, TestNoFetchWithinEnforcedDelay) { + EXPECT_EQ(profile_.GetPrefs()->GetTime(prefs::kCartDiscountLastFetchedTime), + base::Time()); + base::Time last_fetch_time = base::Time::Now(); + profile_.GetPrefs()->SetTime(prefs::kCartDiscountLastFetchedTime, + last_fetch_time); + // Set last fetch timestamp so that the current time is within the enforced + // delay. + StartGettingDiscount(); + task_environment_.RunUntilIdle(); + EXPECT_EQ(profile_.GetPrefs()->GetTime(prefs::kCartDiscountLastFetchedTime), + last_fetch_time); + // Wait so that the current time is beyond the enforced delay. + task_environment_.FastForwardBy(base::TimeDelta::FromSeconds(2)); + StartGettingDiscount(); + task_environment_.RunUntilIdle(); + EXPECT_NE(profile_.GetPrefs()->GetTime(prefs::kCartDiscountLastFetchedTime), + last_fetch_time); +}
diff --git a/chrome/browser/cart/fetch_discount_worker.cc b/chrome/browser/cart/fetch_discount_worker.cc index 9393399..77ddca43 100644 --- a/chrome/browser/cart/fetch_discount_worker.cc +++ b/chrome/browser/cart/fetch_discount_worker.cc
@@ -9,6 +9,7 @@ #include "base/task/thread_pool.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/cart/cart_discount_fetcher.h" +#include "chrome/browser/cart/cart_features.h" #include "chrome/browser/commerce/commerce_feature_list.h" #include "components/search/ntp_features.h" #include "components/signin/public/identity_manager/access_token_info.h" @@ -23,12 +24,6 @@ #include "services/network/public/cpp/shared_url_loader_factory.h" namespace { -// Default value is 6 hours. -constexpr base::FeatureParam<base::TimeDelta> kDelayFetchParam( - &ntp_features::kNtpChromeCartModule, - "delay-fetch-discount", - base::TimeDelta::FromHours(6)); - const char kOauthName[] = "rbd"; const char kOauthScopes[] = "https://www.googleapis.com/auth/chromememex"; const char kEmptyToken[] = ""; @@ -51,6 +46,10 @@ is_tester); } +void CartServiceDelegate::RecordFetchTimestamp() { + cart_service_->RecordFetchTimestamp(); +} + FetchDiscountWorker::FetchDiscountWorker( scoped_refptr<network::SharedURLLoaderFactory> browserProcessURLLoaderFactory, @@ -79,7 +78,6 @@ void FetchDiscountWorker::PrepareToFetch() { DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); - if (identity_manager_ && identity_manager_->HasPrimaryAccount(signin::ConsentLevel::kSync)) { FetchOauthToken(); @@ -139,6 +137,7 @@ base::BindOnce(&FetchDiscountWorker::AfterDiscountFetched, weak_ptr_factory_.GetWeakPtr()); + cart_service_delegate_->RecordFetchTimestamp(); backend_task_runner_->PostTask( FROM_HERE, base::BindOnce( @@ -263,7 +262,7 @@ ntp_features::kNtpChromeCartModule, ntp_features::kNtpChromeCartModuleAbandonedCartDiscountParam, false)) { - // Continue to work - Start(kDelayFetchParam.Get()); + // Continue to work. + Start(cart_features::kDiscountFetchDelayParam.Get()); } }
diff --git a/chrome/browser/cart/fetch_discount_worker.h b/chrome/browser/cart/fetch_discount_worker.h index 63ba1d93..809d8be4 100644 --- a/chrome/browser/cart/fetch_discount_worker.h +++ b/chrome/browser/cart/fetch_discount_worker.h
@@ -35,6 +35,7 @@ virtual void UpdateCart(const std::string& cart_url, const cart_db::ChromeCartContentProto new_proto, const bool is_tester); + virtual void RecordFetchTimestamp(); private: CartService* cart_service_; @@ -66,14 +67,15 @@ std::unique_ptr<CartServiceDelegate> cart_service_delegate, signin::IdentityManager* const identity_manager, variations::VariationsClient* const chrome_variations_client); - ~FetchDiscountWorker(); + virtual ~FetchDiscountWorker(); // Starts the worker to work. - void Start(base::TimeDelta delay); + virtual void Start(base::TimeDelta delay); private: using AfterFetchingCallback = base::OnceCallback<void(CartDiscountFetcher::CartDiscountMap, bool)>; using ContinueToWorkCallback = base::OnceCallback<void()>; + friend class FakeFetchDiscountWorker; scoped_refptr<network::SharedURLLoaderFactory> browserProcessURLLoaderFactory_;
diff --git a/chrome/browser/cart/fetch_discount_worker_unittest.cc b/chrome/browser/cart/fetch_discount_worker_unittest.cc index 655b53e9..46c0691 100644 --- a/chrome/browser/cart/fetch_discount_worker_unittest.cc +++ b/chrome/browser/cart/fetch_discount_worker_unittest.cc
@@ -9,7 +9,9 @@ #include "chrome/browser/cart/cart_discount_fetcher.h" #include "chrome/browser/cart/cart_service_factory.h" #include "chrome/browser/endpoint_fetcher/endpoint_fetcher.h" +#include "chrome/common/pref_names.h" #include "chrome/test/base/testing_profile.h" +#include "components/prefs/pref_service.h" #include "components/search/ntp_features.h" #include "components/signin/public/identity_manager/identity_test_environment.h" #include "components/variations/variations.mojom.h" @@ -272,8 +274,8 @@ FetchDiscountWorkerTest() { features_.InitAndEnableFeatureWithParameters( ntp_features::kNtpChromeCartModule, - {{ntp_features::kNtpChromeCartModuleAbandonedCartDiscountParam, - "true"}}); + {{ntp_features::kNtpChromeCartModuleAbandonedCartDiscountParam, "true"}, + {"discount-fetch-delay", "6h"}}); } void SetUp() override { test_shared_url_loader_factory_ = @@ -353,12 +355,16 @@ TEST_F(FetchDiscountWorkerTest, TestStart_EndToEnd) { + EXPECT_EQ(profile_.GetPrefs()->GetTime(prefs::kCartDiscountLastFetchedTime), + base::Time()); CartDiscountFetcher::CartDiscountMap fake_result; CreateCartDiscountFetcherFactory(std::move(fake_result), false); CreateWorker(); fetch_discount_worker_->Start(base::TimeDelta::FromMilliseconds(0)); task_environment_.RunUntilIdle(); + EXPECT_NE(profile_.GetPrefs()->GetTime(prefs::kCartDiscountLastFetchedTime), + base::Time()); } TEST_F(FetchDiscountWorkerTest, TestStart_DiscountUpdatedWithRBDDiscount) {
diff --git a/chrome/browser/chromeos/BUILD.gn b/chrome/browser/chromeos/BUILD.gn index 6ccec5e9..8ea63b0ef 100644 --- a/chrome/browser/chromeos/BUILD.gn +++ b/chrome/browser/chromeos/BUILD.gn
@@ -3781,6 +3781,7 @@ "../ash/arc/tracing/arc_graphics_jank_detector_unittest.cc", "../ash/arc/tracing/arc_system_model_unittest.cc", "../ash/arc/tracing/arc_system_stat_collector_unittest.cc", + "../ash/arc/tracing/arc_tracing_bridge_unittest.cc", "../ash/arc/tracing/arc_tracing_event_matcher_unittest.cc", "../ash/arc/tracing/arc_tracing_model_unittest.cc", "../ash/arc/tracing/arc_value_event_unittest.cc",
diff --git a/chrome/browser/chromeos/extensions/input_method_api.cc b/chrome/browser/chromeos/extensions/input_method_api.cc index 512860d6..2ad4056 100644 --- a/chrome/browser/chromeos/extensions/input_method_api.cc +++ b/chrome/browser/chromeos/extensions/input_method_api.cc
@@ -139,8 +139,7 @@ ExtensionFunction::ResponseAction InputMethodPrivateGetCurrentInputMethodFunction::Run() { - chromeos::input_method::InputMethodManager* manager = - chromeos::input_method::InputMethodManager::Get(); + auto* manager = ash::input_method::InputMethodManager::Get(); return RespondNow(OneArgument( base::Value(manager->GetActiveIMEState()->GetCurrentInputMethod().id()))); } @@ -150,8 +149,8 @@ std::unique_ptr<SetCurrentInputMethod::Params> params( SetCurrentInputMethod::Params::Create(args())); EXTENSION_FUNCTION_VALIDATE(params.get()); - scoped_refptr<chromeos::input_method::InputMethodManager::State> ime_state = - chromeos::input_method::InputMethodManager::Get()->GetActiveIMEState(); + scoped_refptr<ash::input_method::InputMethodManager::State> ime_state = + ash::input_method::InputMethodManager::Get()->GetActiveIMEState(); const std::vector<std::string>& input_methods = ime_state->GetActiveInputMethodIds(); for (size_t i = 0; i < input_methods.size(); ++i) { @@ -171,15 +170,14 @@ ExtensionFunction::ResponseAction InputMethodPrivateGetInputMethodsFunction::Run() { std::unique_ptr<base::ListValue> output(new base::ListValue()); - chromeos::input_method::InputMethodManager* manager = - chromeos::input_method::InputMethodManager::Get(); - chromeos::input_method::InputMethodUtil* util = manager->GetInputMethodUtil(); - scoped_refptr<chromeos::input_method::InputMethodManager::State> ime_state = + auto* manager = ash::input_method::InputMethodManager::Get(); + ash::input_method::InputMethodUtil* util = manager->GetInputMethodUtil(); + scoped_refptr<ash::input_method::InputMethodManager::State> ime_state = manager->GetActiveIMEState(); - std::unique_ptr<chromeos::input_method::InputMethodDescriptors> - input_methods = ime_state->GetActiveInputMethods(); + std::unique_ptr<ash::input_method::InputMethodDescriptors> input_methods = + ime_state->GetActiveInputMethods(); for (size_t i = 0; i < input_methods->size(); ++i) { - const chromeos::input_method::InputMethodDescriptor& input_method = + const ash::input_method::InputMethodDescriptor& input_method = (*input_methods)[i]; auto val = std::make_unique<base::DictionaryValue>(); val->SetString("id", input_method.id()); @@ -263,9 +261,8 @@ std::unique_ptr<SetXkbLayout::Params> params( SetXkbLayout::Params::Create(args())); EXTENSION_FUNCTION_VALIDATE(params.get()); - chromeos::input_method::InputMethodManager* manager = - chromeos::input_method::InputMethodManager::Get(); - chromeos::input_method::ImeKeyboard* keyboard = manager->GetImeKeyboard(); + auto* manager = ash::input_method::InputMethodManager::Get(); + ash::input_method::ImeKeyboard* keyboard = manager->GetImeKeyboard(); keyboard->SetCurrentKeyboardLayoutByName(params->xkb_name); return RespondNow(NoArguments()); } @@ -297,9 +294,9 @@ std::unique_ptr<OpenOptionsPage::Params> params( OpenOptionsPage::Params::Create(args())); EXTENSION_FUNCTION_VALIDATE(params.get()); - scoped_refptr<chromeos::input_method::InputMethodManager::State> ime_state = - chromeos::input_method::InputMethodManager::Get()->GetActiveIMEState(); - const chromeos::input_method::InputMethodDescriptor* ime = + scoped_refptr<ash::input_method::InputMethodManager::State> ime_state = + ash::input_method::InputMethodManager::Get()->GetActiveIMEState(); + const ash::input_method::InputMethodDescriptor* ime = ime_state->GetInputMethodFromId(params->input_method_id); if (!ime) return RespondNow(Error(InformativeError( @@ -659,7 +656,7 @@ // static std::string InputMethodAPI::GetInputMethodForXkb(const std::string& xkb_id) { std::string xkb_prefix = - chromeos::extension_ime_util::GetInputMethodIDByEngineID(kXkbPrefix); + ash::extension_ime_util::GetInputMethodIDByEngineID(kXkbPrefix); size_t prefix_length = xkb_prefix.length(); DCHECK(xkb_id.substr(0, prefix_length) == xkb_prefix); return xkb_id.substr(prefix_length);
diff --git a/chrome/browser/chromeos/extensions/input_method_apitest_chromeos.cc b/chrome/browser/chromeos/extensions/input_method_apitest_chromeos.cc index 4b045bea..284e95dd 100644 --- a/chrome/browser/chromeos/extensions/input_method_apitest_chromeos.cc +++ b/chrome/browser/chromeos/extensions/input_method_apitest_chromeos.cc
@@ -26,12 +26,12 @@ #include "ui/base/ime/ash/input_method_manager.h" #include "ui/base/ime/ash/input_method_util.h" -using chromeos::extension_ime_util::GetInputMethodIDByEngineID; -using chromeos::input_method::InputMethodDescriptor; -using chromeos::input_method::InputMethodManager; - namespace { +using ::ash::extension_ime_util::GetInputMethodIDByEngineID; +using ::ash::input_method::InputMethodDescriptor; +using ::ash::input_method::InputMethodManager; + const char kLoginScreenUILanguage[] = "fr"; const char kInitialInputMethodOnLoginScreen[] = "xkb:us::eng"; const char kTestIMEID[] = "_ext_ime_ilanclmaeigfpnmdlgelmhkpkegdioiptest"; @@ -153,7 +153,7 @@ extension_ime_ids.push_back(kTestIMEID2); InputMethodManager::Get()->GetActiveIMEState()->SetEnabledExtensionImes( &extension_ime_ids); - chromeos::input_method::InputMethodDescriptors extension_imes; + ash::input_method::InputMethodDescriptors extension_imes; InputMethodManager::Get()->GetActiveIMEState()->GetInputMethodExtensions( &extension_imes); InputMethodManager::Get()->GetActiveIMEState()->ChangeInputMethod(
diff --git a/chrome/browser/chromeos/preferences.h b/chrome/browser/chromeos/preferences.h index 0960f23..e067ff7 100644 --- a/chrome/browser/chromeos/preferences.h +++ b/chrome/browser/chromeos/preferences.h
@@ -38,10 +38,6 @@ class User; -namespace input_method { -class InputMethodManager; -} // namespace input_method - // The Preferences class handles Chrome OS preferences. When the class // is first initialized, it will initialize the OS settings to what's stored in // the preferences. These include touchpad settings, etc.
diff --git a/chrome/browser/component_updater/sw_reporter_installer_win.cc b/chrome/browser/component_updater/sw_reporter_installer_win.cc index 8a0aad5a..8420baa9 100644 --- a/chrome/browser/component_updater/sw_reporter_installer_win.cc +++ b/chrome/browser/component_updater/sw_reporter_installer_win.cc
@@ -459,9 +459,6 @@ // Check if we are running after the user has rebooted. const base::TimeDelta elapsed = base::Time::Now() - start_time; DCHECK_GT(elapsed.InMilliseconds(), 0); - UMA_HISTOGRAM_BOOLEAN( - "SoftwareReporter.Cleaner.HasRebooted", - static_cast<uint64_t>(elapsed.InMilliseconds()) > ::GetTickCount()); } if (cleaner_key.HasValue(chrome_cleaner::kUploadResultsValueName)) {
diff --git a/chrome/browser/content_creation/notes/internal/android/java/src/org/chromium/chrome/browser/content_creation/notes/NoteCreationCoordinatorImpl.java b/chrome/browser/content_creation/notes/internal/android/java/src/org/chromium/chrome/browser/content_creation/notes/NoteCreationCoordinatorImpl.java index 52000f0..b67a39f 100644 --- a/chrome/browser/content_creation/notes/internal/android/java/src/org/chromium/chrome/browser/content_creation/notes/NoteCreationCoordinatorImpl.java +++ b/chrome/browser/content_creation/notes/internal/android/java/src/org/chromium/chrome/browser/content_creation/notes/NoteCreationCoordinatorImpl.java
@@ -81,7 +81,7 @@ UrlFormatter.formatUrlForDisplayOmitSchemeOmitTrivialSubdomains(mShareUrl); mDialog = new NoteCreationDialog(); mDialog.initDialog(this::onViewCreated, urlDomain, title, selectedText, - noteService.isPublishAvailable()); + noteService.isPublishAvailable(), this::executeAction); } @Override
diff --git a/chrome/browser/content_creation/notes/internal/android/java/src/org/chromium/chrome/browser/content_creation/notes/NoteCreationDialog.java b/chrome/browser/content_creation/notes/internal/android/java/src/org/chromium/chrome/browser/content_creation/notes/NoteCreationDialog.java index 114ae575..37361fe 100644 --- a/chrome/browser/content_creation/notes/internal/android/java/src/org/chromium/chrome/browser/content_creation/notes/NoteCreationDialog.java +++ b/chrome/browser/content_creation/notes/internal/android/java/src/org/chromium/chrome/browser/content_creation/notes/NoteCreationDialog.java
@@ -48,6 +48,7 @@ private boolean mIsPublishAvailable; private int mNbTemplateSwitches; private boolean mInitialized; + private Runnable mExecuteActionForAccessibility; interface NoteDialogObserver { void onViewCreated(View view); @@ -55,13 +56,15 @@ private NoteDialogObserver mNoteDialogObserver; public void initDialog(NoteDialogObserver noteDialogObserver, String urlDomain, String title, - String selectedText, boolean isPublishAvailable) { + String selectedText, boolean isPublishAvailable, + Runnable executeActionForAccessibility) { mNoteDialogObserver = noteDialogObserver; mUrlDomain = urlDomain; mTitle = title; mSelectedText = selectedText; mIsPublishAvailable = isPublishAvailable; mInitialized = true; + mExecuteActionForAccessibility = executeActionForAccessibility; } @Override @@ -224,9 +227,13 @@ int position; switch (event.getEventType()) { case AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED: + host.setClickable(true); mSelectedItemIndex = (Integer) host.getTag(); centerCurrentNote(); break; + case AccessibilityEvent.TYPE_VIEW_CLICKED: + mExecuteActionForAccessibility.run(); + break; } super.onPopulateAccessibilityEvent(host, event);
diff --git a/chrome/browser/content_creation/reactions/internal/android/BUILD.gn b/chrome/browser/content_creation/reactions/internal/android/BUILD.gn index 73d6dfa..7471a09 100644 --- a/chrome/browser/content_creation/reactions/internal/android/BUILD.gn +++ b/chrome/browser/content_creation/reactions/internal/android/BUILD.gn
@@ -9,16 +9,29 @@ sources = [ "java/src/org/chromium/chrome/browser/content_creation/reactions/LightweightReactionsCoordinatorFactory.java", "java/src/org/chromium/chrome/browser/content_creation/reactions/LightweightReactionsCoordinatorImpl.java", + "java/src/org/chromium/chrome/browser/content_creation/reactions/LightweightReactionsDialog.java", ] deps = [ + ":java_resources", "//chrome/android:chrome_java", "//chrome/browser/content_creation/reactions/android:public_java", "//chrome/browser/share:java", "//chrome/browser/tab:java", "//components/browser_ui/bottomsheet/android:java", + "//components/browser_ui/styles/android:java_resources", + "//third_party/androidx:androidx_appcompat_appcompat_java", + "//third_party/androidx:androidx_fragment_fragment_java", ] resources_package = "org.chromium.chrome.browser.content_creation.reactions.internal" annotation_processor_deps = [ "//base/android/jni_generator:jni_processor" ] } + +android_resources("java_resources") { + sources = [ + "java/res/layout/reactions_dialog.xml", + "java/res/layout/scene.xml", + "java/res/layout/toolbar.xml", + ] +}
diff --git a/chrome/browser/content_creation/reactions/internal/android/java/res/layout/reactions_dialog.xml b/chrome/browser/content_creation/reactions/internal/android/java/res/layout/reactions_dialog.xml new file mode 100644 index 0000000..0d951c5 --- /dev/null +++ b/chrome/browser/content_creation/reactions/internal/android/java/res/layout/reactions_dialog.xml
@@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-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. --> + + +<!-- TODO(crbug.com/1251666): Add android:contentDescription="@string/foo" attribute--> +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@color/default_bg_color" + android:orientation="vertical" + android:importantForAccessibility="yes"> + + <include layout="@layout/scene"/> + + <include layout="@layout/toolbar"/> +</LinearLayout> \ No newline at end of file
diff --git a/chrome/browser/content_creation/reactions/internal/android/java/res/layout/scene.xml b/chrome/browser/content_creation/reactions/internal/android/java/res/layout/scene.xml new file mode 100644 index 0000000..8cc2fb1 --- /dev/null +++ b/chrome/browser/content_creation/reactions/internal/android/java/res/layout/scene.xml
@@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-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. --> + +<!-- TODO(crbug.com/1249148): Add android:contentDescription="@string/foo" attribute--> +<RelativeLayout + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@color/modern_blue_600" + android:orientation="vertical" + android:importantForAccessibility="yes"> + + <TextView + android:id="@+id/lightweight_reactions_scene_test" + android:gravity="center" + android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:layout_gravity="center" + android:text="@string/sharing_screenshot" + android:textAppearance="@style/TextAppearance.TextMedium.Secondary" /> + +</RelativeLayout> \ No newline at end of file
diff --git a/chrome/browser/content_creation/reactions/internal/android/java/res/layout/toolbar.xml b/chrome/browser/content_creation/reactions/internal/android/java/res/layout/toolbar.xml new file mode 100644 index 0000000..63d3e51 --- /dev/null +++ b/chrome/browser/content_creation/reactions/internal/android/java/res/layout/toolbar.xml
@@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-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. --> + +<!-- TODO:(crbug.com/1251662) Add android:contentDescription="@string/foo" attribute--> +<RelativeLayout + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@color/modern_blue_700" + android:orientation="vertical" + android:importantForAccessibility="yes"> + + <TextView + android:id="@+id/lightweight_reactions_toolbar_test" + android:gravity="center" + android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:layout_gravity="center" + android:text="@string/sharing_lightweight_reactions" + android:textAppearance="@style/TextAppearance.TextMedium.Secondary" /> +</RelativeLayout> \ No newline at end of file
diff --git a/chrome/browser/content_creation/reactions/internal/android/java/src/org/chromium/chrome/browser/content_creation/reactions/LightweightReactionsCoordinatorImpl.java b/chrome/browser/content_creation/reactions/internal/android/java/src/org/chromium/chrome/browser/content_creation/reactions/LightweightReactionsCoordinatorImpl.java index fe8c371..83e61801 100644 --- a/chrome/browser/content_creation/reactions/internal/android/java/src/org/chromium/chrome/browser/content_creation/reactions/LightweightReactionsCoordinatorImpl.java +++ b/chrome/browser/content_creation/reactions/internal/android/java/src/org/chromium/chrome/browser/content_creation/reactions/LightweightReactionsCoordinatorImpl.java
@@ -6,6 +6,8 @@ import android.app.Activity; +import androidx.fragment.app.FragmentActivity; + import org.chromium.chrome.browser.share.BaseScreenshotCoordinator; import org.chromium.chrome.browser.share.share_sheet.ChromeOptionShareCallback; import org.chromium.chrome.browser.tab.Tab; @@ -16,6 +18,7 @@ */ public class LightweightReactionsCoordinatorImpl extends BaseScreenshotCoordinator implements LightweightReactionsCoordinator { + private final LightweightReactionsDialog mDialog; /** * Constructs a new LightweightReactionsCoordinatorImpl which initializes and displays the * Lightweight Reactions scene. @@ -30,15 +33,17 @@ ChromeOptionShareCallback chromeOptionShareCallback, BottomSheetController sheetController) { super(activity, tab, shareUrl, chromeOptionShareCallback, sheetController); + mDialog = new LightweightReactionsDialog(); } @Override public void showDialog() { - // No-op for now + FragmentActivity fragmentActivity = (FragmentActivity) mActivity; + mDialog.show(fragmentActivity.getSupportFragmentManager(), null); } @Override protected void handleScreenshot() { - // No-op for now + showDialog(); } }
diff --git a/chrome/browser/content_creation/reactions/internal/android/java/src/org/chromium/chrome/browser/content_creation/reactions/LightweightReactionsDialog.java b/chrome/browser/content_creation/reactions/internal/android/java/src/org/chromium/chrome/browser/content_creation/reactions/LightweightReactionsDialog.java new file mode 100644 index 0000000..5fc7d41e --- /dev/null +++ b/chrome/browser/content_creation/reactions/internal/android/java/src/org/chromium/chrome/browser/content_creation/reactions/LightweightReactionsDialog.java
@@ -0,0 +1,31 @@ +// 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. + +package org.chromium.chrome.browser.content_creation.reactions; + +import android.app.Dialog; +import android.os.Bundle; +import android.view.View; + +import androidx.appcompat.app.AlertDialog; +import androidx.fragment.app.DialogFragment; + +import org.chromium.chrome.browser.content_creation.reactions.internal.R; + +/** + * Dialog for the note creation. + */ +public class LightweightReactionsDialog extends DialogFragment { + private View mContentView; + + @Override + public Dialog onCreateDialog(Bundle savedInstanceState) { + AlertDialog.Builder builder = + new AlertDialog.Builder(getActivity(), R.style.Theme_Chromium_Fullscreen); + mContentView = getActivity().getLayoutInflater().inflate(R.layout.reactions_dialog, null); + builder.setView(mContentView); + + return builder.create(); + } +} \ No newline at end of file
diff --git a/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/DownloadDialogBridgeUnitTest.java b/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/DownloadDialogBridgeUnitTest.java index 6945a53..21f13fd4 100644 --- a/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/DownloadDialogBridgeUnitTest.java +++ b/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/DownloadDialogBridgeUnitTest.java
@@ -62,7 +62,6 @@ DownloadLocationDialogType.DEFAULT; private static final @DownloadLocationDialogType int LOCATION_DIALOG_ERROR_TYPE = DownloadLocationDialogType.NAME_CONFLICT; - // TODO(crbug/1248017): Add LocationDialog tests for Incognito mode. private static final Boolean isIncognito = false; private static final String SUGGESTED_PATH = "sdcard/download.txt";
diff --git a/chrome/browser/enterprise/connectors/device_trust/attestation/common/proto/BUILD.gn b/chrome/browser/enterprise/connectors/device_trust/attestation/common/proto/BUILD.gn index 4084b50..b84366d 100644 --- a/chrome/browser/enterprise/connectors/device_trust/attestation/common/proto/BUILD.gn +++ b/chrome/browser/enterprise/connectors/device_trust/attestation/common/proto/BUILD.gn
@@ -4,12 +4,6 @@ import("//third_party/protobuf/proto_library.gni") -proto_library("keystore_proto") { - proto_in_dir = "//" - sources = [ "device_trust_keystore.proto" ] - generate_python = false -} - proto_library("attestation_ca_proto") { proto_in_dir = "//" sources = [ "device_trust_attestation_ca.proto" ] @@ -19,10 +13,6 @@ proto_library("interface_proto") { proto_in_dir = "//" sources = [ "device_trust_interface.proto" ] - deps = [ - ":attestation_ca_proto", - ":keystore_proto", - ] generate_python = false }
diff --git a/chrome/browser/enterprise/connectors/device_trust/attestation/common/proto/device_trust_attestation_ca.proto b/chrome/browser/enterprise/connectors/device_trust/attestation/common/proto/device_trust_attestation_ca.proto index b625d0a..8521c48d 100644 --- a/chrome/browser/enterprise/connectors/device_trust/attestation/common/proto/device_trust_attestation_ca.proto +++ b/chrome/browser/enterprise/connectors/device_trust/attestation/common/proto/device_trust_attestation_ca.proto
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// This file is based on a copy of +// This file is a subset copy of // third_party/cros_system_api/dbus/attestation/attestation_ca.proto // third_party/cros_system_api is only for ChromeOS. @@ -12,81 +12,6 @@ package enterprise_connectors; -// Enumerates various certificate profiles supported by the Attestation CA. -enum CertificateProfile { - // A certificate intended for enterprise-owned devices. It has the following - // subjectName fields: - // CN=<stable device identifier> - // OU=state:[verified|developer] - // O=Chrome Device Enterprise - ENTERPRISE_MACHINE_CERTIFICATE = 0; - - // A certificate intended for enterprise-owned user accounts. It has the - // following subjectName fields: - // OU=state:[verified|developer] - // O=Chrome Device Enterprise - ENTERPRISE_USER_CERTIFICATE = 1; - - // A certificate intended for platform verification by providers of protected - // content. It has the following subjectName fields: - // O=Chrome Device Content Protection - CONTENT_PROTECTION_CERTIFICATE = 2; - - // Like above, but it also includes a stable ID and origin. - // CN=<origin-specific device identifier> - // OU=<origin> - // O=Chrome Device Content Protection - CONTENT_PROTECTION_CERTIFICATE_WITH_STABLE_ID = 3; - - // A certificate intended for cast devices. - CAST_CERTIFICATE = 4; - - GFSC_CERTIFICATE = 5; - - JETSTREAM_CERTIFICATE = 6; - - // A certificate for enterprise enrollment. - ENTERPRISE_ENROLLMENT_CERTIFICATE = 7; - - // A certificate for signing Android Testsuite Results using CTS-in-a-box. - XTS_CERTIFICATE = 8; - - // An EK certificate for vTPM - // CN=CROS VTPM PRD EK ROOT CA - ENTERPRISE_VTPM_EK_CERTIFICATE = 9; -} - -enum TpmVersion { - TPM_1_2 = 1; // NOTE: This is the default. It must remain listed first. - TPM_2_0 = 2; -} - -// Types of NVRAM quotes used for attestation. -enum NVRAMQuoteType { - // Quote of the Cr50-backed BoardID. - BOARD_ID = 0; - // Quote of the Cr50-backed SN+RMA bits. - SN_BITS = 1; - // Quote of the Cr50-backed RSA public endorsement key certificate. - RSA_PUB_EK_CERT = 2; - // Quote of the Cr50-backed RSU device ID. - RSU_DEVICE_ID = 3; -} - -// Holds information about a quote generated by the TPM. -message Quote { - // The quote; a signature generated with the AIK. - optional bytes quote = 1; - // The serialized data that was quoted; this assists in verifying the quote. - optional bytes quoted_data = 2; - // The value of the PCR(s) at the time the quote was generated. - optional bytes quoted_pcr_value = 3; - // Source data which was originally used to extend the PCR. If this field - // exists it can be expected that SHA1(pcr_source_hint) was extended into the - // PCR. - optional bytes pcr_source_hint = 4; -} - // Holds encrypted data and information required to decrypt it. message EncryptedData { // A key that has been sealed to the TPM or wrapped by another key. @@ -108,174 +33,6 @@ optional bytes signature = 2; } -// The first two fields are suitable for passing to Tspi_TPM_ActivateIdentity() -// directly when using TPM 1.2. For TPM 2.0 the first two fields are not used. -message EncryptedIdentityCredential { - // TPM_ASYM_CA_CONTENTS, encrypted with EK public key. - optional bytes asym_ca_contents = 1; - // TPM_SYM_CA_ATTESTATION, encrypted with the key in aysm_ca_contents. - optional bytes sym_ca_attestation = 2; - - optional TpmVersion tpm_version = 3; - - // The following fields are used only for TPM 2.0. For details see the TPM 2.0 - // specification Part 1 Rev 1.16: - // - Section 9.5.3.3: General description of the scheme. - // - Section 24: More details including how to use the seed to compute the - // values for 'credential_mac' and 'wrapped_certificate-> - // wrapped_key' - // - Section B.10.4: Encrypting the seed with a RSA EK. - // - Section C.7.4: Encrypting the seed with an EC EK. - - // A seed encrypted with the EK public key. The TPM will use this seed to - // derive both an HMAC key to verify the 'credential_mac' field and an AES key - // to unwrap the 'wrapped_certificate->wrapped_key' field. - optional bytes encrypted_seed = 4; - - // An integrity value computed using HMAC-SHA256 over the - // 'wrapped_certificate.wrapped_key' field and the 'Name' of the identity key. - optional bytes credential_mac = 5; - - // A certificate encrypted with a 'credential' that is decrypted by the TPM. - // The 'wrapped_key' field contains the encrypted credential which is - // encrypted using AES-256-CFB with a zero IV. The encryption of the - // certificate itself uses AES-256-CBC with PKCS #5 padding and a random IV. - // The encryption key is derived from the 'credential' using: - // SHA256('ENCRYPT' + credential) - // The mac uses HMAC-SHA256 with a key derived using: - // SHA256('MAC' + credential) - optional EncryptedData wrapped_certificate = 6; -} - -// This message holds all information to be sent to the attestation server in -// order to complete enrollment. -message AttestationEnrollmentRequest { - // The EK cert, in X.509 form, encrypted using the server's public key with - // the following parameters: - // Key encryption: RSA-OAEP with no custom parameters. - // Data encryption: 256-bit key, AES-CBC with PKCS5 padding. - // MAC: HMAC-SHA-512 using the AES key. - optional EncryptedData encrypted_endorsement_credential = 1; - // The AIK public key, the raw TPM format. (TPM_PUBKEY for TPM 1.2, - // TPMT_PUBLIC for TPM 2.0). - optional bytes identity_public_key = 2; - // PCR0 quoted by AIK. - optional Quote pcr0_quote = 3; - // PCR1 quoted by AIK. - optional Quote pcr1_quote = 4; - // DEN for enterprise zero-touch enrollment (crbug/624187). - optional bytes enterprise_enrollment_nonce = 5; - // The device TPM version. - optional TpmVersion tpm_version = 6; - // An encrypted quote of the RSA EK cert, in X.509 form, if the endorsement - // credential is not RSA. - optional EncryptedData encrypted_rsa_endorsement_quote = 7; -} - -enum ResponseStatus { - OK = 0; - // Internal server error. - SERVER_ERROR = 1; - // The server cannot parse the request. - BAD_REQUEST = 2; - // The server rejects the request. - REJECT = 3; - // Only appears in enrollment response. The server returns the same generated - // id and reports the quota limit exceeded status when the number of reset - // action in a specified time window is more than self reset limitation. - QUOTA_LIMIT_EXCEEDED = 4; -} - -// The response from the attestation server for the enrollment request. -message AttestationEnrollmentResponse { - optional ResponseStatus status = 1; - // Short detail response message. Included when the result is not OK. - optional string detail = 2; - optional EncryptedIdentityCredential encrypted_identity_credential = 3; - // Extra details included when the result is not OK. - optional string extra_details = 4; -} - -// The certificate request to be sent to the attestation server. -message AttestationCertificateRequest { - // The AIK cert in X.509 format. - optional bytes identity_credential = 1; - // A certified public key in TPM_PUBKEY (TPMT_PUBLIC for TPM 2.0). - optional bytes certified_public_key = 3; - // The serialized TPM_CERTIFY_INFO (TPMS_ATTEST for TPM 2.0) for the - // certified key. - optional bytes certified_key_info = 4; - // The signature of the TPM_CERTIFY_INFO (TPMS_ATTEST for TPM 2.0) by the AIK. - optional bytes certified_key_proof = 5; - // A message identifier to be included in the response. - optional bytes message_id = 10; - // The certificate profile defines the type of certificate to issue. - optional CertificateProfile profile = 11; - // Information about the origin of the request which may be used depending on - // the certificate profile. - optional string origin = 12; - // The index of a temporal value. This may be used or ignored depending on - // the certificate profile. - optional int32 temporal_index = 13; - // The device TPM version. - optional TpmVersion tpm_version = 14; - // NVRAM quoted by AIK. Keys are values of the NVRAMQuoteType. This is only - // used for enrollment certificates. - map<int32, Quote> nvram_quotes = 15; -} - -// The response from the attestation server for the certificate request. -message AttestationCertificateResponse { - optional ResponseStatus status = 1; - // Short detail response message. Included when the result is not OK. - optional string detail = 2; - // The credential of the certified key in X.509 format. - optional bytes certified_key_credential = 3; - // The issuer intermediate CA certificate in X.509 format. - optional bytes intermediate_ca_cert = 5; - // A message identifier from the request this message is responding to. - optional bytes message_id = 6; - // Additional intermediate CA certificates that can help in validation. - // Certificate chaining order is from the leaf to the root. That is, - // |certified_key_credential| is signed by - // |intermediate_ca_cert|, which is signed by - // |additional_intermediate_ca_cert(0)|, which is signed by - // |additional_intermediate_ca_cert(1)|, ... and so on. - repeated bytes additional_intermediate_ca_cert = 7; - // Extra details included when the result is not OK. - optional string extra_details = 8; -} - -// The reset request to be sent to the attestation server. -message AttestationResetRequest { - // The AIK cert, in X.509 form, encrypted using the server's public key with - // the following parameters: - // Key encryption: RSA-OAEP with no custom parameters. - // Data encryption: 256-bit key, AES-CBC with PKCS5 padding. - // MAC: HMAC-SHA-512 using the AES key. - optional EncryptedData encrypted_identity_credential = 1; - - // The one time token to make sure the reset process can be triggered only - // once. - optional bytes token = 2; - - // The EK cert, in X.509 form, encrypted using the server's public key with - // the following parameters: - // Key encryption: RSA-OAEP with no custom parameters. - // Data encryption: 256-bit key, AES-CBC with PKCS5 padding. - // MAC: HMAC-SHA-512 using the AES key. - optional EncryptedData encrypted_endorsement_credential = 3; -} - -// The response from the attestation server for the reset request. -message AttestationResetResponse { - // The response status. - optional ResponseStatus status = 1; - // Short detail response message. Included when the result is not OK. - optional string detail = 2; - // Extra details included when the result is not OK. - optional string extra_details = 3; -} // The challenge data (as in challenge-response) generated by the server. // Before transmitted to the client, this message will be wrapped as a
diff --git a/chrome/browser/enterprise/connectors/device_trust/attestation/common/proto/device_trust_google_key.proto b/chrome/browser/enterprise/connectors/device_trust/attestation/common/proto/device_trust_google_key.proto index 2b2f04e..feeac18 100644 --- a/chrome/browser/enterprise/connectors/device_trust/attestation/common/proto/device_trust_google_key.proto +++ b/chrome/browser/enterprise/connectors/device_trust/attestation/common/proto/device_trust_google_key.proto
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// This file is an exact copy of +// This file is a subset copy of // third_party/cros_system_api/dbus/attestation/google_key.proto // third_party/cros_system_api is only for ChromeOS.
diff --git a/chrome/browser/enterprise/connectors/device_trust/attestation/common/proto/device_trust_interface.proto b/chrome/browser/enterprise/connectors/device_trust/attestation/common/proto/device_trust_interface.proto index 2409f1f..71492ee2 100644 --- a/chrome/browser/enterprise/connectors/device_trust/attestation/common/proto/device_trust_interface.proto +++ b/chrome/browser/enterprise/connectors/device_trust/attestation/common/proto/device_trust_interface.proto
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// This file is an exact copy of +// This file is a subset copy of // third_party/cros_system_api/dbus/attestation/interface.proto // third_party/cros_system_api is only for ChromeOS. @@ -10,9 +10,6 @@ option optimize_for = LITE_RUNTIME; -import "chrome/browser/enterprise/connectors/device_trust/attestation/common/proto/device_trust_attestation_ca.proto"; -import "chrome/browser/enterprise/connectors/device_trust/attestation/common/proto/device_trust_keystore.proto"; - package enterprise_connectors; enum AttestationStatus { @@ -30,336 +27,11 @@ STATUS_DBUS_ERROR = 9; } -enum ACAType { - DEFAULT_ACA = 0; - TEST_ACA = 1; -} - enum VAType { DEFAULT_VA = 0; TEST_VA = 1; } -message GetKeyInfoRequest { - optional string key_label = 1; - optional string username = 2; -} - -message GetKeyInfoReply { - optional AttestationStatus status = 1; - optional KeyType key_type = 2; - optional KeyUsage key_usage = 3; - // The public key (X.509/DER SubjectPublicKeyInfo). - optional bytes public_key = 4; - // The serialized TPM_CERTIFY_INFO or TPM2B_ATTEST for the new key. - optional bytes certify_info = 5; - // The signature of certify_info by the Attestation Key. - optional bytes certify_info_signature = 6; - // The certificate data associated with the key (if any). - optional bytes certificate = 7; - // The payload associated with the key. - optional bytes payload = 8; -} - -message GetEndorsementInfoRequest { - reserved 1; -} - -message GetEndorsementInfoReply { - optional AttestationStatus status = 1; - // The endorsement public key (X.509/DER SubjectPublicKeyInfo). - optional bytes ek_public_key = 2; - // The endorsement certificate (X.509/DER). - optional bytes ek_certificate = 3; - // Human-readable string with EK information. Contains EK certificate in PEM - // format and SHA256 hash of the raw DER encoded certificate. - optional string ek_info = 4; -} - -message GetAttestationKeyInfoRequest { - reserved 1; - // What kind of ACA to use. - optional ACAType aca_type = 2; -} - -message GetAttestationKeyInfoReply { - optional AttestationStatus status = 1; - // The attestation public key (X.509/DER SubjectPublicKeyInfo). - optional bytes public_key = 2; - // The attestation public key in TPM_PUBKEY form. - optional bytes public_key_tpm_format = 3; - // The attestation key certificate. - optional bytes certificate = 4; - // A quote of PCR0 at the time of attestation key creation. - optional Quote pcr0_quote = 5; - // A quote of PCR1 at the time of attestation key creation. - optional Quote pcr1_quote = 6; -} - -message ActivateAttestationKeyRequest { - reserved 1; - optional EncryptedIdentityCredential encrypted_certificate = 2; - // Whether, on success, the decrypted certificate should be retained in - // association with the attestation key. When using an ACA, this is normally - // set to true. Other protocols may use a nonce as the 'certificate' and in - // these cases this field is normally set to false. - optional bool save_certificate = 3; - // What kind of ACA to use. - optional ACAType aca_type = 4; -} - -message ActivateAttestationKeyReply { - optional AttestationStatus status = 1; - // The decrypted attestation key certificate. - optional bytes certificate = 2; -} - -message CreateCertifiableKeyRequest { - // An arbitrary label which can be used to reference the key later. - optional string key_label = 1; - // Provided if the new key should be accessible only by a - // particular user. If this field is not set or is the empty - // string, the key will be accessible system-wide. - optional string username = 2; - optional KeyType key_type = 3; - optional KeyUsage key_usage = 4; -} - -message CreateCertifiableKeyReply { - optional AttestationStatus status = 1; - // The new public key (X.509/DER SubjectPublicKeyInfo). - optional bytes public_key = 2; - // The serialized TPM_CERTIFY_INFO or TPM2B_ATTEST for the new key. - optional bytes certify_info = 3; - // The signature of certify_info by the Attestation Key. - optional bytes certify_info_signature = 4; -} - -message DecryptRequest { - optional string key_label = 1; - optional string username = 2; - optional bytes encrypted_data = 3; -} - -message DecryptReply { - optional AttestationStatus status = 1; - optional bytes decrypted_data = 2; -} - -message SignRequest { - optional string key_label = 1; - optional string username = 2; - optional bytes data_to_sign = 3; -} - -message SignReply { - optional AttestationStatus status = 1; - optional bytes signature = 2; -} - -message RegisterKeyWithChapsTokenRequest { - optional string key_label = 1; - optional string username = 2; - optional bool include_certificates = 3; -} - -message RegisterKeyWithChapsTokenReply { - optional AttestationStatus status = 1; -} - -// Message to check whether attestation is prepared for enrollment or not. -message GetEnrollmentPreparationsRequest { - optional ACAType aca_type = 1; -} - -// Reply to a check of whether attestation is prepared for enrollment or not. -message GetEnrollmentPreparationsReply { - optional AttestationStatus status = 1; - map<int32, bool> enrollment_preparations = 2; -} - -message GetStatusRequest { - // Get extended status (see GetStatusReply below). - optional bool extended_status = 1; -} - -message GetStatusReply { - message Identity { - // The identity features. - optional int32 features = 1; - } - - message IdentityCertificate { - // The identity that is enrolled. - optional int32 identity = 1; - // The Privacy CA that the identity is enrolled with. - optional int32 aca = 2; - } - - optional AttestationStatus status = 1; - // Is prepared for enrollment? True if prepared for *any* CA. - optional bool prepared_for_enrollment = 2; - // Is enrolled (AIK certificate created)? True if enrolled with *any* CA. - optional bool enrolled = 3; - // Is in verified boot mode (according to PCR0 quote)? - // [Only included in reply if extended_status is set] - optional bool verified_boot = 4; - // List of identities and their identity features. - repeated Identity identities = 5; - // List of identity certificates. - map<int32, IdentityCertificate> identity_certificates = 6; - // Map of CA types to whether we are prepared for enrollment with that CA. - map<int32, bool> enrollment_preparations = 7; -} - -// Verify attestation data. -message VerifyRequest { - // Use CrosCore CA to verify that the EK is endorsed. - optional bool cros_core = 1; - // Verify EK only. - // Otherwise, in addition to EK, verify all attestation data as a CA would. - optional bool ek_only = 2; -} - -message VerifyReply { - optional AttestationStatus status = 1; - optional bool verified = 2; -} - -// Create an enrollment request to be sent to the Privacy CA. This request -// is a serialized AttestationEnrollmentRequest protobuf. Attestation -// enrollment is a process by which the Privacy CA verifies the EK certificate -// of a device and issues a certificate for an AIK. The enrollment process can -// be finished by sending FinishEnrollRequest with the response from the CA. -message CreateEnrollRequestRequest { - // What kind of ACA to use. - optional ACAType aca_type = 1; -} - -message CreateEnrollRequestReply { - optional AttestationStatus status = 1; - // AttestationEnrollmentRequest to be sent to CA server. - optional bytes pca_request = 2; -} - -// Finish the enrollment process. -message FinishEnrollRequest { - // AttestationEnrollmentResponse received from CA server. - optional bytes pca_response = 1; - // What kind of ACA to use. - optional ACAType aca_type = 2; -} - -message FinishEnrollReply { - optional AttestationStatus status = 1; -} - -// Goes through the entire enrollment process, including creating enroll -// request, sending the request to the corresponding PCA server, and storing the -// response from PCA server if success. The message field is identical to -// |CreateEnrollRequestRequest|. -message EnrollRequest { - // What kind of ACA to use. - optional ACAType aca_type = 1; - // No matter is the device is enrolled, (re-)enroll the device. - optional bool forced = 2; -} - -message EnrollReply { - optional AttestationStatus status = 1; -} - -// Create an attestation certificate request to be sent to the Privacy CA. -// The request is a serialized AttestationCertificateRequest protobuf. The -// certificate request process generates and certifies a key in the TPM and -// sends the AIK certificate along with information about the certified key to -// the Privacy CA. The PCA verifies the information and issues a certificate -// for the certified key. The certificate request process can be finished by -// sending FinishCertificateRequestRequest with the response from the CA. -message CreateCertificateRequestRequest { - // Type of certificate to be requested. - optional CertificateProfile certificate_profile = 1; - // The canonical username of the active user profile. Leave blank - // if not associated with the current user. - optional string username = 2; - // Some certificate requests require information about the origin - // of the request. If no origin is needed, this can be empty. - optional string request_origin = 3; - // What kind of ACA to use. - optional ACAType aca_type = 4; - // The key algorithm of certified key. - optional KeyType key_type = 5; -} - -message CreateCertificateRequestReply { - optional AttestationStatus status = 1; - // The request to be sent to the Privacy CA. - optional bytes pca_request = 2; -} - -// Finish the certificate request process. The |pca_response| from the PCA -// is a serialized AttestationCertificateResponse protobuf. This final step -// verifies the PCA operation succeeded and extracts the certificate for the -// certified key. The certificate is stored with the key. -message FinishCertificateRequestRequest { - // The Privacy CA's response to a certificate request. - optional bytes pca_response = 1; - // A name for the key. If a key already exists with this name it - // will be destroyed and replaced with this one. - optional string key_label = 2; - // This should match |username| in CreateCertificateRequestRequest. - optional string username = 3; -} - -message FinishCertificateRequestReply { - optional AttestationStatus status = 1; - // The PCA issued certificate chain in PEM format. By - // convention the certified key certificate is listed - // first followed by intermediate CA certificate(s). - // The PCA root certificate is not included. - optional bytes certificate = 2; - // The public key (X.509/DER SubjectPublicKeyInfo). - optional bytes public_key = 3; -} - -// Goes through the entire cert process, including creating cert, sending the -// request to the corresponding PCA server, and storing the response from PCA -// server if success. The message fields are basically the union of -// |CreateCertificateRequestRequest| and |FinishCertificateRequestRequest|. -message GetCertificateRequest { - // Type of certificate to be requested. - optional CertificateProfile certificate_profile = 1; - // The canonical username of the active user profile. Leave blank - // if not associated with the current user. - optional string username = 2; - // Some certificate requests require information about the origin - // of the request. If no origin is needed, this can be empty. - optional string request_origin = 3; - // What kind of ACA to use. - optional ACAType aca_type = 4; - // The key algorithm of certified key. - optional KeyType key_type = 5; - // A name for the key. If a key already exists with this name it - // will be destroyed and replaced with this one. - optional string key_label = 6; - // Ignores the current certificate if any and gets the new certificate. - optional bool forced = 7; - // If set to |true|, this request also triggers enrollment process if the - // device is not enrolled yet. - optional bool shall_trigger_enrollment = 8; -} - -message GetCertificateReply { - optional AttestationStatus status = 1; - // The PCA issued certificate chain in PEM format. By - // convention the certified key certificate is listed - // first followed by intermediate CA certificate(s). - // The PCA root certificate is not included. - optional bytes certificate = 2; - // The public key (X.509/DER SubjectPublicKeyInfo). - optional bytes public_key = 3; -} - // Sign a challenge for an enterprise device / user. This challenge is // typically generated by and the response verified by the Enterprise Device // Verification Server (DVServer). @@ -395,105 +67,3 @@ // The challenge response. optional bytes challenge_response = 2; } - -// Sign a challenge outside of an enterprise context: generate a random nonce -// and append it to challenge, then sign and return the signature in the -// |challenge_response|. -// This challenge is typically generated by some module running within Chrome. -message SignSimpleChallengeRequest { - // The key name. This is the same name previously passed to - // FinishCertificateRequestRequest. - optional string key_label = 1; - // The canonical username of the active user profile. Leave blank - // if not associated with the current user. - optional string username = 2; - // The challenge to be signed. - optional bytes challenge = 3; -} - -message SignSimpleChallengeReply { - optional AttestationStatus status = 1; - // The challenge response. - optional bytes challenge_response = 2; -} - -// Set a payload for a key; any previous payload will be overwritten. -message SetKeyPayloadRequest { - // The key name. This is the same name previously passed to - // FinishCertificateRequestRequest. - optional string key_label = 1; - // The canonical username of the active user profile. Leave blank - // if not associated with the current user. - optional string username = 2; - optional bytes payload = 3; -} - -message SetKeyPayloadReply { - optional AttestationStatus status = 1; -} - -// Delete keys either by key label prefix or by exact key label. -message DeleteKeysRequest { - enum MatchBehavior { - // Match type not specified. Behavior defaults to |MATCH_TYPE_PREFIX|. - MATCH_BEHAVIOR_UNSPECIFIED = 0; - - // Will delete all keys that start with |key_label_match|. - // If no such key exists, the operation still succeeds. - MATCH_BEHAVIOR_PREFIX = 1; - - // Will delete the key which has a key_label exactly matching - // |key_label_match|. - // If no such key exists, the operation still succeeds. - MATCH_BEHAVIOR_EXACT = 2; - } - // The key label prefix or the exact key label (depends on |match_behavior|). - optional string key_label_match = 1; - // The canonical username of the active user profile. Leave blank - // if not associated with the current user. - optional string username = 2; - // The matching behavior - see comments on the enum values. If omitted, - // defaults to MATCH_BEHAVIOR_PREFIX for backwards compatibility. - optional MatchBehavior match_behavior = 3; -} - -message DeleteKeysReply { - optional AttestationStatus status = 1; -} - -// Create a request to be sent to the PCA which will reset the identity for -// this device on future AIK enrollments. The |reset_token| is put in the -// request protobuf verbatim. -message ResetIdentityRequest { - optional string reset_token = 1; -} - -message ResetIdentityReply { - optional AttestationStatus status = 1; - // Request to be sent to the CA. - optional bytes reset_request = 2; -} - -message GetEnrollmentIdRequest { - optional bool ignore_cache = 1; -} - -message GetEnrollmentIdReply { - optional AttestationStatus status = 1; - optional string enrollment_id = 2; -} - -// Gets a copy of the specific NV data, signed using the key with the specified -// label, eg "attest-ent-machine". -message GetCertifiedNvIndexRequest { - optional int32 nv_index = 1; - optional int32 nv_size = 2; - optional string key_label = 3; -} - -message GetCertifiedNvIndexReply { - optional AttestationStatus status = 1; - optional bytes certified_data = 2; - optional bytes signature = 3; - optional bytes key_certificate = 4; -}
diff --git a/chrome/browser/enterprise/connectors/device_trust/attestation/common/proto/device_trust_keystore.proto b/chrome/browser/enterprise/connectors/device_trust/attestation/common/proto/device_trust_keystore.proto deleted file mode 100644 index 966a870..0000000 --- a/chrome/browser/enterprise/connectors/device_trust/attestation/common/proto/device_trust_keystore.proto +++ /dev/null
@@ -1,25 +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. - -// This file is an exact copy of -// third_party/cros_system_api/dbus/attestation/keystore.proto -// third_party/cros_system_api is only for ChromeOS. - -syntax = "proto2"; - -option optimize_for = LITE_RUNTIME; - -package enterprise_connectors; - -// Describes key type. -enum KeyType { - KEY_TYPE_RSA = 1; - KEY_TYPE_ECC = 2; -} - -// Describes allowed key usage. -enum KeyUsage { - KEY_USAGE_SIGN = 1; - KEY_USAGE_DECRYPT = 2; -}
diff --git a/chrome/browser/enterprise/connectors/device_trust/attestation/desktop/desktop_attestation_service.h b/chrome/browser/enterprise/connectors/device_trust/attestation/desktop/desktop_attestation_service.h index 65689c0..6046a6d 100644 --- a/chrome/browser/enterprise/connectors/device_trust/attestation/desktop/desktop_attestation_service.h +++ b/chrome/browser/enterprise/connectors/device_trust/attestation/desktop/desktop_attestation_service.h
@@ -15,6 +15,8 @@ namespace enterprise_connectors { class DeviceTrustSignals; +class EncryptedData; +class KeyInfo; class SigningKeyPair; // This class is in charge of handling the key pair used for attestation. Also
diff --git a/chrome/browser/enterprise/connectors/device_trust/attestation/desktop/desktop_attestation_service_unittest.cc b/chrome/browser/enterprise/connectors/device_trust/attestation/desktop/desktop_attestation_service_unittest.cc index c7dcfcc1..e9d3873 100644 --- a/chrome/browser/enterprise/connectors/device_trust/attestation/desktop/desktop_attestation_service_unittest.cc +++ b/chrome/browser/enterprise/connectors/device_trust/attestation/desktop/desktop_attestation_service_unittest.cc
@@ -7,6 +7,7 @@ #include <memory> #include "chrome/browser/enterprise/connectors/device_trust/attestation/common/attestation_utils.h" +#include "chrome/browser/enterprise/connectors/device_trust/attestation/common/proto/device_trust_attestation_ca.pb.h" #include "chrome/browser/enterprise/connectors/device_trust/attestation/desktop/memory_signing_key_pair.h" #include "chrome/browser/enterprise/connectors/device_trust/attestation/desktop/signing_key_pair.h" #include "components/enterprise/common/proto/device_trust_report_event.pb.h"
diff --git a/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc b/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc index 4884af7..7a58f9be6 100644 --- a/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc +++ b/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc
@@ -72,9 +72,8 @@ const char kErrorEngineNotActive[] = "The engine is not active."; const char kErrorRouterNotAvailable[] = "The router is not available."; -void SetMenuItemToMenu( - const input_ime::MenuItem& input, - chromeos::input_method::InputMethodManager::MenuItem* out) { +void SetMenuItemToMenu(const input_ime::MenuItem& input, + ash::input_method::InputMethodManager::MenuItem* out) { out->modified = 0; out->id = input.id; if (input.label) { @@ -85,7 +84,7 @@ if (input.style != input_ime::MENU_ITEM_STYLE_NONE) { out->modified |= InputMethodEngine::MENU_ITEM_MODIFIED_STYLE; out->style = - static_cast<chromeos::input_method::InputMethodManager::MenuItemStyle>( + static_cast<ash::input_method::InputMethodManager::MenuItemStyle>( input.style); } @@ -163,7 +162,7 @@ ~ImeObserverChromeOS() override = default; - // chromeos::InputMethodEngineBase::Observer overrides. + // ash::InputMethodEngineBase::Observer overrides. void OnCandidateClicked( const std::string& component_id, int candidate_id, @@ -379,16 +378,16 @@ // lock screen, login screen, etc.) so that its on-screen keyboard page // won't open new windows/pages. See crbug.com/395621. std::string GetCurrentScreenType() override { - switch (chromeos::input_method::InputMethodManager::Get() + switch (ash::input_method::InputMethodManager::Get() ->GetActiveIMEState() ->GetUIStyle()) { - case chromeos::input_method::InputMethodManager::UIStyle::kLogin: + case ash::input_method::InputMethodManager::UIStyle::kLogin: return "login"; - case chromeos::input_method::InputMethodManager::UIStyle::kSecondaryLogin: + case ash::input_method::InputMethodManager::UIStyle::kSecondaryLogin: return "secondary-login"; - case chromeos::input_method::InputMethodManager::UIStyle::kLock: + case ash::input_method::InputMethodManager::UIStyle::kLock: return "lock"; - case chromeos::input_method::InputMethodManager::UIStyle::kNormal: + case ash::input_method::InputMethodManager::UIStyle::kNormal: return "normal"; } } @@ -535,12 +534,11 @@ if (engine_map_[extension_id]) return false; - chromeos::input_method::InputMethodManager* manager = - chromeos::input_method::InputMethodManager::Get(); - chromeos::ComponentExtensionIMEManager* comp_ext_ime_manager = + auto* manager = ash::input_method::InputMethodManager::Get(); + ash::ComponentExtensionIMEManager* comp_ext_ime_manager = manager->GetComponentExtensionIMEManager(); - chromeos::input_method::InputMethodDescriptors descriptors; + ash::input_method::InputMethodDescriptors descriptors; // Only creates descriptors for 3rd party IME extension, because the // descriptors for component IME extensions are managed by InputMethodUtil. if (!comp_ext_ime_manager->IsAllowlistedExtension(extension_id)) { @@ -560,9 +558,8 @@ languages.assign(component.languages.begin(), component.languages.end()); const std::string& input_method_id = - chromeos::extension_ime_util::GetInputMethodID(extension_id, - component.id); - descriptors.push_back(chromeos::input_method::InputMethodDescriptor( + ash::extension_ime_util::GetInputMethodID(extension_id, component.id); + descriptors.push_back(ash::input_method::InputMethodDescriptor( input_method_id, component.name, std::string(), // TODO(uekawa): Set short name. layout, languages, @@ -577,12 +574,11 @@ bool is_login = false; // When Chrome starts with the Login screen, sometimes active IME State was // not set yet. It's asynchronous process. So we need a fallback for that. - scoped_refptr<chromeos::input_method::InputMethodManager::State> - active_state = chromeos::input_method::InputMethodManager::Get() - ->GetActiveIMEState(); + scoped_refptr<ash::input_method::InputMethodManager::State> active_state = + ash::input_method::InputMethodManager::Get()->GetActiveIMEState(); if (active_state) { is_login = active_state->GetUIStyle() == - chromeos::input_method::InputMethodManager::UIStyle::kLogin; + ash::input_method::InputMethodManager::UIStyle::kLogin; } else { is_login = chromeos::ProfileHelper::IsSigninProfile(profile); } @@ -610,7 +606,7 @@ void InputImeEventRouter::UnregisterAllImes(const std::string& extension_id) { auto it = engine_map_.find(extension_id); if (it != engine_map_.end()) { - chromeos::input_method::InputMethodManager::Get() + ash::input_method::InputMethodManager::Get() ->GetActiveIMEState() ->RemoveInputMethodExtension(extension_id); engine_map_.erase(it); @@ -893,7 +889,7 @@ return RespondNow(Error(InformativeError(error, static_function_name()))); } - std::vector<chromeos::input_method::InputMethodManager::MenuItem> items_out; + std::vector<ash::input_method::InputMethodManager::MenuItem> items_out; for (const input_ime::MenuItem& item_in : params.items) { items_out.emplace_back(); SetMenuItemToMenu(item_in, &items_out.back()); @@ -919,7 +915,7 @@ return RespondNow(Error(InformativeError(error, static_function_name()))); } - std::vector<chromeos::input_method::InputMethodManager::MenuItem> items_out; + std::vector<ash::input_method::InputMethodManager::MenuItem> items_out; for (const input_ime::MenuItem& item_in : params.items) { items_out.emplace_back(); SetMenuItemToMenu(item_in, &items_out.back()); @@ -972,12 +968,12 @@ ExtensionFunction::ResponseAction InputMethodPrivateNotifyImeMenuItemActivatedFunction::Run() { - chromeos::input_method::InputMethodDescriptor current_input_method = - chromeos::input_method::InputMethodManager::Get() + ash::input_method::InputMethodDescriptor current_input_method = + ash::input_method::InputMethodManager::Get() ->GetActiveIMEState() ->GetCurrentInputMethod(); std::string active_extension_id = - chromeos::extension_ime_util::GetExtensionIDFromInputMethodID( + ash::extension_ime_util::GetExtensionIDFromInputMethodID( current_input_method.id()); std::string error; InputMethodEngine* engine = @@ -1057,9 +1053,8 @@ GetInputImeEventRouter(Profile::FromBrowserContext(browser_context)); if (!event_router) return; - chromeos::input_method::InputMethodManager* manager = - chromeos::input_method::InputMethodManager::Get(); - chromeos::ComponentExtensionIMEManager* comp_ext_ime_manager = + auto* manager = ash::input_method::InputMethodManager::Get(); + ash::ComponentExtensionIMEManager* comp_ext_ime_manager = manager->GetComponentExtensionIMEManager(); if (comp_ext_ime_manager->IsAllowlistedExtension(extension->id())) {
diff --git a/chrome/browser/extensions/api/language_settings_private/language_settings_private_api.cc b/chrome/browser/extensions/api/language_settings_private/language_settings_private_api.cc index be949f10..67f91a2d 100644 --- a/chrome/browser/extensions/api/language_settings_private/language_settings_private_api.cc +++ b/chrome/browser/extensions/api/language_settings_private/language_settings_private_api.cc
@@ -64,10 +64,10 @@ namespace { #if BUILDFLAG(IS_CHROMEOS_ASH) -using chromeos::input_method::InputMethodDescriptor; -using chromeos::input_method::InputMethodDescriptors; -using chromeos::input_method::InputMethodManager; -using chromeos::input_method::InputMethodUtil; +using ::ash::input_method::InputMethodDescriptor; +using ::ash::input_method::InputMethodDescriptors; +using ::ash::input_method::InputMethodManager; +using ::ash::input_method::InputMethodUtil; // Number of IMEs that are needed to automatically enable the IME menu option. const size_t kNumImesToAutoEnableImeMenu = 2; @@ -131,8 +131,7 @@ // Get all input methods for this language. std::vector<std::string> input_method_ids; manager->GetInputMethodUtil()->GetInputMethodIdsFromLanguageCode( - language_code, chromeos::input_method::kAllInputMethods, - &input_method_ids); + language_code, ash::input_method::kAllInputMethods, &input_method_ids); // Append the enabled ones to the new list. Also remove them from the set // so they aren't duplicated for other languages. for (const auto& input_method_id : input_method_ids) { @@ -163,7 +162,7 @@ // Add the fake language for ARC IMEs at the very last of the list. Unlike // Chrome OS IMEs, these ARC ones are not associated with any (real) language. - enabled_languages.push_back(chromeos::extension_ime_util::kArcImeLanguage); + enabled_languages.push_back(ash::extension_ime_util::kArcImeLanguage); InputMethodDescriptors descriptors; ime_state->GetInputMethodExtensions(&descriptors); @@ -289,7 +288,7 @@ // drop-down menu doesn't list the fake language. { language_settings_private::Language language; - language.code = chromeos::extension_ime_util::kArcImeLanguage; + language.code = ash::extension_ime_util::kArcImeLanguage; language.display_name = l10n_util::GetStringUTF8(IDS_SETTINGS_LANGUAGES_KEYBOARD_APPS); language_list_->Append(language.ToValue()); @@ -784,7 +783,7 @@ language_settings_private::InputMethodLists input_method_lists; InputMethodManager* manager = InputMethodManager::Get(); - chromeos::ComponentExtensionIMEManager* component_extension_manager = + ash::ComponentExtensionIMEManager* component_extension_manager = manager->GetComponentExtensionIMEManager(); PopulateInputMethodListFromDescriptors( component_extension_manager->GetAllIMEAsInputMethodDescriptor(), @@ -827,8 +826,7 @@ std::string new_input_method_id = params->input_method_id; bool is_component_extension_ime = - chromeos::extension_ime_util::IsComponentExtensionIME( - new_input_method_id); + ash::extension_ime_util::IsComponentExtensionIME(new_input_method_id); PrefService* prefs = Profile::FromBrowserContext(browser_context())->GetPrefs(); @@ -902,7 +900,7 @@ std::string input_method_id = params->input_method_id; bool is_component_extension_ime = - chromeos::extension_ime_util::IsComponentExtensionIME(input_method_id); + ash::extension_ime_util::IsComponentExtensionIME(input_method_id); // Use the pref for the corresponding input method type. PrefService* prefs =
diff --git a/chrome/browser/extensions/api/language_settings_private/language_settings_private_api_unittest.cc b/chrome/browser/extensions/api/language_settings_private/language_settings_private_api_unittest.cc index fe586154..90305bd9 100644 --- a/chrome/browser/extensions/api/language_settings_private/language_settings_private_api_unittest.cc +++ b/chrome/browser/extensions/api/language_settings_private/language_settings_private_api_unittest.cc
@@ -431,26 +431,26 @@ #if BUILDFLAG(IS_CHROMEOS_ASH) namespace { -namespace input_method = chromeos::input_method; +namespace input_method = ::ash::input_method; using input_method::InputMethodDescriptor; using input_method::InputMethodManager; using input_method::MockComponentExtensionIMEManagerDelegate; std::string GetExtensionImeId() { - std::string kExtensionImeId = chromeos::extension_ime_util::GetInputMethodID( + std::string kExtensionImeId = ash::extension_ime_util::GetInputMethodID( crx_file::id_util::GenerateId("test.extension.ime"), "us"); return kExtensionImeId; } std::string GetComponentExtensionImeId() { std::string kComponentExtensionImeId = - chromeos::extension_ime_util::GetComponentInputMethodID( + ash::extension_ime_util::GetComponentInputMethodID( crx_file::id_util::GenerateId("test.component.extension.ime"), "us"); return kComponentExtensionImeId; } std::string GetArcImeId() { - std::string kArcImeId = chromeos::extension_ime_util::GetArcInputMethodID( + std::string kArcImeId = ash::extension_ime_util::GetArcInputMethodID( crx_file::id_util::GenerateId("test.arc.ime"), "us"); return kArcImeId; } @@ -468,10 +468,10 @@ InputMethodDescriptor component_extension_ime( GetComponentExtensionImeId(), "ComponentExtensionIme", "", layout, {"en-US", "en"}, false /* is_login_keyboard */, GURL(), GURL()); - InputMethodDescriptor arc_ime( - GetArcImeId(), "ArcIme", "", layout, - {chromeos::extension_ime_util::kArcImeLanguage}, - false /* is_login_keyboard */, GURL(), GURL()); + InputMethodDescriptor arc_ime(GetArcImeId(), "ArcIme", "", layout, + {ash::extension_ime_util::kArcImeLanguage}, + false /* is_login_keyboard */, GURL(), + GURL()); input_methods_ = {extension_ime, component_extension_ime, arc_ime}; } @@ -492,9 +492,8 @@ TestInputMethodManager() : state_(new TestState), util_(&delegate_) { util_.AppendInputMethods(state_->input_methods_); - component_ext_mgr_ = - std::make_unique<chromeos::ComponentExtensionIMEManager>( - std::make_unique<MockComponentExtensionIMEManagerDelegate>()); + component_ext_mgr_ = std::make_unique<ash::ComponentExtensionIMEManager>( + std::make_unique<MockComponentExtensionIMEManagerDelegate>()); } scoped_refptr<InputMethodManager::State> GetActiveIMEState() override { @@ -505,7 +504,7 @@ return &util_; } - chromeos::ComponentExtensionIMEManager* GetComponentExtensionIMEManager() + ash::ComponentExtensionIMEManager* GetComponentExtensionIMEManager() override { return component_ext_mgr_.get(); } @@ -514,7 +513,7 @@ scoped_refptr<TestState> state_; input_method::FakeInputMethodDelegate delegate_; input_method::InputMethodUtil util_; - std::unique_ptr<chromeos::ComponentExtensionIMEManager> component_ext_mgr_; + std::unique_ptr<ash::ComponentExtensionIMEManager> component_ext_mgr_; DISALLOW_COPY_AND_ASSIGN(TestInputMethodManager); };
diff --git a/chrome/browser/extensions/api/language_settings_private/language_settings_private_delegate.cc b/chrome/browser/extensions/api/language_settings_private/language_settings_private_delegate.cc index 81f389c..55d8a48 100644 --- a/chrome/browser/extensions/api/language_settings_private/language_settings_private_delegate.cc +++ b/chrome/browser/extensions/api/language_settings_private/language_settings_private_delegate.cc
@@ -114,8 +114,7 @@ #if BUILDFLAG(IS_CHROMEOS_ASH) if (listening_input_method_) { - auto* input_method_manager = - chromeos::input_method::InputMethodManager::Get(); + auto* input_method_manager = ash::input_method::InputMethodManager::Get(); if (input_method_manager) input_method_manager->RemoveObserver(this); listening_input_method_ = false; @@ -163,7 +162,7 @@ #if BUILDFLAG(IS_CHROMEOS_ASH) void LanguageSettingsPrivateDelegate::InputMethodChanged( - chromeos::input_method::InputMethodManager* manager, + ash::input_method::InputMethodManager* manager, Profile* profile, bool show_message) { // Nothing to do. @@ -302,8 +301,7 @@ event_router->HasEventListener( language_settings_private::OnInputMethodRemoved::kEventName); - auto* input_method_manager = - chromeos::input_method::InputMethodManager::Get(); + auto* input_method_manager = ash::input_method::InputMethodManager::Get(); if (input_method_manager) { if (should_listen && !listening_input_method_) input_method_manager->AddObserver(this);
diff --git a/chrome/browser/extensions/api/language_settings_private/language_settings_private_delegate.h b/chrome/browser/extensions/api/language_settings_private/language_settings_private_delegate.h index cadb118..543d1d8 100644 --- a/chrome/browser/extensions/api/language_settings_private/language_settings_private_delegate.h +++ b/chrome/browser/extensions/api/language_settings_private/language_settings_private_delegate.h
@@ -37,7 +37,7 @@ public EventRouter::Observer, public content::NotificationObserver, #if BUILDFLAG(IS_CHROMEOS_ASH) - public chromeos::input_method::InputMethodManager::Observer, + public ash::input_method::InputMethodManager::Observer, #endif // BUILDFLAG(IS_CHROMEOS_ASH) public SpellcheckHunspellDictionary::Observer, public SpellcheckCustomDictionary::Observer { @@ -76,8 +76,8 @@ void OnListenerRemoved(const EventListenerInfo& details) override; #if BUILDFLAG(IS_CHROMEOS_ASH) - // chromeos::input_method::InputMethodManager::Observer implementation. - void InputMethodChanged(chromeos::input_method::InputMethodManager* manager, + // ash::input_method::InputMethodManager::Observer implementation. + void InputMethodChanged(ash::input_method::InputMethodManager* manager, Profile* profile, bool show_message) override; void OnInputMethodExtensionAdded(const std::string& extension_id) override;
diff --git a/chrome/browser/extensions/chrome_extensions_browser_interface_binders.cc b/chrome/browser/extensions/chrome_extensions_browser_interface_binders.cc index 6df422b..3fcc034 100644 --- a/chrome/browser/extensions/chrome_extensions_browser_interface_binders.cc +++ b/chrome/browser/extensions/chrome_extensions_browser_interface_binders.cc
@@ -60,7 +60,7 @@ void BindInputEngineManager( content::RenderFrameHost* render_frame_host, mojo::PendingReceiver<chromeos::ime::mojom::InputEngineManager> receiver) { - chromeos::input_method::InputMethodManager::Get()->ConnectInputEngineManager( + ash::input_method::InputMethodManager::Get()->ConnectInputEngineManager( std::move(receiver)); } @@ -119,7 +119,7 @@ #if BUILDFLAG(GOOGLE_CHROME_BRANDING) // Registry InputEngineManager for official Google XKB Input only. - if (extension->id() == chromeos::extension_ime_util::kXkbExtensionId) { + if (extension->id() == ash::extension_ime_util::kXkbExtensionId) { binder_map->Add<chromeos::ime::mojom::InputEngineManager>( base::BindRepeating(&BindInputEngineManager)); binder_map->Add<chromeos::machine_learning::mojom::MachineLearningService>(
diff --git a/chrome/browser/first_run/upgrade_util_win.cc b/chrome/browser/first_run/upgrade_util_win.cc index 4dc3f28..b350a01 100644 --- a/chrome/browser/first_run/upgrade_util_win.cc +++ b/chrome/browser/first_run/upgrade_util_win.cc
@@ -22,11 +22,14 @@ #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/logging.h" +#include "base/metrics/histogram_macros.h" #include "base/path_service.h" #include "base/process/launch.h" #include "base/process/process_handle.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" +#include "base/time/time.h" +#include "base/trace_event/trace_event.h" #include "base/win/registry.h" #include "base/win/windows_version.h" #include "build/branding_buildflags.h" @@ -56,6 +59,8 @@ bool InvokeGoogleUpdateForRename() { #if BUILDFLAG(GOOGLE_CHROME_BRANDING) + TRACE_EVENT0("startup", "upgrade_util::InvokeGoogleUpdateForRename"); + Microsoft::WRL::ComPtr<IProcessLauncher> ipl; HRESULT hr = ::CoCreateInstance(__uuidof(ProcessLauncherClass), nullptr, CLSCTX_ALL, IID_PPV_ARGS(&ipl)); @@ -99,6 +104,8 @@ namespace upgrade_util { bool RelaunchChromeBrowserImpl(const base::CommandLine& command_line) { + TRACE_EVENT0("startup", "upgrade_util::RelaunchChromeBrowserImpl"); + base::FilePath chrome_exe; if (!base::PathService::Get(base::FILE_EXE, &chrome_exe)) { NOTREACHED(); @@ -121,6 +128,7 @@ } bool IsUpdatePendingRestart() { + TRACE_EVENT0("startup", "upgrade_util::IsUpdatePendingRestart"); base::FilePath new_chrome_exe; if (!GetNewerChromeFile(&new_chrome_exe)) return false; @@ -131,6 +139,8 @@ if (!IsUpdatePendingRestart()) return false; + TRACE_EVENT0("startup", "upgrade_util::SwapNewChromeExeIfPresent"); + // If this is a system-level install, ask Google Update to launch an elevated // process to rename Chrome executables. if (install_static::IsSystemInstall()) @@ -181,6 +191,7 @@ } bool IsRunningOldChrome() { + TRACE_EVENT0("startup", "upgrade_util::IsRunningOldChrome"); // This figures out the actual file name that the section containing the // mapped exe refers to. This is used instead of GetModuleFileName because the // .exe may have been renamed out from under us while we've been running which @@ -199,12 +210,23 @@ } bool DoUpgradeTasks(const base::CommandLine& command_line) { - if (!SwapNewChromeExeIfPresent() && !IsRunningOldChrome()) + TRACE_EVENT0("startup", "upgrade_util::DoUpgradeTasks"); + const auto begin_time = base::TimeTicks::Now(); + if (!SwapNewChromeExeIfPresent() && !IsRunningOldChrome()) { + UMA_HISTOGRAM_MEDIUM_TIMES("Startup.DoUpgradeTasks.NoRelaunch", + base::TimeTicks::Now() - begin_time); return false; + } // At this point the chrome.exe has been swapped with the new one. - if (!RelaunchChromeBrowser(command_line)) { - // The re-launch fails. Feel free to panic now. + if (RelaunchChromeBrowser(command_line)) { + UMA_HISTOGRAM_MEDIUM_TIMES("Startup.DoUpgradeTasks.RelaunchSucceeded", + base::TimeTicks::Now() - begin_time); + } else { + // The re-launch failed. Feel free to panic now. NOTREACHED(); + // Log a metric anyways to see if this is at fault in crbug.com/1252004 + UMA_HISTOGRAM_MEDIUM_TIMES("Startup.DoUpgradeTasks.RelaunchFailed", + base::TimeTicks::Now() - begin_time); } return true; }
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json index 5ff4200..6edf43f 100644 --- a/chrome/browser/flag-metadata.json +++ b/chrome/browser/flag-metadata.json
@@ -5466,6 +5466,11 @@ "expiry_milestone": 91 }, { + "name": "u2f-permission-prompt", + "owners": [ "//device/fido/OWNERS" ], + "expiry_milestone": 104 + }, + { "name": "u2f-security-key-api", "owners": [ "//device/fido/OWNERS" ], "expiry_milestone": 104
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc index 1b11896..33e2514 100644 --- a/chrome/browser/flag_descriptions.cc +++ b/chrome/browser/flag_descriptions.cc
@@ -183,6 +183,15 @@ "a blob and the verification process of the signed exchange is skipped for " "the succeeding navigation."; +const char kU2FPermissionPromptName[] = + "Enable a permission prompt for the U2F Security Key API"; +const char kU2FPermissionPromptDescription[] = + "Show a permission prompt when making requests to the legacy U2F Security " + "Key API (CryptoToken). The U2F Security " + "Key API has been deprecated and will be removed soon. For more " + "information, refer to the deprecation announcement at " + "https://groups.google.com/a/chromium.org/g/blink-dev/c/xHC3AtU_65A"; + const char kU2FSecurityKeyAPIName[] = "Enable the U2F Security Key API"; const char kU2FSecurityKeyAPIDescription[] = "Enable the legacy U2F Security Key API (CryptoToken). The U2F Security "
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h index 04e4a97..dc68e8f 100644 --- a/chrome/browser/flag_descriptions.h +++ b/chrome/browser/flag_descriptions.h
@@ -130,6 +130,9 @@ extern const char kEnableSignedExchangePrefetchCacheForNavigationsName[]; extern const char kEnableSignedExchangePrefetchCacheForNavigationsDescription[]; +extern const char kU2FPermissionPromptName[]; +extern const char kU2FPermissionPromptDescription[]; + extern const char kU2FSecurityKeyAPIName[]; extern const char kU2FSecurityKeyAPIDescription[];
diff --git a/chrome/browser/lens/region_search/lens_region_search_controller.cc b/chrome/browser/lens/region_search/lens_region_search_controller.cc index 4cee09cdf..99e55b0 100644 --- a/chrome/browser/lens/region_search/lens_region_search_controller.cc +++ b/chrome/browser/lens/region_search/lens_region_search_controller.cc
@@ -37,7 +37,7 @@ CloseWithReason(views::Widget::ClosedReason::kLostFocus); } -void LensRegionSearchController::Start() { +void LensRegionSearchController::Start(bool use_fullscreen_capture) { if (!web_contents() || !browser_) return; @@ -54,7 +54,11 @@ base::OnceCallback<void(const image_editor::ScreenshotCaptureResult&)> callback = base::BindOnce(&LensRegionSearchController::OnCaptureCompleted, weak_this_); - screenshot_flow_->Start(std::move(callback)); + if (use_fullscreen_capture) { + screenshot_flow_->StartFullscreenCapture(std::move(callback)); + } else { + screenshot_flow_->Start(std::move(callback)); + } } gfx::Image LensRegionSearchController::ResizeImageIfNecessary(
diff --git a/chrome/browser/lens/region_search/lens_region_search_controller.h b/chrome/browser/lens/region_search/lens_region_search_controller.h index af72f00d..ecdca44b 100644 --- a/chrome/browser/lens/region_search/lens_region_search_controller.h +++ b/chrome/browser/lens/region_search/lens_region_search_controller.h
@@ -32,8 +32,9 @@ // Creates and runs the drag and capture flow. When run, the user enters into // a screenshot capture mode with the ability to draw a rectagular region // around the web contents. When finished with selection, the region is - // converted into a PNG and sent to Lens. - void Start(); + // converted into a PNG and sent to Lens. If `use_fullscreen_capture` is set + // to true, the whole screen will automatically be captured. + void Start(bool use_fullscreen_capture); // Closes the UI overlay and user education bubble if currently being shown. // The closed reason for this method is defaulted to the close button being
diff --git a/chrome/browser/media/webrtc/current_tab_desktop_media_list.cc b/chrome/browser/media/webrtc/current_tab_desktop_media_list.cc index 36d3dc54..242da9f74 100644 --- a/chrome/browser/media/webrtc/current_tab_desktop_media_list.cc +++ b/chrome/browser/media/webrtc/current_tab_desktop_media_list.cc
@@ -32,6 +32,8 @@ gfx::Rect(0, 0, size.width(), size.height()), gfx::Size(bitmap.info().width(), bitmap.info().height())); + // TODO(crbug.com/1246835): Consider changing to ResizeMethod::BEST after + // evaluating the CPU impact. const gfx::ImageSkia resized = gfx::ImageSkiaOperations::CreateResizedImage( gfx::ImageSkia::CreateFromBitmap(bitmap, 1.f), skia::ImageOperations::ResizeMethod::RESIZE_GOOD, scaled_rect.size());
diff --git a/chrome/browser/media/webrtc/current_tab_desktop_media_list_unittest.cc b/chrome/browser/media/webrtc/current_tab_desktop_media_list_unittest.cc index a21b2ac..b8f6619 100644 --- a/chrome/browser/media/webrtc/current_tab_desktop_media_list_unittest.cc +++ b/chrome/browser/media/webrtc/current_tab_desktop_media_list_unittest.cc
@@ -53,6 +53,8 @@ MOCK_METHOD2(OnSourceThumbnailChanged, void(DesktopMediaList* list, int index)); MOCK_METHOD1(OnAllSourcesFound, void(DesktopMediaList* list)); + MOCK_METHOD2(OnSourcePreviewChanged, + void(DesktopMediaList* list, size_t index)); }; } // namespace
diff --git a/chrome/browser/media/webrtc/desktop_media_list.cc b/chrome/browser/media/webrtc/desktop_media_list.cc new file mode 100644 index 0000000..b80424fc --- /dev/null +++ b/chrome/browser/media/webrtc/desktop_media_list.cc
@@ -0,0 +1,11 @@ +// 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/media/webrtc/desktop_media_list.h" + +DesktopMediaList::Source::Source() = default; + +DesktopMediaList::Source::Source(const Source& other_source) = default; + +DesktopMediaList::Source::~Source() = default;
diff --git a/chrome/browser/media/webrtc/desktop_media_list.h b/chrome/browser/media/webrtc/desktop_media_list.h index d973704..57cfc64 100644 --- a/chrome/browser/media/webrtc/desktop_media_list.h +++ b/chrome/browser/media/webrtc/desktop_media_list.h
@@ -45,6 +45,10 @@ // Struct used to represent each entry in the list. struct Source { + Source(); + Source(const Source& other_source); + ~Source(); + // Id of the source. content::DesktopMediaID id; @@ -53,6 +57,10 @@ // The thumbnail for the source. gfx::ImageSkia thumbnail; + + // A preview for this source, used when both a thumbnail and preview are + // used. Currently only the case in the tab_desktop_media_list. + gfx::ImageSkia preview; }; using UpdateCallback = base::OnceClosure; @@ -92,6 +100,11 @@ virtual const Source& GetSource(int index) const = 0; virtual Type GetMediaListType() const = 0; + + // Set or clear the id of a single source which needs a preview image + // generating in addition to its thumbnail. + virtual void SetPreviewedSource( + const absl::optional<content::DesktopMediaID>& id) = 0; }; #endif // CHROME_BROWSER_MEDIA_WEBRTC_DESKTOP_MEDIA_LIST_H_
diff --git a/chrome/browser/media/webrtc/desktop_media_list_ash_unittest.cc b/chrome/browser/media/webrtc/desktop_media_list_ash_unittest.cc index 844afc3..a59f22b7 100644 --- a/chrome/browser/media/webrtc/desktop_media_list_ash_unittest.cc +++ b/chrome/browser/media/webrtc/desktop_media_list_ash_unittest.cc
@@ -32,6 +32,8 @@ MOCK_METHOD2(OnSourceNameChanged, void(DesktopMediaList* list, int index)); MOCK_METHOD2(OnSourceThumbnailChanged, void(DesktopMediaList* list, int index)); + MOCK_METHOD2(OnSourcePreviewChanged, + void(DesktopMediaList* list, size_t index)); }; class DesktopMediaListAshTest : public ChromeAshTestBase {
diff --git a/chrome/browser/media/webrtc/desktop_media_list_base.cc b/chrome/browser/media/webrtc/desktop_media_list_base.cc index a3e1de4..051098b 100644 --- a/chrome/browser/media/webrtc/desktop_media_list_base.cc +++ b/chrome/browser/media/webrtc/desktop_media_list_base.cc
@@ -13,31 +13,40 @@ #include "content/public/browser/browser_thread.h" #include "ui/gfx/image/image.h" +using content::BrowserThread; using content::DesktopMediaID; DesktopMediaListBase::DesktopMediaListBase(base::TimeDelta update_period) - : update_period_(update_period) {} + : update_period_(update_period) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); +} DesktopMediaListBase::DesktopMediaListBase(base::TimeDelta update_period, DesktopMediaListObserver* observer) - : update_period_(update_period), observer_(observer) {} + : update_period_(update_period), observer_(observer) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); +} DesktopMediaListBase::~DesktopMediaListBase() = default; void DesktopMediaListBase::SetUpdatePeriod(base::TimeDelta period) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK(!observer_); update_period_ = period; } void DesktopMediaListBase::SetThumbnailSize(const gfx::Size& thumbnail_size) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); thumbnail_size_ = thumbnail_size; } void DesktopMediaListBase::SetViewDialogWindowId(DesktopMediaID dialog_id) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); view_dialog_id_ = dialog_id; } void DesktopMediaListBase::StartUpdating(DesktopMediaListObserver* observer) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK(!observer_); observer_ = observer; @@ -55,6 +64,7 @@ } void DesktopMediaListBase::Update(UpdateCallback callback) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK(sources_.empty()); DCHECK(!refresh_callback_); refresh_callback_ = std::move(callback); @@ -62,17 +72,20 @@ } int DesktopMediaListBase::GetSourceCount() const { + DCHECK_CURRENTLY_ON(BrowserThread::UI); return sources_.size(); } const DesktopMediaList::Source& DesktopMediaListBase::GetSource( int index) const { + DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK_GE(index, 0); DCHECK_LT(index, static_cast<int>(sources_.size())); return sources_[index]; } DesktopMediaList::Type DesktopMediaListBase::GetMediaListType() const { + DCHECK_CURRENTLY_ON(BrowserThread::UI); return type_; } @@ -83,6 +96,8 @@ void DesktopMediaListBase::UpdateSourcesList( const std::vector<SourceDescription>& new_sources) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + typedef std::set<DesktopMediaID> SourceSet; SourceSet new_source_set; for (size_t i = 0; i < new_sources.size(); ++i) { @@ -147,12 +162,14 @@ } } -void DesktopMediaListBase::UpdateSourceThumbnail(DesktopMediaID id, +void DesktopMediaListBase::UpdateSourceThumbnail(const DesktopMediaID& id, const gfx::ImageSkia& image) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + // Unlike other methods that check can_refresh(), this one won't cause // OnRefreshComplete() to be called, but the caller is expected to schedule a - // call to OnRefreshComplete() after this method has been called as many times - // as needed, so the check is still valid. + // call to OnRefreshComplete() after this method and UpdateSourcePreview() + // have been called as many times as needed, so the check is still valid. DCHECK(can_refresh()); for (size_t i = 0; i < sources_.size(); ++i) { @@ -165,19 +182,42 @@ } } +void DesktopMediaListBase::UpdateSourcePreview(const DesktopMediaID& id, + const gfx::ImageSkia& image) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + + // Unlike other methods that check can_refresh(), this one won't cause + // OnRefreshComplete() to be called, but the caller is expected to schedule a + // call to OnRefreshComplete() after this method and UpdateSourceThumbnail() + // have been called as many times as needed, so the check is still valid. + DCHECK(can_refresh()); + + for (size_t i = 0; i < sources_.size(); ++i) { + if (sources_[i].id == id) { + sources_[i].preview = image; + if (observer_) + observer_->OnSourcePreviewChanged(this, i); + break; + } + } +} + // static uint32_t DesktopMediaListBase::GetImageHash(const gfx::Image& image) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); SkBitmap bitmap = image.AsBitmap(); return base::FastHash(base::make_span( static_cast<uint8_t*>(bitmap.getPixels()), bitmap.computeByteSize())); } void DesktopMediaListBase::OnRefreshComplete() { + DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK(refresh_callback_); std::move(refresh_callback_).Run(); } void DesktopMediaListBase::ScheduleNextRefresh() { + DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK(!refresh_callback_); refresh_callback_ = base::BindOnce(&DesktopMediaListBase::ScheduleNextRefresh, weak_factory_.GetWeakPtr());
diff --git a/chrome/browser/media/webrtc/desktop_media_list_base.h b/chrome/browser/media/webrtc/desktop_media_list_base.h index c875359..98cc4e0 100644 --- a/chrome/browser/media/webrtc/desktop_media_list_base.h +++ b/chrome/browser/media/webrtc/desktop_media_list_base.h
@@ -65,15 +65,21 @@ void UpdateSourcesList(const std::vector<SourceDescription>& new_sources); // Update a thumbnail to observer. - void UpdateSourceThumbnail(content::DesktopMediaID id, + void UpdateSourceThumbnail(const content::DesktopMediaID& id, const gfx::ImageSkia& image); + void UpdateSourcePreview(const content::DesktopMediaID& id, + const gfx::ImageSkia& image); + // Called when a refresh is complete. Invokes |refresh_callback_| unless it // is null. Postcondition: |refresh_callback_| is null. void OnRefreshComplete(); bool can_refresh() const { return !refresh_callback_.is_null(); } + void SetPreviewedSource( + const absl::optional<content::DesktopMediaID>& id) override {} + // Size of thumbnails generated by the model. gfx::Size thumbnail_size_ = gfx::Size(kDefaultThumbnailSize, kDefaultThumbnailSize);
diff --git a/chrome/browser/media/webrtc/desktop_media_list_layout_config.h b/chrome/browser/media/webrtc/desktop_media_list_layout_config.h new file mode 100644 index 0000000..70c1886f --- /dev/null +++ b/chrome/browser/media/webrtc/desktop_media_list_layout_config.h
@@ -0,0 +1,15 @@ +// 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_MEDIA_WEBRTC_DESKTOP_MEDIA_LIST_LAYOUT_CONFIG_H_ +#define CHROME_BROWSER_MEDIA_WEBRTC_DESKTOP_MEDIA_LIST_LAYOUT_CONFIG_H_ + +namespace desktopcapture { + +// The fixed size to generate and render tab previews in eg the tab picker view. +constexpr const gfx::Size kPreviewSize = gfx::Size(218, 135); + +} // namespace desktopcapture + +#endif // CHROME_BROWSER_MEDIA_WEBRTC_DESKTOP_MEDIA_LIST_LAYOUT_CONFIG_H_
diff --git a/chrome/browser/media/webrtc/desktop_media_list_observer.h b/chrome/browser/media/webrtc/desktop_media_list_observer.h index ad7f766..7f38e4da 100644 --- a/chrome/browser/media/webrtc/desktop_media_list_observer.h +++ b/chrome/browser/media/webrtc/desktop_media_list_observer.h
@@ -20,6 +20,7 @@ int new_index) = 0; virtual void OnSourceNameChanged(DesktopMediaList* list, int index) = 0; virtual void OnSourceThumbnailChanged(DesktopMediaList* list, int index) = 0; + virtual void OnSourcePreviewChanged(DesktopMediaList* list, size_t index) = 0; protected: virtual ~DesktopMediaListObserver() {}
diff --git a/chrome/browser/media/webrtc/desktop_media_picker_controller_unittest.cc b/chrome/browser/media/webrtc/desktop_media_picker_controller_unittest.cc index f50b008..ab4659b 100644 --- a/chrome/browser/media/webrtc/desktop_media_picker_controller_unittest.cc +++ b/chrome/browser/media/webrtc/desktop_media_picker_controller_unittest.cc
@@ -48,6 +48,8 @@ MOCK_METHOD1(SetViewDialogWindowId, void(content::DesktopMediaID dialog_id)); MOCK_METHOD1(StartUpdating, void(DesktopMediaListObserver* observer)); MOCK_METHOD1(Update, void(UpdateCallback callback)); + MOCK_METHOD1(SetPreviewedSource, + void(const absl::optional<content::DesktopMediaID>& id)); MOCK_CONST_METHOD0(GetSourceCount, int()); MOCK_CONST_METHOD1(GetSource, Source&(int index)); MOCK_CONST_METHOD0(GetMediaListType, DesktopMediaList::Type());
diff --git a/chrome/browser/media/webrtc/fake_desktop_media_list.cc b/chrome/browser/media/webrtc/fake_desktop_media_list.cc index 7a5537e..9f8f33f 100644 --- a/chrome/browser/media/webrtc/fake_desktop_media_list.cc +++ b/chrome/browser/media/webrtc/fake_desktop_media_list.cc
@@ -54,6 +54,11 @@ observer_->OnSourceNameChanged(this, index); } +void FakeDesktopMediaList::SetSourcePreview(int index, gfx::ImageSkia preview) { + sources_[index].preview = preview; + observer_->OnSourcePreviewChanged(this, index); +} + void FakeDesktopMediaList::SetUpdatePeriod(base::TimeDelta period) {} void FakeDesktopMediaList::SetThumbnailSize(const gfx::Size& thumbnail_size) {} @@ -86,3 +91,6 @@ DesktopMediaList::Type FakeDesktopMediaList::GetMediaListType() const { return type_; } + +void FakeDesktopMediaList::SetPreviewedSource( + const absl::optional<content::DesktopMediaID>& id) {}
diff --git a/chrome/browser/media/webrtc/fake_desktop_media_list.h b/chrome/browser/media/webrtc/fake_desktop_media_list.h index f515a16e..22fab63 100644 --- a/chrome/browser/media/webrtc/fake_desktop_media_list.h +++ b/chrome/browser/media/webrtc/fake_desktop_media_list.h
@@ -24,6 +24,7 @@ void MoveSource(int old_index, int new_index); void SetSourceThumbnail(int index); void SetSourceName(int index, std::u16string name); + void SetSourcePreview(int index, gfx::ImageSkia); // DesktopMediaList implementation: void SetUpdatePeriod(base::TimeDelta period) override; @@ -34,6 +35,8 @@ int GetSourceCount() const override; const Source& GetSource(int index) const override; DesktopMediaList::Type GetMediaListType() const override; + void SetPreviewedSource( + const absl::optional<content::DesktopMediaID>& id) override; private: std::vector<Source> sources_;
diff --git a/chrome/browser/media/webrtc/native_desktop_media_list_unittest.cc b/chrome/browser/media/webrtc/native_desktop_media_list_unittest.cc index b2e9948..64e3315 100644 --- a/chrome/browser/media/webrtc/native_desktop_media_list_unittest.cc +++ b/chrome/browser/media/webrtc/native_desktop_media_list_unittest.cc
@@ -60,6 +60,8 @@ MOCK_METHOD2(OnSourceThumbnailChanged, void(DesktopMediaList* list, int index)); MOCK_METHOD1(OnAllSourcesFound, void(DesktopMediaList* list)); + MOCK_METHOD2(OnSourcePreviewChanged, + void(DesktopMediaList* list, size_t index)); }; class FakeScreenCapturer : public webrtc::DesktopCapturer {
diff --git a/chrome/browser/media/webrtc/tab_desktop_media_list.cc b/chrome/browser/media/webrtc/tab_desktop_media_list.cc index 54c7db3e..ab7c152 100644 --- a/chrome/browser/media/webrtc/tab_desktop_media_list.cc +++ b/chrome/browser/media/webrtc/tab_desktop_media_list.cc
@@ -7,18 +7,21 @@ #include <utility> #include "base/bind.h" -#include "base/callback_helpers.h" +#include "base/bind_post_task.h" #include "base/hash/hash.h" #include "base/task/post_task.h" #include "base/task/thread_pool.h" +#include "chrome/browser/media/webrtc/desktop_media_list_layout_config.h" #include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_list.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "components/favicon/content/content_favicon_driver.h" +#include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_process_host.h" +#include "content/public/browser/render_widget_host_view.h" #include "extensions/browser/app_window/app_window.h" #include "extensions/browser/app_window/app_window_registry.h" #include "media/base/video_util.h" @@ -26,6 +29,7 @@ #include "third_party/skia/include/core/SkImage.h" #include "ui/gfx/favicon_size.h" #include "ui/gfx/image/image.h" +#include "ui/gfx/image/image_skia_operations.h" using content::BrowserThread; using content::DesktopMediaID; @@ -63,6 +67,51 @@ // Update the list once per second. const int kDefaultTabDesktopMediaListUpdatePeriod = 1000; +gfx::ImageSkia ScaleBitmap(const SkBitmap& bitmap, gfx::Size size) { + const gfx::Rect scaled_rect = media::ComputeLetterboxRegion( + gfx::Rect(0, 0, size.width(), size.height()), + gfx::Size(bitmap.info().width(), bitmap.info().height())); + + // TODO(crbug.com/1246835): Consider changing to ResizeMethod::BEST after + // verifying CPU impact isn't too high. + const gfx::ImageSkia resized = gfx::ImageSkiaOperations::CreateResizedImage( + gfx::ImageSkia::CreateFromBitmap(bitmap, 1.f), + skia::ImageOperations::ResizeMethod::RESIZE_GOOD, scaled_rect.size()); + + SkBitmap result(*resized.bitmap()); + + // Set alpha channel values to 255 for all pixels. + // TODO(crbug.com/264424): Fix screen/window capturers to capture alpha + // channel and remove this code. Currently screen/window capturers (at least + // some implementations) only capture R, G and B channels and set Alpha to 0. + uint8_t* pixels_data = reinterpret_cast<uint8_t*>(result.getPixels()); + for (int y = 0; y < result.height(); ++y) { + for (int x = 0; x < result.width(); ++x) { + pixels_data[result.rowBytes() * y + x * result.bytesPerPixel() + 3] = + 0xff; + } + } + + return gfx::ImageSkia::CreateFrom1xBitmap(result); +} + +void HandleCapturedBitmap( + base::OnceCallback<void(uint32_t, const gfx::ImageSkia&)> reply, + absl::optional<uint32_t> last_hash, + const SkBitmap& bitmap) { + gfx::ImageSkia image; + + // Only scale and update if the frame appears to be new. + const uint32_t hash = base::FastHash(base::make_span( + static_cast<uint8_t*>(bitmap.getPixels()), bitmap.computeByteSize())); + if (!last_hash.has_value() || hash != last_hash.value()) { + image = ScaleBitmap(bitmap, desktopcapture::kPreviewSize); + } + + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce(std::move(reply), hash, image)); +} + } // namespace TabDesktopMediaList::TabDesktopMediaList( @@ -74,11 +123,27 @@ std::move(includable_web_contents_filter)), include_chrome_app_windows_(include_chrome_app_windows) { type_ = DesktopMediaList::Type::kWebContents; - thumbnail_task_runner_ = base::ThreadPool::CreateSequencedTaskRunner( + image_resize_task_runner_ = base::ThreadPool::CreateSequencedTaskRunner( {base::MayBlock(), base::TaskPriority::USER_VISIBLE}); } -TabDesktopMediaList::~TabDesktopMediaList() {} +TabDesktopMediaList::~TabDesktopMediaList() { + // previewed_source_visible_keepalive_ is expected to be destructed on the UI + // thread. + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); +} + +void TabDesktopMediaList::CompleteRefreshAfterThumbnailProcessing() { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + // OnRefreshComplete() needs to be called after all calls to + // UpdateSourceThumbnail() have completed. Therefore, a DoNothing task is + // posted to the same sequenced task runner to which + // CreateEnclosedFaviconImage() is posted. + image_resize_task_runner_.get()->PostTaskAndReply( + FROM_HERE, base::DoNothing(), + base::BindOnce(&TabDesktopMediaList::OnRefreshComplete, + weak_factory_.GetWeakPtr())); +} void TabDesktopMediaList::Refresh(bool update_thumnails) { DCHECK(can_refresh()); @@ -173,17 +238,155 @@ // Create a thumbail in a different thread and update the thumbnail in // current thread. base::PostTaskAndReplyWithResult( - thumbnail_task_runner_.get(), FROM_HERE, + image_resize_task_runner_.get(), FROM_HERE, base::BindOnce(&CreateEnclosedFaviconImage, thumbnail_size_, it.second), base::BindOnce(&TabDesktopMediaList::UpdateSourceThumbnail, weak_factory_.GetWeakPtr(), it.first)); } - // OnRefreshComplete() needs to be called after all calls for - // UpdateSourceThumbnail() have done. Therefore, a DoNothing task is posted to - // the same sequenced task runner that CreateEnlargedFaviconImag() is posted. - thumbnail_task_runner_.get()->PostTaskAndReply( - FROM_HERE, base::DoNothing(), - base::BindOnce(&TabDesktopMediaList::OnRefreshComplete, - weak_factory_.GetWeakPtr())); + if (previewed_source_) { + // Trigger an update of the selected tab's preview image. It handles calling + // OnRefreshComplete when it's ready. + TriggerScreenshot(/*remaining_retries=*/0, + std::make_unique<TabDesktopMediaList::RefreshCompleter>( + weak_factory_.GetWeakPtr())); + } else { + // No preview to update. + CompleteRefreshAfterThumbnailProcessing(); + } +} + +void TabDesktopMediaList::TriggerScreenshot( + int remaining_retries, + std::unique_ptr<TabDesktopMediaList::RefreshCompleter> refresh_completer) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + + if (!previewed_source_.has_value()) { + // The selection must have been cleared while waiting to retry. Nothing to + // do. + return; + } + + content::RenderFrameHost* host = content::RenderFrameHost::FromID( + previewed_source_->web_contents_id.render_process_id, + previewed_source_->web_contents_id.main_render_frame_id); + content::RenderWidgetHostView* const view = host ? host->GetView() : nullptr; + if (!view) { + // Clear the preview image, so that we don't have a stale image for eg + // crashed tabs. + UpdateSourcePreview(previewed_source_.value(), gfx::ImageSkia()); + return; + } + + view->CopyFromSurface( + gfx::Rect(), gfx::Size(), + base::BindPostTask( + content::GetUIThreadTaskRunner({}), + base::BindOnce(&TabDesktopMediaList::ScreenshotReceived, + weak_factory_.GetWeakPtr(), remaining_retries, + previewed_source_.value(), + std::move(refresh_completer)))); +} + +void TabDesktopMediaList::ScreenshotReceived( + int remaining_retries, + const content::DesktopMediaID& id, + std::unique_ptr<TabDesktopMediaList::RefreshCompleter> refresh_completer, + const SkBitmap& bitmap) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + + if (id != previewed_source_) { + // Selection has changed since triggering this screenshot. Quit early to + // avoid rescaling the image unnecessarily. + return; + } + + // TODO(crbug.com/1224342): Listen for a newly drawn frame to be ready when a + // hidden tab is woken up,rather than just retrying after an arbitrary delay. + constexpr base::TimeDelta kScreenshotRetryDelayMs = + base::TimeDelta::FromMilliseconds(20); + + // It can take a little time after we tell a WebContents it's being captured + // by calling IncrementCapturerCount before it starts painting actual frames, + // so do a few retries before giving up and proceeding with an empty image + // meaning the preview is cleared. + if (bitmap.drawsNothing() && remaining_retries > 0) { + content::GetUIThreadTaskRunner({})->PostDelayedTask( + FROM_HERE, + base::BindOnce(&TabDesktopMediaList::TriggerScreenshot, + weak_factory_.GetWeakPtr(), remaining_retries - 1, + std::move(refresh_completer)), + kScreenshotRetryDelayMs); + return; + } + + auto reply = base::BindOnce(&TabDesktopMediaList::OnPreviewCaptureHandled, + weak_factory_.GetWeakPtr(), id, + std::move(refresh_completer)); + image_resize_task_runner_.get()->PostTask( + FROM_HERE, base::BindOnce(&HandleCapturedBitmap, std::move(reply), + last_hash_, bitmap)); +} + +void TabDesktopMediaList::OnPreviewCaptureHandled( + const content::DesktopMediaID& media_id, + std::unique_ptr<TabDesktopMediaList::RefreshCompleter> refresh_completer, + uint32_t new_hash, + const gfx::ImageSkia& image) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + + if (new_hash != last_hash_) { + last_hash_ = new_hash; + UpdateSourcePreview(media_id, image); + } +} + +void TabDesktopMediaList::SetPreviewedSource( + const absl::optional<content::DesktopMediaID>& id) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + DCHECK(!(id.has_value() && id.value().is_null())); + + previewed_source_ = id; + previewed_source_visible_keepalive_.RunAndReset(); + + if (!id.has_value()) { + return; + } + + content::RenderFrameHost* const host = content::RenderFrameHost::FromID( + id->web_contents_id.render_process_id, + id->web_contents_id.main_render_frame_id); + // Note host may be nullptr, but FromRenderFrameHost handles that for us. + content::WebContents* const source_contents = + content::WebContents::FromRenderFrameHost(host); + if (!source_contents) { + // No WebContents instance found, likely the selected tab has been recently + // closed or crashed and the list of sources hasn't been updated yet. + UpdateSourcePreview(id.value(), gfx::ImageSkia()); + return; + } + + // Let the WebContents know that it's being visibly captured, so paints even + // in the background. Pass false to stay_hidden to fully wake the page to not + // only allow it to load, but also to avoid pages realising they're visible + // only in the preview and manipulating the user. + previewed_source_visible_keepalive_ = source_contents->IncrementCapturerCount( + gfx::Size(), /*stay_hidden=*/false, /*stay_awake=*/false); + + // Capture a new previewed image. + // TODO(crbug.com/1224342): Schedule this delayed if there has been another + // update recently to avoid churning when a user scrolls quickly through the + // list. + constexpr int kMaxPreviewRetries = 5; + TriggerScreenshot(kMaxPreviewRetries, /*refresh_completer=*/nullptr); +} + +TabDesktopMediaList::RefreshCompleter::RefreshCompleter( + base::WeakPtr<TabDesktopMediaList> list) + : list_(list) {} + +TabDesktopMediaList::RefreshCompleter::~RefreshCompleter() { + if (BrowserThread::CurrentlyOn(BrowserThread::UI) && list_) { + list_->CompleteRefreshAfterThumbnailProcessing(); + } }
diff --git a/chrome/browser/media/webrtc/tab_desktop_media_list.h b/chrome/browser/media/webrtc/tab_desktop_media_list.h index 92453f97..4b19b46 100644 --- a/chrome/browser/media/webrtc/tab_desktop_media_list.h +++ b/chrome/browser/media/webrtc/tab_desktop_media_list.h
@@ -7,6 +7,7 @@ #include <map> +#include "base/callback_helpers.h" #include "chrome/browser/media/webrtc/desktop_media_list_base.h" // Implementation of DesktopMediaList that shows tab/WebContents. @@ -21,17 +22,65 @@ ~TabDesktopMediaList() override; + void SetPreviewedSource( + const absl::optional<content::DesktopMediaID>& id) override; + private: + class RefreshCompleter { + public: + explicit RefreshCompleter(const base::WeakPtr<TabDesktopMediaList> list); + ~RefreshCompleter(); + + private: + base::WeakPtr<TabDesktopMediaList> list_; + }; + typedef std::map<content::DesktopMediaID, uint32_t> ImageHashesMap; void Refresh(bool update_thumnails) override; + // TODO(crbug.com/1224342): Combine the below logic for screenshotting with + // the very similar behaviour in current_tab_desktop_media_list.h + + // Called on the UI thread after the captured image is handled. If the + // image was new, it's rescaled to the desired size and sent back in |image|. + // Otherwise, an empty Optional is sent back. In either case, |new_hash| is + // the hash value of the frame that was handled. + void OnPreviewCaptureHandled( + const content::DesktopMediaID& media_id, + std::unique_ptr<TabDesktopMediaList::RefreshCompleter> refresh_completer, + uint32_t new_hash, + const gfx::ImageSkia& image); + + void StartPreviewUpdate(); + void TriggerScreenshot( + int remaining_retries, + std::unique_ptr<TabDesktopMediaList::RefreshCompleter> refresh_completer); + void ScreenshotReceived( + int remaining_retries, + const content::DesktopMediaID& id, + std::unique_ptr<TabDesktopMediaList::RefreshCompleter> refresh_completer, + const SkBitmap& bitmap); + void CompleteRefreshAfterThumbnailProcessing(); + + // The hash of the last captured preview frame. Used to detect identical + // frames and prevent needless rescaling. + absl::optional<uint32_t> last_hash_; + ImageHashesMap favicon_hashes_; const DesktopMediaList::WebContentsFilter includable_web_contents_filter_; const bool include_chrome_app_windows_; - // Task runner used for the |worker_|. - scoped_refptr<base::SequencedTaskRunner> thumbnail_task_runner_; + // Task runner used for resizing thumbnail and preview images. + scoped_refptr<base::SequencedTaskRunner> image_resize_task_runner_; + + absl::optional<content::DesktopMediaID> previewed_source_; + + // Handle returned when incrementing the visible capturer count on the + // WebContents instance being previewed, if there is one. Allowing this to go + // out of scope, either when switching previewed sources or on destruction, + // allows the source to stop painting when not visible etc. + base::ScopedClosureRunner previewed_source_visible_keepalive_; base::WeakPtrFactory<TabDesktopMediaList> weak_factory_{this}; };
diff --git a/chrome/browser/media/webrtc/tab_desktop_media_list_unittest.cc b/chrome/browser/media/webrtc/tab_desktop_media_list_unittest.cc index 69edc51..54993bf 100644 --- a/chrome/browser/media/webrtc/tab_desktop_media_list_unittest.cc +++ b/chrome/browser/media/webrtc/tab_desktop_media_list_unittest.cc
@@ -93,6 +93,8 @@ MOCK_METHOD2(OnSourceThumbnailChanged, void(DesktopMediaList* list, int index)); MOCK_METHOD1(OnAllSourcesFound, void(DesktopMediaList* list)); + MOCK_METHOD2(OnSourcePreviewChanged, + void(DesktopMediaList* list, size_t index)); void VerifyAndClearExpectations() { testing::Mock::VerifyAndClearExpectations(this); @@ -242,6 +244,8 @@ } void TearDown() override { + list_.reset(); + // TODO(erikchen): Tearing down the TabStripModel should just delete all its // owned WebContents. Then |manually_added_web_contents_| won't be // necessary. https://crbug.com/832879. @@ -344,8 +348,6 @@ .WillOnce(QuitMessageLoop()); base::RunLoop().Run(); - - list_.reset(); } TEST_F(TabDesktopMediaListTest, AddAppWindow) { @@ -363,8 +365,6 @@ base::test::RunClosure(loop.QuitClosure()))); loop.Run(); - - list_.reset(); } TEST_F(TabDesktopMediaListTest, RemoveTab) { @@ -382,8 +382,6 @@ QuitMessageLoop())); base::RunLoop().Run(); - - list_.reset(); } TEST_F(TabDesktopMediaListTest, MoveTab) { @@ -408,8 +406,6 @@ QuitMessageLoop())); base::RunLoop().Run(); - - list_.reset(); } TEST_F(TabDesktopMediaListTest, UpdateTitle) { @@ -431,8 +427,6 @@ base::RunLoop().Run(); EXPECT_EQ(list_->GetSource(0).name, u"New test tab"); - - list_.reset(); } TEST_F(TabDesktopMediaListTest, UpdateThumbnail) { @@ -454,6 +448,25 @@ .WillOnce(QuitMessageLoop()); base::RunLoop().Run(); +} - list_.reset(); +// Test that a source which is set as the one being previewed is marked as being +// visibly captured, so that it is still painted even when hidden. +TEST_F(TabDesktopMediaListTest, SetPreviewMarksTabAsVisiblyCaptured) { + InitializeAndVerify(); + + TabStripModel* tab_strip_model = browser_->tab_strip_model(); + ASSERT_TRUE(tab_strip_model); + WebContents* contents = + tab_strip_model->GetWebContentsAt(kDefaultSourceCount - 1); + ASSERT_TRUE(contents); + + list_->SetPreviewedSource(list_->GetSource(0).id); + + EXPECT_TRUE(contents->IsBeingVisiblyCaptured()); + + EXPECT_CALL(observer_, OnSourcePreviewChanged(list_.get(), 0)) + .WillOnce(QuitMessageLoop()); + + base::RunLoop().Run(); }
diff --git a/chrome/browser/metrics/OWNERS b/chrome/browser/metrics/OWNERS index 2c7147b..54005a4 100644 --- a/chrome/browser/metrics/OWNERS +++ b/chrome/browser/metrics/OWNERS
@@ -1,4 +1,5 @@ file://base/metrics/OWNERS per-file first_web_contents_profiler*=file://components/startup_metric_utils/OWNERS +per-file process_memory_metrics_emitter*=file://services/resource_coordinator/memory_instrumentation/OWNERS per-file process_memory_metrics_emitter*=file://chrome/browser/performance_manager/OWNERS
diff --git a/chrome/browser/metrics/structured/BUILD.gn b/chrome/browser/metrics/structured/BUILD.gn index a77626a1..2b0a464 100644 --- a/chrome/browser/metrics/structured/BUILD.gn +++ b/chrome/browser/metrics/structured/BUILD.gn
@@ -9,17 +9,25 @@ static_library("structured") { sources = [] - deps = [] + deps = [ + "//base", + "//chromeos/crosapi/mojom", + "//components/metrics/structured", + ] if (is_chromeos_ash) { sources += [ "ash_structured_metrics_recorder.cc", "ash_structured_metrics_recorder.h", ] - deps += [ - "//chrome/browser/ash/crosapi", - "//chromeos/crosapi/mojom", - "//components/metrics/structured", + deps += [ "//chrome/browser/ash/crosapi" ] + } + + if (is_chromeos_lacros) { + sources += [ + "lacros_structured_metrics_recorder.cc", + "lacros_structured_metrics_recorder.h", ] + deps += [ "//chromeos/lacros" ] } }
diff --git a/chrome/browser/metrics/structured/lacros_structured_metrics_recorder.cc b/chrome/browser/metrics/structured/lacros_structured_metrics_recorder.cc new file mode 100644 index 0000000..e56f75e --- /dev/null +++ b/chrome/browser/metrics/structured/lacros_structured_metrics_recorder.cc
@@ -0,0 +1,102 @@ +// 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/metrics/structured/lacros_structured_metrics_recorder.h" + +#include <vector> + +#include "base/sequenced_task_runner.h" +#include "chromeos/crosapi/mojom/structured_metrics_service.mojom.h" +#include "chromeos/lacros/lacros_service.h" +#include "components/metrics/structured/event.h" +#include "components/metrics/structured/event_base.h" +#include "components/metrics/structured/structured_metrics_client.h" +#include "mojo/public/cpp/bindings/remote.h" + +namespace metrics { +namespace structured { + +LacrosStructuredMetricsRecorder::LacrosStructuredMetricsRecorder() = default; +LacrosStructuredMetricsRecorder::~LacrosStructuredMetricsRecorder() = default; + +void LacrosStructuredMetricsRecorder::SetSequence( + const scoped_refptr<base::SequencedTaskRunner> sequence_task_runner) { + sequence_task_runner_ = sequence_task_runner; +} + +void LacrosStructuredMetricsRecorder::RecordEvent(Event&& event) { + DCHECK(IsReadyToRecord()); + + // No-op if not properly initialized. + if (!IsReadyToRecord()) + return; + + // Ensure that the task is always run on the designated + // |sequence_task_runner_|. Lacros::GetRemote requires that the remote be + // called within the same sequence. + if (!sequence_task_runner_->RunsTasksInCurrentSequence()) { + sequence_task_runner_->PostTask( + FROM_HERE, + base::BindOnce(&LacrosStructuredMetricsRecorder::RecordEvent, + weak_ptr_factory_.GetWeakPtr(), std::move(event))); + return; + } + + auto* service = chromeos::LacrosService::Get(); + + // If the service is not available yet, keep it in memory until the next + // record call and service is available. + if (!service || + !service->IsAvailable<crosapi::mojom::StructuredMetricsService>()) { + // Notify observers. + for (auto& observer : observers_) + observer.OnRecord(event); + enqueued_events_.emplace_back(std::move(event)); + return; + } + + const auto& remote = + service->GetRemote<crosapi::mojom::StructuredMetricsService>(); + + // Lacros service has no observer to callback when a service is bound and + // ready. Thus, events will be enqueued best effort. + if (!enqueued_events_.empty()) { + for (auto& observer : observers_) + observer.OnFlush(); + + remote->Record(enqueued_events_); + enqueued_events_.clear(); + } + + // Notify observers. + for (auto& observer : observers_) + observer.OnRecord(event); + + std::vector<Event> events; + events.push_back(std::move(event)); + remote->Record(events); +} + +// TODO(crbug.com/1249222): Delete this once migration is complete. +// +// EventBase should not be used with the mojo API and this function call +// will be removed in the future. +void LacrosStructuredMetricsRecorder::Record(EventBase&& event_base) { + VLOG(2) << "LacrosStructuredMetricsRecorder should use event."; +} + +bool LacrosStructuredMetricsRecorder::IsReadyToRecord() const { + return static_cast<bool>(sequence_task_runner_); +} + +void LacrosStructuredMetricsRecorder::AddObserver(Observer* observer) { + observers_.AddObserver(observer); +} + +void LacrosStructuredMetricsRecorder::RemoveObserver(Observer* observer) { + observers_.RemoveObserver(observer); +} + +} // namespace structured +} // namespace metrics
diff --git a/chrome/browser/metrics/structured/lacros_structured_metrics_recorder.h b/chrome/browser/metrics/structured/lacros_structured_metrics_recorder.h new file mode 100644 index 0000000..5d75f9e --- /dev/null +++ b/chrome/browser/metrics/structured/lacros_structured_metrics_recorder.h
@@ -0,0 +1,81 @@ +// 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_METRICS_STRUCTURED_LACROS_STRUCTURED_METRICS_RECORDER_H_ +#define CHROME_BROWSER_METRICS_STRUCTURED_LACROS_STRUCTURED_METRICS_RECORDER_H_ + +#include <vector> + +#include "base/memory/weak_ptr.h" +#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" + +namespace metrics { +namespace structured { + +// Structured metrics recorder for Lacros. This class forwards all events to Ash +// Chrome, where the main service to validate and persist events is. +// +// This recorder is thread-safe. Any calls to |this| not on the dedicated +// sequence will be forwarded to the dedicated sequence set by |SetSequence|. +class LacrosStructuredMetricsRecorder + : public StructuredMetricsClient::RecordingDelegate { + public: + LacrosStructuredMetricsRecorder(); + ~LacrosStructuredMetricsRecorder() override; + + LacrosStructuredMetricsRecorder( + const LacrosStructuredMetricsRecorder& recorder) = delete; + LacrosStructuredMetricsRecorder& operator=( + const LacrosStructuredMetricsRecorder& recorder) = delete; + + // Assigns a sequence for which events will be recorded. Should be called + // before any calls to Record. This sequence should be the affine sequence. + void SetSequence( + const scoped_refptr<base::SequencedTaskRunner> sequence_task_runner); + + // RecordingDelegate: + void RecordEvent(Event&& event) override; + void Record(EventBase&& event_base) override; + bool IsReadyToRecord() const override; + + private: + friend class LacrosStructuredMetricsRecorderTest; + + // For testing. + class Observer : public base::CheckedObserver { + public: + // Called on every call of |RecordEvent|. + virtual void OnRecord(const Event& event) = 0; + + // Called when |enqueued_events_| is flushed. + virtual void OnFlush() = 0; + }; + + void AddObserver(Observer* observer); + void RemoveObserver(Observer* observer); + + scoped_refptr<base::SequencedTaskRunner> sequence_task_runner_; + + // Lacros service may not be ready by the time some metrics need to be + // recorded. Enqueue those events in memory until the service is ready. + // + // TODO(jongahn): Think about having |this| own a remote and expose an API in + // LacrosService to allow arbitrary receivers be bound. This could allow other + // processes utilize Structured Metrics. + std::vector<Event> enqueued_events_; + + base::ObserverList<Observer> observers_; + + base::WeakPtrFactory<LacrosStructuredMetricsRecorder> weak_ptr_factory_{this}; +}; + +} // namespace structured +} // namespace metrics + +#endif // CHROME_BROWSER_METRICS_STRUCTURED_LACROS_STRUCTURED_METRICS_RECORDER_H_
diff --git a/chrome/browser/metrics/structured/lacros_structured_metrics_recorder_browsertest.cc b/chrome/browser/metrics/structured/lacros_structured_metrics_recorder_browsertest.cc new file mode 100644 index 0000000..e16d590 --- /dev/null +++ b/chrome/browser/metrics/structured/lacros_structured_metrics_recorder_browsertest.cc
@@ -0,0 +1,147 @@ +// 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/metrics/structured/lacros_structured_metrics_recorder.h" + +#include <memory> +#include <vector> + +#include "base/callback.h" +#include "base/run_loop.h" +#include "base/sequenced_task_runner.h" +#include "base/test/bind.h" +#include "base/test/scoped_run_loop_timeout.h" +#include "chrome/test/base/in_process_browser_test.h" +#include "chromeos/crosapi/mojom/structured_metrics_service.mojom.h" +#include "chromeos/lacros/lacros_service.h" +#include "components/metrics/structured/event.h" +#include "components/metrics/structured/structured_mojo_events.h" +#include "content/public/test/browser_test.h" +#include "testing/gmock/include/gmock/gmock.h" +#include "testing/gtest/include/gtest/gtest.h" +#include "third_party/abseil-cpp/absl/types/optional.h" + +namespace metrics { +namespace structured { + +namespace { + +using FlushCallback = base::RepeatingCallback<void()>; +using RecordCallback = base::OnceCallback<void(const Event& event)>; + +using testing::Eq; + +} // namespace + +// TODO(jongahn): Improve test checkers once callback API is implemented to +// verify that events sent to Ash-Chrome have been verified. +class LacrosStructuredMetricsRecorderTest : public InProcessBrowserTest { + public: + LacrosStructuredMetricsRecorderTest() = default; + ~LacrosStructuredMetricsRecorderTest() override = default; + + class TestObserver : public LacrosStructuredMetricsRecorder::Observer { + public: + TestObserver() = default; + ~TestObserver() override = default; + + void SetFlushCallback(FlushCallback callback) { + flush_callback_ = std::move(callback); + } + + void SetRecordCallback(RecordCallback callback) { + record_callback_ = std::move(callback); + } + + void OnRecord(const Event& event) override { + std::move(record_callback_).Run(event); + } + + void OnFlush() override { std::move(flush_callback_).Run(); } + + private: + FlushCallback flush_callback_; + RecordCallback record_callback_; + }; + + void SetUpInProcessBrowserTestFixture() override { + recorder_ = std::make_unique<LacrosStructuredMetricsRecorder>(); + StructuredMetricsClient::Get()->SetDelegate(recorder_.get()); + InProcessBrowserTest::SetUpInProcessBrowserTestFixture(); + } + + void TearDownInProcessBrowserTestFixture() override { + if (observer_) + recorder_->RemoveObserver(observer_.get()); + + StructuredMetricsClient::Get()->UnsetDelegate(); + InProcessBrowserTest::TearDownInProcessBrowserTestFixture(); + } + + TestObserver* InitTestObserver() { + observer_ = std::make_unique<TestObserver>(); + recorder_->AddObserver(observer_.get()); + return observer_.get(); + } + + void RemoveObserver(TestObserver* observer) { + recorder_->RemoveObserver(observer); + } + + // TODO(jongahn): Remove this once migration is complete as it should be part + // of init. + void SetSequence( + const scoped_refptr<base::SequencedTaskRunner> sequence_task_runner) { + recorder_->SetSequence(sequence_task_runner); + } + + const LacrosStructuredMetricsRecorder* recorder() const { + return recorder_.get(); + } + + private: + std::unique_ptr<LacrosStructuredMetricsRecorder> recorder_; + std::unique_ptr<TestObserver> observer_; +}; + +IN_PROC_BROWSER_TEST_F(LacrosStructuredMetricsRecorderTest, + SendEventsAfterSequenceIsSet) { + auto* observer = InitTestObserver(); + RecordCallback record_callback = + base::BindLambdaForTesting([](const Event& event) { + EXPECT_THAT(event.project_name(), "TestProjectOne"); + EXPECT_THAT(event.event_name(), "TestEventOne"); + }); + observer->SetRecordCallback(std::move(record_callback)); + + FlushCallback flush_callback = base::BindLambdaForTesting([]() { FAIL(); }); + observer->SetFlushCallback(std::move(flush_callback)); + + // Set the sequence for lacros recorder to run on. + SetSequence(base::SequencedTaskRunnerHandle::Get()); + + events::v2::test_project_one::TestEventOne test_event; + test_event.SetTestMetricOne("hash").SetTestMetricTwo(1); + test_event.Record(); +} + +IN_PROC_BROWSER_TEST_F(LacrosStructuredMetricsRecorderTest, + EventIgnoredIfSequenceNotSet) { + auto* observer = InitTestObserver(); + RecordCallback record_callback = + base::BindLambdaForTesting([](const Event& event) { FAIL(); }); + observer->SetRecordCallback(std::move(record_callback)); + + events::v2::test_project_one::TestEventOne test_event; + test_event.SetTestMetricOne("hash").SetTestMetricTwo(1); + + // Record before sequence is set. + test_event.Record(); + + // SUCCESS() if callback not triggered. +} + +} // namespace structured + +} // namespace metrics
diff --git a/chrome/browser/pdf/pdf_extension_test.cc b/chrome/browser/pdf/pdf_extension_test.cc index d0d74dc..e6b86bf 100644 --- a/chrome/browser/pdf/pdf_extension_test.cc +++ b/chrome/browser/pdf/pdf_extension_test.cc
@@ -2611,7 +2611,7 @@ #define MAYBE_TouchscreenPinchInvokesCustomZoom \ TouchscreenPinchInvokesCustomZoom #endif -IN_PROC_BROWSER_TEST_F(PDFExtensionTestWithoutUnseasonedOverride, +IN_PROC_BROWSER_TEST_P(PDFExtensionTest, MAYBE_TouchscreenPinchInvokesCustomZoom) { WebContents* guest_contents = LoadPdfGetGuestContents(embedded_test_server()->GetURL("/pdf/test.pdf"));
diff --git a/chrome/browser/policy/configuration_policy_handler_list_factory.cc b/chrome/browser/policy/configuration_policy_handler_list_factory.cc index 24d43669..3896365 100644 --- a/chrome/browser/policy/configuration_policy_handler_list_factory.cc +++ b/chrome/browser/policy/configuration_policy_handler_list_factory.cc
@@ -19,6 +19,7 @@ #include "build/branding_buildflags.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" +#include "chrome/browser/ash/app_restore/full_restore_prefs.h" #include "chrome/browser/ash/login/login_pref_names.h" #include "chrome/browser/browsing_data/browsing_data_lifetime_policy_handler.h" #include "chrome/browser/net/disk_cache_dir_policy_handler.h" @@ -1243,6 +1244,12 @@ { key::kEnhancedNetworkVoicesInSelectToSpeakAllowed, ash::prefs::kAccessibilityEnhancedNetworkVoicesInSelectToSpeakAllowed, base::Value::Type::BOOLEAN }, + { key::kFullRestoreEnabled, + ash::full_restore::kRestoreAppsEnabled, + base::Value::Type::BOOLEAN }, + { key::kGhostWindowEnabled, + ash::full_restore::kGhostWindowEnabled, + base::Value::Type::BOOLEAN }, #endif // BUILDFLAG(IS_CHROMEOS_ASH) #if defined(OS_WIN)
diff --git a/chrome/browser/policy/login_policy_test_base_browsertest.cc b/chrome/browser/policy/login_policy_test_base_browsertest.cc index 50549d0..7cc69dd 100644 --- a/chrome/browser/policy/login_policy_test_base_browsertest.cc +++ b/chrome/browser/policy/login_policy_test_base_browsertest.cc
@@ -93,10 +93,9 @@ Profile* const profile = GetProfileForActiveUser(); - chromeos::input_method::InputMethodManager* imm = - chromeos::input_method::InputMethodManager::Get(); + auto* imm = ash::input_method::InputMethodManager::Get(); ASSERT_TRUE(imm); - scoped_refptr<chromeos::input_method::InputMethodManager::State> ime_state = + scoped_refptr<ash::input_method::InputMethodManager::State> ime_state = imm->GetActiveIMEState(); ASSERT_TRUE(ime_state.get());
diff --git a/chrome/browser/profiles/profile_avatar_icon_util.cc b/chrome/browser/profiles/profile_avatar_icon_util.cc index 969995c82..677bbab 100644 --- a/chrome/browser/profiles/profile_avatar_icon_util.cc +++ b/chrome/browser/profiles/profile_avatar_icon_util.cc
@@ -37,6 +37,7 @@ #include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/resource_bundle.h" #include "ui/base/webui/web_ui_util.h" +#include "ui/color/color_id.h" #include "ui/gfx/canvas.h" #include "ui/gfx/color_palette.h" #include "ui/gfx/favicon_size.h" @@ -46,7 +47,6 @@ #include "ui/gfx/image/image_skia_operations.h" #include "ui/gfx/paint_vector_icon.h" #include "ui/gfx/skia_util.h" -#include "ui/native_theme/native_theme.h" #include "url/url_canon.h" #if defined(OS_WIN) @@ -367,9 +367,8 @@ #endif ui::ImageModel GetGuestAvatar(int size) { - return ui::ImageModel::FromVectorIcon( - kUserAccountAvatarIcon, ui::NativeTheme::kColorId_AvatarIconGuest, - size); + return ui::ImageModel::FromVectorIcon(kUserAccountAvatarIcon, + ui::kColorAvatarIconGuest, size); } gfx::Image GetSizedAvatarIcon(const gfx::Image& image,
diff --git a/chrome/browser/recovery/recovery_install_global_error.cc b/chrome/browser/recovery/recovery_install_global_error.cc index 2e991df..c06433d9 100644 --- a/chrome/browser/recovery/recovery_install_global_error.cc +++ b/chrome/browser/recovery/recovery_install_global_error.cc
@@ -20,7 +20,7 @@ #include "components/prefs/pref_service.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/models/image_model.h" -#include "ui/native_theme/native_theme.h" +#include "ui/color/color_id.h" RecoveryInstallGlobalError::RecoveryInstallGlobalError(Profile* profile) : elevation_needed_(false), @@ -69,8 +69,8 @@ } ui::ImageModel RecoveryInstallGlobalError::MenuItemIcon() { - return ui::ImageModel::FromVectorIcon( - kBrowserToolsUpdateIcon, ui::NativeTheme::kColorId_AlertSeverityHigh); + return ui::ImageModel::FromVectorIcon(kBrowserToolsUpdateIcon, + ui::kColorAlertHighSeverity); } void RecoveryInstallGlobalError::ExecuteMenuItem(Browser* browser) {
diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu.cc b/chrome/browser/renderer_context_menu/render_view_context_menu.cc index ba951bc..ef1c283 100644 --- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc +++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc
@@ -616,6 +616,19 @@ return base::FeatureList::IsEnabled(share::kShareMenu); } +#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) || \ + (defined(OS_WIN) || defined(OS_CHROMEOS) || defined(OS_LINUX)) && \ + BUILDFLAG(GOOGLE_CHROME_BRANDING) +ui::MenuSourceType GetMenuSourceType(int event_flags) { + if (event_flags & ui::EF_LEFT_MOUSE_BUTTON) + return ui::MENU_SOURCE_MOUSE; + else if (event_flags & ui::EF_FROM_TOUCH) + return ui::MENU_SOURCE_TOUCH; + else + return ui::MENU_SOURCE_KEYBOARD; +} +#endif + } // namespace // static @@ -2517,7 +2530,7 @@ break; case IDC_CONTENT_CONTEXT_LENS_REGION_SEARCH: - ExecLensRegionSearch(); + ExecLensRegionSearch(event_flags); break; case IDC_CONTENT_CONTEXT_OPEN_ORIGINAL_IMAGE_NEW_TAB: @@ -2751,13 +2764,7 @@ anchor_point_in_screen.Offset(params_.x, params_.y); // Calculate the menu source type from `event_flags`. - ui::MenuSourceType source_type; - if (event_flags & ui::EF_LEFT_MOUSE_BUTTON) - source_type = ui::MENU_SOURCE_MOUSE; - else if (event_flags & ui::EF_FROM_TOUCH) - source_type = ui::MENU_SOURCE_TOUCH; - else - source_type = ui::MENU_SOURCE_KEYBOARD; + ui::MenuSourceType source_type = GetMenuSourceType(event_flags); #if BUILDFLAG(IS_CHROMEOS_ASH) ash::ClipboardHistoryController::Get()->ShowMenu( @@ -3311,14 +3318,16 @@ lens::features::kEnableSidePanelForLensImageSearch.Get()); } -void RenderViewContextMenu::ExecLensRegionSearch() { +void RenderViewContextMenu::ExecLensRegionSearch(int event_flags) { #if (defined(OS_WIN) || defined(OS_CHROMEOS) || defined(OS_LINUX)) && \ BUILDFLAG(GOOGLE_CHROME_BRANDING) if (!lens_region_search_controller_) lens_region_search_controller_ = std::make_unique<lens::LensRegionSearchController>(source_web_contents_, GetBrowser()); - lens_region_search_controller_->Start(); + bool use_fullscreen_capture = + GetMenuSourceType(event_flags) == ui::MENU_SOURCE_KEYBOARD; + lens_region_search_controller_->Start(use_fullscreen_capture); #endif }
diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu.h b/chrome/browser/renderer_context_menu/render_view_context_menu.h index 3fc171c..227525c 100644 --- a/chrome/browser/renderer_context_menu/render_view_context_menu.h +++ b/chrome/browser/renderer_context_menu/render_view_context_menu.h
@@ -261,7 +261,7 @@ void ExecCopyLinkText(); void ExecCopyImageAt(); void ExecSearchLensForImage(); - void ExecLensRegionSearch(); + void ExecLensRegionSearch(int event_flags); void ExecSearchWebForImage(); void ExecLoadImage(); void ExecPlayPause();
diff --git a/chrome/browser/resources/chromeos/login/BUILD.gn b/chrome/browser/resources/chromeos/login/BUILD.gn index 1bb2003..c7feccf7 100644 --- a/chrome/browser/resources/chromeos/login/BUILD.gn +++ b/chrome/browser/resources/chromeos/login/BUILD.gn
@@ -11,7 +11,6 @@ import("//ui/webui/resources/tools/js_modulizer.gni") import("./oobe_auto_imports.gni") - assert(is_chromeos, "OOBE UI is only available on ChromeOS builds") ################### @@ -63,9 +62,12 @@ #### GRD GENERATION #### ######################## -autogenerated_unconditional_files_manifest = "autogenerated_unconditional_files_manifest.json" -autogenerated_conditional_files_manifest = "autogenerated_conditional_files_manifest.json" -existing_unconditional_files_manifest = "existing_unconditional_files_manifest.json" +autogenerated_unconditional_files_manifest = + "autogenerated_unconditional_files_manifest.json" +autogenerated_conditional_files_manifest = + "autogenerated_conditional_files_manifest.json" +existing_unconditional_files_manifest = + "existing_unconditional_files_manifest.json" oobe_preprocessed_folder = "oobe_preprocessed" # Generates OOBE's default GRD file that contains only resources that are @@ -143,9 +145,13 @@ "components/throbber_notice/throbber_notice.js", "components/hd_iron_icon.html", "components/hd_iron_icon.js", + "components/long_touch_detector.html", + "components/long_touch_detector.js", "components/oobe_a11y_option.html", "components/oobe_a11y_option.js", "components/oobe_icons.html", + "screens/common/gesture_navigation.html", + "screens/common/gesture_navigation.js", "screens/common/marketing_opt_in.html", "screens/common/marketing_opt_in.js", "screens/login/active_directory_password_change.html", @@ -207,6 +213,7 @@ "components/common_styles/oobe_dialog_host_styles.m.js", "components/common_styles/oobe_flex_layout_styles.m.js", "debug/debug.m.js", + "screens/common/gesture_navigation.m.js", "screens/common/marketing_opt_in.m.js", "screens/login/active_directory_password_change.m.js", "screens/oobe/hid_detection.m.js", @@ -249,10 +256,10 @@ # Uncomment once most screens are migrated. #"debug:closure_compile_module", + ":closure_compile_module_local", "screens/common:closure_compile_module", "screens/login:closure_compile_module", "screens/oobe:closure_compile_module", - ":closure_compile_module_local", ] } @@ -278,7 +285,6 @@ ":gaia_buttons", ":gaia_header", ":gaia_input_form", - ":gesture_navigation", ":managed_terms_of_service", ":multidevice_setup_first_run", ":notification_card", @@ -468,17 +474,6 @@ js_library("gaia_input_form") { } -js_library("gesture_navigation") { - deps = [ - "components/behaviors:login_screen_behavior", - "components/behaviors:oobe_i18n_behavior", - "components/buttons:oobe_back_button", - "components/buttons:oobe_next_button", - "components/buttons:oobe_text_button", - "components/dialogs:oobe_adaptive_dialog", - ] -} - js_library("managed_terms_of_service") { deps = [ "components/behaviors:login_screen_behavior", @@ -715,4 +710,3 @@ ] namespace_rewrites = [ "cr.ui.toCssPx|toCssPx" ] } -
diff --git a/chrome/browser/resources/chromeos/login/components/BUILD.gn b/chrome/browser/resources/chromeos/login/components/BUILD.gn index a1fb069..28c6161 100644 --- a/chrome/browser/resources/chromeos/login/components/BUILD.gn +++ b/chrome/browser/resources/chromeos/login/components/BUILD.gn
@@ -27,6 +27,7 @@ ":fake_oobe", ":hd_iron_icon", ":html-echo", + ":long_touch_detector", ":network_select_login", ":oobe_i18n_dropdown", ":oobe_select", @@ -45,6 +46,7 @@ # Local targets ":display_manager_types.m", ":hd_iron_icon.m", + ":long_touch_detector.m", ":oobe_a11y_option.m", ":oobe_icons.m", ":oobe_network_icons.m", @@ -62,6 +64,7 @@ # Local targets ":hd_iron_icon_module", + ":long_touch_detector_module", ":oobe_a11y_option_module", ":oobe_icons_module", ":oobe_network_icons_module", @@ -103,6 +106,9 @@ js_library("html-echo") { } +js_library("long_touch_detector") { +} + js_library("network_select_login") { deps = [ "//ui/webui/resources/cr_components/chromeos/network:network_select", @@ -139,6 +145,11 @@ extra_deps = [ ":hd_iron_icon_module" ] } +js_library("long_touch_detector.m") { + sources = [ "$root_gen_dir/chrome/browser/resources/chromeos/login/components/long_touch_detector.m.js" ] + extra_deps = [ ":long_touch_detector_module" ] +} + js_library("oobe_a11y_option.m") { sources = [ "$root_gen_dir/chrome/browser/resources/chromeos/login/components/oobe_a11y_option.m.js" ] deps = [] @@ -169,6 +180,12 @@ html_type = "dom-module" } +polymer_modulizer("long_touch_detector") { + js_file = "long_touch_detector.js" + html_file = "long_touch_detector.html" + html_type = "dom-module" +} + polymer_modulizer("oobe_a11y_option") { js_file = "oobe_a11y_option.js" html_file = "oobe_a11y_option.html"
diff --git a/chrome/browser/resources/chromeos/login/components/behaviors/login_screen_behavior.js b/chrome/browser/resources/chromeos/login/components/behaviors/login_screen_behavior.js index 16d96e2e..225776d 100644 --- a/chrome/browser/resources/chromeos/login/components/behaviors/login_screen_behavior.js +++ b/chrome/browser/resources/chromeos/login/components/behaviors/login_screen_behavior.js
@@ -160,4 +160,9 @@ initializeLoginScreen(screenName, attributes) {} userActed(action_id) {} + + /** return {!Array<string>} */ + get EXTERNAL_API() { + return []; + } }
diff --git a/chrome/browser/resources/chromeos/login/components/behaviors/multi_step_behavior.js b/chrome/browser/resources/chromeos/login/components/behaviors/multi_step_behavior.js index c38a75d..31e3606 100644 --- a/chrome/browser/resources/chromeos/login/components/behaviors/multi_step_behavior.js +++ b/chrome/browser/resources/chromeos/login/components/behaviors/multi_step_behavior.js
@@ -197,4 +197,9 @@ /** @interface */ /* #export */ class MultiStepBehaviorInterface { setUIStep(step) {} + /** @return {string} */ + defaultUIStep() {} + + /** @return {string} */ + get uiStep() {} }
diff --git a/chrome/browser/resources/chromeos/login/components/long_touch_detector.html b/chrome/browser/resources/chromeos/login/components/long_touch_detector.html new file mode 100644 index 0000000..12e7938c --- /dev/null +++ b/chrome/browser/resources/chromeos/login/components/long_touch_detector.html
@@ -0,0 +1 @@ +<script src="long_touch_detector.js"></script> \ No newline at end of file
diff --git a/chrome/browser/resources/chromeos/login/components/long_touch_detector.js b/chrome/browser/resources/chromeos/login/components/long_touch_detector.js new file mode 100644 index 0000000..a916a5d --- /dev/null +++ b/chrome/browser/resources/chromeos/login/components/long_touch_detector.js
@@ -0,0 +1,56 @@ +// 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. + +const LONG_TOUCH_TIME_MS = 1000; + +/* #export */ class LongTouchDetector { + constructor(element, callback) { + this.callback_ = callback; + /** + * This is timeout ID used to kill window timeout that fires "detected" + * callback if touch event was cancelled. + * + * @private {number|null} + */ + this.timeoutId_ = null; + + element.addEventListener('touchstart', () => void this.onTouchStart_()); + element.addEventListener('touchend', () => void this.killTimer_()); + element.addEventListener('touchcancel', () => void this.killTimer_()); + + element.addEventListener('mousedown', () => void this.onTouchStart_()); + element.addEventListener('mouseup', () => void this.killTimer_()); + element.addEventListener('mouseleave', () => void this.killTimer_()); + } + + /** + * window.setTimeout() callback. + * + * @private + */ + onTimeout_() { + this.killTimer_(); + this.callback_(); + } + + /** + * @private + */ + onTouchStart_() { + this.killTimer_(); + this.timeoutId_ = + window.setTimeout(() => void this.onTimeout_(), LONG_TOUCH_TIME_MS); + } + + /** + * @private + */ + killTimer_() { + if (this.timeoutId_ === null) + return; + + window.clearTimeout(this.timeoutId_); + this.timeoutId_ = null; + } +}
diff --git a/chrome/browser/resources/chromeos/login/md_login_polymer3.html b/chrome/browser/resources/chromeos/login/md_login_polymer3.html index 36749e8..6652bc8 100644 --- a/chrome/browser/resources/chromeos/login/md_login_polymer3.html +++ b/chrome/browser/resources/chromeos/login/md_login_polymer3.html
@@ -27,10 +27,11 @@ <div class="oobe-vertical-margin"></div> <div id="oobe" class="faded"> <div id="inner-container" class="down"> + <gesture-navigation-element id="gesture-navigation" class="step hidden" hidden> + </gesture-navigation-element> <marketing-opt-in-element id="marketing-opt-in" class="step hidden" hidden> </marketing-opt-in-element> - <active-directory-password-change-element id="ad-password-change" - class="step hidden migrate" hidden> + <active-directory-password-change-element id="ad-password-change" class="step hidden migrate" hidden> </active-directory-password-change-element> </div> </div>
diff --git a/chrome/browser/resources/chromeos/login/oobe_polymer3.html b/chrome/browser/resources/chromeos/login/oobe_polymer3.html index bfb7cfa..82c53bb8 100644 --- a/chrome/browser/resources/chromeos/login/oobe_polymer3.html +++ b/chrome/browser/resources/chromeos/login/oobe_polymer3.html
@@ -27,10 +27,12 @@ <div class="oobe-vertical-margin"></div> <div id="oobe" class="faded"> <div id="inner-container" class="down"> - <marketing-opt-in-element id="marketing-opt-in" class="step hidden" hidden> - </marketing-opt-in-element> <hid-detection-element id="hid-detection" class="step hidden" hidden> </hid-detection-element> + <gesture-navigation-element id="gesture-navigation" class="step hidden" hidden> + </gesture-navigation-element> + <marketing-opt-in-element id="marketing-opt-in" class="step hidden" hidden> + </marketing-opt-in-element> </div> </div> <div class="oobe-vertical-margin"></div>
diff --git a/chrome/browser/resources/chromeos/login/oobe_polymer3.js b/chrome/browser/resources/chromeos/login/oobe_polymer3.js index 55c9fc0..663f62d4 100644 --- a/chrome/browser/resources/chromeos/login/oobe_polymer3.js +++ b/chrome/browser/resources/chromeos/login/oobe_polymer3.js
@@ -2,14 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import {loadTimeData} from './i18n_setup.js'; -import {DebuggerUI} from './debug/debug.m.js'; -import {Oobe} from './cr_ui.m.js'; - +import 'chrome://oobe/screens/common/gesture_navigation.m.js'; import 'chrome://oobe/screens/common/marketing_opt_in.m.js'; import 'chrome://oobe/screens/login/active_directory_password_change.m.js'; import 'chrome://oobe/screens/oobe/hid_detection.m.js'; +import {Oobe} from './cr_ui.m.js'; +import {DebuggerUI} from './debug/debug.m.js'; +import {loadTimeData} from './i18n_setup.js'; + function initializeDebugger() { if (document.readyState === 'loading') return;
diff --git a/chrome/browser/resources/chromeos/login/oobe_welcome_dialog.html b/chrome/browser/resources/chromeos/login/oobe_welcome_dialog.html index 265a62d..fcb2a32 100644 --- a/chrome/browser/resources/chromeos/login/oobe_welcome_dialog.html +++ b/chrome/browser/resources/chromeos/login/oobe_welcome_dialog.html
@@ -9,6 +9,7 @@ <link rel="import" href="chrome://resources/cr_elements/cr_lottie/cr_lottie.html"> <link rel="import" href="/components/oobe_icons.html"> +<link rel="import" href="/components/long_touch_detector.html"> <link rel="import" href="/components/behaviors/oobe_i18n_behavior.html"> <link rel="import" href="/components/buttons/oobe_icon_button.html"> <link rel="import" href="/components/buttons/oobe_next_button.html">
diff --git a/chrome/browser/resources/chromeos/login/oobe_welcome_dialog.js b/chrome/browser/resources/chromeos/login/oobe_welcome_dialog.js index ae9badf..0827b26f 100644 --- a/chrome/browser/resources/chromeos/login/oobe_welcome_dialog.js +++ b/chrome/browser/resources/chromeos/login/oobe_welcome_dialog.js
@@ -2,60 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// #import {LongTouchDetector} from './components/long_touch_detector.m.js'; + { - const LONG_TOUCH_TIME_MS = 1000; - - class TitleLongTouchDetector { - constructor(element, callback) { - this.callback_ = callback; - /** - * This is timeout ID used to kill window timeout that fires "detected" - * callback if touch event was cancelled. - * - * @private {number|null} - */ - this.timeoutId_ = null; - - element.addEventListener('touchstart', () => void this.onTouchStart_()); - element.addEventListener('touchend', () => void this.killTimer_()); - element.addEventListener('touchcancel', () => void this.killTimer_()); - - element.addEventListener('mousedown', () => void this.onTouchStart_()); - element.addEventListener('mouseup', () => void this.killTimer_()); - element.addEventListener('mouseleave', () => void this.killTimer_()); - } - - /** - * window.setTimeout() callback. - * - * @private - */ - onTimeout_() { - this.killTimer_(); - this.callback_(); - } - - /** - * @private - */ - onTouchStart_() { - this.killTimer_(); - this.timeoutId_ = - window.setTimeout(() => void this.onTimeout_(), LONG_TOUCH_TIME_MS); - } - - /** - * @private - */ - killTimer_() { - if (this.timeoutId_ === null) - return; - - window.clearTimeout(this.timeoutId_); - this.timeoutId_ = null; - } - } - Polymer({ is: 'oobe-welcome-dialog', @@ -117,7 +66,7 @@ }, /** - * @private {TitleLongTouchDetector} + * @private {LongTouchDetector} */ titleLongTouchDetector_: null, @@ -165,7 +114,7 @@ }, attached() { - this.titleLongTouchDetector_ = new TitleLongTouchDetector( + this.titleLongTouchDetector_ = new LongTouchDetector( this.$.title, () => void this.onTitleLongTouch_()); this.$.chromeVoxHint.addEventListener('keydown', (event) => { // When the ChromeVox hint dialog is open, allow users to press the
diff --git a/chrome/browser/resources/chromeos/login/screens/common/BUILD.gn b/chrome/browser/resources/chromeos/login/screens/common/BUILD.gn index 4b75629d..7330c5fd 100644 --- a/chrome/browser/resources/chromeos/login/screens/common/BUILD.gn +++ b/chrome/browser/resources/chromeos/login/screens/common/BUILD.gn
@@ -12,6 +12,7 @@ group("polymer3_elements") { public_deps = [ + ":gesture_navigation_module", ":marketing_opt_in_module", ] } @@ -32,6 +33,7 @@ is_polymer3 = true closure_flags = default_closure_args deps = [ + ":gesture_navigation.m", ":marketing_opt_in.m", ] } @@ -50,19 +52,42 @@ ] } +js_library("gesture_navigation.m") { + sources = [ "$root_gen_dir/chrome/browser/resources/chromeos/login/screens/common/gesture_navigation.m.js" ] + deps = [ + "//ui/webui/resources/js:cr.m", + "../../components/behaviors:login_screen_behavior.m", + "../../components/behaviors:multi_step_behavior.m", + "../../components/behaviors:oobe_i18n_behavior.m", + "../../components/buttons:oobe_back_button.m", + "../../components/buttons:oobe_next_button.m", + "../../components/buttons:oobe_text_button.m", + "../../components/dialogs:oobe_adaptive_dialog.m", + ] + extra_deps = [ ":gesture_navigation_module" ] +} + js_library("marketing_opt_in.m") { sources = [ "$root_gen_dir/chrome/browser/resources/chromeos/login/screens/common/marketing_opt_in.m.js" ] deps = [ - "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled", - "//ui/webui/resources/cr_elements/cr_toggle:cr_toggle.m", - "//ui/webui/resources/cr_elements/cr_lottie:cr_lottie.m", - "../../components/behaviors:oobe_i18n_behavior.m", - "../../components/behaviors:oobe_dialog_host_behavior.m", "../../components/behaviors:login_screen_behavior.m", + "../../components/behaviors:oobe_dialog_host_behavior.m", + "../../components/behaviors:oobe_i18n_behavior.m", + "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled", + "//ui/webui/resources/cr_elements/cr_lottie:cr_lottie.m", + "//ui/webui/resources/cr_elements/cr_toggle:cr_toggle.m", ] extra_deps = [ ":marketing_opt_in_module" ] } +polymer_modulizer("gesture_navigation") { + js_file = "gesture_navigation.js" + html_file = "gesture_navigation.html" + html_type = "dom-module" + auto_imports = oobe_auto_imports + namespace_rewrites = oobe_namespace_rewrites +} + polymer_modulizer("marketing_opt_in") { js_file = "marketing_opt_in.js" html_file = "marketing_opt_in.html"
diff --git a/chrome/browser/resources/chromeos/login/gesture_navigation.html b/chrome/browser/resources/chromeos/login/screens/common/gesture_navigation.html similarity index 88% rename from chrome/browser/resources/chromeos/login/gesture_navigation.html rename to chrome/browser/resources/chromeos/login/screens/common/gesture_navigation.html index 8cc9ad35..da77926 100644 --- a/chrome/browser/resources/chromeos/login/gesture_navigation.html +++ b/chrome/browser/resources/chromeos/login/screens/common/gesture_navigation.html
@@ -7,16 +7,15 @@ <link rel="import" href="chrome://resources/cr_elements/cr_lottie/cr_lottie.html"> <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.html"> - -<link rel="import" href="/components/behaviors/login_screen_behavior.html"> -<link rel="import" href="/components/behaviors/multi_step_behavior.html"> -<link rel="import" href="/components/behaviors/oobe_i18n_behavior.html"> -<link rel="import" href="/components/buttons/oobe_back_button.html"> -<link rel="import" href="/components/buttons/oobe_next_button.html"> -<link rel="import" href="/components/buttons/oobe_text_button.html"> -<link rel="import" href="/components/common_styles/common_styles.html"> -<link rel="import" href="/components/common_styles/oobe_dialog_host_styles.html"> -<link rel="import" href="/components/dialogs/oobe_adaptive_dialog.html"> +<link rel="import" href="../../components/behaviors/login_screen_behavior.html"> +<link rel="import" href="../../components/behaviors/multi_step_behavior.html"> +<link rel="import" href="../../components/behaviors/oobe_i18n_behavior.html"> +<link rel="import" href="../../components/buttons/oobe_back_button.html"> +<link rel="import" href="../../components/buttons/oobe_icon_button.html"> +<link rel="import" href="../../components/buttons/oobe_text_button.html"> +<link rel="import" href="../../components/common_styles/common_styles.html"> +<link rel="import" href="../../components/common_styles/oobe_dialog_host_styles.html"> +<link rel="import" href="../../components/dialogs/oobe_adaptive_dialog.html"> <dom-module id="gesture-navigation-element"> <template> @@ -167,4 +166,5 @@ </div> </oobe-adaptive-dialog> </template> + <script src="gesture_navigation.js"></script> </dom-module>
diff --git a/chrome/browser/resources/chromeos/login/gesture_navigation.js b/chrome/browser/resources/chromeos/login/screens/common/gesture_navigation.js similarity index 73% rename from chrome/browser/resources/chromeos/login/gesture_navigation.js rename to chrome/browser/resources/chromeos/login/screens/common/gesture_navigation.js index e70eda29..1fccd37 100644 --- a/chrome/browser/resources/chromeos/login/gesture_navigation.js +++ b/chrome/browser/resources/chromeos/login/screens/common/gesture_navigation.js
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -(function() { +/* #js_imports_placeholder */ /** * Enum to represent each page in the gesture navigation screen. @@ -15,33 +15,51 @@ BACK: 'gestureBack' }; -Polymer({ - is: 'gesture-navigation-element', +/** + * @constructor + * @extends {PolymerElement} + * @implements {LoginScreenBehaviorInterface} + * @implements {MultiStepBehaviorInterface} + */ +const GestureScreenElementBase = Polymer.mixinBehaviors( + [OobeI18nBehavior, LoginScreenBehavior, MultiStepBehavior], + Polymer.Element); - behaviors: [ - OobeI18nBehavior, - LoginScreenBehavior, - MultiStepBehavior - ], +class GestureNavigation extends GestureScreenElementBase { + static get is() { + return 'gesture-navigation-element'; + } - UI_STEPS: GesturePage, + /* #html_template_placeholder */ + static get properties() { + return {}; + } + + constructor() { + super(); + this.UI_STEPS = GesturePage; + } + + /** @override */ + get EXTERNAL_API() { + return []; + } + + /** @override */ defaultUIStep() { return GesturePage.INTRO; - }, + } /** @override */ ready() { - this.initializeLoginScreen('GestureNavigationScreen', { - commonScreenSize: true, - resetAllowed: true, - }); - }, + super.ready(); + this.initializeLoginScreen('GestureNavigationScreen', {resetAllowed: true}); + } /** * This is the 'on-tap' event handler for the 'next' or 'get started' button. * @private - * */ onNext_() { switch (this.uiStep) { @@ -62,7 +80,7 @@ this.userActed('exit'); break; } - }, + } /** * This is the 'on-tap' event handler for the 'back' button. @@ -80,7 +98,7 @@ this.setCurrentPage_(GesturePage.OVERVIEW); break; } - }, + } /** * Set the new page, making sure to stop the animation for the old page and @@ -93,7 +111,7 @@ this.setUIStep(newPage); chrome.send('handleGesturePageChange', [newPage]); this.setPlayCurrentScreenAnimation(true); - }, + } /** * This will play or stop the current screen's lottie animation. @@ -105,6 +123,7 @@ if (animation) { animation.setPlay(enabled); } - }, -}); -})(); + } +} + +customElements.define(GestureNavigation.is, GestureNavigation); \ No newline at end of file
diff --git a/chrome/browser/resources/chromeos/login/structure/components_common.html b/chrome/browser/resources/chromeos/login/structure/components_common.html index cbb81af..7b120ea0 100644 --- a/chrome/browser/resources/chromeos/login/structure/components_common.html +++ b/chrome/browser/resources/chromeos/login/structure/components_common.html
@@ -8,6 +8,7 @@ <link rel="import" href="/components/common_styles/common_styles.html"> <link rel="import" href="/components/hd_iron_icon.html"> <link rel="import" href="/components/oobe_a11y_option.html"> +<link rel="import" href="/screens/common/gesture_navigation.html"> <link rel="import" href="/screens/common/marketing_opt_in.html"> <include src="../components/html-echo.html"> @@ -42,7 +43,6 @@ <include src="../multidevice_setup_first_run.html"> <include src="../screen_multidevice_setup.html"> <include src="../security_token_pin.html"> -<include src="../gesture_navigation.html"> <include src="../screen_tpm_error.html"> <include src="../device_disabled.html"> <include src="../screen_wrong_hwid.html">
diff --git a/chrome/browser/resources/chromeos/login/structure/components_common.js b/chrome/browser/resources/chromeos/login/structure/components_common.js index f2130889..8c0e59a 100644 --- a/chrome/browser/resources/chromeos/login/structure/components_common.js +++ b/chrome/browser/resources/chromeos/login/structure/components_common.js
@@ -37,7 +37,6 @@ // <include src="../multidevice_setup_first_run.js"> // <include src="../screen_multidevice_setup.js"> // <include src="../security_token_pin.js"> -// <include src="../gesture_navigation.js"> // <include src="../screen_tpm_error.js"> // <include src="../device_disabled.js"> // <include src="../screen_wrong_hwid.js">
diff --git a/chrome/browser/resources/pdf/BUILD.gn b/chrome/browser/resources/pdf/BUILD.gn index b01bb1c..1cfb334 100644 --- a/chrome/browser/resources/pdf/BUILD.gn +++ b/chrome/browser/resources/pdf/BUILD.gn
@@ -342,6 +342,7 @@ ":browser_api", ":constants", ":controller", + ":gesture_detector", ":ink_controller", ":local_storage_proxy", ":metrics",
diff --git a/chrome/browser/resources/pdf/gesture_detector.js b/chrome/browser/resources/pdf/gesture_detector.js index ffc8ce9..1682f8e 100644 --- a/chrome/browser/resources/pdf/gesture_detector.js +++ b/chrome/browser/resources/pdf/gesture_detector.js
@@ -7,6 +7,14 @@ /** * @typedef {{ + * type: string, + * detail: !PinchEventDetail, + * }} + */ +export let Gesture; + +/** + * @typedef {{ * center: !Point, * direction: (string|undefined), * scaleRatio: (?number|undefined),
diff --git a/chrome/browser/resources/pdf/pdf_internal_plugin_wrapper.js b/chrome/browser/resources/pdf/pdf_internal_plugin_wrapper.js index e8da030..5a68bdff 100644 --- a/chrome/browser/resources/pdf/pdf_internal_plugin_wrapper.js +++ b/chrome/browser/resources/pdf/pdf_internal_plugin_wrapper.js
@@ -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 {GestureDetector} from './gesture_detector.js'; +import {GestureDetector, PinchEventDetail} from './gesture_detector.js'; const channel = new MessageChannel(); @@ -24,4 +24,22 @@ window.parent.postMessage( {type: 'connect', token: srcUrl.href}, srcUrl.origin, [channel.port2]); +/** + * Relays gesture events to the parent frame. + * @param {!Event} e The gesture event. + */ +function relayGesture(e) { + const gestureEvent = /** @type {!CustomEvent<!PinchEventDetail>} */ (e); + channel.port1.postMessage({ + type: 'gesture', + gesture: { + type: gestureEvent.type, + detail: gestureEvent.detail, + }, + }); +} + const gestureDetector = new GestureDetector(plugin); +for (const type of ['pinchstart', 'pinchupdate', 'pinchend']) { + gestureDetector.getEventTarget().addEventListener(type, relayGesture); +}
diff --git a/chrome/browser/resources/pdf/pdf_viewer.js b/chrome/browser/resources/pdf/pdf_viewer.js index bdfa7f5..25373e9 100644 --- a/chrome/browser/resources/pdf/pdf_viewer.js +++ b/chrome/browser/resources/pdf/pdf_viewer.js
@@ -24,6 +24,7 @@ import {ViewerErrorDialogElement} from './elements/viewer-error-dialog.js'; import {ViewerPdfSidenavElement} from './elements/viewer-pdf-sidenav.js'; import {ViewerToolbarElement} from './elements/viewer-toolbar.js'; +import {Gesture} from './gesture_detector.js'; // <if expr="enable_ink"> import {InkController, InkControllerEventType} from './ink_controller.js'; //</if> @@ -839,6 +840,10 @@ this.documentHasFocus_ = /** @type {{ hasFocus: boolean }} */ (data).hasFocus; return; + case 'gesture': + this.viewport.dispatchGesture( + /** @type {{ gesture: !Gesture }} */ (data).gesture); + return; } assertNotReached('Unknown message type received: ' + data.type); }
diff --git a/chrome/browser/resources/pdf/viewport.js b/chrome/browser/resources/pdf/viewport.js index e73048a..4e4c56f 100644 --- a/chrome/browser/resources/pdf/viewport.js +++ b/chrome/browser/resources/pdf/viewport.js
@@ -7,7 +7,7 @@ import {$, hasKeyModifiers} from 'chrome://resources/js/util.m.js'; import {FittingType, Point} from './constants.js'; -import {GestureDetector, PinchEventDetail} from './gesture_detector.js'; +import {Gesture, GestureDetector, PinchEventDetail} from './gesture_detector.js'; import {InactiveZoomManager, ZoomManager} from './zoom_manager.js'; /** @@ -1381,6 +1381,15 @@ } /** + * Dispatches a gesture external to this viewport. + * @param {!Gesture} gesture The gesture to dispatch. + */ + dispatchGesture(gesture) { + this.gestureDetector_.getEventTarget().dispatchEvent( + new CustomEvent(gesture.type, {detail: gesture.detail})); + } + + /** * A callback that's called when an update to a pinch zoom is detected. * @param {!CustomEvent<!PinchEventDetail>} e the pinch event. * @private
diff --git a/chrome/browser/resources/print_preview/BUILD.gn b/chrome/browser/resources/print_preview/BUILD.gn index d8134be..dad249b 100644 --- a/chrome/browser/resources/print_preview/BUILD.gn +++ b/chrome/browser/resources/print_preview/BUILD.gn
@@ -76,9 +76,9 @@ "cloud_print_interface_impl.ts", "dark_mode_mixin.ts", "metrics.ts", - "native_layer.js", + "native_layer.ts", "print_preview.js", - "print_preview_utils.js", + "print_preview_utils.ts", "data/cdd.ts", "data/cloud_parsers.ts", "data/coordinate2d.ts", @@ -106,7 +106,7 @@ in_files += [ "data/print_server_store.ts", "data/printer_status_cros.ts", - "native_layer_cros.js", + "native_layer_cros.ts", ] } } @@ -238,9 +238,9 @@ "cloud_print_interface_impl.ts", "dark_mode_mixin.ts", "metrics.ts", - "native_layer.js", + "native_layer.ts", "print_preview.js", - "print_preview_utils.js", + "print_preview_utils.ts", "data/cdd.ts", "data/cloud_parsers.ts", "data/coordinate2d.ts", @@ -303,7 +303,7 @@ in_files += [ "data/print_server_store.ts", "data/printer_status_cros.ts", - "native_layer_cros.js", + "native_layer_cros.ts", "ui/destination_dialog_cros.js", "ui/destination_dropdown_cros.js", "ui/destination_select_cros.js",
diff --git a/chrome/browser/resources/print_preview/data/model.ts b/chrome/browser/resources/print_preview/data/model.ts index 40ef34a..0fe4e00 100644 --- a/chrome/browser/resources/print_preview/data/model.ts +++ b/chrome/browser/resources/print_preview/data/model.ts
@@ -114,6 +114,41 @@ print: CloudJobTicketPrint, }; +type PrintTicket = { + collate: boolean, + color: number, + copies: number, + deviceName: string, + dpiDefault: boolean, + dpiHorizontal: number, + dpiVertical: number, + duplex: DuplexMode, + headerFooterEnabled: boolean, + landscape: boolean, + marginsType: MarginsType, + mediaSize: object, + pageCount: number, + pagesPerSheet: number, + pageHeight: number, + pageWidth: number, + previewModifiable: boolean, + printerType: PrinterType, + printToGoogleDrive: boolean, + rasterizePDF: boolean, + scaleFactor: number, + scalingType: ScalingType, + shouldPrintBackgrounds: boolean, + shouldPrintSelectionOnly: boolean, + showSystemDialog: boolean, + advancedSettings?: object, + capabilities?: string, + cloudPrintID?: string, + marginsCustom?: MarginsSetting, + openPDFInPreview?: boolean, + pinValue?: string, + ticket?: string, +}; + /** * Constant values matching printing::DuplexMode enum. */ @@ -1488,7 +1523,7 @@ const scalingSettingKey = this.getSetting('scalingTypePdf').available ? 'scalingTypePdf' : 'scalingType'; - const ticket = { + const ticket: PrintTicket = { mediaSize: this.getSettingValue('mediaSize'), pageCount: this.getSettingValue('pages').length, landscape: this.getSettingValue('layout'), @@ -1518,7 +1553,7 @@ pageWidth: this.pageSize.width, pageHeight: this.pageSize.height, showSystemDialog: showSystemDialog, - } as {[key: string]: any}; + }; // <if expr="chromeos or lacros"> ticket['printToGoogleDrive'] = ticket['printToGoogleDrive'] || destination.id === GooglePromotedDestinationId.SAVE_TO_DRIVE_CROS; @@ -1530,7 +1565,7 @@ } if (openPdfInPreview) { - ticket['OpenPDFInPreview'] = openPdfInPreview; + ticket['openPDFInPreview'] = openPdfInPreview; } if (this.getSettingValue('margins') === MarginsType.CUSTOM) {
diff --git a/chrome/browser/resources/print_preview/native_layer.js b/chrome/browser/resources/print_preview/native_layer.js deleted file mode 100644 index 1477839a..0000000 --- a/chrome/browser/resources/print_preview/native_layer.js +++ /dev/null
@@ -1,336 +0,0 @@ -// Copyright (c) 2012 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 {assert} from 'chrome://resources/js/assert.m.js'; -import {sendWithPromise} from 'chrome://resources/js/cr.m.js'; - -import {Cdd} from './data/cdd.js'; -import {PrinterType} from './data/destination_match.js'; -import {LocalDestinationInfo} from './data/local_parsers.js'; -import {MeasurementSystemUnitType} from './data/measurement_system.js'; - -/** - * @typedef {{selectSaveAsPdfDestination: boolean, - * layoutSettings.portrait: boolean, - * pageRange: string, - * headersAndFooters: boolean, - * backgroundColorsAndImages: boolean, - * margins: number}} - * @see chrome/browser/printing/print_preview_pdf_generated_browsertest.cc - */ -export let PreviewSettings; - -/** - * Enumeration of background graphics printing mode restrictions used by - * Chromium. - * This has to coincide with |printing::BackgroundGraphicsModeRestriction| as - * defined in printing/backend/printing_restrictions.h - * @enum {number} - */ -export const BackgroundGraphicsModeRestriction = { - UNSET: 0, - ENABLED: 1, - DISABLED: 2, -}; - -/** - * Enumeration of color mode restrictions used by Chromium. - * This has to coincide with |printing::ColorModeRestriction| as defined in - * printing/backend/printing_restrictions.h - * @enum {number} - */ -export const ColorModeRestriction = { - UNSET: 0x0, - MONOCHROME: 0x1, - COLOR: 0x2, -}; - -/** - * Enumeration of duplex mode restrictions used by Chromium. - * This has to coincide with |printing::DuplexModeRestriction| as defined in - * printing/backend/printing_restrictions.h - * @enum {number} - */ -export const DuplexModeRestriction = { - UNSET: 0x0, - SIMPLEX: 0x1, - LONG_EDGE: 0x2, - SHORT_EDGE: 0x4, - DUPLEX: 0x6, -}; - -/** - * Enumeration of PIN printing mode restrictions used by Chromium. - * This has to coincide with |printing::PinModeRestriction| as defined in - * printing/backend/printing_restrictions.h - * @enum {number} - */ -export const PinModeRestriction = { - UNSET: 0, - PIN: 1, - NO_PIN: 2, -}; - -/** - * Policies affecting print settings values and availability. - * @typedef {{ - * headerFooter: ({ - * allowedMode: (boolean | undefined), - * defaultMode: (boolean | undefined), - * } | undefined), - * cssBackground: ({ - * allowedMode: (BackgroundGraphicsModeRestriction | undefined), - * defaultMode: (BackgroundGraphicsModeRestriction | undefined), - * } | undefined), - * mediaSize: ({ - * defaultMode: ({ - * width: (number | undefined), - * height: (number | undefined), - * } | undefined), - * } | undefined), - * sheets: ({ - * value: (number | undefined), - * } | undefined), - * color: ({ - * allowedMode: (ColorModeRestriction | undefined), - * defaultMode: (ColorModeRestriction | undefined), - * } | undefined), - * duplex: ({ - * allowedMode: (DuplexModeRestriction | undefined), - * defaultMode: (DuplexModeRestriction | undefined), - * } | undefined), - * pin: ({ - * allowedMode: (PinModeRestriction | undefined), - * defaultMode: (PinModeRestriction | undefined), - * } | undefined), - * printPdfAsImage: ({ - * defaultMode: (boolean | undefined), - * } | undefined), - * printPdfAsImageAvailability: ({ - * allowedMode: (boolean | undefined), - * } | undefined), - * }} - */ -export let Policies; - -/** - * @typedef {{ - * isInKioskAutoPrintMode: boolean, - * isInAppKioskMode: boolean, - * uiLocale: string, - * thousandsDelimiter: string, - * decimalDelimiter: string, - * unitType: !MeasurementSystemUnitType, - * previewModifiable: boolean, - * previewIsFromArc: boolean, - * documentTitle: string, - * documentHasSelection: boolean, - * shouldPrintSelectionOnly: boolean, - * printerName: string, - * policies: (Policies | undefined), - * serializedAppStateStr: ?string, - * serializedDefaultDestinationSelectionRulesStr: ?string, - * pdfPrinterDisabled: boolean, - * destinationsManaged: boolean, - * cloudPrintURL: (string | undefined), - * isDriveMounted: (boolean | undefined), - * }} - * @see corresponding field name definitions in print_preview_handler.cc - */ -export let NativeInitialSettings; - -/** - * @typedef {{ - * printer:(LocalDestinationInfo | - * undefined), - * capabilities: ?Cdd, - * }} - */ -export let CapabilitiesResponse; - -/** - * An interface to the native Chromium printing system layer. - * @interface - */ -export class NativeLayer { - /** - * Gets the initial settings to initialize the print preview with. - * @return {!Promise<!NativeInitialSettings>} - */ - getInitialSettings() {} - - /** - * Requests the system's print destinations. The promise will be resolved - * when all destinations of that type have been retrieved. One or more - * 'printers-added' events may be fired in response before resolution. - * @param {!PrinterType} type The type of destinations to - * request. - * @return {!Promise} - */ - getPrinters(type) {} - - /** - * Requests the destination's printing capabilities. Returns a promise that - * will be resolved with the capabilities if they are obtained successfully. - * @param {string} destinationId ID of the destination. - * @param {!PrinterType} type The destination's printer type. - * @return {!Promise<!CapabilitiesResponse>} - */ - getPrinterCapabilities(destinationId, type) {} - - /** - * Requests that a preview be generated. The following Web UI events may - * be triggered in response: - * 'print-preset-options', - * 'page-count-ready', - * 'page-layout-ready', - * 'page-preview-ready' - * @param {string} printTicket JSON print ticket for the request. - * @return {!Promise<number>} Promise that resolves with the unique ID of - * the preview UI when the preview has been generated. - */ - getPreview(printTicket) {} - - /** - * Opens the OS's printer manager dialog. For Chrome OS, open the printing - * settings in the Settings App. - */ - managePrinters() {} - - /** - * Requests that the document be printed. - * @param {string} printTicket The serialized print ticket for the print - * job. - * @return {!Promise} Promise that will resolve when the print request is - * finished or rejected. - */ - print(printTicket) {} - - /** Requests that the current pending print request be cancelled. */ - cancelPendingPrintRequest() {} - - /** - * Sends the app state to be saved in the sticky settings. - * @param {string} appStateStr JSON string of the app state to persist. - */ - saveAppState(appStateStr) {} - - // <if expr="not chromeos and not lacros and not is_win"> - /** Shows the system's native printing dialog. */ - showSystemDialog() {} - // </if> - - /** - * Closes the print preview dialog. - * If |isCancel| is true, also sends a message to Print Preview Handler in - * order to update UMA statistics. - * @param {boolean} isCancel whether this was called due to the user - * closing the dialog without printing. - */ - dialogClose(isCancel) {} - - /** Hide the print preview dialog and allow the native layer to close it. */ - hidePreview() {} - - /** - * Opens the Google Cloud Print sign-in tab. If the user signs in - * successfully, the user-accounts-updated event will be sent in response. - */ - signIn() {} - - /** - * Notifies the metrics handler to record a histogram value. - * @param {string} histogram The name of the histogram to record - * @param {number} bucket The bucket to record - * @param {number} maxBucket The maximum bucket value in the histogram. - */ - recordInHistogram(histogram, bucket, maxBucket) {} -} - -/** @implements {NativeLayer} */ -export class NativeLayerImpl { - /** @override */ - getInitialSettings() { - return sendWithPromise('getInitialSettings'); - } - - /** @override */ - getPrinters(type) { - return sendWithPromise('getPrinters', type); - } - - /** @override */ - getPrinterCapabilities(destinationId, type) { - return sendWithPromise('getPrinterCapabilities', destinationId, type); - } - - /** @override */ - getPreview(printTicket) { - return sendWithPromise('getPreview', printTicket); - } - - /** @override */ - managePrinters() { - chrome.send('managePrinters'); - } - - /** @override */ - print(printTicket) { - return sendWithPromise('print', printTicket); - } - - /** @override */ - cancelPendingPrintRequest() { - chrome.send('cancelPendingPrintRequest'); - } - - /** @override */ - saveAppState(appStateStr) { - chrome.send('saveAppState', [appStateStr]); - } - - // <if expr="not chromeos and not lacros and not is_win"> - /** @override */ - showSystemDialog() { - chrome.send('showSystemDialog'); - } - // </if> - - /** @override */ - dialogClose(isCancel) { - if (isCancel) { - chrome.send('closePrintPreviewDialog'); - } - chrome.send('dialogClose'); - } - - /** @override */ - hidePreview() { - chrome.send('hidePreview'); - } - - /** @override */ - signIn() { - chrome.send('signIn'); - } - - /** @override */ - recordInHistogram(histogram, bucket, maxBucket) { - chrome.send( - 'metricsHandler:recordInHistogram', [histogram, bucket, maxBucket]); - } - - /** @return {!NativeLayer} */ - static getInstance() { - return instance || (instance = new NativeLayerImpl()); - } - - /** @param {!NativeLayer} obj */ - static setInstance(obj) { - instance = obj; - } -} - -/** @type {?NativeLayer} */ -let instance = null;
diff --git a/chrome/browser/resources/print_preview/native_layer.ts b/chrome/browser/resources/print_preview/native_layer.ts new file mode 100644 index 0000000..f17ce7e2 --- /dev/null +++ b/chrome/browser/resources/print_preview/native_layer.ts
@@ -0,0 +1,273 @@ +// Copyright (c) 2012 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 {assert} from 'chrome://resources/js/assert.m.js'; +import {sendWithPromise} from 'chrome://resources/js/cr.m.js'; + +import {Cdd} from './data/cdd.js'; +import {PrinterType} from './data/destination_match.js'; +import {LocalDestinationInfo} from './data/local_parsers.js'; +import {MeasurementSystemUnitType} from './data/measurement_system.js'; + +/** + * Enumeration of background graphics printing mode restrictions used by + * Chromium. + * This has to coincide with |printing::BackgroundGraphicsModeRestriction| as + * defined in printing/backend/printing_restrictions.h + */ +export enum BackgroundGraphicsModeRestriction { + UNSET = 0, + ENABLED = 1, + DISABLED = 2, +} + +/** + * Enumeration of color mode restrictions used by Chromium. + * This has to coincide with |printing::ColorModeRestriction| as defined in + * printing/backend/printing_restrictions.h + */ +export enum ColorModeRestriction { + UNSET = 0x0, + MONOCHROME = 0x1, + COLOR = 0x2, +} + +/** + * Enumeration of duplex mode restrictions used by Chromium. + * This has to coincide with |printing::DuplexModeRestriction| as defined in + * printing/backend/printing_restrictions.h + */ +export enum DuplexModeRestriction { + UNSET = 0x0, + SIMPLEX = 0x1, + LONG_EDGE = 0x2, + SHORT_EDGE = 0x4, + DUPLEX = 0x6, +} + +/** + * Enumeration of PIN printing mode restrictions used by Chromium. + * This has to coincide with |printing::PinModeRestriction| as defined in + * printing/backend/printing_restrictions.h + */ +export enum PinModeRestriction { + UNSET = 0, + PIN = 1, + NO_PIN = 2, +} + +/** + * Policies affecting print settings values and availability. + */ +export type Policies = { + headerFooter?: {allowedMode?: boolean, defaultMode?: boolean}, + cssBackground?: { + allowedMode?: BackgroundGraphicsModeRestriction, + defaultMode?: BackgroundGraphicsModeRestriction + }, + mediaSize?: {defaultMode?: {width: number, height: number}}, + sheets?: {value?: number}, + color?: { + allowedMode?: ColorModeRestriction, + defaultMode?: ColorModeRestriction + }, + duplex?: { + allowedMode?: DuplexModeRestriction, + defaultMode?: DuplexModeRestriction + }, + pin?: {allowedMode?: PinModeRestriction, defaultMode?: PinModeRestriction}, + printPdfAsImage?: {defaultMode?: boolean}, + printPdfAsImageAvailability?: {allowedMode?: boolean}, +}; + +/** + * @see corresponding field name definitions in print_preview_handler.cc + */ +export type NativeInitialSettings = { + isInKioskAutoPrintMode: boolean, + isInAppKioskMode: boolean, + uiLocale: string, + thousandsDelimiter: string, + decimalDelimiter: string, + unitType: MeasurementSystemUnitType, + previewModifiable: boolean, + previewIsFromArc: boolean, + documentTitle: string, + documentHasSelection: boolean, + shouldPrintSelectionOnly: boolean, + printerName: string, + policies?: Policies, + serializedAppStateStr: string|null, + serializedDefaultDestinationSelectionRulesStr: string|null, + pdfPrinterDisabled: boolean, + destinationsManaged: boolean, + cloudPrintURL?: string, + isDriveMounted?: boolean, +}; + +export type CapabilitiesResponse = { + printer?: LocalDestinationInfo, capabilities: Cdd|null, +}; + +/** + * An interface to the native Chromium printing system layer. + */ +export interface NativeLayer { + /** + * Gets the initial settings to initialize the print preview with. + */ + getInitialSettings(): Promise<NativeInitialSettings>; + + /** + * Requests the system's print destinations. The promise will be resolved + * when all destinations of that type have been retrieved. One or more + * 'printers-added' events may be fired in response before resolution. + */ + getPrinters(type: PrinterType): Promise<void>; + + /** + * Requests the destination's printing capabilities. Returns a promise that + * will be resolved with the capabilities if they are obtained successfully. + */ + getPrinterCapabilities(destinationId: string, type: PrinterType): + Promise<CapabilitiesResponse>; + + /** + * Requests that a preview be generated. The following Web UI events may + * be triggered in response: + * 'print-preset-options', + * 'page-count-ready', + * 'page-layout-ready', + * 'page-preview-ready' + * @param printTicket JSON print ticket for the request. + * @return Promise that resolves with the unique ID of + * the preview UI when the preview has been generated. + */ + getPreview(printTicket: string): Promise<number>; + + /** + * Opens the OS's printer manager dialog. For Chrome OS, open the printing + * settings in the Settings App. + */ + managePrinters(): void; + + /** + * Requests that the document be printed. + * @param printTicket The serialized print ticket for the print + * job. + * @return Promise that will resolve when the print request is + * finished or rejected. + */ + print(printTicket: string): Promise<void>; + + /** Requests that the current pending print request be cancelled. */ + cancelPendingPrintRequest(): void; + + /** + * Sends the app state to be saved in the sticky settings. + * @param appStateStr JSON string of the app state to persist. + */ + saveAppState(appStateStr: string): void; + + // <if expr="not chromeos and not lacros and not is_win"> + /** Shows the system's native printing dialog. */ + showSystemDialog(): void; + // </if> + + /** + * Closes the print preview dialog. + * If |isCancel| is true, also sends a message to Print Preview Handler in + * order to update UMA statistics. + * @param isCancel whether this was called due to the user + * closing the dialog without printing. + */ + dialogClose(isCancel: boolean): void; + + /** Hide the print preview dialog and allow the native layer to close it. */ + hidePreview(): void; + + /** + * Opens the Google Cloud Print sign-in tab. If the user signs in + * successfully, the user-accounts-updated event will be sent in response. + */ + signIn(): void; + + /** + * Notifies the metrics handler to record a histogram value. + * @param histogram The name of the histogram to record + * @param bucket The bucket to record + * @param maxBucket The maximum bucket value in the histogram. + */ + recordInHistogram(histogram: string, bucket: number, maxBucket: number): void; +} + +export class NativeLayerImpl implements NativeLayer { + getInitialSettings() { + return sendWithPromise('getInitialSettings'); + } + + getPrinters(type: PrinterType) { + return sendWithPromise('getPrinters', type); + } + + getPrinterCapabilities(destinationId: string, type: PrinterType) { + return sendWithPromise('getPrinterCapabilities', destinationId, type); + } + + getPreview(printTicket: string) { + return sendWithPromise('getPreview', printTicket); + } + + managePrinters() { + chrome.send('managePrinters'); + } + + print(printTicket: string) { + return sendWithPromise('print', printTicket); + } + + cancelPendingPrintRequest() { + chrome.send('cancelPendingPrintRequest'); + } + + saveAppState(appStateStr: string) { + chrome.send('saveAppState', [appStateStr]); + } + + // <if expr="not chromeos and not lacros and not is_win"> + showSystemDialog() { + chrome.send('showSystemDialog'); + } + // </if> + + dialogClose(isCancel: boolean) { + if (isCancel) { + chrome.send('closePrintPreviewDialog'); + } + chrome.send('dialogClose'); + } + + hidePreview() { + chrome.send('hidePreview'); + } + + signIn() { + chrome.send('signIn'); + } + + recordInHistogram(histogram: string, bucket: number, maxBucket: number) { + chrome.send( + 'metricsHandler:recordInHistogram', [histogram, bucket, maxBucket]); + } + + static getInstance(): NativeLayer { + return instance || (instance = new NativeLayerImpl()); + } + + static setInstance(obj: NativeLayer) { + instance = obj; + } +} + +let instance: NativeLayer|null = null;
diff --git a/chrome/browser/resources/print_preview/native_layer_cros.js b/chrome/browser/resources/print_preview/native_layer_cros.js deleted file mode 100644 index 58f1d0c9..0000000 --- a/chrome/browser/resources/print_preview/native_layer_cros.js +++ /dev/null
@@ -1,192 +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. - -import {assert} from 'chrome://resources/js/assert.m.js'; -import {addSingletonGetter, sendWithPromise} from 'chrome://resources/js/cr.m.js'; - -import {Cdd} from './data/cdd.js'; -import {ProvisionalDestinationInfo} from './data/local_parsers.js'; -import {PrinterStatus, PrinterStatusReason} from './data/printer_status_cros.js'; - -/** - * @typedef {{ - * printerId: string, - * capabilities: !Cdd, - * }} - */ -export let PrinterSetupResponse; - -/** - * @typedef {{ - * id: string, - * name: string, - * }} - */ -export let PrintServer; - -/** - * @typedef {{ - * printServers: !Array<!PrintServer>, - * isSingleServerFetchingMode: boolean, - * }} - */ -export let PrintServersConfig; - -/** - * An interface to the Chrome OS platform specific part of the native Chromium - * printing system layer. - * @interface - */ -export class NativeLayerCros { - /** - * Requests access token for cloud print requests for DEVICE origin. - * @return {!Promise<string>} - */ - getAccessToken() {} - - /** - * Requests the destination's end user license information. Returns a promise - * that will be resolved with the destination's EULA URL if obtained - * successfully. - * @param {!string} destinationId ID of the destination. - * @return {!Promise<string>} - */ - getEulaUrl(destinationId) {} - - /** - * Requests Chrome to resolve provisional extension destination by granting - * the provider extension access to the printer. - * @param {string} provisionalDestinationId - * @return {!Promise<!ProvisionalDestinationInfo>} - */ - grantExtensionPrinterAccess(provisionalDestinationId) {} - - /** - * Requests that Chrome perform printer setup for the given printer. - * @param {string} printerId - * @return {!Promise<!PrinterSetupResponse>} - */ - setupPrinter(printerId) {} - - /** - * Sends a request to the printer with id |printerId| for its current status. - * @param {string} printerId - * @return {!Promise<?PrinterStatus>} - */ - requestPrinterStatusUpdate(printerId) {} - - /** - * Records the histogram to capture the printer status of the current - * destination and whether the user chose to print or cancel. - * @param {?PrinterStatusReason} statusReason Current destination printer - * status - * @param {boolean} didUserAttemptPrint True if user printed, false if user - * canceled. - */ - recordPrinterStatusHistogram(statusReason, didUserAttemptPrint) {} - - /** - * Records the histogram to capture if the retried printer status was - * able to get a valid response from the local printer. - * @param {boolean} retrySuccessful - */ - recordPrinterStatusRetrySuccessHistogram(retrySuccessful) {} - - /** - * Selects all print servers with ids in |printServerIds| to query for their - * printers. - * @param {!Array<string>} printServerIds - */ - choosePrintServers(printServerIds) {} - - /** - * Gets the available print servers and whether we are in single server - * fetching mode. - * @return {!Promise<!PrintServersConfig>} - */ - getPrintServersConfig() {} -} - -/** @implements {NativeLayerCros} */ -export class NativeLayerCrosImpl { - /** @override */ - getAccessToken() { - return sendWithPromise('getAccessToken'); - } - - /** @override */ - getEulaUrl(destinationId) { - return sendWithPromise('getEulaUrl', destinationId); - } - - /** @override */ - grantExtensionPrinterAccess(provisionalDestinationId) { - return sendWithPromise( - 'grantExtensionPrinterAccess', provisionalDestinationId); - } - - /** @override */ - setupPrinter(printerId) { - return sendWithPromise('setupPrinter', printerId); - } - - /** @override */ - requestPrinterStatusUpdate(printerId) { - return sendWithPromise('requestPrinterStatus', printerId); - } - - /** @override */ - recordPrinterStatusHistogram(statusReason, didUserAttemptPrint) { - if (!statusReason) { - return; - } - - let histogram; - switch (statusReason) { - case (PrinterStatusReason.NO_ERROR): - histogram = 'PrintPreview.PrinterStatus.AttemptedPrintWithGoodStatus'; - break; - case (PrinterStatusReason.UNKNOWN_REASON): - histogram = - 'PrintPreview.PrinterStatus.AttemptedPrintWithUnknownStatus'; - break; - default: - histogram = 'PrintPreview.PrinterStatus.AttemptedPrintWithErrorStatus'; - break; - } - chrome.send( - 'metricsHandler:recordBooleanHistogram', - [histogram, didUserAttemptPrint]); - } - - /** @override */ - recordPrinterStatusRetrySuccessHistogram(retrySuccessful) { - chrome.send( - 'metricsHandler:recordBooleanHistogram', - ['PrinterStatusRetrySuccess', retrySuccessful]); - } - - /** @override */ - choosePrintServers(printServerIds) { - chrome.send('choosePrintServers', [printServerIds]); - } - - /** @override */ - getPrintServersConfig() { - return sendWithPromise('getPrintServersConfig'); - } - - /** @return {!NativeLayerCros} */ - static getInstance() { - return instance || (instance = new NativeLayerCrosImpl()); - } - - /** @param {!NativeLayerCros} obj */ - static setInstance(obj) { - instance = obj; - } -} - -/** @type {?NativeLayerCros} */ -let instance = null;
diff --git a/chrome/browser/resources/print_preview/native_layer_cros.ts b/chrome/browser/resources/print_preview/native_layer_cros.ts new file mode 100644 index 0000000..d93132c --- /dev/null +++ b/chrome/browser/resources/print_preview/native_layer_cros.ts
@@ -0,0 +1,161 @@ +// 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. + +import {assert} from 'chrome://resources/js/assert.m.js'; +import {addSingletonGetter, sendWithPromise} from 'chrome://resources/js/cr.m.js'; + +import {Cdd} from './data/cdd.js'; +import {ProvisionalDestinationInfo} from './data/local_parsers.js'; +import {PrinterStatus, PrinterStatusReason} from './data/printer_status_cros.js'; + +export type PrinterSetupResponse = { + printerId: string, + capabilities: Cdd, +}; + +export type PrintServer = { + id: string, + name: string, +}; + +export type PrintServersConfig = { + printServers: PrintServer[], + isSingleServerFetchingMode: boolean, +}; + +/** + * An interface to the Chrome OS platform specific part of the native Chromium + * printing system layer. + */ +export interface NativeLayerCros { + /** + * Requests access token for cloud print requests for DEVICE origin. + */ + getAccessToken(): Promise<string>; + + /** + * Requests the destination's end user license information. Returns a promise + * that will be resolved with the destination's EULA URL if obtained + * successfully. + * @param destinationId ID of the destination. + */ + getEulaUrl(destinationId: string): Promise<string>; + + /** + * Requests Chrome to resolve provisional extension destination by granting + * the provider extension access to the printer. + * @param provisionalDestinationId + */ + grantExtensionPrinterAccess(provisionalDestinationId: string): + Promise<ProvisionalDestinationInfo>; + + /** + * Requests that Chrome perform printer setup for the given printer. + */ + setupPrinter(printerId: string): Promise<PrinterSetupResponse>; + + /** + * Sends a request to the printer with id |printerId| for its current status. + */ + requestPrinterStatusUpdate(printerId: string): Promise<PrinterStatus>; + + /** + * Records the histogram to capture the printer status of the current + * destination and whether the user chose to print or cancel. + * @param statusReason Current destination printer status + * @param didUserAttemptPrint True if user printed, false if user canceled. + */ + recordPrinterStatusHistogram( + statusReason: PrinterStatusReason|null, + didUserAttemptPrint: boolean): void; + + /** + * Records the histogram to capture if the retried printer status was + * able to get a valid response from the local printer. + */ + recordPrinterStatusRetrySuccessHistogram(retrySuccessful: boolean): void; + + /** + * Selects all print servers with ids in |printServerIds| to query for their + * printers. + */ + choosePrintServers(printServerIds: string[]): void; + + /** + * Gets the available print servers and whether we are in single server + * fetching mode. + */ + getPrintServersConfig(): Promise<PrintServersConfig>; +} + +export class NativeLayerCrosImpl implements NativeLayerCros { + getAccessToken() { + return sendWithPromise('getAccessToken'); + } + + getEulaUrl(destinationId: string) { + return sendWithPromise('getEulaUrl', destinationId); + } + + grantExtensionPrinterAccess(provisionalDestinationId: string) { + return sendWithPromise( + 'grantExtensionPrinterAccess', provisionalDestinationId); + } + + setupPrinter(printerId: string) { + return sendWithPromise('setupPrinter', printerId); + } + + requestPrinterStatusUpdate(printerId: string) { + return sendWithPromise('requestPrinterStatus', printerId); + } + + recordPrinterStatusHistogram( + statusReason: PrinterStatusReason|null, didUserAttemptPrint: boolean) { + if (statusReason === null) { + return; + } + + let histogram; + switch (statusReason) { + case (PrinterStatusReason.UNKNOWN_REASON): + histogram = + 'PrintPreview.PrinterStatus.AttemptedPrintWithUnknownStatus'; + break; + case (PrinterStatusReason.NO_ERROR): + histogram = 'PrintPreview.PrinterStatus.AttemptedPrintWithGoodStatus'; + break; + default: + histogram = 'PrintPreview.PrinterStatus.AttemptedPrintWithErrorStatus'; + break; + } + chrome.send( + 'metricsHandler:recordBooleanHistogram', + [histogram, didUserAttemptPrint]); + } + + recordPrinterStatusRetrySuccessHistogram(retrySuccessful: boolean) { + chrome.send( + 'metricsHandler:recordBooleanHistogram', + ['PrinterStatusRetrySuccess', retrySuccessful]); + } + + choosePrintServers(printServerIds: string[]) { + chrome.send('choosePrintServers', [printServerIds]); + } + + getPrintServersConfig() { + return sendWithPromise('getPrintServersConfig'); + } + + static getInstance(): NativeLayerCros { + return instance || (instance = new NativeLayerCrosImpl()); + } + + static setInstance(obj: NativeLayerCros) { + instance = obj; + } +} + +let instance: NativeLayerCros|null = null;
diff --git a/chrome/browser/resources/print_preview/print_preview.js b/chrome/browser/resources/print_preview/print_preview.js index a21f451..57b3a60 100644 --- a/chrome/browser/resources/print_preview/print_preview.js +++ b/chrome/browser/resources/print_preview/print_preview.js
@@ -3,7 +3,7 @@ // found in the LICENSE file. export {PluralStringProxyImpl as PrintPreviewPluralStringProxyImpl} from 'chrome://resources/js/plural_string_proxy.js'; -export {CloudPrintInterface, CloudPrintInterfaceEventType} from './cloud_print_interface.js'; +export {CloudPrintInterfaceEventType} from './cloud_print_interface.js'; export {CloudPrintInterfaceImpl} from './cloud_print_interface_impl.js'; export {ColorMode, createDestinationKey, Destination, DestinationCertificateStatus, DestinationConnectionStatus, DestinationOrigin, DestinationType, GooglePromotedDestinationId, makeRecentDestination} from './data/destination.js'; // <if expr="chromeos or lacros"> @@ -23,9 +23,9 @@ export {ScalingType} from './data/scaling.js'; export {Size} from './data/size.js'; export {Error, State} from './data/state.js'; -export {BackgroundGraphicsModeRestriction, CapabilitiesResponse, ColorModeRestriction, DuplexModeRestriction, NativeInitialSettings, NativeLayer, NativeLayerImpl, PinModeRestriction} from './native_layer.js'; +export {BackgroundGraphicsModeRestriction, ColorModeRestriction, DuplexModeRestriction, NativeLayerImpl, PinModeRestriction} from './native_layer.js'; // <if expr="chromeos or lacros"> -export {NativeLayerCros, NativeLayerCrosImpl, PrinterSetupResponse, PrintServer, PrintServersConfig} from './native_layer_cros.js'; +export {NativeLayerCrosImpl} from './native_layer_cros.js'; // </if> export {getSelectDropdownBackground} from './print_preview_utils.js'; export {PrintPreviewAdvancedSettingsDialogElement} from './ui/advanced_settings_dialog.js';
diff --git a/chrome/browser/resources/print_preview/print_preview_utils.js b/chrome/browser/resources/print_preview/print_preview_utils.js deleted file mode 100644 index cf55d02f..0000000 --- a/chrome/browser/resources/print_preview/print_preview_utils.js +++ /dev/null
@@ -1,86 +0,0 @@ -// Copyright (c) 2012 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 'chrome://resources/polymer/v3_0/iron-iconset-svg/iron-iconset-svg.js'; - -import {isRTL} from 'chrome://resources/js/util.m.js'; - -import {inDarkMode} from './dark_mode_mixin.js'; - -/** - * Returns true if the contents of the two page ranges are equal. - * @param {!Array<{ to: number, from: number }>} array1 The first array. - * @param {!Array<{ to: number, from: number }>} array2 The second array. - * @return {boolean} true if the arrays are equal. - */ -export function areRangesEqual(array1, array2) { - if (array1.length !== array2.length) { - return false; - } - for (let i = 0; i < array1.length; i++) { - if (array1[i].from !== array2[i].from || array1[i].to !== array2[i].to) { - return false; - } - } - return true; -} - -/** - * @param {!Array<!{locale: string, value: string}>} localizedStrings An array - * of strings with corresponding locales. - * @param {string} locale Locale to look the string up for. - * @return {string} A string for the requested {@code locale}. An empty string - * if there's no string for the specified locale found. - */ -export function getStringForLocale(localizedStrings, locale) { - locale = locale.toLowerCase(); - for (let i = 0; i < localizedStrings.length; i++) { - if (localizedStrings[i].locale.toLowerCase() === locale) { - return localizedStrings[i].value; - } - } - return ''; -} - -/** - * @param {!Array<!{locale: string, value: string}>} localizedStrings An array - * of strings with corresponding locales. - * @return {string} A string for the current locale. An empty string if there's - * no string for the current locale found. - */ -export function getStringForCurrentLocale(localizedStrings) { - // First try to find an exact match and then look for the language only. - return getStringForLocale(localizedStrings, navigator.language) || - getStringForLocale(localizedStrings, navigator.language.split('-')[0]); -} - -/** - * @param {!Array<*>} args The arguments for the observer. - * @return {boolean} Whether all arguments are defined. - */ -export function observerDepsDefined(args) { - return args.every(arg => arg !== undefined); -} - -/** - * Returns background images (icon and dropdown arrow) for use in a md-select. - * @param {!IronIconsetSvgElement} iconset The iconset the icon is in. - * @param {string} iconName The icon name - * @param {!HTMLElement} el The element that contains the select. - * @return {string} String containing inlined SVG of the icon and - * url(path_to_arrow) separated by a comma. - */ -export function getSelectDropdownBackground(iconset, iconName, el) { - const serializer = new XMLSerializer(); - const iconElement = iconset.createIcon(iconName, isRTL()); - const dark = inDarkMode(); - const fillColor = getComputedStyle(el).getPropertyValue( - dark ? '--google-grey-refresh-500' : '--google-grey-600'); - iconElement.style.fill = fillColor; - const serializedIcon = serializer.serializeToString(iconElement); - const uri = encodeURIComponent(serializedIcon); - const arrowDownPath = dark ? 'chrome://resources/images/dark/arrow_down.svg' : - 'chrome://resources/images/arrow_down.svg'; - return `url("data:image/svg+xml;charset=utf-8,${uri}"),` + - `url("${arrowDownPath}")`; -}
diff --git a/chrome/browser/resources/print_preview/print_preview_utils.ts b/chrome/browser/resources/print_preview/print_preview_utils.ts new file mode 100644 index 0000000..f67c273e --- /dev/null +++ b/chrome/browser/resources/print_preview/print_preview_utils.ts
@@ -0,0 +1,93 @@ +// Copyright (c) 2012 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 {isRTL} from 'chrome://resources/js/util.m.js'; +import {IronIconsetSvgElement} from 'chrome://resources/polymer/v3_0/iron-iconset-svg/iron-iconset-svg.js'; + +import {inDarkMode} from './dark_mode_mixin.js'; + +type Range = { + to: number, + from: number, +}; + +/** + * Returns true if the contents of the two page ranges are equal. + */ +export function areRangesEqual(array1: Range[], array2: Range[]): boolean { + if (array1.length !== array2.length) { + return false; + } + for (let i = 0; i < array1.length; i++) { + if (array1[i].from !== array2[i].from || array1[i].to !== array2[i].to) { + return false; + } + } + return true; +} + +type LocalizedString = { + locale: string, + value: string, +}; + +/** + * @param localizedStrings An array of strings with corresponding locales. + * @param locale Locale to look the string up for. + * @return A string for the requested {@code locale}. An empty string + * if there's no string for the specified locale found. + */ +function getStringForLocale( + localizedStrings: LocalizedString[], locale: string): string { + locale = locale.toLowerCase(); + for (let i = 0; i < localizedStrings.length; i++) { + if (localizedStrings[i].locale.toLowerCase() === locale) { + return localizedStrings[i].value; + } + } + return ''; +} + +/** + * @param localizedStrings An array of strings with corresponding locales. + * @return {string} A string for the current locale. An empty string if there's + * no string for the current locale found. + */ +export function getStringForCurrentLocale(localizedStrings: LocalizedString[]): + string { + // First try to find an exact match and then look for the language only. + return getStringForLocale(localizedStrings, navigator.language) || + getStringForLocale(localizedStrings, navigator.language.split('-')[0]); +} + +/** + * @param args The arguments for the observer. + * @return Whether all arguments are defined. + */ +export function observerDepsDefined(args: any[]): boolean { + return args.every(arg => arg !== undefined); +} + +/** + * Returns background images (icon and dropdown arrow) for use in a md-select. + * @param iconset The iconset the icon is in. + * @param iconName The icon name + * @param el The element that contains the select. + * @return String containing inlined SVG of the icon and + * url(path_to_arrow) separated by a comma. + */ +export function getSelectDropdownBackground( + iconset: IronIconsetSvgElement, iconName: string, el: HTMLElement): string { + const serializer = new XMLSerializer(); + const iconElement = iconset.createIcon(iconName, isRTL()) as HTMLElement; + const dark = inDarkMode(); + const fillColor = getComputedStyle(el).getPropertyValue( + dark ? '--google-grey-refresh-500' : '--google-grey-600'); + iconElement.style.fill = fillColor; + const serializedIcon = serializer.serializeToString(iconElement); + const uri = encodeURIComponent(serializedIcon); + const arrowDownPath = dark ? 'chrome://resources/images/dark/arrow_down.svg' : + 'chrome://resources/images/arrow_down.svg'; + return `url("data:image/svg+xml;charset=utf-8,${uri}"),` + + `url("${arrowDownPath}")`; +}
diff --git a/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_impl_win.cc b/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_impl_win.cc index 90a31775..aa58459 100644 --- a/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_impl_win.cc +++ b/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_impl_win.cc
@@ -67,16 +67,6 @@ // These values are used to send UMA information and are replicated in the // enums.xml file, so the order MUST NOT CHANGE. -enum CleanupResultHistogramValue { - CLEANUP_RESULT_SUCCEEDED = 0, - CLEANUP_RESULT_REBOOT_REQUIRED = 1, - CLEANUP_RESULT_FAILED = 2, - - CLEANUP_RESULT_MAX, -}; - -// These values are used to send UMA information and are replicated in the -// enums.xml file, so the order MUST NOT CHANGE. enum IPCDisconnectedHistogramValue { IPC_DISCONNECTED_SUCCESS = 0, IPC_DISCONNECTED_LOST_WHILE_SCANNING = 1, @@ -143,11 +133,6 @@ logs_accepted); } -void RecordCleanupResultHistogram(CleanupResultHistogramValue result) { - UMA_HISTOGRAM_ENUMERATION("SoftwareReporter.Cleaner.CleanupResult", result, - CLEANUP_RESULT_MAX); -} - void RecordIPCDisconnectedHistogram(IPCDisconnectedHistogramValue error) { UMA_HISTOGRAM_ENUMERATION("SoftwareReporter.IPCDisconnected", error, IPC_DISCONNECTED_MAX); @@ -516,7 +501,6 @@ if (state() != State::kRebootRequired) return; - UMA_HISTOGRAM_BOOLEAN("SoftwareReporter.Cleaner.RebootResponse", true); InitiateReboot(); } @@ -673,8 +657,6 @@ return; } - UMA_HISTOGRAM_COUNTS_1000("SoftwareReporter.NumberOfFilesToDelete", - scanner_results.files_to_delete().size()); scanner_results_ = std::move(scanner_results); prompt_user_reply_callback_ = std::move(reply_callback); SetStateAndNotifyObservers(State::kInfected); @@ -734,7 +716,6 @@ } if (process_status.exit_code == kRebootRequiredExitCode) { - RecordCleanupResultHistogram(CLEANUP_RESULT_REBOOT_REQUIRED); SetStateAndNotifyObservers(State::kRebootRequired); // Start the reboot prompt flow. @@ -743,7 +724,6 @@ } if (process_status.exit_code == kRebootNotRequiredExitCode) { - RecordCleanupResultHistogram(CLEANUP_RESULT_SUCCEEDED); delegate_->ResetTaggedProfiles( g_browser_process->profile_manager()->GetLoadedProfiles(), base::DoNothing()); @@ -753,7 +733,6 @@ } } - RecordCleanupResultHistogram(CLEANUP_RESULT_FAILED); idle_reason_ = IdleReason::kCleaningFailed; SetStateAndNotifyObservers(State::kIdle); }
diff --git a/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_fetcher_win.cc b/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_fetcher_win.cc index 95d801e..0b3dec9 100644 --- a/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_fetcher_win.cc +++ b/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_fetcher_win.cc
@@ -101,12 +101,6 @@ policy_exception_justification: "Not implemented." })"); -void RecordCleanerDownloadStatusHistogram( - CleanerDownloadStatusHistogramValue value) { - UMA_HISTOGRAM_ENUMERATION("SoftwareReporter.Cleaner.DownloadStatus", value, - CLEANER_DOWNLOAD_STATUS_MAX); -} - // Class that will attempt to download the Chrome Cleaner executable and call a // given callback when done. Instances of ChromeCleanerFetcher own themselves // and will self-delete if they encounter an error or when the network request @@ -124,12 +118,6 @@ void PostCallbackAndDeleteSelf(base::FilePath path, ChromeCleanerFetchStatus fetch_status); - // Sends a histogram indicating an error and invokes the fetch callback if - // the cleaner binary can't be downloaded or saved to the disk. - void RecordDownloadStatusAndPostCallback( - CleanerDownloadStatusHistogramValue histogram_value, - ChromeCleanerFetchStatus fetch_status); - void RecordTimeToCompleteDownload(FetchCompletedReasonHistogramSuffix suffix, base::TimeDelta download_duration); @@ -179,8 +167,6 @@ void ChromeCleanerFetcher::OnTemporaryDirectoryCreated(bool success) { if (!success) { - RecordCleanerDownloadStatusHistogram( - CLEANER_DOWNLOAD_STATUS_FAILED_TO_CREATE_TEMP_DIR); PostCallbackAndDeleteSelf( base::FilePath(), ChromeCleanerFetchStatus::kFailedToCreateTemporaryDirectory); @@ -230,9 +216,8 @@ url_loader_->NetError()); RecordTimeToCompleteDownload( FetchCompletedReasonHistogramSuffix::kNetworkError, download_duration); - RecordDownloadStatusAndPostCallback( - CLEANER_DOWNLOAD_STATUS_OTHER_FAILURE, - ChromeCleanerFetchStatus::kOtherFailure); + PostCallbackAndDeleteSelf(base::FilePath(), + ChromeCleanerFetchStatus::kOtherFailure); return; } @@ -248,34 +233,24 @@ RecordTimeToCompleteDownload(suffix, download_duration); if (response_code == net::HTTP_NOT_FOUND) { - RecordDownloadStatusAndPostCallback( - CLEANER_DOWNLOAD_STATUS_NOT_FOUND_ON_SERVER, - ChromeCleanerFetchStatus::kNotFoundOnServer); + PostCallbackAndDeleteSelf(base::FilePath(), + ChromeCleanerFetchStatus::kNotFoundOnServer); return; } if (response_code != net::HTTP_OK) { - RecordDownloadStatusAndPostCallback( - CLEANER_DOWNLOAD_STATUS_OTHER_FAILURE, - ChromeCleanerFetchStatus::kOtherFailure); + PostCallbackAndDeleteSelf(base::FilePath(), + ChromeCleanerFetchStatus::kOtherFailure); return; } // Take ownership of the scoped temp directory so it is not deleted. scoped_temp_dir_->Take(); - RecordCleanerDownloadStatusHistogram(CLEANER_DOWNLOAD_STATUS_SUCCEEDED); PostCallbackAndDeleteSelf(std::move(path), ChromeCleanerFetchStatus::kSuccess); } -void ChromeCleanerFetcher::RecordDownloadStatusAndPostCallback( - CleanerDownloadStatusHistogramValue histogram_value, - ChromeCleanerFetchStatus fetch_status) { - RecordCleanerDownloadStatusHistogram(histogram_value); - PostCallbackAndDeleteSelf(base::FilePath(), fetch_status); -} - void ChromeCleanerFetcher::RecordTimeToCompleteDownload( FetchCompletedReasonHistogramSuffix suffix, base::TimeDelta download_duration) {
diff --git a/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_reboot_dialog_controller_impl_win.cc b/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_reboot_dialog_controller_impl_win.cc index 6da6558..f880cbb9 100644 --- a/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_reboot_dialog_controller_impl_win.cc +++ b/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_reboot_dialog_controller_impl_win.cc
@@ -19,16 +19,6 @@ namespace { -// These values are used to send UMA information and are replicated in the -// enums.xml, so the order MUST NOT CHANGE -enum SettingsPageActiveOnRebootRequiredHistogramValue { - SETTINGS_PAGE_ON_REBOOT_REQUIRED_NO_BROWSER = 0, - SETTINGS_PAGE_ON_REBOOT_REQUIRED_NOT_ACTIVE_TAB = 1, - SETTINGS_PAGE_ON_REBOOT_REQUIRED_ACTIVE_TAB = 2, - - SETTINGS_PAGE_ON_REBOOT_REQUIRED_MAX, -}; - class PromptDelegateImpl : public ChromeCleanerRebootDialogControllerImpl::PromptDelegate { public: @@ -49,13 +39,6 @@ void PromptDelegateImpl::OnSettingsPageIsActiveTab() {} -void RecordSettingsPageActiveOnRebootRequired( - SettingsPageActiveOnRebootRequiredHistogramValue value) { - UMA_HISTOGRAM_ENUMERATION( - "SoftwareReporter.Cleaner.SettingsPageActiveOnRebootRequired", value, - SETTINGS_PAGE_ON_REBOOT_REQUIRED_MAX); -} - } // namespace ChromeCleanerRebootDialogControllerImpl::PromptDelegate::~PromptDelegate() = @@ -132,9 +115,6 @@ Browser* browser = chrome_cleaner_util::FindBrowser(); if (browser == nullptr) { - RecordSettingsPageActiveOnRebootRequired( - SETTINGS_PAGE_ON_REBOOT_REQUIRED_NO_BROWSER); - waiting_for_browser_ = true; BrowserList::AddObserver(this); @@ -148,16 +128,11 @@ Browser* browser) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); if (chrome_cleaner_util::CleanupPageIsActiveTab(browser)) { - RecordSettingsPageActiveOnRebootRequired( - SETTINGS_PAGE_ON_REBOOT_REQUIRED_ACTIVE_TAB); - prompt_delegate_->OnSettingsPageIsActiveTab(); OnInteractionDone(); return; } - RecordSettingsPageActiveOnRebootRequired( - SETTINGS_PAGE_ON_REBOOT_REQUIRED_NOT_ACTIVE_TAB); prompt_delegate_->ShowChromeCleanerRebootPrompt(browser, this); }
diff --git a/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/long_screenshots/bitmap_generation/BitmapGenerator.java b/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/long_screenshots/bitmap_generation/BitmapGenerator.java index 24913a6..1de8d58a 100644 --- a/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/long_screenshots/bitmap_generation/BitmapGenerator.java +++ b/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/long_screenshots/bitmap_generation/BitmapGenerator.java
@@ -99,17 +99,20 @@ * @param rect The bounds of the webpage (not capture) to composite into bitmap. * @param errorCallback Callback for when an error is encountered * @param onBitmapGenerated Called with the generated bitmap. + * @param boundsRelativeToCapture Whether the passed bounds are relative to capture to the page. * @return id of the request. */ - public int compositeBitmap( - Rect rect, Runnable errorCallback, Callback<Bitmap> onBitmapGenerated) { + public int compositeBitmap(Rect rect, Runnable errorCallback, + Callback<Bitmap> onBitmapGenerated, boolean boundsRelativeToCapture) { // Check if the compositor is ready and whether the rect is within the bounds of the // the capture. if (mScaleFactor == 0f) { mScaleFactor = mBoundsManager.getBitmapScaleFactorFromCompositedWidth( getContentSize().getWidth()); } - return mCompositor.requestBitmap(mBoundsManager.calculateBoundsRelativeToCapture(rect), + return mCompositor.requestBitmap(boundsRelativeToCapture + ? rect + : mBoundsManager.calculateBoundsRelativeToCapture(rect), mScaleFactor, errorCallback, onBitmapGenerated); }
diff --git a/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/long_screenshots/bitmap_generation/EntryManager.java b/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/long_screenshots/bitmap_generation/EntryManager.java index 5cef372..bd618bd8 100644 --- a/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/long_screenshots/bitmap_generation/EntryManager.java +++ b/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/long_screenshots/bitmap_generation/EntryManager.java
@@ -180,8 +180,9 @@ * @param updateMemoryUsage The callback to be notified of the bitmap memory usage. * @return The new entry that generates the bitmap. */ - public LongScreenshotsEntry generateEntry(Rect bounds) { - LongScreenshotsEntry entry = new LongScreenshotsEntry(mGenerator, bounds, (bytes) -> {}); + public LongScreenshotsEntry generateEntry(Rect bounds, boolean boundsRelativeToCapture) { + LongScreenshotsEntry entry = new LongScreenshotsEntry( + mGenerator, bounds, (bytes) -> {}, boundsRelativeToCapture); processEntry(entry, true, false); return entry; } @@ -298,4 +299,11 @@ } }; } + + public void destroy() { + if (mGenerator != null) { + mGenerator.destroy(); + mGenerator = null; + } + } }
diff --git a/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/long_screenshots/bitmap_generation/LongScreenshotsEntry.java b/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/long_screenshots/bitmap_generation/LongScreenshotsEntry.java index 6536a24fe1..20c24b6 100644 --- a/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/long_screenshots/bitmap_generation/LongScreenshotsEntry.java +++ b/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/long_screenshots/bitmap_generation/LongScreenshotsEntry.java
@@ -36,6 +36,7 @@ private Bitmap mGeneratedBitmap; private EntryListener mEntryListener; private Callback<Integer> mMemoryTracker; + private boolean mBoundsAreRelativeToCapture; @IntDef({EntryStatus.UNKNOWN, EntryStatus.INSUFFICIENT_MEMORY, EntryStatus.GENERATION_ERROR, EntryStatus.BITMAP_GENERATED, EntryStatus.CAPTURE_COMPLETE, @@ -66,15 +67,24 @@ void onResult(@EntryStatus int status); } + public LongScreenshotsEntry( + BitmapGenerator generator, Rect bounds, Callback<Integer> memoryTracker) { + this(generator, bounds, memoryTracker, false); + } + /** * @param generator BitmapGenerator to be used to capture and composite the website. * @param bounds The bounds of the entry. + * @param memoryTracker Callback to be notified of the entry's memory usage. + * @param boundsRelativeToCapture whether the bounds of the entry are relative to the capture or + * the page. */ - public LongScreenshotsEntry( - BitmapGenerator generator, Rect bounds, Callback<Integer> memoryTracker) { + public LongScreenshotsEntry(BitmapGenerator generator, Rect bounds, + Callback<Integer> memoryTracker, boolean boundsRelativeToCapture) { mRect = bounds; mGenerator = generator; mMemoryTracker = memoryTracker; + mBoundsAreRelativeToCapture = boundsRelativeToCapture; } static LongScreenshotsEntry createEntryWithStatus(@EntryStatus int status) { @@ -113,7 +123,8 @@ return; } updateStatus(EntryStatus.BITMAP_GENERATION_IN_PROGRESS); - mGenerator.compositeBitmap(mRect, this::onBitmapGenerationError, this::onBitmapGenerated); + mGenerator.compositeBitmap(mRect, this::onBitmapGenerationError, this::onBitmapGenerated, + mBoundsAreRelativeToCapture); } /**
diff --git a/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/scroll_capture/ScrollCaptureCallbackImpl.java b/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/scroll_capture/ScrollCaptureCallbackImpl.java index 830a283..1c49a1f 100644 --- a/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/scroll_capture/ScrollCaptureCallbackImpl.java +++ b/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/scroll_capture/ScrollCaptureCallbackImpl.java
@@ -97,6 +97,7 @@ // Abort if BitmapGenerator is not initialized successfully. if (status != EntryStatus.CAPTURE_COMPLETE) { mEntryManager.removeBitmapGeneratorObserver(this); + mEntryManager.destroy(); signal.cancel(); } } @@ -105,6 +106,7 @@ public void onCompositorReady(Size contentSize, Size scrollOffset) { mEntryManager.removeBitmapGeneratorObserver(this); if (contentSize.getWidth() == 0 || contentSize.getHeight() == 0) { + mEntryManager.destroy(); signal.cancel(); return; } @@ -132,7 +134,7 @@ return; } - LongScreenshotsEntry entry = mEntryManager.generateEntry(captureArea); + LongScreenshotsEntry entry = mEntryManager.generateEntry(captureArea, true); entry.setListener(status -> { if (status == EntryStatus.BITMAP_GENERATION_IN_PROGRESS) return; @@ -156,7 +158,10 @@ // TODO(crbug.com/1231201): work out why this is causing a lint error @SuppressWarnings("Override") public void onScrollCaptureEnd(@NonNull Runnable onReady) { - mEntryManager = null; + if (mEntryManager != null) { + mEntryManager.destroy(); + mEntryManager = null; + } mContentArea = null; mInitialRect = null; mViewportRect = null;
diff --git a/chrome/browser/share/android/javatests/src/org/chromium/chrome/browser/share/long_screenshots/bitmap_generation/BitmapGeneratorTest.java b/chrome/browser/share/android/javatests/src/org/chromium/chrome/browser/share/long_screenshots/bitmap_generation/BitmapGeneratorTest.java index c891fcec5..7eaf851 100644 --- a/chrome/browser/share/android/javatests/src/org/chromium/chrome/browser/share/long_screenshots/bitmap_generation/BitmapGeneratorTest.java +++ b/chrome/browser/share/android/javatests/src/org/chromium/chrome/browser/share/long_screenshots/bitmap_generation/BitmapGeneratorTest.java
@@ -88,7 +88,7 @@ Assert.assertEquals(CompositorStatus.OK, status); TestThreadUtils.runOnUiThreadBlocking(() -> { mGenerator.compositeBitmap( - new Rect(0, 0, 100, 100), onErrorCallback, onBitmapGenerated); + new Rect(0, 0, 100, 100), onErrorCallback, onBitmapGenerated, false); }); }
diff --git a/chrome/browser/share/android/javatests/src/org/chromium/chrome/browser/share/long_screenshots/bitmap_generation/LongScreenshotsEntryTest.java b/chrome/browser/share/android/javatests/src/org/chromium/chrome/browser/share/long_screenshots/bitmap_generation/LongScreenshotsEntryTest.java index 23f460b..399ec5a 100644 --- a/chrome/browser/share/android/javatests/src/org/chromium/chrome/browser/share/long_screenshots/bitmap_generation/LongScreenshotsEntryTest.java +++ b/chrome/browser/share/android/javatests/src/org/chromium/chrome/browser/share/long_screenshots/bitmap_generation/LongScreenshotsEntryTest.java
@@ -86,8 +86,8 @@ } @Override - public int compositeBitmap( - Rect rect, Runnable errorCallback, Callback<Bitmap> onBitmapGenerated) { + public int compositeBitmap(Rect rect, Runnable errorCallback, + Callback<Bitmap> onBitmapGenerated, boolean boundsRelativeToCapture) { if (mThrowErrorOnComposite) { errorCallback.run(); return -1;
diff --git a/chrome/browser/share/android/javatests/src/org/chromium/chrome/browser/share/scroll_capture/ScrollCaptureCallbackImplTest.java b/chrome/browser/share/android/javatests/src/org/chromium/chrome/browser/share/scroll_capture/ScrollCaptureCallbackImplTest.java index e5072df..d8b372e 100644 --- a/chrome/browser/share/android/javatests/src/org/chromium/chrome/browser/share/scroll_capture/ScrollCaptureCallbackImplTest.java +++ b/chrome/browser/share/android/javatests/src/org/chromium/chrome/browser/share/scroll_capture/ScrollCaptureCallbackImplTest.java
@@ -5,6 +5,7 @@ package org.chromium.chrome.browser.share.scroll_capture; import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyBoolean; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.mock; @@ -211,7 +212,7 @@ session, signal, captureArea, mRectConsumer); inOrder.verify(mRectConsumer).accept(eq(new Rect())); - when(mEntryManager.generateEntry(any())).thenReturn(entry); + when(mEntryManager.generateEntry(any(), anyBoolean())).thenReturn(entry); doAnswer(invocation -> { EntryListener listener = invocation.getArgument(0); listener.onResult(EntryStatus.BITMAP_GENERATED); @@ -241,6 +242,7 @@ // Test end capture scrollCaptureCallback.onScrollCaptureEnd(onReady); + inOrder.verify(mEntryManager).destroy(); Assert.assertNull(scrollCaptureCallback.getContentAreaForTesting()); Assert.assertNull(scrollCaptureCallback.getInitialRectForTesting()); inOrder.verify(onReady).run();
diff --git a/chrome/browser/sharing/click_to_call/click_to_call_context_menu_observer.cc b/chrome/browser/sharing/click_to_call/click_to_call_context_menu_observer.cc index ba13eacc..bb9e005b2 100644 --- a/chrome/browser/sharing/click_to_call/click_to_call_context_menu_observer.cc +++ b/chrome/browser/sharing/click_to_call/click_to_call_context_menu_observer.cc
@@ -16,6 +16,7 @@ #include "components/sync_device_info/device_info.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/models/image_model.h" +#include "ui/color/color_id.h" #include "ui/gfx/color_palette.h" #include "ui/gfx/paint_vector_icon.h" @@ -78,7 +79,7 @@ IDS_CONTENT_CONTEXT_SHARING_CLICK_TO_CALL_SINGLE_DEVICE, base::UTF8ToUTF16(devices_[0]->client_name())), ui::ImageModel::FromVectorIcon(controller_->GetVectorIcon(), - /*color_id=*/-1, + ui::kColorMenuIcon, ui::SimpleMenuModel::kDefaultIconSize)); #endif } else { @@ -95,7 +96,7 @@ IDS_CONTENT_CONTEXT_SHARING_CLICK_TO_CALL_MULTIPLE_DEVICES, sub_menu_model_.get(), ui::ImageModel::FromVectorIcon(controller_->GetVectorIcon(), - /*color_id=*/-1, + ui::kColorMenuIcon, ui::SimpleMenuModel::kDefaultIconSize)); #endif }
diff --git a/chrome/browser/sharing/shared_clipboard/shared_clipboard_context_menu_observer.cc b/chrome/browser/sharing/shared_clipboard/shared_clipboard_context_menu_observer.cc index 9b0df0a4..e01584f2 100644 --- a/chrome/browser/sharing/shared_clipboard/shared_clipboard_context_menu_observer.cc +++ b/chrome/browser/sharing/shared_clipboard/shared_clipboard_context_menu_observer.cc
@@ -16,6 +16,7 @@ #include "components/sync_device_info/device_info.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/models/image_model.h" +#include "ui/color/color_id.h" #include "ui/gfx/color_palette.h" #include "ui/gfx/paint_vector_icon.h" @@ -75,7 +76,7 @@ IDS_CONTENT_CONTEXT_SHARING_SHARED_CLIPBOARD_SINGLE_DEVICE, base::UTF8ToUTF16(devices_[0]->client_name())), ui::ImageModel::FromVectorIcon(controller_->GetVectorIcon(), - /*color_id=*/-1, + ui::kColorMenuIcon, ui::SimpleMenuModel::kDefaultIconSize)); #endif } else { @@ -92,7 +93,7 @@ IDS_CONTENT_CONTEXT_SHARING_SHARED_CLIPBOARD_MULTIPLE_DEVICES, sub_menu_model_.get(), ui::ImageModel::FromVectorIcon(controller_->GetVectorIcon(), - /*color_id=*/-1, + ui::kColorMenuIcon, ui::SimpleMenuModel::kDefaultIconSize)); #endif }
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd index 921b25d..ccf5a6d 100644 --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
@@ -5104,7 +5104,7 @@ <ph name="TEMPLATE_TITLE">%1$s<ex>Classic</ex> template selected</ph> </message> <message name="IDS_CONTENT_CREATION_NOTE_DIALOG_DESCRIPTION" desc="Accessibility information for note template picking dialog."> - Select a template for your highlight. To return to the main dialog, use an up then down gesture, then tap Next. + Select a template for your highlight. </message> <message name="IDS_CONTENT_CREATION_NOTE_SHORTENED_MESSAGE" desc="Toast message displayed when highlighted text is too long and is cropped to fit in the note."> Highlight was shortened
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings_grd/IDS_CONTENT_CREATION_NOTE_DIALOG_DESCRIPTION.png.sha1 b/chrome/browser/ui/android/strings/android_chrome_strings_grd/IDS_CONTENT_CREATION_NOTE_DIALOG_DESCRIPTION.png.sha1 index 60f1eab3..85f0e72 100644 --- a/chrome/browser/ui/android/strings/android_chrome_strings_grd/IDS_CONTENT_CREATION_NOTE_DIALOG_DESCRIPTION.png.sha1 +++ b/chrome/browser/ui/android/strings/android_chrome_strings_grd/IDS_CONTENT_CREATION_NOTE_DIALOG_DESCRIPTION.png.sha1
@@ -1 +1 @@ -b0f52d88f6d27009a4f5029408ee1acce8d4fcd3 \ No newline at end of file +688161b81fdcdc966f4e702958312ecb50f05310 \ No newline at end of file
diff --git a/chrome/browser/ui/app_list/app_context_menu.cc b/chrome/browser/ui/app_list/app_context_menu.cc index 04acacf..652f4f1f 100644 --- a/chrome/browser/ui/app_list/app_context_menu.cc +++ b/chrome/browser/ui/app_list/app_context_menu.cc
@@ -14,6 +14,7 @@ #include "chrome/grit/generated_resources.h" #include "components/vector_icons/vector_icons.h" #include "ui/base/l10n/l10n_util.h" +#include "ui/color/color_id.h" #include "ui/gfx/paint_vector_icon.h" #include "ui/gfx/vector_icon_types.h" #include "ui/views/vector_icons.h" @@ -75,7 +76,7 @@ GetMenuItemVectorIcon(command_id, controller_->IsAppPinned(app_id_) ? IDS_APP_LIST_CONTEXT_MENU_UNPIN : IDS_APP_LIST_CONTEXT_MENU_PIN); - return ui::ImageModel::FromVectorIcon(icon, /*color_id=*/-1, + return ui::ImageModel::FromVectorIcon(icon, ui::kColorMenuIcon, ash::kAppContextMenuIconSize); } @@ -158,7 +159,7 @@ if (!icon.is_empty()) { menu_model->AddItemWithStringIdAndIcon( command_id, string_id, - ui::ImageModel::FromVectorIcon(icon, /*color_id=*/-1, + ui::ImageModel::FromVectorIcon(icon, ui::kColorMenuIcon, ash::kAppContextMenuIconSize)); return; }
diff --git a/chrome/browser/ui/app_list/extension_app_utils.cc b/chrome/browser/ui/app_list/extension_app_utils.cc index f3993786..94311ae 100644 --- a/chrome/browser/ui/app_list/extension_app_utils.cc +++ b/chrome/browser/ui/app_list/extension_app_utils.cc
@@ -15,6 +15,7 @@ #include "ui/base/l10n/l10n_util.h" #include "ui/base/models/image_model.h" #include "ui/base/models/simple_menu_model.h" +#include "ui/color/color_id.h" #include "ui/gfx/paint_vector_icon.h" #include "ui/views/controls/menu/menu_config.h" #include "ui/views/vector_icons.h" @@ -38,10 +39,9 @@ const int index = start_index + i; if (menu_model->GetLabelAt(index) == l10n_util::GetStringUTF16(IDS_APP_LIST_CONTEXT_MENU_NEW_WINDOW)) { - menu_model->SetIcon( - index, ui::ImageModel::FromVectorIcon(views::kNewWindowIcon, - /*color_id=*/-1, - ash::kAppContextMenuIconSize)); + menu_model->SetIcon(index, ui::ImageModel::FromVectorIcon( + views::kNewWindowIcon, ui::kColorMenuIcon, + ash::kAppContextMenuIconSize)); } } }
diff --git a/chrome/browser/ui/app_list/search/arc/arc_app_reinstall_app_result.cc b/chrome/browser/ui/app_list/search/arc/arc_app_reinstall_app_result.cc index fc42c95bf..86def90 100644 --- a/chrome/browser/ui/app_list/search/arc/arc_app_reinstall_app_result.cc +++ b/chrome/browser/ui/app_list/search/arc/arc_app_reinstall_app_result.cc
@@ -18,10 +18,10 @@ #include "chromeos/ui/vector_icons/vector_icons.h" #include "components/vector_icons/vector_icons.h" #include "ui/base/models/image_model.h" +#include "ui/color/color_id.h" #include "ui/gfx/color_palette.h" #include "ui/gfx/image/image_skia_operations.h" #include "ui/gfx/paint_vector_icon.h" -#include "ui/native_theme/native_theme.h" namespace app_list { @@ -64,8 +64,7 @@ SetIcon(IconInfo(masked_app_icon)); SetChipIcon(masked_app_icon); SetBadgeIcon(ui::ImageModel::FromVectorIcon( - vector_icons::kCloudDownloadIcon, - ui::NativeTheme::kColorId_DefaultIconColor, + vector_icons::kCloudDownloadIcon, ui::kColorIcon, ash::SharedAppListConfig::instance().search_tile_badge_icon_dimension())); SetUseBadgeIconBackground(true); SetNotifyVisibilityChange(true);
diff --git a/chrome/browser/ui/ash/chrome_browser_main_extra_parts_ash.cc b/chrome/browser/ui/ash/chrome_browser_main_extra_parts_ash.cc index 5a7adc1..3db42835 100644 --- a/chrome/browser/ui/ash/chrome_browser_main_extra_parts_ash.cc +++ b/chrome/browser/ui/ash/chrome_browser_main_extra_parts_ash.cc
@@ -175,7 +175,7 @@ } ime_controller_client_ = std::make_unique<ImeControllerClientImpl>( - chromeos::input_method::InputMethodManager::Get()); + ash::input_method::InputMethodManager::Get()); ime_controller_client_->Init(); in_session_auth_dialog_client_ =
diff --git a/chrome/browser/ui/ash/ime_controller_client_impl.cc b/chrome/browser/ui/ash/ime_controller_client_impl.cc index cad226a..48375d7 100644 --- a/chrome/browser/ui/ash/ime_controller_client_impl.cc +++ b/chrome/browser/ui/ash/ime_controller_client_impl.cc
@@ -15,13 +15,13 @@ #include "ui/base/ime/ash/input_method_descriptor.h" #include "ui/base/ime/ash/input_method_util.h" -using chromeos::input_method::InputMethodDescriptor; -using chromeos::input_method::InputMethodManager; -using chromeos::input_method::InputMethodUtil; -using ui::ime::InputMethodMenuManager; - namespace { +using ::ash::input_method::InputMethodDescriptor; +using ::ash::input_method::InputMethodManager; +using ::ash::input_method::InputMethodUtil; +using ::ui::ime::InputMethodMenuManager; + ImeControllerClientImpl* g_ime_controller_client_instance = nullptr; } // namespace @@ -98,8 +98,8 @@ } void ImeControllerClientImpl::SetCapsLockEnabled(bool caps_enabled) { - chromeos::input_method::ImeKeyboard* keyboard = - chromeos::input_method::InputMethodManager::Get()->GetImeKeyboard(); + ash::input_method::ImeKeyboard* keyboard = + InputMethodManager::Get()->GetImeKeyboard(); if (keyboard) keyboard->SetCapsLockEnabled(caps_enabled); } @@ -119,7 +119,7 @@ } void ImeControllerClientImpl::OverrideKeyboardKeyset( - chromeos::input_method::ImeKeyset keyset, + ash::input_method::ImeKeyset keyset, OverrideKeyboardKeysetCallback callback) { input_method_manager_->OverrideKeyboardKeyset(keyset); std::move(callback).Run(); @@ -131,7 +131,7 @@ input_method_manager_->GetActiveIMEState()->GetCurrentInputMethod(); const std::u16string short_name = descriptor.GetIndicator(); - chromeos::IMECandidateWindowHandlerInterface* cw_handler = + ash::IMECandidateWindowHandlerInterface* cw_handler = ui::IMEBridge::Get()->GetCandidateWindowHandler(); if (!cw_handler) return; @@ -151,7 +151,7 @@ ime_controller_->ShowModeIndicator(anchor_bounds, short_name); } -// chromeos::input_method::InputMethodManager::Observer: +// ash::input_method::InputMethodManager::Observer: void ImeControllerClientImpl::InputMethodChanged(InputMethodManager* manager, Profile* profile, bool show_message) { @@ -160,7 +160,7 @@ ShowModeIndicator(); } -// chromeos::input_method::InputMethodManager::ImeMenuObserver: +// ash::input_method::InputMethodManager::ImeMenuObserver: void ImeControllerClientImpl::ImeMenuActivationChanged(bool is_active) { ime_controller_->ShowImeMenuOnShelf(is_active); } @@ -179,7 +179,7 @@ RefreshIme(); } -// chromeos::input_method::ImeKeyboard::Observer: +// ash::input_method::ImeKeyboard::Observer: void ImeControllerClientImpl::OnCapsLockChanged(bool enabled) { ime_controller_->UpdateCapsLockState(enabled); } @@ -194,7 +194,7 @@ // Now that the client is set, flush state from observed objects to // the ImeController, now that it will hear it. input_method_manager_->NotifyObserversImeExtraInputStateChange(); - if (const chromeos::input_method::ImeKeyboard* keyboard = + if (const ash::input_method::ImeKeyboard* keyboard = input_method_manager_->GetImeKeyboard()) { ime_controller_->OnKeyboardLayoutNameChanged( keyboard->GetCurrentKeyboardLayoutName()); @@ -208,7 +208,7 @@ info.id = ime.id(); info.name = util->GetInputMethodLongName(ime); info.short_name = ime.GetIndicator(); - info.third_party = chromeos::extension_ime_util::IsExtensionIME(ime.id()); + info.third_party = ash::extension_ime_util::IsExtensionIME(ime.id()); return info; }
diff --git a/chrome/browser/ui/ash/ime_controller_client_impl.h b/chrome/browser/ui/ash/ime_controller_client_impl.h index 52f8766..90bb240 100644 --- a/chrome/browser/ui/ash/ime_controller_client_impl.h +++ b/chrome/browser/ui/ash/ime_controller_client_impl.h
@@ -15,17 +15,15 @@ // Connects the ImeController in ash to the InputMethodManagerImpl in chrome. class ImeControllerClientImpl : public ash::ImeControllerClient, - public chromeos::input_method::InputMethodManager::Observer, - public chromeos::input_method::InputMethodManager::ImeMenuObserver, - public chromeos::input_method::ImeKeyboard::Observer, + public ash::input_method::InputMethodManager::Observer, + public ash::input_method::InputMethodManager::ImeMenuObserver, + public ash::input_method::ImeKeyboard::Observer, public ui::ime::InputMethodMenuManager::Observer { public: explicit ImeControllerClientImpl( - chromeos::input_method::InputMethodManager* manager); - + ash::input_method::InputMethodManager* manager); ImeControllerClientImpl(const ImeControllerClientImpl&) = delete; ImeControllerClientImpl& operator=(const ImeControllerClientImpl&) = delete; - ~ImeControllerClientImpl() override; // Initializes and connects to ash. @@ -47,32 +45,32 @@ void SetCapsLockEnabled(bool caps_enabled) override; void UpdateMirroringState(bool mirroring_enabled) override; void UpdateCastingState(bool casting_enabled) override; - void OverrideKeyboardKeyset(chromeos::input_method::ImeKeyset keyset, + void OverrideKeyboardKeyset(ash::input_method::ImeKeyset keyset, OverrideKeyboardKeysetCallback callback) override; void ShowModeIndicator() override; - // chromeos::input_method::InputMethodManager::Observer: - void InputMethodChanged(chromeos::input_method::InputMethodManager* manager, + // ash::input_method::InputMethodManager::Observer: + void InputMethodChanged(ash::input_method::InputMethodManager* manager, Profile* profile, bool show_message) override; - // chromeos::input_method::InputMethodManager::ImeMenuObserver: + // ash::input_method::InputMethodManager::ImeMenuObserver: void ImeMenuActivationChanged(bool is_active) override; void ImeMenuListChanged() override; void ImeMenuItemsChanged( const std::string& engine_id, - const std::vector<chromeos::input_method::InputMethodManager::MenuItem>& - items) override; + const std::vector<ash::input_method::InputMethodManager::MenuItem>& items) + override; // ui::ime::InputMethodMenuManager::Observer: void InputMethodMenuItemChanged( ui::ime::InputMethodMenuManager* manager) override; - // chromeos::input_method::ImeKeyboard::Observer: + // ash::input_method::ImeKeyboard::Observer: void OnCapsLockChanged(bool enabled) override; void OnLayoutChanging(const std::string& layout_name) override; - // chromeos::input_method::InputMethodManager::Observer + // ash::input_method::InputMethodManager::Observer void OnExtraInputEnabledStateChange(bool is_extra_input_options_enabled, bool is_emoji_enabled, bool is_handwriting_enabled, @@ -83,12 +81,12 @@ // Converts IME information from |descriptor| into the ash format. ash::ImeInfo GetAshImeInfo( - const chromeos::input_method::InputMethodDescriptor& descriptor) const; + const ash::input_method::InputMethodDescriptor& descriptor) const; // Sends information about current and available IMEs to ash. void RefreshIme(); - chromeos::input_method::InputMethodManager* const input_method_manager_; + ash::input_method::InputMethodManager* const input_method_manager_; // ImeController in ash. ash::ImeController* ime_controller_ = nullptr;
diff --git a/chrome/browser/ui/ash/ime_controller_client_impl_unittest.cc b/chrome/browser/ui/ash/ime_controller_client_impl_unittest.cc index 6f3d4cc..d60a8e9 100644 --- a/chrome/browser/ui/ash/ime_controller_client_impl_unittest.cc +++ b/chrome/browser/ui/ash/ime_controller_client_impl_unittest.cc
@@ -24,16 +24,16 @@ #include "ui/base/ime/ash/mock_ime_candidate_window_handler.h" #include "ui/base/ime/ash/mock_input_method_manager.h" -using chromeos::input_method::FakeInputMethodDelegate; -using chromeos::input_method::InputMethodDescriptor; -using chromeos::input_method::InputMethodManager; -using chromeos::input_method::InputMethodUtil; -using chromeos::input_method::MockInputMethodManager; -using ui::ime::InputMethodMenuItem; -using ui::ime::InputMethodMenuManager; - namespace { +using ::ash::input_method::FakeInputMethodDelegate; +using ::ash::input_method::InputMethodDescriptor; +using ::ash::input_method::InputMethodManager; +using ::ash::input_method::InputMethodUtil; +using ::ash::input_method::MockInputMethodManager; +using ::ui::ime::InputMethodMenuItem; +using ::ui::ime::InputMethodMenuManager; + // Used to look up IME names. std::u16string GetLocalizedString(int resource_id) { return u"localized string"; @@ -123,8 +123,7 @@ void ActivateInputMethodMenuItem(const std::string& key) override { last_activate_menu_item_key_ = key; } - void OverrideKeyboardKeyset( - chromeos::input_method::ImeKeyset keyset) override { + void OverrideKeyboardKeyset(ash::input_method::ImeKeyset keyset) override { keyboard_keyset_ = keyset; } @@ -139,7 +138,7 @@ int add_menu_observer_count_ = 0; int remove_menu_observer_count_ = 0; std::string last_activate_menu_item_key_; - chromeos::input_method::ImeKeyset keyboard_keyset_; + ash::input_method::ImeKeyset keyboard_keyset_; FakeInputMethodDelegate delegate_; InputMethodUtil util_; @@ -245,9 +244,8 @@ TEST_F(ImeControllerClientImplTest, InputMethodChanged) { ui::IMEBridge::Initialize(); - std::unique_ptr<chromeos::MockIMECandidateWindowHandler> - mock_candidate_window = - std::make_unique<chromeos::MockIMECandidateWindowHandler>(); + auto mock_candidate_window = + std::make_unique<ash::MockIMECandidateWindowHandler>(); ui::IMEBridge::Get()->SetCandidateWindowHandler(mock_candidate_window.get()); ImeControllerClientImpl client(&input_method_manager_); @@ -349,10 +347,10 @@ client.Init(); bool callback_called = false; client.OverrideKeyboardKeyset( - chromeos::input_method::ImeKeyset::kEmoji, + ash::input_method::ImeKeyset::kEmoji, base::BindLambdaForTesting( [&callback_called]() { callback_called = true; })); - EXPECT_EQ(chromeos::input_method::ImeKeyset::kEmoji, + EXPECT_EQ(ash::input_method::ImeKeyset::kEmoji, input_method_manager_.keyboard_keyset_); EXPECT_TRUE(callback_called); }
diff --git a/chrome/browser/ui/ash/keyboard/chrome_keyboard_controller_client.cc b/chrome/browser/ui/ash/keyboard/chrome_keyboard_controller_client.cc index 36ca5ef..c15a151f 100644 --- a/chrome/browser/ui/ash/keyboard/chrome_keyboard_controller_client.cc +++ b/chrome/browser/ui/ash/keyboard/chrome_keyboard_controller_client.cc
@@ -248,8 +248,7 @@ if (!virtual_keyboard_url_for_test_.is_empty()) return virtual_keyboard_url_for_test_; - chromeos::input_method::InputMethodManager* ime_manager = - chromeos::input_method::InputMethodManager::Get(); + auto* ime_manager = ash::input_method::InputMethodManager::Get(); if (!ime_manager || !ime_manager->GetActiveIMEState()) return GURL(keyboard::kKeyboardURL);
diff --git a/chrome/browser/ui/ash/sharesheet/sharesheet_target_button.cc b/chrome/browser/ui/ash/sharesheet/sharesheet_target_button.cc index 15cfdea..e925ffd 100644 --- a/chrome/browser/ui/ash/sharesheet/sharesheet_target_button.cc +++ b/chrome/browser/ui/ash/sharesheet/sharesheet_target_button.cc
@@ -12,6 +12,7 @@ #include "chrome/browser/ui/ash/sharesheet/sharesheet_constants.h" #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/base/models/image_model.h" +#include "ui/color/color_id.h" #include "ui/gfx/font_list.h" #include "ui/views/controls/image_view.h" #include "ui/views/layout/box_layout.h" @@ -38,8 +39,7 @@ return image; } else if (vector_icon != nullptr) { return std::make_unique<views::ImageView>(ui::ImageModel::FromVectorIcon( - *vector_icon, ui::NativeTheme::kColorId_DefaultIconColor, - sharesheet::kIconSize)); + *vector_icon, ui::kColorIcon, sharesheet::kIconSize)); } NOTREACHED(); return nullptr;
diff --git a/chrome/browser/ui/ash/shelf/extension_shelf_context_menu.cc b/chrome/browser/ui/ash/shelf/extension_shelf_context_menu.cc index 532bb56f..3b6905b 100644 --- a/chrome/browser/ui/ash/shelf/extension_shelf_context_menu.cc +++ b/chrome/browser/ui/ash/shelf/extension_shelf_context_menu.cc
@@ -25,6 +25,7 @@ #include "content/public/browser/context_menu_params.h" #include "extensions/browser/extension_prefs.h" #include "ui/base/models/image_model.h" +#include "ui/color/color_id.h" #include "ui/display/scoped_display_for_new_windows.h" #include "ui/display/screen.h" #include "ui/gfx/paint_vector_icon.h" @@ -209,7 +210,7 @@ open_new_submenu_model_.get(), ui::ImageModel::FromVectorIcon( GetCommandIdVectorIcon(ash::MENU_OPEN_NEW, GetLaunchTypeStringId()), - /*color_id=*/-1, ash::kAppContextMenuIconSize)); + ui::kColorMenuIcon, ash::kAppContextMenuIconSize)); } extensions::LaunchType ExtensionShelfContextMenu::GetLaunchType() const {
diff --git a/chrome/browser/ui/ash/shelf/shelf_context_menu.cc b/chrome/browser/ui/ash/shelf/shelf_context_menu.cc index ecd8729..3224e22c 100644 --- a/chrome/browser/ui/ash/shelf/shelf_context_menu.cc +++ b/chrome/browser/ui/ash/shelf/shelf_context_menu.cc
@@ -30,6 +30,7 @@ #include "components/services/app_service/public/mojom/types.mojom.h" #include "components/vector_icons/vector_icons.h" #include "ui/base/models/image_model.h" +#include "ui/color/color_id.h" #include "ui/display/types/display_constants.h" #include "ui/gfx/paint_vector_icon.h" #include "ui/views/vector_icons.h" @@ -287,7 +288,7 @@ if (!icon.is_empty()) { menu_model->AddItemWithStringIdAndIcon( type, string_id, - ui::ImageModel::FromVectorIcon(icon, /*color_id=*/-1, + ui::ImageModel::FromVectorIcon(icon, ui::kColorMenuIcon, ash::kAppContextMenuIconSize)); return; }
diff --git a/chrome/browser/ui/bookmarks/bookmark_utils.cc b/chrome/browser/ui/bookmarks/bookmark_utils.cc index 99fc56b9..72317752 100644 --- a/chrome/browser/ui/bookmarks/bookmark_utils.cc +++ b/chrome/browser/ui/bookmarks/bookmark_utils.cc
@@ -38,6 +38,8 @@ #if defined(TOOLKIT_VIEWS) #include "chrome/grit/theme_resources.h" #include "ui/base/resource/resource_bundle.h" +#include "ui/color/color_id.h" +#include "ui/color/color_provider.h" #include "ui/gfx/canvas.h" #include "ui/gfx/color_utils.h" #include "ui/gfx/image/image_skia_source.h" @@ -273,7 +275,7 @@ #endif const auto generator = [](int default_id, BookmarkFolderIconType icon_type, absl::variant<int, SkColor> color, - const ui::NativeTheme* native_theme) { + const ui::ColorProvider* color_provider) { gfx::ImageSkia folder; #if defined(OS_WIN) // TODO(bsep): vectorize the Windows versions: crbug.com/564112 @@ -284,9 +286,8 @@ if (absl::holds_alternative<SkColor>(color)) { sk_color = absl::get<SkColor>(color); } else { - DCHECK(native_theme); - sk_color = native_theme->GetSystemColor( - static_cast<ui::NativeTheme::ColorId>(absl::get<int>(color))); + DCHECK(color_provider); + sk_color = color_provider->GetColor(absl::get<ui::ColorId>(color)); } const int white_id = (icon_type == BookmarkFolderIconType::kNormal) ? IDR_FOLDER_CLOSED_WHITE @@ -310,8 +311,8 @@ const ui::ThemedVectorIcon icon = absl::holds_alternative<SkColor>(color) ? ui::ThemedVectorIcon(id, absl::get<SkColor>(color)) - : ui::ThemedVectorIcon(id, absl::get<int>(color)); - folder = icon.GetImageSkia(native_theme); + : ui::ThemedVectorIcon(id, absl::get<ui::ColorId>(color)); + folder = icon.GetImageSkia(color_provider); #endif return gfx::ImageSkia(std::make_unique<RTLFlipSource>(folder), folder.size());
diff --git a/chrome/browser/ui/browser_command_controller_unittest.cc b/chrome/browser/ui/browser_command_controller_unittest.cc index 330f963..1aa247ec1 100644 --- a/chrome/browser/ui/browser_command_controller_unittest.cc +++ b/chrome/browser/ui/browser_command_controller_unittest.cc
@@ -291,6 +291,7 @@ ExclusiveAccessBubbleType bubble_type, ExclusiveAccessBubbleHideCallback bubble_first_hide_callback, bool force_update) override {} + bool IsExclusiveAccessBubbleDisplayed() const override { return false; } void OnExclusiveAccessUserInput() override {} bool CanUserExitFullscreen() const override { return true; }
diff --git a/chrome/browser/ui/exclusive_access/exclusive_access_context.h b/chrome/browser/ui/exclusive_access/exclusive_access_context.h index 4e41ca3..02b58048 100644 --- a/chrome/browser/ui/exclusive_access/exclusive_access_context.h +++ b/chrome/browser/ui/exclusive_access/exclusive_access_context.h
@@ -55,6 +55,8 @@ ExclusiveAccessBubbleHideCallback bubble_first_hide_callback, bool force_update) = 0; + virtual bool IsExclusiveAccessBubbleDisplayed() const = 0; + // Informs the exclusive access system of some user input, which may update // internal timers and/or re-display the bubble. virtual void OnExclusiveAccessUserInput() = 0;
diff --git a/chrome/browser/ui/exclusive_access/exclusive_access_test.cc b/chrome/browser/ui/exclusive_access/exclusive_access_test.cc index 1f39484..33720bafa7 100644 --- a/chrome/browser/ui/exclusive_access/exclusive_access_test.cc +++ b/chrome/browser/ui/exclusive_access/exclusive_access_test.cc
@@ -15,6 +15,7 @@ #include "chrome/browser/ui/browser_commands.h" #include "chrome/browser/ui/browser_window.h" #include "chrome/browser/ui/exclusive_access/exclusive_access_bubble.h" +#include "chrome/browser/ui/exclusive_access/exclusive_access_context.h" #include "chrome/browser/ui/exclusive_access/exclusive_access_manager.h" #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h" #include "chrome/browser/ui/exclusive_access/keyboard_lock_controller.h" @@ -26,6 +27,7 @@ #include "content/public/common/content_features.h" #include "content/public/test/browser_test_utils.h" #include "content/public/test/test_navigation_observer.h" +#include "extensions/common/extension.h" #include "third_party/abseil-cpp/absl/types/optional.h" #include "third_party/blink/public/mojom/frame/fullscreen.mojom.h" #include "ui/base/ui_base_features.h" @@ -168,7 +170,9 @@ } bool ExclusiveAccessTest::IsExclusiveAccessBubbleDisplayed() { - return GetExclusiveAccessBubbleType() != EXCLUSIVE_ACCESS_BUBBLE_TYPE_NONE; + return GetExclusiveAccessManager() + ->context() + ->IsExclusiveAccessBubbleDisplayed(); } void ExclusiveAccessTest::GoBack() { @@ -200,7 +204,9 @@ void ExclusiveAccessTest::EnterExtensionInitiatedFullscreen() { FullscreenNotificationObserver fullscreen_observer(browser()); - browser()->ToggleFullscreenModeWithExtension(GURL("faux_extension")); + static const char kExtensionId[] = "extension-id"; + browser()->ToggleFullscreenModeWithExtension( + extensions::Extension::GetBaseURLFromExtensionId(kExtensionId)); fullscreen_observer.Wait(); }
diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller_interactive_browsertest.cc b/chrome/browser/ui/exclusive_access/fullscreen_controller_interactive_browsertest.cc index 3ed3f4f..c362031 100644 --- a/chrome/browser/ui/exclusive_access/fullscreen_controller_interactive_browsertest.cc +++ b/chrome/browser/ui/exclusive_access/fullscreen_controller_interactive_browsertest.cc
@@ -4,6 +4,7 @@ #include "base/command_line.h" #include "base/feature_list.h" +#include "base/test/bind.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" #include "chrome/browser/content_settings/host_content_settings_map_factory.h" @@ -930,6 +931,49 @@ EXPECT_EQ(original_bounds, browser()->window()->GetBounds()); } +// TODO(crbug.com/1034772): Disabled on Windows, where views::FullscreenHandler +// implements fullscreen by directly obtaining MONITORINFO, ignoring the mocked +// display::Screen configuration used in this test. Disabled on Mac and Linux, +// where the window server's async handling of the fullscreen window state may +// transition the window into fullscreen on the actual (non-mocked) display +// bounds before or after the window bounds checks, yielding flaky results. +#if !BUILDFLAG(IS_CHROMEOS_ASH) +#define MAYBE_SwapShowsBubble DISABLED_SwapShowsBubble +#else +#define MAYBE_SwapShowsBubble SwapShowsBubble +#endif +// Test requesting fullscreen on the current display and then swapping displays. +IN_PROC_BROWSER_TEST_F(ExperimentalFullscreenControllerInteractiveTest, + MAYBE_SwapShowsBubble) { + SetUpTestScreenAndWindowPlacementTab(); + + // Execute JS to request fullscreen on the current display (on the left). + RequestContentFullscreen(); + EXPECT_EQ(gfx::Rect(0, 0, 800, 800), browser()->window()->GetBounds()); + + // Explicitly check for, and destroy, the exclusive access bubble. + EXPECT_TRUE(IsExclusiveAccessBubbleDisplayed()); + base::RunLoop run_loop; + ExclusiveAccessBubbleHideCallback callback = base::BindLambdaForTesting( + [&run_loop](ExclusiveAccessBubbleHideReason) { run_loop.Quit(); }); + browser() + ->exclusive_access_manager() + ->context() + ->UpdateExclusiveAccessExitBubbleContent( + browser()->exclusive_access_manager()->GetExclusiveAccessBubbleURL(), + EXCLUSIVE_ACCESS_BUBBLE_TYPE_NONE, std::move(callback), + /*force_update=*/false); + run_loop.Run(); + EXPECT_FALSE(IsExclusiveAccessBubbleDisplayed()); + + // Execute JS to request fullscreen on the other display (on the right). + RequestContentFullscreenOnScreen(1); + EXPECT_EQ(gfx::Rect(800, 0, 800, 800), browser()->window()->GetBounds()); + + // Ensure the exclusive access bubble is re-shown on fullscreen display swap. + EXPECT_TRUE(IsExclusiveAccessBubbleDisplayed()); +} + // TODO(crbug.com/1134731): Disabled on Windows, where RenderWidgetHostViewAura // blindly casts display::Screen::GetScreen() to display::win::ScreenWin*. // TODO(crbug.com/1183791): Disabled on Mac due to flaky ObserverList crashes.
diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller_state_unittest.cc b/chrome/browser/ui/exclusive_access/fullscreen_controller_state_unittest.cc index a852ea587..b3ac587 100644 --- a/chrome/browser/ui/exclusive_access/fullscreen_controller_state_unittest.cc +++ b/chrome/browser/ui/exclusive_access/fullscreen_controller_state_unittest.cc
@@ -66,6 +66,7 @@ ExclusiveAccessBubbleType bubble_type, ExclusiveAccessBubbleHideCallback bubble_first_hide_callback, bool force_update) override; + bool IsExclusiveAccessBubbleDisplayed() const override; void OnExclusiveAccessUserInput() override; bool CanUserExitFullscreen() const override; @@ -187,6 +188,10 @@ ExclusiveAccessBubbleHideCallback bubble_first_hide_callback, bool force_update) {} +bool FullscreenControllerTestWindow::IsExclusiveAccessBubbleDisplayed() const { + return false; +} + void FullscreenControllerTestWindow::OnExclusiveAccessUserInput() {} bool FullscreenControllerTestWindow::CanUserExitFullscreen() const {
diff --git a/chrome/browser/ui/search/ntp_user_data_logger.cc b/chrome/browser/ui/search/ntp_user_data_logger.cc index 9f5bebf..5331b83 100644 --- a/chrome/browser/ui/search/ntp_user_data_logger.cc +++ b/chrome/browser/ui/search/ntp_user_data_logger.cc
@@ -463,11 +463,7 @@ bool is_google = DefaultSearchProviderIsGoogle(); // Split between NTP variants. - if (ntp_url_.SchemeIsHTTPOrHTTPS()) { - UMA_HISTOGRAM_LOAD_TIME("NewTabPage.LoadTime.Web", load_time); - // Only third-party NTPs can be loaded from the web. - UMA_HISTOGRAM_LOAD_TIME("NewTabPage.LoadTime.Web.Other", load_time); - } else if (ntp_url_ == GURL(chrome::kChromeUINewTabPageURL)) { + if (ntp_url_ == GURL(chrome::kChromeUINewTabPageURL)) { UMA_HISTOGRAM_LOAD_TIME("NewTabPage.LoadTime.WebUINTP", load_time); } else if (ntp_url_ == GURL(chrome::kChromeUINewTabPageThirdPartyURL)) { UMA_HISTOGRAM_LOAD_TIME("NewTabPage.LoadTime.WebUI3PNTP", load_time);
diff --git a/chrome/browser/ui/search/ntp_user_data_logger_unittest.cc b/chrome/browser/ui/search/ntp_user_data_logger_unittest.cc index 60b61aa..95f0f755 100644 --- a/chrome/browser/ui/search/ntp_user_data_logger_unittest.cc +++ b/chrome/browser/ui/search/ntp_user_data_logger_unittest.cc
@@ -500,36 +500,6 @@ delta_tiles_loaded, 1); } -TEST_F(NTPUserDataLoggerTest, ShouldRecordLoadTimeRemoteNTPOther) { - base::HistogramTester histogram_tester; - - TestNTPUserDataLogger logger(GURL("https://www.notgoogle.com/newtab")); - logger.is_google_ = false; - - base::TimeDelta delta_tiles_loaded = base::TimeDelta::FromMilliseconds(100); - - // This should trigger emitting histograms. - logger.LogMostVisitedLoaded(delta_tiles_loaded, /*using_most_visited=*/true, - /*is_visible=*/true); - - EXPECT_THAT(histogram_tester.GetAllSamples("NewTabPage.LoadTime"), SizeIs(1)); - EXPECT_THAT(histogram_tester.GetAllSamples("NewTabPage.LoadTime.LocalNTP"), - IsEmpty()); - EXPECT_THAT(histogram_tester.GetAllSamples("NewTabPage.LoadTime.Web"), - SizeIs(1)); - EXPECT_THAT(histogram_tester.GetAllSamples("NewTabPage.LoadTime.Web.Google"), - IsEmpty()); - EXPECT_THAT(histogram_tester.GetAllSamples("NewTabPage.LoadTime.Web.Other"), - SizeIs(1)); - - histogram_tester.ExpectTimeBucketCount("NewTabPage.LoadTime", - delta_tiles_loaded, 1); - histogram_tester.ExpectTimeBucketCount("NewTabPage.LoadTime.Web", - delta_tiles_loaded, 1); - histogram_tester.ExpectTimeBucketCount("NewTabPage.LoadTime.Web.Other", - delta_tiles_loaded, 1); -} - TEST_F(NTPUserDataLoggerTest, ShouldRecordImpressionsAge) { base::HistogramTester histogram_tester; @@ -597,21 +567,8 @@ logger.LogEvent(NTP_CUSTOMIZE_CHROME_BACKGROUNDS_CLICKED, delta_tiles_loaded); EXPECT_THAT(histogram_tester.GetAllSamples("NewTabPage.LoadTime"), SizeIs(1)); - EXPECT_THAT(histogram_tester.GetAllSamples("NewTabPage.LoadTime.LocalNTP"), + EXPECT_THAT(histogram_tester.GetAllSamples("NewTabPage.LoadTime.WebUINTP"), IsEmpty()); - EXPECT_THAT(histogram_tester.GetAllSamples("NewTabPage.LoadTime.Web"), - SizeIs(1)); - EXPECT_THAT(histogram_tester.GetAllSamples("NewTabPage.LoadTime.Web.Google"), - IsEmpty()); - EXPECT_THAT(histogram_tester.GetAllSamples("NewTabPage.LoadTime.Web.Other"), - SizeIs(1)); - - histogram_tester.ExpectTimeBucketCount("NewTabPage.LoadTime", - delta_tiles_loaded, 1); - histogram_tester.ExpectTimeBucketCount("NewTabPage.LoadTime.Web", - delta_tiles_loaded, 1); - histogram_tester.ExpectTimeBucketCount("NewTabPage.LoadTime.Web.Other", - delta_tiles_loaded, 1); EXPECT_THAT(histogram_tester.GetAllSamples("NewTabPage.CustomizeAction"), IsEmpty());
diff --git a/chrome/browser/ui/sharing_hub/sharing_hub_sub_menu_model.cc b/chrome/browser/ui/sharing_hub/sharing_hub_sub_menu_model.cc index 438a4aa..0c627c8 100644 --- a/chrome/browser/ui/sharing_hub/sharing_hub_sub_menu_model.cc +++ b/chrome/browser/ui/sharing_hub/sharing_hub_sub_menu_model.cc
@@ -19,6 +19,7 @@ #include "chrome/grit/generated_resources.h" #include "content/public/browser/web_contents.h" #include "ui/base/models/simple_menu_model.h" +#include "ui/color/color_id.h" namespace sharing_hub { @@ -79,9 +80,10 @@ AddSeparator(ui::NORMAL_SEPARATOR); for (auto action : third_party_actions) { if (action.third_party_icon.isNull()) { - AddItemWithIcon(action.command_id, action.title, - ui::ImageModel::FromVectorIcon(*action.icon, /*color*/ -1, - /*icon_size*/ 16)); + AddItemWithIcon( + action.command_id, action.title, + ui::ImageModel::FromVectorIcon(*action.icon, ui::kColorMenuIcon, + /*icon_size*/ 16)); } else { AddItemWithIcon(action.command_id, action.title, ui::ImageModel::FromImageSkia(action.third_party_icon));
diff --git a/chrome/browser/ui/toolbar/app_menu_model.cc b/chrome/browser/ui/toolbar/app_menu_model.cc index f9b53d6c..a6b1af80 100644 --- a/chrome/browser/ui/toolbar/app_menu_model.cc +++ b/chrome/browser/ui/toolbar/app_menu_model.cc
@@ -84,12 +84,12 @@ #include "ui/base/models/image_model.h" #include "ui/base/models/simple_menu_model.h" #include "ui/base/resource/resource_bundle.h" +#include "ui/color/color_id.h" #include "ui/gfx/color_palette.h" #include "ui/gfx/image/image.h" #include "ui/gfx/image/image_skia.h" #include "ui/gfx/paint_vector_icon.h" #include "ui/gfx/text_elider.h" -#include "ui/native_theme/native_theme.h" #if BUILDFLAG(GOOGLE_CHROME_BRANDING) || BUILDFLAG(IS_CHROMEOS_ASH) #include "base/feature_list.h" @@ -947,10 +947,9 @@ AddHighlightedItemWithIcon( IDC_SHOW_MANAGEMENT_PAGE, chrome::GetManagedUiMenuItemLabel(browser_->profile()), - ui::ImageModel::FromVectorIcon( - vector_icons::kBusinessIcon, - ui::NativeTheme::kColorId_HighlightedMenuItemForegroundColor, - kIconSize)); + ui::ImageModel::FromVectorIcon(vector_icons::kBusinessIcon, + ui::kColorMenuItemForegroundHighlighted, + kIconSize)); } #endif // !BUILDFLAG(IS_CHROMEOS_ASH)
diff --git a/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc b/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc index 06e5983a..0e9d3f0 100644 --- a/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc +++ b/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc
@@ -49,10 +49,10 @@ #include "ui/base/l10n/l10n_util.h" #include "ui/base/models/image_model.h" #include "ui/base/resource/resource_bundle.h" +#include "ui/color/color_id.h" #include "ui/gfx/color_palette.h" #include "ui/gfx/favicon_size.h" #include "ui/gfx/paint_vector_icon.h" -#include "ui/native_theme/native_theme.h" #include "ui/resources/grit/ui_resources.h" namespace { @@ -69,8 +69,8 @@ } ui::ImageModel CreateFavicon(const gfx::VectorIcon& icon) { - return ui::ImageModel::FromVectorIcon( - icon, ui::NativeTheme::kColorId_MenuIconColor, gfx::kFaviconSize); + return ui::ImageModel::FromVectorIcon(icon, ui::kColorMenuIcon, + gfx::kFaviconSize); } } // namespace
diff --git a/chrome/browser/ui/views/apps/chrome_native_app_window_views_aura_ash.cc b/chrome/browser/ui/views/apps/chrome_native_app_window_views_aura_ash.cc index d91381f..26268565 100644 --- a/chrome/browser/ui/views/apps/chrome_native_app_window_views_aura_ash.cc +++ b/chrome/browser/ui/views/apps/chrome_native_app_window_views_aura_ash.cc
@@ -409,6 +409,11 @@ this, url, bubble_type, std::move(bubble_first_hide_callback)); } +bool ChromeNativeAppWindowViewsAuraAsh::IsExclusiveAccessBubbleDisplayed() + const { + return exclusive_access_bubble_ && exclusive_access_bubble_->IsShowing(); +} + void ChromeNativeAppWindowViewsAuraAsh::OnExclusiveAccessUserInput() { if (exclusive_access_bubble_) exclusive_access_bubble_->OnUserInput();
diff --git a/chrome/browser/ui/views/apps/chrome_native_app_window_views_aura_ash.h b/chrome/browser/ui/views/apps/chrome_native_app_window_views_aura_ash.h index 885946f..5b89ccf 100644 --- a/chrome/browser/ui/views/apps/chrome_native_app_window_views_aura_ash.h +++ b/chrome/browser/ui/views/apps/chrome_native_app_window_views_aura_ash.h
@@ -115,6 +115,7 @@ ExclusiveAccessBubbleType bubble_type, ExclusiveAccessBubbleHideCallback bubble_first_hide_callback, bool force_update) override; + bool IsExclusiveAccessBubbleDisplayed() const override; void OnExclusiveAccessUserInput() override; content::WebContents* GetActiveWebContents() override; bool CanUserExitFullscreen() const override;
diff --git a/chrome/browser/ui/views/autofill/autofill_popup_view_native_views.cc b/chrome/browser/ui/views/autofill/autofill_popup_view_native_views.cc index e3c9b0a..12179ff 100644 --- a/chrome/browser/ui/views/autofill/autofill_popup_view_native_views.cc +++ b/chrome/browser/ui/views/autofill/autofill_popup_view_native_views.cc
@@ -36,13 +36,13 @@ #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/base/models/image_model.h" #include "ui/base/resource/resource_bundle.h" +#include "ui/color/color_id.h" #include "ui/gfx/color_palette.h" #include "ui/gfx/favicon_size.h" #include "ui/gfx/font.h" #include "ui/gfx/geometry/rect_conversions.h" #include "ui/gfx/paint_vector_icon.h" #include "ui/gfx/shadow_value.h" -#include "ui/native_theme/native_theme.h" #include "ui/views/accessibility/view_accessibility.h" #include "ui/views/background.h" #include "ui/views/border.h" @@ -133,8 +133,7 @@ std::unique_ptr<views::ImageView> ImageViewFromVectorIcon( const gfx::VectorIcon& vector_icon) { return std::make_unique<views::ImageView>(ui::ImageModel::FromVectorIcon( - vector_icon, ui::NativeTheme::kColorId_DefaultIconColor, - gfx::kFaviconSize)); + vector_icon, ui::kColorIcon, gfx::kFaviconSize)); } std::unique_ptr<views::ImageView> GetIconImageViewByName(
diff --git a/chrome/browser/ui/views/autofill/payments/autofill_error_dialog_view_native_views.cc b/chrome/browser/ui/views/autofill/payments/autofill_error_dialog_view_native_views.cc index b662e291..f876f34 100644 --- a/chrome/browser/ui/views/autofill/payments/autofill_error_dialog_view_native_views.cc +++ b/chrome/browser/ui/views/autofill/payments/autofill_error_dialog_view_native_views.cc
@@ -11,6 +11,7 @@ #include "components/constrained_window/constrained_window_views.h" #include "components/vector_icons/vector_icons.h" #include "ui/base/models/image_model.h" +#include "ui/color/color_id.h" #include "ui/gfx/vector_icon_utils.h" #include "ui/views/bubble/bubble_frame_view.h" #include "ui/views/controls/image_view.h" @@ -69,7 +70,7 @@ AddChildView( std::make_unique<views::ImageView>(ui::ImageModel::FromVectorIcon( - vector_icons::kErrorIcon, ui::NativeTheme::kColorId_AlertSeverityHigh, + vector_icons::kErrorIcon, ui::kColorAlertHighSeverity, gfx::GetDefaultSizeOfVectorIcon(vector_icons::kErrorIcon)))); auto* label = AddChildView(std::make_unique<views::Label>(
diff --git a/chrome/browser/ui/views/autofill/payments/card_unmask_prompt_views.cc b/chrome/browser/ui/views/autofill/payments/card_unmask_prompt_views.cc index 405e0887..0881de9 100644 --- a/chrome/browser/ui/views/autofill/payments/card_unmask_prompt_views.cc +++ b/chrome/browser/ui/views/autofill/payments/card_unmask_prompt_views.cc
@@ -154,8 +154,7 @@ // error we do not intend to return to a previous state. auto error_icon = std::make_unique<views::ImageView>(ui::ImageModel::FromVectorIcon( - kBrowserToolsErrorIcon, - ui::NativeTheme::kColorId_AlertSeverityHigh)); + kBrowserToolsErrorIcon, ui::kColorAlertHighSeverity)); layout->StartRow(1.0, 0); layout->AddView(std::move(error_icon)); @@ -390,7 +389,7 @@ temporary_error->SetVisible(false); temporary_error->AddChildView( std::make_unique<views::ImageView>(ui::ImageModel::FromVectorIcon( - vector_icons::kErrorIcon, ui::NativeTheme::kColorId_AlertSeverityHigh, + vector_icons::kErrorIcon, ui::kColorAlertHighSeverity, gfx::GetDefaultSizeOfVectorIcon(vector_icons::kErrorIcon)))); auto error_label = std::make_unique<views::Label>(
diff --git a/chrome/browser/ui/views/autofill/payments/local_card_migration_dialog_view.cc b/chrome/browser/ui/views/autofill/payments/local_card_migration_dialog_view.cc index b08d2d508..aec5e5d 100644 --- a/chrome/browser/ui/views/autofill/payments/local_card_migration_dialog_view.cc +++ b/chrome/browser/ui/views/autofill/payments/local_card_migration_dialog_view.cc
@@ -36,6 +36,7 @@ #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/base/models/image_model.h" #include "ui/base/resource/resource_bundle.h" +#include "ui/color/color_id.h" #include "ui/gfx/color_palette.h" #include "ui/gfx/geometry/insets.h" #include "ui/gfx/paint_vector_icon.h" @@ -102,8 +103,8 @@ constexpr int kTipImageSize = 16; auto* lightbulb_outline_image = AddChildView( std::make_unique<views::ImageView>(ui::ImageModel::FromVectorIcon( - vector_icons::kLightbulbOutlineIcon, - ui::NativeTheme::kColorId_AlertSeverityMedium, kTipImageSize))); + vector_icons::kLightbulbOutlineIcon, ui::kColorAlertMediumSeverity, + kTipImageSize))); lightbulb_outline_image->SetVerticalAlignment( views::ImageView::Alignment::kLeading);
diff --git a/chrome/browser/ui/views/autofill/payments/migratable_card_view.cc b/chrome/browser/ui/views/autofill/payments/migratable_card_view.cc index ff600edf..32bc6ecd 100644 --- a/chrome/browser/ui/views/autofill/payments/migratable_card_view.cc +++ b/chrome/browser/ui/views/autofill/payments/migratable_card_view.cc
@@ -17,6 +17,7 @@ #include "ui/base/l10n/l10n_util.h" #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/base/resource/resource_bundle.h" +#include "ui/color/color_id.h" #include "ui/gfx/paint_vector_icon.h" #include "ui/native_theme/native_theme.h" #include "ui/views/animation/ink_drop.h" @@ -133,8 +134,7 @@ migratable_card_description_view->AddChildView( std::make_unique<views::ImageView>()); migration_succeeded_image->SetImage(ui::ImageModel::FromVectorIcon( - vector_icons::kCheckCircleIcon, - ui::NativeTheme::kColorId_AlertSeverityLow, + vector_icons::kCheckCircleIcon, ui::kColorAlertLowSeverity, kMigrationResultImageSize)); break; } @@ -143,7 +143,7 @@ migratable_card_description_view->AddChildView( std::make_unique<views::ImageView>()); migration_failed_image->SetImage(ui::ImageModel::FromVectorIcon( - vector_icons::kErrorIcon, ui::NativeTheme::kColorId_AlertSeverityHigh, + vector_icons::kErrorIcon, ui::kColorAlertHighSeverity, kMigrationResultImageSize)); break; }
diff --git a/chrome/browser/ui/views/autofill/save_address_profile_view.cc b/chrome/browser/ui/views/autofill/save_address_profile_view.cc index 1546720..5452bbe 100644 --- a/chrome/browser/ui/views/autofill/save_address_profile_view.cc +++ b/chrome/browser/ui/views/autofill/save_address_profile_view.cc
@@ -21,6 +21,7 @@ #include "components/vector_icons/vector_icons.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/models/simple_combobox_model.h" +#include "ui/color/color_id.h" #include "ui/gfx/color_utils.h" #include "ui/views/controls/button/image_button.h" #include "ui/views/controls/button/image_button_factory.h" @@ -55,8 +56,8 @@ std::unique_ptr<views::ImageView> CreateAddressSectionIcon( const gfx::VectorIcon& icon) { auto icon_view = std::make_unique<views::ImageView>(); - icon_view->SetImage(ui::ImageModel::FromVectorIcon( - icon, ui::NativeTheme::kColorId_SecondaryIconColor, kIconSize)); + icon_view->SetImage( + ui::ImageModel::FromVectorIcon(icon, ui::kColorIconSecondary, kIconSize)); return icon_view; } @@ -171,8 +172,7 @@ /*text=*/u"Home", /*dropdown_secondary_text=*/std::u16string(), /*icon=*/ - ui::ImageModel::FromVectorIcon(kNavigateHomeIcon, - ui::NativeTheme::kColorId_DefaultIconColor, + ui::ImageModel::FromVectorIcon(kNavigateHomeIcon, ui::kColorIcon, ComboboxIconSize())); ui::SimpleComboboxModel::Item work( @@ -180,8 +180,7 @@ /*dropdown_secondary_text=*/std::u16string(), /*icon=*/ ui::ImageModel::FromVectorIcon(vector_icons::kBusinessIcon, - ui::NativeTheme::kColorId_DefaultIconColor, - ComboboxIconSize())); + ui::kColorIcon, ComboboxIconSize())); std::vector<ui::SimpleComboboxModel::Item> nicknames{std::move(home), std::move(work)};
diff --git a/chrome/browser/ui/views/autofill/update_address_profile_view.cc b/chrome/browser/ui/views/autofill/update_address_profile_view.cc index 68efada..c8fdc6fb 100644 --- a/chrome/browser/ui/views/autofill/update_address_profile_view.cc +++ b/chrome/browser/ui/views/autofill/update_address_profile_view.cc
@@ -16,6 +16,7 @@ #include "components/strings/grit/components_strings.h" #include "components/vector_icons/vector_icons.h" #include "ui/base/l10n/l10n_util.h" +#include "ui/color/color_id.h" #include "ui/gfx/paint_vector_icon.h" #include "ui/views/controls/button/image_button.h" #include "ui/views/controls/button/image_button_factory.h" @@ -53,7 +54,7 @@ std::unique_ptr<views::View> CreateValuesView( const std::vector<ProfileValueDifference>& diff, bool are_new_values, - ui::NativeTheme::ColorId icon_color) { + ui::ColorId icon_color) { auto view = std::make_unique<views::View>(); view->SetLayoutManager(std::make_unique<views::FlexLayout>()) ->SetOrientation(views::LayoutOrientation::kVertical) @@ -123,9 +124,8 @@ /*h_align=*/views::GridLayout::LEADING, /*v_align=*/views::GridLayout::LEADING); } - ui::NativeTheme::ColorId icon_color = - are_new_values ? ui::NativeTheme::kColorId_ProminentButtonColor - : ui::NativeTheme::kColorId_SecondaryIconColor; + ui::ColorId icon_color = are_new_values ? ui::kColorButtonBackgroundProminent + : ui::kColorIconSecondary; layout->AddView(CreateValuesView(diff, are_new_values, icon_color), /*col_span=*/1, /*row_span=*/1,
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc index 719ed42..5fd7574 100644 --- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc +++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
@@ -1442,7 +1442,7 @@ button_drag_utils::SetDragImage( node->url(), node->GetTitle(), - views::GetImageSkiaFromImageModel(icon, GetNativeTheme()), &press_pt, + views::GetImageSkiaFromImageModel(icon, GetColorProvider()), &press_pt, *widget, data); WriteBookmarkDragData(node, data); }
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_drag_drop_views.cc b/chrome/browser/ui/views/bookmarks/bookmark_drag_drop_views.cc index 336ad17..716df4b5 100644 --- a/chrome/browser/ui/views/bookmarks/bookmark_drag_drop_views.cc +++ b/chrome/browser/ui/views/bookmarks/bookmark_drag_drop_views.cc
@@ -223,17 +223,18 @@ const ui::ImageModel& icon) { auto* widget = views::Widget::GetWidgetForNativeView(web_contents_->GetNativeView()); - ui::NativeTheme* native_theme = widget ? widget->GetNativeTheme() : nullptr; + ui::ColorProvider* color_provider = + widget ? widget->GetColorProvider() : nullptr; gfx::ImageSkia drag_image( std::make_unique<BookmarkDragImageSource>( drag_node->GetTitle(), - // It's not clear if the "generator without native theme" case can + // It's not clear if the "generator without color provider" case can // occur, but if it can, better to wrongly show the default favicon // than to crash. - (icon.IsEmpty() || (icon.IsImageGenerator() && !native_theme)) + (icon.IsEmpty() || (icon.IsImageGenerator() && !color_provider)) ? *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( IDR_DEFAULT_FAVICON) - : views::GetImageSkiaFromImageModel(icon, native_theme), + : views::GetImageSkiaFromImageModel(icon, color_provider), count_), BookmarkDragImageSource::kBookmarkDragImageSize);
diff --git a/chrome/browser/ui/views/bubble/bubble_contents_wrapper.cc b/chrome/browser/ui/views/bubble/bubble_contents_wrapper.cc index 188be26..ea3078bc 100644 --- a/chrome/browser/ui/views/bubble/bubble_contents_wrapper.cc +++ b/chrome/browser/ui/views/bubble/bubble_contents_wrapper.cc
@@ -38,8 +38,10 @@ content::BrowserContext* browser_context, int task_manager_string_id, bool enable_extension_apis, - bool webui_resizes_host) + bool webui_resizes_host, + bool esc_closes_ui) : webui_resizes_host_(webui_resizes_host), + esc_closes_ui_(esc_closes_ui), web_contents_(content::WebContents::Create( GetWebContentsCreateParams(browser_context))) { web_contents_->SetDelegate(this); @@ -73,7 +75,7 @@ DCHECK_EQ(web_contents(), source); // Close the bubble if an escape event is detected. Handle this here to // prevent the renderer from capturing the event and not propagating it up. - if (host_ && IsEscapeEvent(event)) { + if (host_ && IsEscapeEvent(event) && esc_closes_ui_) { host_->CloseUI(); return content::KeyboardEventProcessingResult::HANDLED; }
diff --git a/chrome/browser/ui/views/bubble/bubble_contents_wrapper.h b/chrome/browser/ui/views/bubble/bubble_contents_wrapper.h index b4da05af..fe7d157c 100644 --- a/chrome/browser/ui/views/bubble/bubble_contents_wrapper.h +++ b/chrome/browser/ui/views/bubble/bubble_contents_wrapper.h
@@ -49,7 +49,8 @@ BubbleContentsWrapper(content::BrowserContext* browser_context, int task_manager_string_id, bool enable_extension_apis, - bool webui_resizes_host); + bool webui_resizes_host, + bool esc_closes_ui); ~BubbleContentsWrapper() override; // content::WebContentsDelegate: @@ -91,6 +92,8 @@ // If true will allow the wrapped WebContents to automatically resize its // RenderWidgetHostView and send back updates to `Host` for the new size. const bool webui_resizes_host_; + // If true will cause the ESC key to close the UI during pre-handling. + const bool esc_closes_ui_; base::WeakPtr<BubbleContentsWrapper::Host> host_; std::unique_ptr<content::WebContents> web_contents_; }; @@ -106,11 +109,13 @@ content::BrowserContext* browser_context, int task_manager_string_id, bool enable_extension_apis = false, - bool webui_resizes_host = true) + bool webui_resizes_host = true, + bool esc_closes_ui = true) : BubbleContentsWrapper(browser_context, task_manager_string_id, enable_extension_apis, - webui_resizes_host), + webui_resizes_host, + esc_closes_ui), webui_url_(webui_url) {} void ReloadWebContents() override {
diff --git a/chrome/browser/ui/views/bubble/bubble_contents_wrapper_unittest.cc b/chrome/browser/ui/views/bubble/bubble_contents_wrapper_unittest.cc index fa6dc99..2467e41 100644 --- a/chrome/browser/ui/views/bubble/bubble_contents_wrapper_unittest.cc +++ b/chrome/browser/ui/views/bubble/bubble_contents_wrapper_unittest.cc
@@ -62,7 +62,7 @@ class TestBubbleContentsWrapper : public BubbleContentsWrapper { public: explicit TestBubbleContentsWrapper(Profile* profile) - : BubbleContentsWrapper(profile, 0, false, true) {} + : BubbleContentsWrapper(profile, 0, false, true, true) {} ~TestBubbleContentsWrapper() override = default; // BubbleContentsWrapper:
diff --git a/chrome/browser/ui/views/bubble/webui_bubble_dialog_view_unittest.cc b/chrome/browser/ui/views/bubble/webui_bubble_dialog_view_unittest.cc index 6f7805f..203961a6 100644 --- a/chrome/browser/ui/views/bubble/webui_bubble_dialog_view_unittest.cc +++ b/chrome/browser/ui/views/bubble/webui_bubble_dialog_view_unittest.cc
@@ -18,7 +18,7 @@ class TestBubbleContentsWrapper : public BubbleContentsWrapper { public: explicit TestBubbleContentsWrapper(Profile* profile) - : BubbleContentsWrapper(profile, 0, false, true) {} + : BubbleContentsWrapper(profile, 0, false, true, true) {} void ReloadWebContents() override {} }; } // namespace
diff --git a/chrome/browser/ui/views/bubble/webui_bubble_manager_browsertest.cc b/chrome/browser/ui/views/bubble/webui_bubble_manager_browsertest.cc index 1aa7be2..be075e33 100644 --- a/chrome/browser/ui/views/bubble/webui_bubble_manager_browsertest.cc +++ b/chrome/browser/ui/views/bubble/webui_bubble_manager_browsertest.cc
@@ -25,11 +25,13 @@ content::BrowserContext* browser_context, int task_manager_string_id, bool enable_extension_apis = false, - bool webui_resizes_host = true) + bool webui_resizes_host = true, + bool esc_closes_ui = true) : BubbleContentsWrapper(browser_context, task_manager_string_id, enable_extension_apis, - webui_resizes_host) {} + webui_resizes_host, + esc_closes_ui) {} void ReloadWebContents() override {} };
diff --git a/chrome/browser/ui/views/bubble/webui_bubble_manager_unittest.cc b/chrome/browser/ui/views/bubble/webui_bubble_manager_unittest.cc index 5389625..856d5df9 100644 --- a/chrome/browser/ui/views/bubble/webui_bubble_manager_unittest.cc +++ b/chrome/browser/ui/views/bubble/webui_bubble_manager_unittest.cc
@@ -34,11 +34,13 @@ content::BrowserContext* browser_context, int task_manager_string_id, bool enable_extension_apis = false, - bool webui_resizes_host = true) + bool webui_resizes_host = true, + bool esc_closes_ui = true) : BubbleContentsWrapper(browser_context, task_manager_string_id, enable_extension_apis, - webui_resizes_host) {} + webui_resizes_host, + esc_closes_ui) {} void ReloadWebContents() override {} };
diff --git a/chrome/browser/ui/views/content_setting_bubble_contents.cc b/chrome/browser/ui/views/content_setting_bubble_contents.cc index 648500d..d4ce399 100644 --- a/chrome/browser/ui/views/content_setting_bubble_contents.cc +++ b/chrome/browser/ui/views/content_setting_bubble_contents.cc
@@ -30,6 +30,7 @@ #include "ui/base/models/combobox_model.h" #include "ui/base/models/image_model.h" #include "ui/base/resource/resource_bundle.h" +#include "ui/color/color_id.h" #include "ui/gfx/color_utils.h" #include "ui/gfx/geometry/insets.h" #include "ui/gfx/geometry/size.h" @@ -246,7 +247,7 @@ item_icon->SetBorder( views::CreateEmptyBorder(kTitleDescriptionListItemInset)); item_icon->SetImage(ui::ImageModel::FromVectorIcon( - *item.image, ui::NativeTheme::kColorId_LabelEnabledColor, + *item.image, ui::kColorLabelForeground, GetLayoutConstant(LOCATION_BAR_ICON_SIZE), item.has_blocked_badge ? &vector_icons::kBlockedBadgeIcon : &gfx::kNoneIcon));
diff --git a/chrome/browser/ui/views/desktop_capture/desktop_media_list_controller.cc b/chrome/browser/ui/views/desktop_capture/desktop_media_list_controller.cc index 1af567d..6b32487 100644 --- a/chrome/browser/ui/views/desktop_capture/desktop_media_list_controller.cc +++ b/chrome/browser/ui/views/desktop_capture/desktop_media_list_controller.cc
@@ -112,6 +112,11 @@ media_list_->SetThumbnailSize(size); } +void DesktopMediaListController::SetPreviewedSource( + const absl::optional<content::DesktopMediaID>& id) { + media_list_->SetPreviewedSource(id); +} + void DesktopMediaListController::OnSourceAdded(DesktopMediaList* list, int index) { if (view_) { @@ -166,6 +171,13 @@ } } +void DesktopMediaListController::OnSourcePreviewChanged(DesktopMediaList* list, + size_t index) { + if (view_) { + view_->GetSourceListListener()->OnSourcePreviewChanged(index); + } +} + void DesktopMediaListController::OnViewIsDeleting(views::View* view) { view_observations_.RemoveObservation(view); view_ = nullptr;
diff --git a/chrome/browser/ui/views/desktop_capture/desktop_media_list_controller.h b/chrome/browser/ui/views/desktop_capture/desktop_media_list_controller.h index 3f03ab4..ef186ffe 100644 --- a/chrome/browser/ui/views/desktop_capture/desktop_media_list_controller.h +++ b/chrome/browser/ui/views/desktop_capture/desktop_media_list_controller.h
@@ -36,6 +36,7 @@ virtual void OnSourceMoved(size_t old_index, size_t new_index) = 0; virtual void OnSourceNameChanged(size_t index) = 0; virtual void OnSourceThumbnailChanged(size_t index) = 0; + virtual void OnSourcePreviewChanged(size_t index) = 0; }; // The abstract interface implemented by any view controlled by this @@ -96,6 +97,7 @@ size_t GetSourceCount() const; const DesktopMediaList::Source& GetSource(size_t index) const; void SetThumbnailSize(const gfx::Size& size); + void SetPreviewedSource(const absl::optional<content::DesktopMediaID>& id); private: friend class DesktopMediaPickerViewsTestApi; @@ -118,6 +120,7 @@ int new_index) override; void OnSourceNameChanged(DesktopMediaList* list, int index) override; void OnSourceThumbnailChanged(DesktopMediaList* list, int index) override; + void OnSourcePreviewChanged(DesktopMediaList* list, size_t index) override; // ViewObserver: void OnViewIsDeleting(views::View* view) override;
diff --git a/chrome/browser/ui/views/desktop_capture/desktop_media_list_view.cc b/chrome/browser/ui/views/desktop_capture/desktop_media_list_view.cc index d4b8c5d..f394348 100644 --- a/chrome/browser/ui/views/desktop_capture/desktop_media_list_view.cc +++ b/chrome/browser/ui/views/desktop_capture/desktop_media_list_view.cc
@@ -229,6 +229,8 @@ source_view->SetThumbnail(source.thumbnail); } +void DesktopMediaListView::OnSourcePreviewChanged(size_t index) {} + void DesktopMediaListView::SetStyle(DesktopMediaSourceViewStyle* style) { active_style_ = style; controller_->SetThumbnailSize(style->image_rect.size());
diff --git a/chrome/browser/ui/views/desktop_capture/desktop_media_list_view.h b/chrome/browser/ui/views/desktop_capture/desktop_media_list_view.h index d0951d1d..07b1bb1 100644 --- a/chrome/browser/ui/views/desktop_capture/desktop_media_list_view.h +++ b/chrome/browser/ui/views/desktop_capture/desktop_media_list_view.h
@@ -51,6 +51,7 @@ void OnSourceMoved(size_t old_index, size_t new_index) override; void OnSourceNameChanged(size_t index) override; void OnSourceThumbnailChanged(size_t index) override; + void OnSourcePreviewChanged(size_t index) override; private: // Change the source style of this list on the fly.
diff --git a/chrome/browser/ui/views/desktop_capture/desktop_media_picker_views_test_api.cc b/chrome/browser/ui/views/desktop_capture/desktop_media_picker_views_test_api.cc index d5481285..3c7cd1f8 100644 --- a/chrome/browser/ui/views/desktop_capture/desktop_media_picker_views_test_api.cc +++ b/chrome/browser/ui/views/desktop_capture/desktop_media_picker_views_test_api.cc
@@ -147,13 +147,13 @@ const views::TableView* DesktopMediaPickerViewsTestApi::GetTableView() const { views::View* list = picker_->dialog_->GetSelectedController()->view_; return IsDesktopMediaTabList(list) - ? static_cast<DesktopMediaTabList*>(list)->child_ + ? static_cast<DesktopMediaTabList*>(list)->list_ : nullptr; } views::TableView* DesktopMediaPickerViewsTestApi::GetTableView() { views::View* list = picker_->dialog_->GetSelectedController()->view_; return IsDesktopMediaTabList(list) - ? static_cast<DesktopMediaTabList*>(list)->child_ + ? static_cast<DesktopMediaTabList*>(list)->list_ : nullptr; }
diff --git a/chrome/browser/ui/views/desktop_capture/desktop_media_tab_list.cc b/chrome/browser/ui/views/desktop_capture/desktop_media_tab_list.cc index a48c74f..9f8b2075 100644 --- a/chrome/browser/ui/views/desktop_capture/desktop_media_tab_list.cc +++ b/chrome/browser/ui/views/desktop_capture/desktop_media_tab_list.cc
@@ -5,24 +5,53 @@ #include "chrome/browser/ui/views/desktop_capture/desktop_media_tab_list.h" #include "base/numerics/safe_conversions.h" +#include "chrome/browser/media/webrtc/desktop_media_list_layout_config.h" +#include "chrome/grit/generated_resources.h" +#include "content/public/browser/browser_task_traits.h" +#include "content/public/browser/browser_thread.h" +#include "content/public/browser/render_frame_host.h" +#include "content/public/browser/render_widget_host_view.h" +#include "content/public/browser/web_contents.h" +#include "ui/base/l10n/l10n_util.h" #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/gfx/favicon_size.h" #include "ui/views/accessibility/view_accessibility.h" +#include "ui/views/background.h" #include "ui/views/border.h" #include "ui/views/controls/scroll_view.h" #include "ui/views/controls/table/table_view.h" #include "ui/views/controls/table/table_view_observer.h" +#include "ui/views/layout/box_layout.h" #include "ui/views/layout/fill_layout.h" +#include "ui/views/layout/grid_layout.h" #include "ui/views/view.h" +using content::BrowserThread; + namespace { +// Max stored length for the title of a previewed tab. The actual displayed +// length is likely shorter than this, as the Label will elide it to fit the UI. +constexpr const int kMaxPreviewTitleLength = 500; + +// TODO(crbug.com/1224342): Refer to central Desktop UI constants rather than +// hardcoding this. +const int kListWidth = 346; + +// Delay after the selection is changed before clearing the preview, to allow a +// direct switch from the old preview to the new one without flashing grey in +// between. +const base::TimeDelta kClearPreviewDelay = + base::TimeDelta::FromMilliseconds(200); + // ui::TableModel that wraps a DesktopMediaListController and listens for // updates from it. class TabListModel : public ui::TableModel, public DesktopMediaListController::SourceListListener { public: - explicit TabListModel(DesktopMediaListController* controller); + explicit TabListModel( + DesktopMediaListController* controller, + base::RepeatingCallback<void(size_t)> preview_updated_callback); // ui::TableModel: int RowCount() override; @@ -36,6 +65,7 @@ void OnSourceMoved(size_t old_index, size_t new_index) override; void OnSourceNameChanged(size_t index) override; void OnSourceThumbnailChanged(size_t index) override; + void OnSourcePreviewChanged(size_t index) override; private: TabListModel(const TabListModel&) = delete; @@ -43,52 +73,76 @@ DesktopMediaListController* controller_; ui::TableModelObserver* observer_ = nullptr; + base::RepeatingCallback<void(size_t)> preview_updated_callback_; }; -TabListModel::TabListModel(DesktopMediaListController* controller) - : controller_(controller) {} +TabListModel::TabListModel( + DesktopMediaListController* controller, + base::RepeatingCallback<void(size_t)> preview_updated_callback) + : controller_(controller), + preview_updated_callback_(preview_updated_callback) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); +} int TabListModel::RowCount() { + DCHECK_CURRENTLY_ON(BrowserThread::UI); return base::checked_cast<int>(controller_->GetSourceCount()); } std::u16string TabListModel::GetText(int row, int column) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); return controller_->GetSource(row).name; } ui::ImageModel TabListModel::GetIcon(int row) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); return ui::ImageModel::FromImageSkia(controller_->GetSource(row).thumbnail); } void TabListModel::SetObserver(ui::TableModelObserver* observer) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); observer_ = observer; } void TabListModel::OnSourceAdded(size_t index) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); observer_->OnItemsAdded(index, 1); } void TabListModel::OnSourceRemoved(size_t index) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); observer_->OnItemsRemoved(index, 1); } void TabListModel::OnSourceMoved(size_t old_index, size_t new_index) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); observer_->OnItemsMoved(old_index, 1, new_index); } void TabListModel::OnSourceNameChanged(size_t index) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); observer_->OnItemsChanged(index, 1); + // Also invoke the preview updated callback, to ensure the preview's use of + // the source's name is updated. + preview_updated_callback_.Run(index); } void TabListModel::OnSourceThumbnailChanged(size_t index) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); observer_->OnItemsChanged(index, 1); } +void TabListModel::OnSourcePreviewChanged(size_t index) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + preview_updated_callback_.Run(index); +} + // TableViewObserver implementation that bridges between the actual TableView // listing tabs and the DesktopMediaTabList. class TabListViewObserver : public views::TableViewObserver { public: - explicit TabListViewObserver(DesktopMediaListController* controller); + TabListViewObserver(DesktopMediaListController* controller, + base::RepeatingClosure selection_changed_callback); void OnSelectionChanged() override; void OnKeyDown(ui::KeyboardCode virtual_keycode) override; @@ -97,17 +151,26 @@ TabListViewObserver(const TabListViewObserver&) = delete; TabListViewObserver operator=(const TabListViewObserver&) = delete; - DesktopMediaListController* controller_; + DesktopMediaListController* const controller_; + base::RepeatingClosure selection_changed_callback_; }; -TabListViewObserver::TabListViewObserver(DesktopMediaListController* controller) - : controller_(controller) {} +TabListViewObserver::TabListViewObserver( + DesktopMediaListController* controller, + base::RepeatingClosure selection_changed_callback) + : controller_(controller), + selection_changed_callback_(std::move(selection_changed_callback)) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); +} void TabListViewObserver::OnSelectionChanged() { + DCHECK_CURRENTLY_ON(BrowserThread::UI); controller_->OnSourceSelectionChanged(); + selection_changed_callback_.Run(); } void TabListViewObserver::OnKeyDown(ui::KeyboardCode virtual_keycode) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); if (virtual_keycode == ui::VKEY_RETURN) controller_->AcceptSource(); } @@ -117,6 +180,7 @@ DesktopMediaTabList::DesktopMediaTabList(DesktopMediaListController* controller, const std::u16string& accessible_name) : controller_(controller) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); // The thumbnail size isn't allowed to be smaller than gfx::kFaviconSize by // the underlying media list. TableView requires that the icon size be exactly // ui::TableModel::kIconSize; if it's not, rendering of the TableView breaks. @@ -129,30 +193,93 @@ SetLayoutManager(std::make_unique<views::FillLayout>()); - model_ = std::make_unique<TabListModel>(controller_); - view_observer_ = std::make_unique<TabListViewObserver>(controller_); + model_ = std::make_unique<TabListModel>( + controller_, base::BindRepeating(&DesktopMediaTabList::OnPreviewUpdated, + weak_factory_.GetWeakPtr())); + auto selection_changed_callback = base::BindRepeating( + &DesktopMediaTabList::OnSelectionChanged, weak_factory_.GetWeakPtr()); + view_observer_ = std::make_unique<TabListViewObserver>( + controller_, selection_changed_callback); - auto child = std::make_unique<views::TableView>( + auto list = std::make_unique<views::TableView>( model_.get(), std::vector<ui::TableColumn>(1), views::ICON_AND_TEXT, true); - child->set_observer(view_observer_.get()); - child->GetViewAccessibility().OverrideName(accessible_name); - child->SetBorder(views::CreateSolidBorder(1, SK_ColorBLACK)); - child_ = child.get(); + list->set_observer(view_observer_.get()); + list->GetViewAccessibility().OverrideName(accessible_name); + list->SetBorder(views::CreateSolidBorder(1, SK_ColorBLACK)); + list_ = list.get(); - AddChildView(views::TableView::CreateScrollViewWithTable(std::move(child))); + AddChildView(BuildUI(std::move(list))); +} + +std::unique_ptr<views::View> DesktopMediaTabList::BuildUI( + std::unique_ptr<views::TableView> list) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + auto preview_wrapper = std::make_unique<views::View>(); + preview_wrapper->SetPreferredSize(desktopcapture::kPreviewSize); + preview_wrapper->SetBackground( + views::CreateSolidBackground(gfx::kGoogleGrey300)); + + auto preview = std::make_unique<views::ImageView>(); + preview->SetVisible(false); + preview->SetSize(desktopcapture::kPreviewSize); + preview_ = preview_wrapper->AddChildView(std::move(preview)); + + auto empty_preview_label = std::make_unique<views::Label>(); + empty_preview_label->SetText( + l10n_util::GetStringUTF16(IDS_DESKTOP_MEDIA_PICKER_EMPTY_PREVIEW)); + empty_preview_label->SetMultiLine(true); + empty_preview_label->SetBackground( + views::CreateSolidBackground(gfx::kGoogleGrey300)); + empty_preview_label->SetPreferredSize(desktopcapture::kPreviewSize); + empty_preview_label->SetSize(desktopcapture::kPreviewSize); + empty_preview_ = + preview_wrapper->AddChildView(std::move(empty_preview_label)); + + auto preview_label = std::make_unique<views::Label>(); + preview_label->SetMultiLine(true); + preview_label->SetMaximumWidth(desktopcapture::kPreviewSize.width()); + preview_label->SetMaxLines(2); + preview_label->SetHorizontalAlignment(gfx::HorizontalAlignment::ALIGN_LEFT); + + auto preview_sidebar = std::make_unique<views::View>(); + preview_sidebar->AddChildView(std::move(preview_wrapper)); + preview_label_ = preview_sidebar->AddChildView(std::move(preview_label)); + + preview_sidebar->SetLayoutManager(std::make_unique<views::BoxLayout>( + views::BoxLayout::Orientation::kVertical, gfx::Insets(), + /*between_child_spacing=*/11)); + + std::unique_ptr<views::View> full_panel = std::make_unique<views::View>(); + + View* scroll_view = full_panel->AddChildView( + views::TableView::CreateScrollViewWithTable(std::move(list))); + scroll_view->SetPreferredSize(gfx::Size(kListWidth, 0)); + full_panel->AddChildView(std::move(preview_sidebar)); + + full_panel->SetLayoutManager(std::make_unique<views::BoxLayout>( + views::BoxLayout::Orientation::kHorizontal, gfx::Insets(15, 0, 0, 0), + /*between_child_spacing=*/12, true)); + + auto container = std::make_unique<View>(); + container->SetUseDefaultFillLayout(true); + container->AddChildView(std::move(full_panel)); + return container; } DesktopMediaTabList::~DesktopMediaTabList() { - child_->SetModel(nullptr); + DCHECK_CURRENTLY_ON(BrowserThread::UI); + list_->SetModel(nullptr); } gfx::Size DesktopMediaTabList::CalculatePreferredSize() const { + DCHECK_CURRENTLY_ON(BrowserThread::UI); // The picker should have a fixed height of 10 rows. - return gfx::Size(0, child_->GetRowHeight() * 10); + return gfx::Size(0, list_->GetRowHeight() * 10); } int DesktopMediaTabList::GetHeightForWidth(int width) const { + DCHECK_CURRENTLY_ON(BrowserThread::UI); // If this method isn't overridden here, the default implementation would fall // back to FillLayout's GetHeightForWidth, which would ask the TableView, // which would return something based on the total number of rows, since @@ -162,7 +289,8 @@ } absl::optional<content::DesktopMediaID> DesktopMediaTabList::GetSelection() { - int row = child_->GetFirstSelectedRow(); + DCHECK_CURRENTLY_ON(BrowserThread::UI); + int row = list_->GetFirstSelectedRow(); if (row == -1) return absl::nullopt; return controller_->GetSource(row).id; @@ -170,8 +298,75 @@ DesktopMediaListController::SourceListListener* DesktopMediaTabList::GetSourceListListener() { + DCHECK_CURRENTLY_ON(BrowserThread::UI); return model_.get(); } +void DesktopMediaTabList::ClearPreview() { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + preview_label_->SetText(u""); + preview_->SetImage(nullptr); + preview_->SetVisible(false); + empty_preview_->SetVisible(true); +} + +void DesktopMediaTabList::OnSelectionChanged() { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + + const int row = list_->GetFirstSelectedRow(); + if (row == -1) { + ClearPreview(); + controller_->SetPreviewedSource(absl::nullopt); + return; + } + const DesktopMediaList::Source& source = controller_->GetSource(row); + + const std::u16string truncated_title = + source.name.substr(0, kMaxPreviewTitleLength); + preview_label_->SetText(truncated_title); + + // Trigger a preview update to either show a previous snapshot for this source + // if we have one, or clear it if we don't. + OnPreviewUpdated(base::checked_cast<size_t>(row)); + + // Update the source for which previews are generated. + controller_->SetPreviewedSource(source.id); + + preview_->SetVisible(true); + empty_preview_->SetVisible(false); +} + +void DesktopMediaTabList::ClearPreviewImageIfUnchanged( + size_t previous_preview_set_count) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + + if (preview_set_count_ == previous_preview_set_count) { + // preview_ has not been set to a new image since this was scheduled. Clear + // it. + preview_->SetImage(nullptr); + } +} + +void DesktopMediaTabList::OnPreviewUpdated(size_t index) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + if (base::checked_cast<int>(index) != list_->GetFirstSelectedRow()) { + return; + } + + const DesktopMediaList::Source& source = controller_->GetSource(index); + if (!source.preview.isNull()) { + preview_->SetImage(source.preview); + ++preview_set_count_; + } else { + // Clear the preview after a short time. + base::SequencedTaskRunnerHandle::Get()->PostDelayedTask( + FROM_HERE, + base::BindOnce(&DesktopMediaTabList::ClearPreviewImageIfUnchanged, + weak_factory_.GetWeakPtr(), preview_set_count_), + kClearPreviewDelay); + } + preview_label_->SetText(source.name.substr(0, kMaxPreviewTitleLength)); +} + BEGIN_METADATA(DesktopMediaTabList, DesktopMediaListController::ListView) END_METADATA
diff --git a/chrome/browser/ui/views/desktop_capture/desktop_media_tab_list.h b/chrome/browser/ui/views/desktop_capture/desktop_media_tab_list.h index fe291ae..5939f14 100644 --- a/chrome/browser/ui/views/desktop_capture/desktop_media_tab_list.h +++ b/chrome/browser/ui/views/desktop_capture/desktop_media_tab_list.h
@@ -29,13 +29,6 @@ // observes the DesktopMediaList to update the TableModel. // * TabListViewObserver, which is a TableViewObserver that notifies the // controller when the user takes an action on the TableView. -// -// Since TableView really wants to be the child of a ScrollView, this class's -// internal view hierarchy actually looks like: -// DesktopMediaTabList -// ScrollView -// [ScrollView internal helper Views] -// TableView class DesktopMediaTabList : public DesktopMediaListController::ListView { public: METADATA_HEADER(DesktopMediaTabList); @@ -54,13 +47,34 @@ DesktopMediaListController::SourceListListener* GetSourceListListener() override; + // Called to indicate the preview image of the source indicated by index has + // been updated. + void OnPreviewUpdated(size_t index); + private: + std::unique_ptr<views::View> BuildUI(std::unique_ptr<views::TableView> list); + void OnSelectionChanged(); + void ClearPreview(); + void ClearPreviewImageIfUnchanged(size_t previous_preview_set_count); + friend class DesktopMediaPickerViewsTestApi; + friend class DesktopMediaTabListTest; DesktopMediaListController* controller_; std::unique_ptr<TabListModel> model_; std::unique_ptr<TabListViewObserver> view_observer_; - views::TableView* child_ = nullptr; + + // These members are owned in the tree of views under this ListView's children + // so it's safe to store raw pointers to them. + views::TableView* list_; + views::ImageView* preview_; + views::View* empty_preview_; + views::Label* preview_label_; + + // Counts the number of times preview_ has been set to an image. + size_t preview_set_count_ = 0; + + base::WeakPtrFactory<DesktopMediaTabList> weak_factory_{this}; }; #endif // CHROME_BROWSER_UI_VIEWS_DESKTOP_CAPTURE_DESKTOP_MEDIA_TAB_LIST_H_
diff --git a/chrome/browser/ui/views/desktop_capture/desktop_media_tab_list_unittest.cc b/chrome/browser/ui/views/desktop_capture/desktop_media_tab_list_unittest.cc new file mode 100644 index 0000000..94bc971 --- /dev/null +++ b/chrome/browser/ui/views/desktop_capture/desktop_media_tab_list_unittest.cc
@@ -0,0 +1,192 @@ +// 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/desktop_capture/desktop_media_tab_list.h" +#include "base/time/time.h" +#include "chrome/browser/media/webrtc/desktop_media_list.h" +#include "chrome/browser/media/webrtc/fake_desktop_media_list.h" +#include "chrome/browser/ui/views/desktop_capture/desktop_media_picker_views.h" +#include "chrome/browser/ui/views/desktop_capture/desktop_media_picker_views_test_api.h" +#include "chrome/test/views/chrome_test_views_delegate.h" +#include "content/public/browser/desktop_media_id.h" +#include "content/public/test/browser_task_environment.h" +#include "testing/gmock/include/gmock/gmock.h" +#include "testing/gtest/include/gtest/gtest.h" +#include "ui/gfx/image/image_skia.h" +#include "ui/views/controls/table/table_view.h" +#include "ui/views/layout/layout_provider.h" +#include "ui/views/test/scoped_views_test_helper.h" +#include "ui/views/test/widget_test.h" +#include "ui/views/widget/any_widget_observer.h" + +using testing::Return; +using testing::ReturnRef; + +const content::DesktopMediaID kDesktopMediaID0; +const content::DesktopMediaID kDesktopMediaID1 = + content::DesktopMediaID(content::DesktopMediaID::Type::TYPE_WEB_CONTENTS, + 1); +const std::u16string kSourceName0 = u"source_0"; +const std::u16string kSourceName1 = u"source_1"; +const int kMaxPreviewTitleLength = 500; + +class DesktopMediaTabListTest : public testing::Test { + public: + DesktopMediaTabListTest() { + picker_views_ = std::make_unique<DesktopMediaPickerViews>(); + + const std::u16string kAppName = u"foo"; + DesktopMediaPicker::Params picker_params; + picker_params.context = test_helper_.GetContext(); + picker_params.app_name = kAppName; + picker_params.target_name = kAppName; + picker_params.request_audio = true; + + std::vector<std::unique_ptr<DesktopMediaList>> source_lists; + source_lists.push_back(std::make_unique<FakeDesktopMediaList>( + DesktopMediaList::Type::kWebContents)); + media_list_ = static_cast<FakeDesktopMediaList*>(source_lists.back().get()); + + views::NamedWidgetShownWaiter waiter(views::test::AnyWidgetTestPasskey{}, + "DesktopMediaPickerDialogView"); + + picker_views_->Show(picker_params, std::move(source_lists), + base::BindOnce([](content::DesktopMediaID id) {})); + test_api_.set_picker(picker_views_.get()); + + tab_list_ = + static_cast<DesktopMediaTabList*>(test_api_.GetSelectedListView()); + list_ = tab_list_->list_; + preview_ = tab_list_->preview_; + preview_label_ = tab_list_->preview_label_; + + widget_destroyed_waiter_ = + std::make_unique<views::test::WidgetDestroyedWaiter>( + waiter.WaitIfNeededAndGet()); + + SkBitmap bitmap0; + bitmap0.allocN32Pixels(16, 14); + bitmap0.eraseColor(SK_ColorYELLOW); + preview_0_ = gfx::ImageSkia::CreateFrom1xBitmap(bitmap0); + media_list_->AddSourceByFullMediaID(kDesktopMediaID0); + media_list_->SetSourceName(0, kSourceName0); + media_list_->SetSourcePreview(0, preview_0_); + + SkBitmap bitmap1; + bitmap1.allocN32Pixels(16, 14); + bitmap1.eraseColor(SK_ColorRED); + preview_1_ = gfx::ImageSkia::CreateFrom1xBitmap(bitmap1); + media_list_->AddSourceByFullMediaID(kDesktopMediaID1); + media_list_->SetSourceName(1, kSourceName1); + media_list_->SetSourcePreview(1, preview_1_); + } + + ~DesktopMediaTabListTest() override = default; + + void TearDown() override { + if (GetPickerDialogView()) { + GetPickerDialogView()->GetWidget()->CloseNow(); + } + widget_destroyed_waiter_->Wait(); + } + + DesktopMediaPickerDialogView* GetPickerDialogView() const { + return picker_views_->GetDialogViewForTesting(); + } + + protected: + content::BrowserTaskEnvironment task_environment_; + views::ScopedViewsTestHelper test_helper_{ + std::make_unique<ChromeTestViewsDelegate<>>()}; + FakeDesktopMediaList* media_list_; + std::unique_ptr<DesktopMediaPickerViews> picker_views_; + DesktopMediaPickerViewsTestApi test_api_; + DesktopMediaTabList* tab_list_; + views::ImageView* preview_; + views::TableView* list_; + views::Label* preview_label_; + std::unique_ptr<views::test::WidgetDestroyedWaiter> widget_destroyed_waiter_; + + gfx::ImageSkia preview_0_; + gfx::ImageSkia preview_1_; +}; + +TEST_F(DesktopMediaTabListTest, InitialSelection) { + EXPECT_TRUE(preview_label_->GetText().empty()); + + test_api_.PressMouseOnSourceAtIndex(0); + + EXPECT_EQ(preview_label_->GetText(), kSourceName0); +} + +TEST_F(DesktopMediaTabListTest, TitleUpdatedIfTitleOfSelectedTabChanges) { + test_api_.PressMouseOnSourceAtIndex(0); + + ASSERT_EQ(preview_label_->GetText(), kSourceName0); + + std::u16string new_name = u"new_name"; + media_list_->SetSourceName(0, new_name); + + // Label should have been updated. + EXPECT_EQ(preview_label_->GetText(), new_name); +} + +TEST_F(DesktopMediaTabListTest, SelectedSourceHasPreview) { + test_api_.PressMouseOnSourceAtIndex(0); + + EXPECT_TRUE(preview_->GetImage().BackedBySameObjectAs(preview_0_)); +} + +TEST_F(DesktopMediaTabListTest, UpdatedPreview) { + test_api_.PressMouseOnSourceAtIndex(0); + + SkBitmap bitmap_blue; + bitmap_blue.allocN32Pixels(16, 14); + bitmap_blue.eraseColor(SK_ColorBLUE); + gfx::ImageSkia new_preview = gfx::ImageSkia::CreateFrom1xBitmap(bitmap_blue); + + EXPECT_FALSE(preview_->GetImage().BackedBySameObjectAs(new_preview)); + + media_list_->SetSourcePreview(0, new_preview); + + EXPECT_TRUE(preview_->GetImage().BackedBySameObjectAs(new_preview)); +} + +TEST_F(DesktopMediaTabListTest, IgnorePreviewUpdatesForUnselectedSource) { + test_api_.PressMouseOnSourceAtIndex(0); + + // Let the tab list know that the non-selected source #1 has a new preview. + media_list_->SetSourcePreview(1, gfx::ImageSkia()); + + // Preview image is unchanged. + EXPECT_TRUE(preview_->GetImage().BackedBySameObjectAs(preview_0_)); +} + +TEST_F(DesktopMediaTabListTest, PreviewedSourceChange) { + test_api_.PressMouseOnSourceAtIndex(0); + + EXPECT_TRUE(preview_->GetImage().BackedBySameObjectAs(preview_0_)); + + test_api_.PressMouseOnSourceAtIndex(1); + + EXPECT_FALSE(preview_->GetImage().BackedBySameObjectAs(preview_0_)); + EXPECT_TRUE(preview_->GetImage().BackedBySameObjectAs(preview_1_)); +} + +TEST_F(DesktopMediaTabListTest, LongPageTitle) { + std::u16string long_title(kMaxPreviewTitleLength + 1, 'a'); + media_list_->SetSourceName(0, long_title); + + std::u16string short_title(kMaxPreviewTitleLength, 'a'); + + // Select source #0 now that it has a long title. + test_api_.PressMouseOnSourceAtIndex(0); + + EXPECT_EQ(preview_label_->GetText(), short_title); + + // Also fire an OnSourceNameChanged event for the selected source #0. + media_list_->SetSourceName(0, long_title); + + EXPECT_EQ(preview_label_->GetText(), short_title); +}
diff --git a/chrome/browser/ui/views/download/download_item_view.cc b/chrome/browser/ui/views/download/download_item_view.cc index 568b998..b3ef6442 100644 --- a/chrome/browser/ui/views/download/download_item_view.cc +++ b/chrome/browser/ui/views/download/download_item_view.cc
@@ -67,6 +67,7 @@ #include "ui/base/text/bytes_formatting.h" #include "ui/base/theme_provider.h" #include "ui/base/ui_base_types.h" +#include "ui/color/color_id.h" #include "ui/compositor/layer.h" #include "ui/display/screen.h" #include "ui/events/event.h" @@ -83,8 +84,6 @@ #include "ui/gfx/skia_util.h" #include "ui/gfx/text_constants.h" #include "ui/gfx/text_elider.h" -#include "ui/native_theme/native_theme.h" -#include "ui/native_theme/native_theme_color_id.h" #include "ui/native_theme/themed_vector_icon.h" #include "ui/views/accessibility/view_accessibility.h" #include "ui/views/animation/ink_drop.h" @@ -682,7 +681,7 @@ if (mode_ != download::DownloadItemMode::kNormal) { VLOG(2) << "Overlaying warning icon in mode " << static_cast<int>(mode_); const gfx::ImageSkia icon = ui::ThemedVectorIcon(GetIcon().GetVectorIcon()) - .GetImageSkia(GetNativeTheme()); + .GetImageSkia(GetColorProvider()); gfx::RectF bounds = GetIconBounds(); canvas->DrawImageInt(icon, bounds.x(), bounds.y()); } @@ -1094,10 +1093,10 @@ // new UX is fully launched. const int non_error_icon_size = UseNewWarnings() ? 20 : 27; const auto kWarning = ui::ImageModel::FromVectorIcon( - vector_icons::kWarningIcon, ui::NativeTheme::kColorId_AlertSeverityMedium, + vector_icons::kWarningIcon, ui::kColorAlertMediumSeverity, non_error_icon_size); const auto kError = ui::ImageModel::FromVectorIcon( - vector_icons::kErrorIcon, ui::NativeTheme::kColorId_AlertSeverityHigh, + vector_icons::kErrorIcon, ui::kColorAlertHighSeverity, UseNewWarnings() ? 20 : 24); const auto danger_type = model_->GetDangerType(); @@ -1127,7 +1126,7 @@ (danger_type == download::DOWNLOAD_DANGER_TYPE_ASYNC_SCANNING) ? views::kInfoIcon : vector_icons::kHelpIcon, - ui::NativeTheme::kColorId_DefaultIconColor, non_error_icon_size); + ui::kColorIcon, non_error_icon_size); case download::DOWNLOAD_DANGER_TYPE_BLOCKED_UNSUPPORTED_FILETYPE: case download::DOWNLOAD_DANGER_TYPE_DEEP_SCANNED_SAFE: case download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS:
diff --git a/chrome/browser/ui/views/extensions/extension_install_friction_dialog_view.cc b/chrome/browser/ui/views/extensions/extension_install_friction_dialog_view.cc index c2ac187..5b707c2 100644 --- a/chrome/browser/ui/views/extensions/extension_install_friction_dialog_view.cc +++ b/chrome/browser/ui/views/extensions/extension_install_friction_dialog_view.cc
@@ -26,8 +26,8 @@ #include "extensions/common/constants.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/metadata/metadata_impl_macros.h" +#include "ui/color/color_id.h" #include "ui/gfx/paint_vector_icon.h" -#include "ui/native_theme/native_theme_color_id.h" #include "ui/views/controls/button/label_button.h" #include "ui/views/controls/scroll_view.h" #include "ui/views/controls/styled_label.h" @@ -212,9 +212,9 @@ // override ui::ImageModel ExtensionInstallFrictionDialogView::GetWindowIcon() { - return ui::ImageModel::FromVectorIcon( - vector_icons::kGppMaybeIcon, - ui::NativeTheme::kColorId_AlertSeverityMedium, kWarningIconSize); + return ui::ImageModel::FromVectorIcon(vector_icons::kGppMaybeIcon, + ui::kColorAlertMediumSeverity, + kWarningIconSize); } void ExtensionInstallFrictionDialogView::OnLearnMoreLinkClicked() {
diff --git a/chrome/browser/ui/views/file_system_access/file_system_access_usage_bubble_view.cc b/chrome/browser/ui/views/file_system_access/file_system_access_usage_bubble_view.cc index 715b980..094e3a25 100644 --- a/chrome/browser/ui/views/file_system_access/file_system_access_usage_bubble_view.cc +++ b/chrome/browser/ui/views/file_system_access/file_system_access_usage_bubble_view.cc
@@ -33,6 +33,7 @@ #include "ui/base/l10n/l10n_util.h" #include "ui/base/metadata/metadata_header_macros.h" #include "ui/base/metadata/metadata_impl_macros.h" +#include "ui/color/color_id.h" #include "ui/gfx/paint_vector_icon.h" #include "ui/views/controls/button/image_button.h" #include "ui/views/controls/button/image_button_factory.h" @@ -266,7 +267,7 @@ static_cast<size_t>(row) < files_.size() ? vector_icons::kInsertDriveFileOutlineIcon : vector_icons::kFolderOpenIcon, - ui::NativeTheme::kColorId_DefaultIconColor, kIconSize); + ui::kColorIcon, kIconSize); } std::u16string FileSystemAccessUsageBubbleView::FilePathListModel::GetTooltip(
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc index 6607503..e26c7b2a 100644 --- a/chrome/browser/ui/views/frame/browser_view.cc +++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -1462,6 +1462,10 @@ this, url, bubble_type, std::move(bubble_first_hide_callback)); } +bool BrowserView::IsExclusiveAccessBubbleDisplayed() const { + return exclusive_access_bubble_ && exclusive_access_bubble_->IsShowing(); +} + void BrowserView::OnExclusiveAccessUserInput() { if (exclusive_access_bubble_.get()) exclusive_access_bubble_->OnUserInput(); @@ -3431,8 +3435,8 @@ // TODO(crbug.com/1034783): Implement at lower layers to avoid transitions. #if defined(OS_MAC) bool entering_cross_screen_fullscreen = false; - bool swapping_screens_during_fullscreen = false; #endif // OS_MAC + bool swapping_screens_during_fullscreen = false; if (fullscreen && display_id != display::kInvalidDisplayId) { display::Screen* screen = display::Screen::GetScreen(); display::Display display; @@ -3446,9 +3450,7 @@ // Fullscreen windows must exit fullscreen to move to another display. if (IsFullscreen()) { -#if defined(OS_MAC) swapping_screens_during_fullscreen = true; -#endif // OS_MAC frame_->SetFullscreen(false); // Activate the window to give it input focus and bring it to the front @@ -3525,9 +3527,9 @@ browser_->WindowFullscreenStateChanged(); if (fullscreen && !chrome::IsRunningInAppMode()) { - UpdateExclusiveAccessExitBubbleContent(url, bubble_type, - ExclusiveAccessBubbleHideCallback(), - /*force_update=*/false); + UpdateExclusiveAccessExitBubbleContent( + url, bubble_type, ExclusiveAccessBubbleHideCallback(), + /*force_update=*/swapping_screens_during_fullscreen); } // Undo our anti-jankiness hacks and force a re-layout.
diff --git a/chrome/browser/ui/views/frame/browser_view.h b/chrome/browser/ui/views/frame/browser_view.h index fb4455bf..498a51a 100644 --- a/chrome/browser/ui/views/frame/browser_view.h +++ b/chrome/browser/ui/views/frame/browser_view.h
@@ -426,6 +426,7 @@ ExclusiveAccessBubbleType bubble_type, ExclusiveAccessBubbleHideCallback bubble_first_hide_callback, bool force_update) override; + bool IsExclusiveAccessBubbleDisplayed() const override; void OnExclusiveAccessUserInput() override; bool ShouldHideUIForFullscreen() const override; bool IsFullscreen() const override;
diff --git a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc index 70c4dac..7bb3a34 100644 --- a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc +++ b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
@@ -808,7 +808,7 @@ HICON big_icon = nullptr; gfx::ImageSkia icon = views::GetImageSkiaFromImageModel( - browser_view()->GetWindowIcon(), GetNativeTheme()); + browser_view()->GetWindowIcon(), GetColorProvider()); if (!icon.isNull()) { // Keep previous icons alive as long as they are referenced by the HWND.
diff --git a/chrome/browser/ui/views/location_bar/star_menu_model.cc b/chrome/browser/ui/views/location_bar/star_menu_model.cc index c54e26c..8a450da2 100644 --- a/chrome/browser/ui/views/location_bar/star_menu_model.cc +++ b/chrome/browser/ui/views/location_bar/star_menu_model.cc
@@ -8,7 +8,7 @@ #include "chrome/grit/generated_resources.h" #include "components/omnibox/browser/vector_icons.h" #include "ui/base/models/image_model.h" -#include "ui/native_theme/native_theme.h" +#include "ui/color/color_id.h" StarMenuModel::StarMenuModel(ui::SimpleMenuModel::Delegate* delegate, bool bookmarked, @@ -27,8 +27,7 @@ CommandBookmark, bookmarked ? IDS_STAR_VIEW_MENU_EDIT_BOOKMARK : IDS_STAR_VIEW_MENU_ADD_BOOKMARK, - ui::ImageModel::FromVectorIcon( - omnibox::kStarIcon, ui::NativeTheme::kColorId_DefaultIconColor)); + ui::ImageModel::FromVectorIcon(omnibox::kStarIcon, ui::kColorIcon)); AddItemWithStringIdAndIcon( exists_as_unread_in_read_later ? CommandMarkAsRead : CommandMoveToReadLater, @@ -36,9 +35,7 @@ : IDS_STAR_VIEW_MENU_MOVE_TO_READ_LATER, ui::ImageModel::FromVectorIcon( exists_as_unread_in_read_later ? kReadLaterIcon : kReadLaterAddIcon, - can_move_to_read_later - ? ui::NativeTheme::kColorId_DefaultIconColor - : ui::NativeTheme::kColorId_DisabledIconColor)); + can_move_to_read_later ? ui::kColorIcon : ui::kColorIconDisabled)); int index = GetIndexOfCommandId(CommandMoveToReadLater); if (index != -1) { SetEnabledAt(index, can_move_to_read_later);
diff --git a/chrome/browser/ui/views/media_router/cast_dialog_sink_button.cc b/chrome/browser/ui/views/media_router/cast_dialog_sink_button.cc index 0191351..db5617f 100644 --- a/chrome/browser/ui/views/media_router/cast_dialog_sink_button.cc +++ b/chrome/browser/ui/views/media_router/cast_dialog_sink_button.cc
@@ -33,6 +33,7 @@ #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/base/models/image_model.h" #include "ui/base/ui_base_types.h" +#include "ui/color/color_id.h" #include "ui/gfx/color_palette.h" #include "ui/gfx/paint_vector_icon.h" #include "ui/native_theme/native_theme.h" @@ -76,10 +77,9 @@ return CreatePrimaryIconView(gfx::CreateVectorIcon( kGenericStopIcon, kPrimaryIconSize, gfx::kGoogleBlue500)); } else if (sink.issue) { - auto icon = - std::make_unique<views::ImageView>(ui::ImageModel::FromVectorIcon( - ::vector_icons::kInfoOutlineIcon, - ui::NativeTheme::kColorId_DefaultIconColor, kPrimaryIconSize)); + auto icon = std::make_unique<views::ImageView>( + ui::ImageModel::FromVectorIcon(::vector_icons::kInfoOutlineIcon, + ui::kColorIcon, kPrimaryIconSize)); icon->SetBorder(views::CreateEmptyBorder(kPrimaryIconBorder)); return icon; } else if (sink.state == UIMediaSinkState::CONNECTING ||
diff --git a/chrome/browser/ui/views/media_router/presentation_receiver_window_view.cc b/chrome/browser/ui/views/media_router/presentation_receiver_window_view.cc index 8f48722..a035985 100644 --- a/chrome/browser/ui/views/media_router/presentation_receiver_window_view.cc +++ b/chrome/browser/ui/views/media_router/presentation_receiver_window_view.cc
@@ -352,6 +352,10 @@ this, url, bubble_type, std::move(bubble_first_hide_callback)); } +bool PresentationReceiverWindowView::IsExclusiveAccessBubbleDisplayed() const { + return exclusive_access_bubble_ && exclusive_access_bubble_->IsShowing(); +} + void PresentationReceiverWindowView::OnExclusiveAccessUserInput() {} content::WebContents* PresentationReceiverWindowView::GetActiveWebContents() {
diff --git a/chrome/browser/ui/views/media_router/presentation_receiver_window_view.h b/chrome/browser/ui/views/media_router/presentation_receiver_window_view.h index 69230c637..1d81ef2 100644 --- a/chrome/browser/ui/views/media_router/presentation_receiver_window_view.h +++ b/chrome/browser/ui/views/media_router/presentation_receiver_window_view.h
@@ -98,6 +98,7 @@ ExclusiveAccessBubbleType bubble_type, ExclusiveAccessBubbleHideCallback bubble_first_hide_callback, bool force_update) final; + bool IsExclusiveAccessBubbleDisplayed() const final; void OnExclusiveAccessUserInput() final; content::WebContents* GetActiveWebContents() final; bool CanUserExitFullscreen() const final;
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc index 34ab544..68ef48eb 100644 --- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc +++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
@@ -192,8 +192,8 @@ OmniboxViewViews::~OmniboxViewViews() { #if BUILDFLAG(IS_CHROMEOS_ASH) - chromeos::input_method::InputMethodManager::Get()-> - RemoveCandidateWindowObserver(this); + ash::input_method::InputMethodManager::Get()->RemoveCandidateWindowObserver( + this); #endif // Explicitly teardown members which have a reference to us. Just to be safe @@ -228,8 +228,8 @@ SetBorder(views::CreateEmptyBorder(kTextfieldInsets)); #if BUILDFLAG(IS_CHROMEOS_ASH) - chromeos::input_method::InputMethodManager::Get()-> - AddCandidateWindowObserver(this); + ash::input_method::InputMethodManager::Get()->AddCandidateWindowObserver( + this); #endif } @@ -1525,12 +1525,12 @@ #if BUILDFLAG(IS_CHROMEOS_ASH) void OmniboxViewViews::CandidateWindowOpened( - chromeos::input_method::InputMethodManager* manager) { + ash::input_method::InputMethodManager* manager) { ime_candidate_window_open_ = true; } void OmniboxViewViews::CandidateWindowClosed( - chromeos::input_method::InputMethodManager* manager) { + ash::input_method::InputMethodManager* manager) { ime_candidate_window_open_ = false; } #endif
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.h b/chrome/browser/ui/views/omnibox/omnibox_view_views.h index 6eea696..8e6c6ef 100644 --- a/chrome/browser/ui/views/omnibox/omnibox_view_views.h +++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.h
@@ -53,15 +53,15 @@ } // namespace ui // Views-implementation of OmniboxView. -class OmniboxViewViews : public OmniboxView, - public views::Textfield, +class OmniboxViewViews + : public OmniboxView, + public views::Textfield, #if BUILDFLAG(IS_CHROMEOS_ASH) - public chromeos::input_method::InputMethodManager:: - CandidateWindowObserver, + public ash::input_method::InputMethodManager::CandidateWindowObserver, #endif - public views::TextfieldController, - public ui::CompositorObserver, - public TemplateURLServiceObserver { + public views::TextfieldController, + public ui::CompositorObserver, + public TemplateURLServiceObserver { public: METADATA_HEADER(OmniboxViewViews); @@ -270,12 +270,12 @@ void ExecuteTextEditCommand(ui::TextEditCommand command) override; bool ShouldShowPlaceholderText() const override; - // chromeos::input_method::InputMethodManager::CandidateWindowObserver: + // ash::input_method::InputMethodManager::CandidateWindowObserver: #if BUILDFLAG(IS_CHROMEOS_ASH) void CandidateWindowOpened( - chromeos::input_method::InputMethodManager* manager) override; + ash::input_method::InputMethodManager* manager) override; void CandidateWindowClosed( - chromeos::input_method::InputMethodManager* manager) override; + ash::input_method::InputMethodManager* manager) override; #endif // views::TextfieldController:
diff --git a/chrome/browser/ui/views/page_info/accuracy_tip_bubble_view.cc b/chrome/browser/ui/views/page_info/accuracy_tip_bubble_view.cc index 464bc6d..abf2fb67 100644 --- a/chrome/browser/ui/views/page_info/accuracy_tip_bubble_view.cc +++ b/chrome/browser/ui/views/page_info/accuracy_tip_bubble_view.cc
@@ -28,6 +28,7 @@ #include "content/public/browser/navigation_handle.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/models/image_model.h" +#include "ui/color/color_id.h" #include "ui/gfx/geometry/insets.h" #include "ui/views/bubble/bubble_frame_view.h" #include "ui/views/controls/button/md_text_button.h" @@ -60,8 +61,8 @@ provider->GetDistanceMetric(views::DISTANCE_RELATED_LABEL_HORIZONTAL); auto icon_view = std::make_unique<NonAccessibleImageView>(); - icon_view->SetImage(ui::ImageModel::FromVectorIcon( - icon, ui::NativeTheme::kColorId_DefaultIconColor, kVectorIconSize)); + icon_view->SetImage( + ui::ImageModel::FromVectorIcon(icon, ui::kColorIcon, kVectorIconSize)); icon_view->SetProperty(views::kMarginsKey, gfx::Insets(0, 0, 0, icon_margin)); icon_view->SetProperty(views::kCrossAxisAlignmentKey, views::LayoutAlignment::kStart);
diff --git a/chrome/browser/ui/views/page_info/page_info_view_factory.cc b/chrome/browser/ui/views/page_info/page_info_view_factory.cc index a5f2f8d..7012c43 100644 --- a/chrome/browser/ui/views/page_info/page_info_view_factory.cc +++ b/chrome/browser/ui/views/page_info/page_info_view_factory.cc
@@ -20,6 +20,7 @@ #include "components/strings/grit/components_strings.h" #include "components/vector_icons/vector_icons.h" #include "ui/base/l10n/l10n_util.h" +#include "ui/color/color_id.h" #include "ui/gfx/paint_vector_icon.h" #include "ui/views/bubble/bubble_frame_view.h" #include "ui/views/controls/button/image_button.h" @@ -295,7 +296,7 @@ ? setting == CONTENT_SETTING_BLOCK || setting == CONTENT_SETTING_ASK : setting == CONTENT_SETTING_BLOCK; return ui::ImageModel::FromVectorIcon( - *icon, ui::NativeTheme::kColorId_DefaultIconColor, GetIconSize(), + *icon, ui::kColorIcon, GetIconSize(), show_blocked_badge ? &vector_icons::kBlockedBadgeIcon : nullptr); } @@ -329,63 +330,57 @@ } return ui::ImageModel::FromVectorIcon( - *icon, ui::NativeTheme::kColorId_DefaultIconColor, GetIconSize(), + *icon, ui::kColorIcon, GetIconSize(), deleted ? &vector_icons::kBlockedBadgeIcon : nullptr); } // static const ui::ImageModel PageInfoViewFactory::GetValidCertificateIcon() { - return ui::ImageModel::FromVectorIcon( - vector_icons::kCertificateIcon, - ui::NativeTheme::kColorId_DefaultIconColor, GetIconSize()); + return ui::ImageModel::FromVectorIcon(vector_icons::kCertificateIcon, + ui::kColorIcon, GetIconSize()); } // static const ui::ImageModel PageInfoViewFactory::GetInvalidCertificateIcon() { - return ui::ImageModel::FromVectorIcon( - vector_icons::kCertificateIcon, - ui::NativeTheme::kColorId_DefaultIconColor, GetIconSize(), - &vector_icons::kBlockedBadgeIcon); + return ui::ImageModel::FromVectorIcon(vector_icons::kCertificateIcon, + ui::kColorIcon, GetIconSize(), + &vector_icons::kBlockedBadgeIcon); } // static const ui::ImageModel PageInfoViewFactory::GetSiteSettingsIcon() { - return ui::ImageModel::FromVectorIcon( - vector_icons::kSettingsIcon, ui::NativeTheme::kColorId_DefaultIconColor); + return ui::ImageModel::FromVectorIcon(vector_icons::kSettingsIcon, + ui::kColorIcon); } // static const ui::ImageModel PageInfoViewFactory::GetVrSettingsIcon() { - return ui::ImageModel::FromVectorIcon( - vector_icons::kVrHeadsetIcon, ui::NativeTheme::kColorId_DefaultIconColor); + return ui::ImageModel::FromVectorIcon(vector_icons::kVrHeadsetIcon, + ui::kColorIcon); } // static const ui::ImageModel PageInfoViewFactory::GetLaunchIcon() { - return ui::ImageModel::FromVectorIcon( - vector_icons::kLaunchIcon, ui::NativeTheme::kColorId_SecondaryIconColor, - GetIconSize()); + return ui::ImageModel::FromVectorIcon(vector_icons::kLaunchIcon, + ui::kColorIconSecondary, GetIconSize()); } // static const ui::ImageModel PageInfoViewFactory::GetConnectionNotSecureIcon() { - return ui::ImageModel::FromVectorIcon( - vector_icons::kNotSecureWarningIcon, - ui::NativeTheme::kColorId_AlertSeverityHigh); + return ui::ImageModel::FromVectorIcon(vector_icons::kNotSecureWarningIcon, + ui::kColorAlertHighSeverity); } // static const ui::ImageModel PageInfoViewFactory::GetConnectionSecureIcon() { - return ui::ImageModel::FromVectorIcon( - vector_icons::kHttpsValidIcon, - ui::NativeTheme::kColorId_DefaultIconColor); + return ui::ImageModel::FromVectorIcon(vector_icons::kHttpsValidIcon, + ui::kColorIcon); } // static const ui::ImageModel PageInfoViewFactory::GetOpenSubpageIcon() { - return ui::ImageModel::FromVectorIcon( - vector_icons::kSubmenuArrowIcon, - ui::NativeTheme::kColorId_DefaultIconColor); + return ui::ImageModel::FromVectorIcon(vector_icons::kSubmenuArrowIcon, + ui::kColorIcon); } // static @@ -395,7 +390,6 @@ info.source == content_settings::SETTING_SOURCE_EXTENSION ? vector_icons::kExtensionIcon : vector_icons::kBusinessIcon; - return ui::ImageModel::FromVectorIcon( - managed_vector_icon, ui::NativeTheme::kColorId_DefaultIconColor, - GetIconSize()); + return ui::ImageModel::FromVectorIcon(managed_vector_icon, ui::kColorIcon, + GetIconSize()); }
diff --git a/chrome/browser/ui/views/passwords/move_to_account_store_bubble_view.cc b/chrome/browser/ui/views/passwords/move_to_account_store_bubble_view.cc index 6598fa6d..4ae3386e 100644 --- a/chrome/browser/ui/views/passwords/move_to_account_store_bubble_view.cc +++ b/chrome/browser/ui/views/passwords/move_to_account_store_bubble_view.cc
@@ -21,6 +21,7 @@ #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/base/models/image_model.h" #include "ui/base/resource/resource_bundle.h" +#include "ui/color/color_id.h" #include "ui/gfx/canvas.h" #include "ui/gfx/color_utils.h" #include "ui/gfx/favicon_size.h" @@ -233,8 +234,7 @@ auto arrow_view = std::make_unique<views::ImageView>(ui::ImageModel::FromVectorIcon( - kChevronRightIcon, ui::NativeTheme::kColorId_DefaultIconColor, - gfx::kFaviconSize)); + kChevronRightIcon, ui::kColorIcon, gfx::kFaviconSize)); arrow_view->SetFlipCanvasOnPaintForRTLUI(true); AddChildView(std::move(arrow_view));
diff --git a/chrome/browser/ui/views/passwords/password_items_view.cc b/chrome/browser/ui/views/passwords/password_items_view.cc index 6b51bbf4..19640c5 100644 --- a/chrome/browser/ui/views/passwords/password_items_view.cc +++ b/chrome/browser/ui/views/passwords/password_items_view.cc
@@ -26,6 +26,7 @@ #include "ui/base/models/image_model.h" #include "ui/base/models/simple_combobox_model.h" #include "ui/base/resource/resource_bundle.h" +#include "ui/color/color_id.h" #include "ui/gfx/favicon_size.h" #include "ui/gfx/image/image_skia.h" #include "ui/gfx/paint_vector_icon.h" @@ -197,8 +198,7 @@ // Use a globe fallback until the actual favicon is loaded. layout->AddView( std::make_unique<views::ImageView>(ui::ImageModel::FromVectorIcon( - kGlobeIcon, ui::NativeTheme::kColorId_DefaultIconColor, - gfx::kFaviconSize))); + kGlobeIcon, ui::kColorIcon, gfx::kFaviconSize))); } else { layout->AddView(std::make_unique<views::ImageView>()) ->SetImage(parent_->favicon_.AsImageSkia());
diff --git a/chrome/browser/ui/views/passwords/password_save_update_view.cc b/chrome/browser/ui/views/passwords/password_save_update_view.cc index 7815940..6de6f16b 100644 --- a/chrome/browser/ui/views/passwords/password_save_update_view.cc +++ b/chrome/browser/ui/views/passwords/password_save_update_view.cc
@@ -39,6 +39,7 @@ #include "ui/base/models/image_model.h" #include "ui/base/models/simple_combobox_model.h" #include "ui/base/resource/resource_bundle.h" +#include "ui/color/color_id.h" #include "ui/gfx/color_palette.h" #include "ui/gfx/color_utils.h" #include "ui/gfx/vector_icon_utils.h" @@ -241,8 +242,7 @@ ui::ImageModel primary_account_avatar, bool is_using_account_store) { ui::ImageModel computer_image = ui::ImageModel::FromVectorIcon( - kComputerWithCircleBackgroundIcon, - ui::NativeTheme::kColorId_DefaultIconColor, ComboboxIconSize()); + kComputerWithCircleBackgroundIcon, ui::kColorIcon, ComboboxIconSize()); ui::SimpleComboboxModel::Item account_destination( /*text=*/l10n_util::GetStringUTF16(
diff --git a/chrome/browser/ui/views/payments/cvc_unmask_view_controller.cc b/chrome/browser/ui/views/payments/cvc_unmask_view_controller.cc index e54927c..6e67d2b 100644 --- a/chrome/browser/ui/views/payments/cvc_unmask_view_controller.cc +++ b/chrome/browser/ui/views/payments/cvc_unmask_view_controller.cc
@@ -35,6 +35,7 @@ #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/base/models/image_model.h" #include "ui/base/resource/resource_bundle.h" +#include "ui/color/color_id.h" #include "ui/gfx/paint_vector_icon.h" #include "ui/views/border.h" #include "ui/views/controls/button/md_text_button.h" @@ -279,8 +280,7 @@ auto error_icon = std::make_unique<views::ImageView>(); error_icon->SetID(static_cast<int>(DialogViewID::CVC_ERROR_ICON)); error_icon->SetImage(ui::ImageModel::FromVectorIcon( - vector_icons::kWarningIcon, ui::NativeTheme::kColorId_AlertSeverityHigh, - 16)); + vector_icons::kWarningIcon, ui::kColorAlertHighSeverity, 16)); error_icon->SetVisible(false); layout->AddView(std::move(error_icon));
diff --git a/chrome/browser/ui/views/payments/payment_request_views_util.cc b/chrome/browser/ui/views/payments/payment_request_views_util.cc index 731236f..5886874d 100644 --- a/chrome/browser/ui/views/payments/payment_request_views_util.cc +++ b/chrome/browser/ui/views/payments/payment_request_views_util.cc
@@ -33,6 +33,7 @@ #include "ui/base/metadata/metadata_header_macros.h" #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/base/resource/resource_bundle.h" +#include "ui/color/color_id.h" #include "ui/compositor/layer.h" #include "ui/gfx/canvas.h" #include "ui/gfx/color_utils.h" @@ -491,8 +492,7 @@ auto warning_icon = std::make_unique<views::ImageView>(); warning_icon->SetCanProcessEventsWithinSubtree(false); warning_icon->SetImage(ui::ImageModel::FromVectorIcon( - vector_icons::kWarningIcon, ui::NativeTheme::kColorId_AlertSeverityHigh, - 16)); + vector_icons::kWarningIcon, ui::kColorAlertHighSeverity, 16)); header_view->AddChildView(std::move(warning_icon)); label->set_enabled_color_id(ui::NativeTheme::kColorId_AlertSeverityHigh); }
diff --git a/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc b/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc index 516198b..e02ee22 100644 --- a/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc +++ b/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc
@@ -43,6 +43,7 @@ #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/base/models/image_model.h" #include "ui/base/resource/resource_bundle.h" +#include "ui/color/color_id.h" #include "ui/gfx/color_palette.h" #include "ui/gfx/color_utils.h" #include "ui/gfx/font.h" @@ -281,8 +282,7 @@ std::unique_ptr<views::View> extra_content_view) { auto chevron = std::make_unique<views::ImageView>(ui::ImageModel::FromVectorIcon( - vector_icons::kSubmenuArrowIcon, - ui::NativeTheme::kColorId_DefaultIconColor, + vector_icons::kSubmenuArrowIcon, ui::kColorIcon, gfx::GetDefaultSizeOfVectorIcon(vector_icons::kSubmenuArrowIcon))); chevron->SetCanProcessEventsWithinSubtree(false); std::unique_ptr<PaymentRequestRowView> section = CreatePaymentSheetRow(
diff --git a/chrome/browser/ui/views/permission_bubble/file_handling_permission_request_dialog.cc b/chrome/browser/ui/views/permission_bubble/file_handling_permission_request_dialog.cc index a8018ff..c715e3e 100644 --- a/chrome/browser/ui/views/permission_bubble/file_handling_permission_request_dialog.cc +++ b/chrome/browser/ui/views/permission_bubble/file_handling_permission_request_dialog.cc
@@ -22,6 +22,7 @@ #include "ui/base/l10n/l10n_util.h" #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/base/models/image_model.h" +#include "ui/color/color_id.h" #include "ui/gfx/text_elider.h" #include "ui/views/controls/button/checkbox.h" #include "ui/views/controls/label.h" @@ -78,8 +79,7 @@ constexpr int kIconSize = 16; auto* icon = files_view->AddChildView( std::make_unique<views::ImageView>(ui::ImageModel::FromVectorIcon( - vector_icons::kDescriptionIcon, - ui::NativeTheme::kColorId_DefaultIconColor, kIconSize))); + vector_icons::kDescriptionIcon, ui::kColorIcon, kIconSize))); const int icon_margin = views::LayoutProvider::Get()->GetDistanceMetric( views::DISTANCE_RELATED_LABEL_HORIZONTAL); icon->SetProperty(views::kMarginsKey, gfx::Insets(0, 0, 0, icon_margin));
diff --git a/chrome/browser/ui/views/permission_bubble/permission_prompt_bubble_view.cc b/chrome/browser/ui/views/permission_bubble/permission_prompt_bubble_view.cc index bdf3ccc..c7aeb840 100644 --- a/chrome/browser/ui/views/permission_bubble/permission_prompt_bubble_view.cc +++ b/chrome/browser/ui/views/permission_bubble/permission_prompt_bubble_view.cc
@@ -31,10 +31,10 @@ #include "ui/base/l10n/l10n_util.h" #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/base/models/image_model.h" +#include "ui/color/color_id.h" #include "ui/gfx/geometry/insets.h" #include "ui/gfx/paint_vector_icon.h" #include "ui/gfx/text_constants.h" -#include "ui/native_theme/native_theme.h" #include "ui/views/bubble/bubble_frame_view.h" #include "ui/views/controls/button/image_button.h" #include "ui/views/controls/button/image_button_factory.h" @@ -210,8 +210,8 @@ constexpr int kPermissionIconSize = 18; auto* icon = line_container->AddChildView( std::make_unique<views::ImageView>(ui::ImageModel::FromVectorIcon( - permissions::GetIconId(request->request_type()), - ui::NativeTheme::kColorId_DefaultIconColor, kPermissionIconSize))); + permissions::GetIconId(request->request_type()), ui::kColorIcon, + kPermissionIconSize))); icon->SetVerticalAlignment(views::ImageView::Alignment::kLeading); auto* label = line_container->AddChildView(
diff --git a/chrome/browser/ui/views/policy/enterprise_startup_dialog_view.cc b/chrome/browser/ui/views/policy/enterprise_startup_dialog_view.cc index d0587ed..a190dc3 100644 --- a/chrome/browser/ui/views/policy/enterprise_startup_dialog_view.cc +++ b/chrome/browser/ui/views/policy/enterprise_startup_dialog_view.cc
@@ -22,6 +22,7 @@ #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/base/models/image_model.h" #include "ui/base/resource/resource_bundle.h" +#include "ui/color/color_id.h" #include "ui/gfx/color_palette.h" #include "ui/gfx/paint_vector_icon.h" #include "ui/native_theme/native_theme.h" @@ -146,8 +147,7 @@ std::unique_ptr<views::Label> text = CreateText(error_message); auto error_icon = std::make_unique<views::ImageView>(ui::ImageModel::FromVectorIcon( - kBrowserToolsErrorIcon, ui::NativeTheme::kColorId_AlertSeverityHigh, - kIconSize)); + kBrowserToolsErrorIcon, ui::kColorAlertHighSeverity, kIconSize)); if (accept_button) { // TODO(ellyjones): This should use SetButtonLabel()
diff --git a/chrome/browser/ui/views/profiles/incognito_menu_view.cc b/chrome/browser/ui/views/profiles/incognito_menu_view.cc index 8a93e59..38970b9 100644 --- a/chrome/browser/ui/views/profiles/incognito_menu_view.cc +++ b/chrome/browser/ui/views/profiles/incognito_menu_view.cc
@@ -24,6 +24,7 @@ #include "components/vector_icons/vector_icons.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/models/image_model.h" +#include "ui/color/color_id.h" #include "ui/views/accessibility/view_accessibility.h" #include "ui/views/controls/image_view.h" #include "ui/views/style/typography.h" @@ -53,14 +54,14 @@ BrowserList::GetOffTheRecordBrowsersActiveForProfile( browser()->profile()); - ui::ThemedVectorIcon header_art_icon( - &kIncognitoMenuArtIcon, ui::NativeTheme::kColorId_AvatarHeaderArt); + ui::ThemedVectorIcon header_art_icon(&kIncognitoMenuArtIcon, + ui::kColorAvatarHeaderArt); SetProfileIdentityInfo( /*profile_name=*/std::u16string(), /*background_color=*/SK_ColorTRANSPARENT, /*edit_button=*/absl::nullopt, - ui::ImageModel::FromVectorIcon( - kIncognitoProfileIcon, ui::NativeTheme::kColorId_AvatarIconIncognito), + ui::ImageModel::FromVectorIcon(kIncognitoProfileIcon, + ui::kColorAvatarIconIncognito), l10n_util::GetStringUTF16(IDS_INCOGNITO_PROFILE_MENU_TITLE), incognito_window_count > 1 ? l10n_util::GetPluralStringFUTF16(IDS_INCOGNITO_WINDOW_COUNT_MESSAGE,
diff --git a/chrome/browser/ui/views/profiles/profile_menu_view.cc b/chrome/browser/ui/views/profiles/profile_menu_view.cc index 258d95c..a2da5902 100644 --- a/chrome/browser/ui/views/profiles/profile_menu_view.cc +++ b/chrome/browser/ui/views/profiles/profile_menu_view.cc
@@ -62,6 +62,7 @@ #include "ui/base/l10n/l10n_util.h" #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/base/resource/resource_bundle.h" +#include "ui/color/color_id.h" #include "ui/gfx/image/canvas_image_source.h" #include "ui/gfx/image/image_skia_operations.h" #include "ui/native_theme/native_theme.h" @@ -471,8 +472,8 @@ IDS_GUEST_WINDOW_COUNT_MESSAGE, guest_window_count); } - ui::ThemedVectorIcon header_art_icon( - &kGuestMenuArtIcon, ui::NativeTheme::kColorId_AvatarHeaderArt); + ui::ThemedVectorIcon header_art_icon(&kGuestMenuArtIcon, + ui::kColorAvatarHeaderArt); SetProfileIdentityInfo( /*profile_name=*/std::u16string(), /*background_color=*/SK_ColorTRANSPARENT,
diff --git a/chrome/browser/ui/views/profiles/profile_menu_view_base.cc b/chrome/browser/ui/views/profiles/profile_menu_view_base.cc index ac2127ba..272923c 100644 --- a/chrome/browser/ui/views/profiles/profile_menu_view_base.cc +++ b/chrome/browser/ui/views/profiles/profile_menu_view_base.cc
@@ -35,6 +35,7 @@ #include "ui/base/metadata/metadata_header_macros.h" #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/base/models/image_model.h" +#include "ui/color/color_id.h" #include "ui/display/display.h" #include "ui/display/screen.h" #include "ui/gfx/canvas.h" @@ -290,7 +291,7 @@ // This can happen if the account image hasn't been fetched yet, if there // is no image, or in tests. avatar_image_ = ui::ImageModel::FromVectorIcon( - kUserAccountAvatarIcon, ui::NativeTheme::kColorId_MenuIconColor, + kUserAccountAvatarIcon, ui::kColorMenuIcon, ProfileMenuViewBase::kIdentityImageSize); } } @@ -302,7 +303,7 @@ DCHECK(!avatar_image_.IsEmpty()); gfx::ImageSkia sized_avatar_image = views::GetImageSkiaFromImageModel( SizeImageModel(avatar_image_, ProfileMenuViewBase::kIdentityImageSize), - GetNativeTheme()); + GetColorProvider()); sized_avatar_image = AddCircularBackground( sized_avatar_image, GetBackgroundColor(), kIdentityImageSizeInclBorder); gfx::ImageSkia sized_badge = AddCircularBackground(
diff --git a/chrome/browser/ui/views/send_tab_to_self/send_tab_to_self_bubble_device_button.cc b/chrome/browser/ui/views/send_tab_to_self/send_tab_to_self_bubble_device_button.cc index 3a5c17ba..a61f8eb 100644 --- a/chrome/browser/ui/views/send_tab_to_self/send_tab_to_self_bubble_device_button.cc +++ b/chrome/browser/ui/views/send_tab_to_self/send_tab_to_self_bubble_device_button.cc
@@ -16,6 +16,7 @@ #include "ui/base/l10n/l10n_util.h" #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/base/models/image_model.h" +#include "ui/color/color_id.h" #include "ui/views/border.h" #include "ui/views/controls/button/button.h" #include "ui/views/controls/image_view.h" @@ -30,7 +31,7 @@ auto icon = std::make_unique<views::ImageView>(ui::ImageModel::FromVectorIcon( device_type == sync_pb::SyncEnums::TYPE_PHONE ? kHardwareSmartphoneIcon : kHardwareComputerIcon, - ui::NativeTheme::kColorId_DefaultIconColor, kPrimaryIconSize)); + ui::kColorIcon, kPrimaryIconSize)); constexpr auto kPrimaryIconBorder = gfx::Insets(6); icon->SetBorder(views::CreateEmptyBorder(kPrimaryIconBorder)); return icon;
diff --git a/chrome/browser/ui/views/send_tab_to_self/send_tab_to_self_toolbar_icon_view.cc b/chrome/browser/ui/views/send_tab_to_self/send_tab_to_self_toolbar_icon_view.cc index 5cd76d98..2a468ac 100644 --- a/chrome/browser/ui/views/send_tab_to_self/send_tab_to_self_toolbar_icon_view.cc +++ b/chrome/browser/ui/views/send_tab_to_self/send_tab_to_self_toolbar_icon_view.cc
@@ -17,6 +17,7 @@ #include "components/vector_icons/vector_icons.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/models/image_model.h" +#include "ui/color/color_id.h" #include "ui/gfx/favicon_size.h" #include "ui/views/controls/button/button_controller.h" @@ -24,10 +25,9 @@ SendTabToSelfToolbarIconView::SendTabToSelfToolbarIconView( BrowserView* browser_view) - : ImageView(ui::ImageModel::FromVectorIcon( - kSendTabToSelfIcon, - ui::NativeTheme::kColorId_DefaultIconColor, - gfx::kFaviconSize)), + : ImageView(ui::ImageModel::FromVectorIcon(kSendTabToSelfIcon, + ui::kColorIcon, + gfx::kFaviconSize)), browser_(browser_view->browser()) { SetAccessibleName(l10n_util::GetStringUTF16( IDS_TOOLBAR_BUTTON_SEND_TAB_TO_SELF_BUTTON_A11Y_NAME));
diff --git a/chrome/browser/ui/views/sharing/sharing_dialog_view.cc b/chrome/browser/ui/views/sharing/sharing_dialog_view.cc index 08b0b80..2ccd33e 100644 --- a/chrome/browser/ui/views/sharing/sharing_dialog_view.cc +++ b/chrome/browser/ui/views/sharing/sharing_dialog_view.cc
@@ -25,6 +25,7 @@ #include "ui/base/l10n/l10n_util.h" #include "ui/base/models/image_model.h" #include "ui/base/resource/resource_bundle.h" +#include "ui/color/color_id.h" #include "ui/gfx/color_utils.h" #include "ui/gfx/paint_vector_icon.h" #include "ui/strings/grit/ui_strings.h" @@ -249,7 +250,7 @@ device->device_type() == sync_pb::SyncEnums::TYPE_TABLET ? kTabletIcon : kHardwareSmartphoneIcon, - ui::NativeTheme::kColorId_DefaultIconColor, kPrimaryIconSize)); + ui::kColorIcon, kPrimaryIconSize)); auto* dialog_button = button_list->AddChildView(std::make_unique<HoverButton>( @@ -268,8 +269,7 @@ std::unique_ptr<views::ImageView> icon; if (app.vector_icon) { icon = std::make_unique<views::ImageView>(ui::ImageModel::FromVectorIcon( - *app.vector_icon, ui::NativeTheme::kColorId_DefaultIconColor, - kPrimaryIconSize)); + *app.vector_icon, ui::kColorIcon, kPrimaryIconSize)); } else { icon = std::make_unique<views::ImageView>(); icon->SetImage(app.image.AsImageSkia());
diff --git a/chrome/browser/ui/views/sharing_hub/sharing_hub_bubble_action_button.cc b/chrome/browser/ui/views/sharing_hub/sharing_hub_bubble_action_button.cc index 75eec17..5f17a8c8 100644 --- a/chrome/browser/ui/views/sharing_hub/sharing_hub_bubble_action_button.cc +++ b/chrome/browser/ui/views/sharing_hub/sharing_hub_bubble_action_button.cc
@@ -13,6 +13,7 @@ #include "ui/base/l10n/l10n_util.h" #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/base/models/image_model.h" +#include "ui/color/color_id.h" #include "ui/views/animation/ink_drop.h" #include "ui/views/border.h" #include "ui/views/controls/image_view.h" @@ -28,8 +29,7 @@ std::unique_ptr<views::ImageView> CreateIconFromVector( const gfx::VectorIcon& vector_icon) { auto icon = std::make_unique<views::ImageView>(ui::ImageModel::FromVectorIcon( - vector_icon, ui::NativeTheme::kColorId_DefaultIconColor, - kPrimaryIconSize)); + vector_icon, ui::kColorIcon, kPrimaryIconSize)); icon->SetBorder(views::CreateEmptyBorder(kPrimaryIconBorder)); return icon; }
diff --git a/chrome/browser/ui/views/tab_icon_view.cc b/chrome/browser/ui/views/tab_icon_view.cc index a6aae90..2a95bcb 100644 --- a/chrome/browser/ui/views/tab_icon_view.cc +++ b/chrome/browser/ui/views/tab_icon_view.cc
@@ -6,11 +6,6 @@ #include <memory> -#if defined(OS_WIN) -#include <windows.h> -#include <shellapi.h> -#endif - #include "base/logging.h" #include "base/no_destructor.h" #include "build/build_config.h" @@ -27,6 +22,11 @@ #include "ui/views/image_model_utils.h" #if defined(OS_WIN) +#include <windows.h> + +// windows.h needs to come first. The gap above prevents reordering. +#include <shellapi.h> + #include "chrome/browser/win/app_icon.h" #include "ui/gfx/icon_util.h" #endif @@ -141,7 +141,7 @@ } gfx::ImageSkia favicon = views::GetImageSkiaFromImageModel( - model_->GetFaviconForTabIconView(), GetNativeTheme()); + model_->GetFaviconForTabIconView(), GetColorProvider()); if (!favicon.isNull()) { PaintFavicon(canvas, favicon); return;
diff --git a/chrome/browser/ui/views/toolbar/read_later_toolbar_button.cc b/chrome/browser/ui/views/toolbar/read_later_toolbar_button.cc index 069498a..251d45dd 100644 --- a/chrome/browser/ui/views/toolbar/read_later_toolbar_button.cc +++ b/chrome/browser/ui/views/toolbar/read_later_toolbar_button.cc
@@ -50,7 +50,8 @@ browser->profile(), IDS_READ_LATER_TITLE, /*enable_extension_apis=*/true, - /*webui_resizes_host=*/false)) { + /*webui_resizes_host=*/false, + /*esc_closes_ui=*/false)) { SetVisible(false); contents_wrapper_->SetHost(weak_factory_.GetWeakPtr()); contents_wrapper_->ReloadWebContents();
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 f67bf424..e1ca1d7e 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
@@ -17,6 +17,7 @@ #include "ui/base/l10n/l10n_util.h" #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/base/models/image_model.h" +#include "ui/color/color_id.h" #include "ui/gfx/image/image_skia.h" #include "ui/gfx/paint_vector_icon.h" #include "ui/views/controls/image_view.h" @@ -156,8 +157,7 @@ auto arrow = std::make_unique<views::ImageView>(ui::ImageModel::FromVectorIcon( - vector_icons::kForwardArrowIcon, - ui::NativeTheme::kColorId_DefaultIconColor, kArrowIconSizeDp)); + vector_icons::kForwardArrowIcon, ui::kColorIcon, kArrowIconSizeDp)); layout->AddView(std::move(arrow)); auto new_icon_image_view = std::make_unique<views::ImageView>();
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 976ee67..8148ac3 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
@@ -334,19 +334,9 @@ most_visited_page_factory_receiver_(this), browser_command_factory_receiver_(this), profile_(Profile::FromWebUI(web_ui)), - theme_service_(ThemeServiceFactory::GetForProfile(profile_)), - ntp_custom_background_service_( - NtpCustomBackgroundServiceFactory::GetForProfile(profile_)), - web_contents_(web_ui->GetWebContents()), - // We initialize navigation_start_time_ to a reasonable value to account - // for the unlikely case where the NewTabPageHandler is created before we - // received the DidStartNavigation event. - navigation_start_time_(base::Time::Now()) { + web_contents_(web_ui->GetWebContents()) { auto* source = CreateNewTabPageUiHtmlSource(profile_); source->AddBoolean( - "customBackgroundDisabledByPolicy", - ntp_custom_background_service_->IsCustomBackgroundDisabledByPolicy()); - source->AddBoolean( "modulesVisibleManagedByPolicy", profile_->GetPrefs()->IsManagedPreference(prefs::kNtpModulesVisible)); content::WebUIDataSource::Add(profile_, source); @@ -373,22 +363,6 @@ ntp_prefs::kNtpShortcutsVisible, base::BindRepeating(&NewTabPageUI::OnTilesVisibilityPrefChanged, weak_ptr_factory_.GetWeakPtr())); - - // Store basic theme info in load time data to make the background color and - // background image available as soon as the page loads to prevent a potential - // white flicker. - - // Load time data is cached across page reloads. Listen for theme changes so - // that theme info is up-to-date when reloading. - native_theme_observation_.Observe(ui::NativeTheme::GetInstanceForNativeUi()); - theme_service_observation_.Observe(theme_service_); - ntp_custom_background_service_observation_.Observe( - ntp_custom_background_service_); - - // Populates the load time data with basic info. - OnThemeChanged(); - OnCustomBackgroundImageUpdated(); - OnLoad(); } WEB_UI_CONTROLLER_TYPE_IMPL(NewTabPageUI) @@ -516,7 +490,8 @@ DCHECK(pending_page.is_valid()); page_handler_ = std::make_unique<NewTabPageHandler>( std::move(pending_page_handler), std::move(pending_page), profile_, - ntp_custom_background_service_, theme_service_, + NtpCustomBackgroundServiceFactory::GetForProfile(profile_), + ThemeServiceFactory::GetForProfile(profile_), LogoServiceFactory::GetForProfile(profile_), &ThemeService::GetThemeProviderForProfile(profile_), web_contents_, navigation_start_time_); @@ -557,70 +532,15 @@ most_visited_page_handler_->SetShortcutsVisible(IsShortcutsVisible()); } -void NewTabPageUI::OnNativeThemeUpdated(ui::NativeTheme* observed_theme) { - OnThemeChanged(); -} - -void NewTabPageUI::OnThemeChanged() { - std::unique_ptr<base::DictionaryValue> update(new base::DictionaryValue); - auto background_color = - ThemeService::GetThemeProviderForProfile(profile_).GetColor( - ThemeProperties::COLOR_NTP_BACKGROUND); - update->SetString( - "backgroundColor", - base::StringPrintf("#%02X%02X%02X", SkColorGetR(background_color), - SkColorGetG(background_color), - SkColorGetB(background_color))); - content::WebUIDataSource::Update(profile_, chrome::kChromeUINewTabPageHost, - std::move(update)); -} - -void NewTabPageUI::OnCustomBackgroundImageUpdated() { - std::unique_ptr<base::DictionaryValue> update(new base::DictionaryValue); - url::RawCanonOutputT<char> encoded_url; - auto custom_background_url = - (ntp_custom_background_service_ - ? ntp_custom_background_service_->GetCustomBackground() - : absl::optional<CustomBackground>()) - .value_or(CustomBackground()) - .custom_background_url; - url::EncodeURIComponent(custom_background_url.spec().c_str(), - custom_background_url.spec().size(), &encoded_url); - update->SetString( - "backgroundImageUrl", - encoded_url.length() > 0 - ? base::StrCat( - {"chrome-untrusted://new-tab-page/custom_background_image?url=", - std::string(encoded_url.data(), encoded_url.length())}) - : ""); - content::WebUIDataSource::Update(profile_, chrome::kChromeUINewTabPageHost, - std::move(update)); -} - -void NewTabPageUI::OnNtpCustomBackgroundServiceShuttingDown() { - ntp_custom_background_service_observation_.Reset(); - ntp_custom_background_service_ = nullptr; -} - void NewTabPageUI::DidStartNavigation( content::NavigationHandle* navigation_handle) { // TODO(https://crbug.com/1218946): With MPArch there may be multiple main // frames. This caller was converted automatically to the primary main frame // to preserve its semantics. Follow up to confirm correctness. if (navigation_handle->IsInPrimaryMainFrame() && - navigation_handle->GetURL() == GURL(chrome::kChromeUINewTabPageURL)) { - navigation_start_time_ = base::Time::Now(); + /* Comparing origins because NTP might be called with URL params. */ + IsNewTabPageOrigin(navigation_handle->GetURL())) { OnLoad(); - auto prev_navigation_time = - profile_->GetPrefs()->GetTime(kPrevNavigationTimePrefName); - if (!prev_navigation_time.is_null()) { - base::UmaHistogramCustomTimes( - "NewTabPage.TimeSinceLastNTP", - navigation_start_time_ - prev_navigation_time, - base::TimeDelta::FromSeconds(1), base::TimeDelta::FromDays(1), 100); - } - profile_->GetPrefs()->SetTime(kPrevNavigationTimePrefName, - navigation_start_time_); } } @@ -645,6 +565,8 @@ } void NewTabPageUI::OnLoad() { + navigation_start_time_ = base::Time::Now(); + std::unique_ptr<base::DictionaryValue> update(new base::DictionaryValue); update->SetDoubleKey("navigationStartTime", navigation_start_time_.ToJsTime()); @@ -659,8 +581,50 @@ base::FeatureList::IsEnabled(ntp_features::kModules) && has_credentials); update->SetBoolKey("driveModuleEnabled", NewTabPageUI::IsDriveModuleEnabled(profile_)); + // Store basic theme info in load time data to make the background color and + // background image available as soon as the page loads to prevent a + // potential white flicker. + auto background_color = + ThemeService::GetThemeProviderForProfile(profile_).GetColor( + ThemeProperties::COLOR_NTP_BACKGROUND); + update->SetString( + "backgroundColor", + base::StringPrintf("#%02X%02X%02X", SkColorGetR(background_color), + SkColorGetG(background_color), + SkColorGetB(background_color))); + url::RawCanonOutputT<char> encoded_url; + auto* ntp_custom_background_service = + NtpCustomBackgroundServiceFactory::GetForProfile(profile_); + CHECK(ntp_custom_background_service); + update->SetBoolean( + "customBackgroundDisabledByPolicy", + ntp_custom_background_service->IsCustomBackgroundDisabledByPolicy()); + auto custom_background_url = + ntp_custom_background_service->GetCustomBackground() + .value_or(CustomBackground()) + .custom_background_url; + url::EncodeURIComponent(custom_background_url.spec().c_str(), + custom_background_url.spec().size(), &encoded_url); + update->SetString("backgroundImageUrl", + encoded_url.length() > 0 + ? base::StrCat({"chrome-untrusted://new-tab-page/" + "custom_background_image?url=", + std::string(encoded_url.data(), + encoded_url.length())}) + : ""); content::WebUIDataSource::Update(profile_, chrome::kChromeUINewTabPageHost, std::move(update)); + + auto prev_navigation_time = + profile_->GetPrefs()->GetTime(kPrevNavigationTimePrefName); + if (!prev_navigation_time.is_null()) { + base::UmaHistogramCustomTimes("NewTabPage.TimeSinceLastNTP", + navigation_start_time_ - prev_navigation_time, + base::TimeDelta::FromSeconds(1), + base::TimeDelta::FromDays(1), 100); + } + profile_->GetPrefs()->SetTime(kPrevNavigationTimePrefName, + navigation_start_time_); } // static
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 03f4455..26777b5b 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
@@ -16,10 +16,6 @@ #endif #include "base/memory/weak_ptr.h" #include "base/scoped_observation.h" -#include "chrome/browser/search/background/ntp_custom_background_service.h" -#include "chrome/browser/search/background/ntp_custom_background_service_observer.h" -#include "chrome/browser/themes/theme_service.h" -#include "chrome/browser/themes/theme_service_observer.h" #include "chrome/browser/ui/webui/new_tab_page/new_tab_page.mojom.h" #include "chrome/browser/ui/webui/realbox/realbox.mojom-forward.h" #include "components/prefs/pref_change_registrar.h" @@ -28,8 +24,6 @@ #include "mojo/public/cpp/bindings/pending_remote.h" #include "mojo/public/cpp/bindings/receiver.h" #include "ui/base/resource/resource_scale_factor.h" -#include "ui/native_theme/native_theme.h" -#include "ui/native_theme/native_theme_observer.h" #include "ui/webui/mojo_web_ui_controller.h" #include "ui/webui/resources/cr_components/customize_themes/customize_themes.mojom.h" #include "ui/webui/resources/cr_components/most_visited/most_visited.mojom.h" @@ -67,9 +61,6 @@ public customize_themes::mojom::CustomizeThemesHandlerFactory, public most_visited::mojom::MostVisitedPageHandlerFactory, public browser_command::mojom::CommandHandlerFactory, - public ui::NativeThemeObserver, - public ThemeServiceObserver, - public NtpCustomBackgroundServiceObserver, content::WebContentsObserver { public: explicit NewTabPageUI(content::WebUI* web_ui); @@ -173,16 +164,6 @@ mojo::PendingReceiver<most_visited::mojom::MostVisitedPageHandler> pending_page_handler) override; - // ui::NativeThemeObserver: - void OnNativeThemeUpdated(ui::NativeTheme* observed_theme) override; - - // ThemeServiceObserver: - void OnThemeChanged() override; - - // NtpCustomBackgroundServiceObserver: - void OnCustomBackgroundImageUpdated() override; - void OnNtpCustomBackgroundServiceShuttingDown() override; - // content::WebContentsObserver: void DidStartNavigation( content::NavigationHandle* navigation_handle) override; @@ -195,7 +176,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. + // Called when the NTP (re)loads. Sets mutable load time data among other + // things. void OnLoad(); std::unique_ptr<NewTabPageHandler> page_handler_; @@ -216,15 +198,6 @@ #endif std::unique_ptr<CartHandler> cart_handler_; Profile* profile_; - ThemeService* theme_service_; - NtpCustomBackgroundService* ntp_custom_background_service_; - base::ScopedObservation<ui::NativeTheme, ui::NativeThemeObserver> - native_theme_observation_{this}; - base::ScopedObservation<ThemeService, ThemeServiceObserver> - theme_service_observation_{this}; - base::ScopedObservation<NtpCustomBackgroundService, - NtpCustomBackgroundServiceObserver> - ntp_custom_background_service_observation_{this}; content::WebContents* web_contents_; // Time the NTP started loading. Used for logging the WebUI NTP's load // performance.
diff --git a/chrome/browser/ui/webui/settings/chrome_cleanup_handler_win.cc b/chrome/browser/ui/webui/settings/chrome_cleanup_handler_win.cc index f018ed74..3efe0ec 100644 --- a/chrome/browser/ui/webui/settings/chrome_cleanup_handler_win.cc +++ b/chrome/browser/ui/webui/settings/chrome_cleanup_handler_win.cc
@@ -193,7 +193,6 @@ const base::ListValue* args) { DCHECK_EQ(0U, args->GetList().size()); - UMA_HISTOGRAM_BOOLEAN("SoftwareReporter.CleanupCard", true); base::RecordAction( base::UserMetricsAction("SoftwareReporter.CleanupWebui_Shown")); AllowJavascript();
diff --git a/chrome/browser/updater/browser_updater_client_mac.mm b/chrome/browser/updater/browser_updater_client_mac.mm index 52622be3..f461f20 100644 --- a/chrome/browser/updater/browser_updater_client_mac.mm +++ b/chrome/browser/updater/browser_updater_client_mac.mm
@@ -52,13 +52,14 @@ if (scope == updater::UpdaterScope::kSystem) { options = NSXPCConnectionPrivileged; } - return [self initWithConnectionOptions:options]; + return [self initWithConnectionOptions:options withScope:scope]; } -- (instancetype)initWithConnectionOptions:(NSXPCConnectionOptions)options { +- (instancetype)initWithConnectionOptions:(NSXPCConnectionOptions)options + withScope:(updater::UpdaterScope)scope { if (self = [super init]) { _xpcConnection.reset([[NSXPCConnection alloc] - initWithMachServiceName:updater::GetUpdateServiceMachName() + initWithMachServiceName:updater::GetUpdateServiceMachName(scope) options:options]); _xpcConnection.get().remoteObjectInterface =
diff --git a/chrome/build/win32.pgo.txt b/chrome/build/win32.pgo.txt index a32d9f96..3d12a0a 100644 --- a/chrome/build/win32.pgo.txt +++ b/chrome/build/win32.pgo.txt
@@ -1 +1 @@ -chrome-win32-main-1632311929-105d3e8781f17ca94ef572f4c77e012f35cfe9ac.profdata +chrome-win32-main-1632322693-4c53de8707e82c77d21ef36875183133e93a33b0.profdata
diff --git a/chrome/build/win64.pgo.txt b/chrome/build/win64.pgo.txt index 0048300..e86e0c9 100644 --- a/chrome/build/win64.pgo.txt +++ b/chrome/build/win64.pgo.txt
@@ -1 +1 @@ -chrome-win64-main-1632311929-f09deebcdbfea1b7306092c75b6288d39cb8bac9.profdata +chrome-win64-main-1632322693-ccbeb05d971781902a0dc8c7c3416d37d8b993c8.profdata
diff --git a/chrome/common/chromeos/extensions/api/_api_features.json b/chrome/common/chromeos/extensions/api/_api_features.json index 9f689f6..a3fe4eba 100644 --- a/chrome/common/chromeos/extensions/api/_api_features.json +++ b/chrome/common/chromeos/extensions/api/_api_features.json
@@ -13,13 +13,13 @@ "contexts": [ "blessed_extension" ], - "channel": "dev" + "channel": "stable" }, "os.telemetry": { "dependencies": [ "permission:os.telemetry" ], "contexts": [ "blessed_extension" ], - "channel": "dev" + "channel": "stable" } }
diff --git a/chrome/common/chromeos/extensions/api/_manifest_features.json b/chrome/common/chromeos/extensions/api/_manifest_features.json index ddfcdfd1..f84af672 100644 --- a/chrome/common/chromeos/extensions/api/_manifest_features.json +++ b/chrome/common/chromeos/extensions/api/_manifest_features.json
@@ -11,7 +11,7 @@ // Note: only allowlisted extension ID hashes are allowed to declare this key. // More info: http://go/dd-telemetry-extension-api-surface "chromeos_system_extension": { - "channel": "dev", + "channel": "stable", "extension_types": [ "chromeos_system_extension" ],
diff --git a/chrome/common/chromeos/extensions/api/_permission_features.json b/chrome/common/chromeos/extensions/api/_permission_features.json index 9bcb687..b926a3a 100644 --- a/chrome/common/chromeos/extensions/api/_permission_features.json +++ b/chrome/common/chromeos/extensions/api/_permission_features.json
@@ -9,14 +9,14 @@ // well as feature.h, simple_feature.h, and feature_provider.h. { "os.diagnostics": { - "channel": "dev", + "channel": "stable", "extension_types": [ "chromeos_system_extension" ], "dependencies": [ "manifest:chromeos_system_extension" ] }, "os.telemetry": { - "channel": "dev", + "channel": "stable", "extension_types": [ "chromeos_system_extension" ],
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc index cae569ce..e685591 100644 --- a/chrome/common/pref_names.cc +++ b/chrome/common/pref_names.cc
@@ -3280,6 +3280,9 @@ const char kCartDiscountEnabled[] = "cart_discount_enabled"; // Map pref recording the discounts used by users. const char kCartUsedDiscounts[] = "cart_used_discounts"; +// A time pref indicating the timestamp of when last cart discount fetch +// happened. +const char kCartDiscountLastFetchedTime[] = "cart_discount_last_fetched_time"; #endif #if defined(OS_ANDROID)
diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h index e00513c..7cf29b2 100644 --- a/chrome/common/pref_names.h +++ b/chrome/common/pref_names.h
@@ -1159,6 +1159,7 @@ extern const char kCartDiscountAcknowledged[]; extern const char kCartDiscountEnabled[]; extern const char kCartUsedDiscounts[]; +extern const char kCartDiscountLastFetchedTime[]; #endif #if defined(OS_ANDROID)
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn index 0718709..d50f94c 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn
@@ -2964,6 +2964,7 @@ "../browser/ash/app_mode/kiosk_crash_restore_browsertest.cc", "../browser/ash/app_mode/web_app/web_kiosk_app_data_browsertest.cc", "../browser/ash/app_restore/full_restore_app_launch_handler_browsertest.cc", + "../browser/ash/app_restore/full_restore_policy_browsertest.cc", "../browser/ash/apps/apk_web_app_installer_browsertest.cc", "../browser/ash/arc/accessibility/arc_accessibility_helper_bridge_browsertest.cc", "../browser/ash/arc/auth/arc_active_directory_enrollment_token_fetcher_browsertest.cc", @@ -3988,16 +3989,20 @@ "../browser/lacros/popup_lacros_browsertest.cc", "../browser/lacros/screen_manager_lacros_browsertest.cc", "../browser/lacros/web_contents_can_go_back_observer_browsertest.cc", + "../browser/metrics/structured/lacros_structured_metrics_recorder_browsertest.cc", ] deps = [ ":browser_tests_runner", ":test_support", + "//chrome/browser/metrics/structured", "//chromeos/crosapi/mojom", "//chromeos/lacros", "//chromeos/services/machine_learning/public/cpp", "//chromeos/services/machine_learning/public/cpp:stub", "//chromeos/services/machine_learning/public/mojom", + "//components/metrics/structured", + "//components/metrics/structured:structured_events", "//components/proxy_config:proxy_config", "//ui/platform_window", ] @@ -7514,6 +7519,7 @@ "../browser/ui/views/confirm_bubble_views_unittest.cc", "../browser/ui/views/content_setting_bubble_contents_unittest.cc", "../browser/ui/views/desktop_capture/desktop_media_picker_views_unittest.cc", + "../browser/ui/views/desktop_capture/desktop_media_tab_list_unittest.cc", "../browser/ui/views/device_chooser_content_view_unittest.cc", "../browser/ui/views/download/download_in_progress_dialog_view_unittest.cc", "../browser/ui/views/download/download_shelf_view_unittest.cc",
diff --git a/chrome/test/data/policy/policy_test_cases.json b/chrome/test/data/policy/policy_test_cases.json index 66a8e1dc..fd2891a 100644 --- a/chrome/test/data/policy/policy_test_cases.json +++ b/chrome/test/data/policy/policy_test_cases.json
@@ -15724,5 +15724,75 @@ } } ] + }, + "FullRestoreEnabled": { + "os": [ + "chromeos_ash" + ], + "policy_pref_mapping_tests": [ + { + "policies": { + "FullRestoreEnabled": false + }, + "prefs": { + "settings.restore_apps_enabled": { + "value": false + } + } + }, + { + "policies": { + "FullRestoreEnabled": true + }, + "prefs": { + "settings.restore_apps_enabled": { + "value": true + } + } + }, + { + "policies": {}, + "prefs": { + "settings.restore_apps_enabled": { + "default_value": true + } + } + } + ] + }, + "GhostWindowEnabled": { + "os": [ + "chromeos_ash" + ], + "policy_pref_mapping_tests": [ + { + "policies": { + "GhostWindowEnabled": false + }, + "prefs": { + "settings.ghost_window_enabled": { + "value": false + } + } + }, + { + "policies": { + "GhostWindowEnabled": true + }, + "prefs": { + "settings.ghost_window_enabled": { + "value": true + } + } + }, + { + "policies": {}, + "prefs": { + "settings.ghost_window_enabled": { + "default_value": true + } + } + } + ] } }
diff --git a/chrome/test/data/webui/chromeos/diagnostics/connectivity_card_test.js b/chrome/test/data/webui/chromeos/diagnostics/connectivity_card_test.js index 6edf101..4134b39d 100644 --- a/chrome/test/data/webui/chromeos/diagnostics/connectivity_card_test.js +++ b/chrome/test/data/webui/chromeos/diagnostics/connectivity_card_test.js
@@ -145,16 +145,15 @@ test('CardTitleEthernetOnlineInitializedCorrectly', () => { return initializeConnectivityCard('ethernetGuid').then(() => { dx_utils.assertElementContainsText( - connectivityCardElement.$$('#cardTitle'), - 'Ethernet [81:C5:A6:30:3F:31] (Online)'); + connectivityCardElement.$$('#cardTitle'), 'Ethernet (Online)'); }); }); - test('CardConnectionChipInitializedCorrectly', () => { + test('CardMacAddressChipInitializedCorrectly', () => { return initializeConnectivityCard('ethernetGuid').then(() => { dx_utils.assertElementContainsText( - connectivityCardElement.$$('#defaultConnectionChip'), - connectivityCardElement.i18n('networkDefaultConnectionLabel')); + connectivityCardElement.$$('#macAddressChip'), + 'MAC: 81:C5:A6:30:3F:31'); }); });
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 575a834..57a5ed1 100644 --- a/chrome/test/data/webui/chromeos/diagnostics/network_card_test.js +++ b/chrome/test/data/webui/chromeos/diagnostics/network_card_test.js
@@ -104,8 +104,7 @@ test('CardTitleWiFiConnectedInitializedCorrectly', () => { return initializeNetworkCard('wifiGuid').then(() => { dx_utils.assertElementContainsText( - networkCardElement.$$('#cardTitle'), - 'Wi-Fi [84:C5:A6:30:3F:31] (Connected)'); + networkCardElement.$$('#cardTitle'), 'Wi-Fi (Connected)'); assertFalse(isVisible(getTroubleConnectingElement())); assertTrue(isVisible(getWifiInfoElement())); assertTrue(isVisible(getIpConfigDrawerElement())); @@ -115,8 +114,7 @@ test('CardTitleWiFiDisabledInitializedCorrectly', () => { return initializeNetworkCard('wifiGuidDisabled').then(() => { dx_utils.assertElementContainsText( - networkCardElement.$$('#cardTitle'), - 'Wi-Fi [84:C5:A6:30:3F:31] (Disabled)'); + networkCardElement.$$('#cardTitle'), 'Wi-Fi (Disabled)'); assertTrue(isVisible(getTroubleConnectingElement())); assertFalse(isVisible(getNetworkInfoElement())); assertFalse(isVisible(getIpConfigDrawerElement())); @@ -126,8 +124,7 @@ test('WifiDisconnectedShowTroubleShooting', () => { return initializeNetworkCard('wifiDisconnectedGuid').then(() => { dx_utils.assertElementContainsText( - networkCardElement.$$('#cardTitle'), - 'Wi-Fi [84:C5:A6:30:3F:31] (Not Connected)'); + networkCardElement.$$('#cardTitle'), 'Wi-Fi (Not Connected)'); assertTrue(isVisible(getTroubleConnectingElement())); assertFalse(isVisible(getNetworkInfoElement())); assertFalse(isVisible(getIpConfigDrawerElement())); @@ -137,8 +134,7 @@ test('WifiPortalShowTroubleShooting', () => { return initializeNetworkCard('wifiPortalGuid').then(() => { dx_utils.assertElementContainsText( - networkCardElement.$$('#cardTitle'), - 'Wi-Fi [84:C5:A6:30:3F:31] (Portal)'); + networkCardElement.$$('#cardTitle'), 'Wi-Fi (Portal)'); assertTrue(isVisible(getTroubleConnectingElement())); assertTrue(isVisible(getNetworkInfoElement())); assertTrue(isVisible(getIpConfigDrawerElement())); @@ -148,8 +144,7 @@ test('CardTitleEthernetOnlineInitializedCorrectly', () => { return initializeNetworkCard('ethernetGuid').then(() => { dx_utils.assertElementContainsText( - networkCardElement.$$('#cardTitle'), - 'Ethernet [81:C5:A6:30:3F:31] (Online)'); + networkCardElement.$$('#cardTitle'), 'Ethernet (Online)'); assertFalse(isVisible(getTroubleConnectingElement())); assertTrue(isVisible(getEthernetInfoElement())); }); @@ -158,8 +153,7 @@ test('EthernetDisconnectedShowTroubleShooting', () => { return initializeNetworkCard('ethernetDisconnectedGuid').then(() => { dx_utils.assertElementContainsText( - networkCardElement.$$('#cardTitle'), - 'Ethernet [81:C5:A6:30:3F:32] (Not Connected)'); + networkCardElement.$$('#cardTitle'), 'Ethernet (Not Connected)'); assertTrue(isVisible(getTroubleConnectingElement())); assertFalse(isVisible(getNetworkInfoElement())); assertFalse(isVisible(getIpConfigDrawerElement())); @@ -169,8 +163,7 @@ test('NetworkConnectingHideTroubleShooting', () => { return initializeNetworkCard('ethernetConnectingGuid').then(() => { dx_utils.assertElementContainsText( - networkCardElement.$$('#cardTitle'), - 'Ethernet [81:C5:A6:30:3F:33] (Connecting)'); + networkCardElement.$$('#cardTitle'), 'Ethernet (Connecting)'); assertFalse(isVisible(getTroubleConnectingElement())); assertTrue(isVisible(getNetworkInfoElement())); assertTrue(isVisible(getIpConfigDrawerElement()));
diff --git a/chrome/test/data/webui/chromeos/shimless_rma/BUILD.gn b/chrome/test/data/webui/chromeos/shimless_rma/BUILD.gn index 74a7f4f..6beb1cb 100644 --- a/chrome/test/data/webui/chromeos/shimless_rma/BUILD.gn +++ b/chrome/test/data/webui/chromeos/shimless_rma/BUILD.gn
@@ -27,6 +27,7 @@ ":onboarding_update_page_test", ":onboarding_wait_for_manual_wp_disable_page_test", ":reimaging_calibration_page_test", + ":reimaging_calibration_run_page_test", ":reimaging_calibration_setup_page_test", ":reimaging_device_information_page_test", ":reimaging_firmware_update_page_test", @@ -188,6 +189,16 @@ externs_list = [ "$externs_path/mocha-2.5.js" ] } +js_library("reimaging_calibration_run_page_test") { + deps = [ + "../..:chai_assert", + "//ash/webui/shimless_rma/resources:fake_shimless_rma_service", + "//ash/webui/shimless_rma/resources:mojo_interface_provider", + "//ash/webui/shimless_rma/resources:reimaging_calibration_run_page", + ] + externs_list = [ "$externs_path/mocha-2.5.js" ] +} + js_library("reimaging_calibration_setup_page_test") { deps = [ "../..:chai_assert",
diff --git a/chrome/test/data/webui/chromeos/shimless_rma/reimaging_calibration_run_page_test.js b/chrome/test/data/webui/chromeos/shimless_rma/reimaging_calibration_run_page_test.js new file mode 100644 index 0000000..5046169e --- /dev/null +++ b/chrome/test/data/webui/chromeos/shimless_rma/reimaging_calibration_run_page_test.js
@@ -0,0 +1,179 @@ +// 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 {PromiseResolver} from 'chrome://resources/js/promise_resolver.m.js'; +import {FakeShimlessRmaService} from 'chrome://shimless-rma/fake_shimless_rma_service.js'; +import {setShimlessRmaServiceForTesting} from 'chrome://shimless-rma/mojo_interface_provider.js'; +import {ReimagingCalibrationRunPageElement} from 'chrome://shimless-rma/reimaging_calibration_run_page.js'; +import {CalibrationOverallStatus, CalibrationStatus, ComponentType} from 'chrome://shimless-rma/shimless_rma_types.js'; + +import {assertDeepEquals, assertEquals, assertFalse, assertNotEquals, assertTrue} from '../../chai_assert.js'; +import {flushTasks} from '../../test_util.js'; + +export function reimagingCalibrationRunPageTest() { + /** @type {?ReimagingCalibrationRunPageElement} */ + let component = null; + + /** @type {?FakeShimlessRmaService} */ + let service = null; + + suiteSetup(() => { + service = new FakeShimlessRmaService(); + setShimlessRmaServiceForTesting(service); + }); + + setup(() => { + document.body.innerHTML = ''; + }); + + teardown(() => { + component.remove(); + component = null; + service.reset(); + }); + + /** + * @return {!Promise} + */ + function initializeCalibrationRunPage() { + assertFalse(!!component); + + component = /** @type {!ReimagingCalibrationRunPageElement} */ ( + document.createElement('reimaging-calibration-run-page')); + assertTrue(!!component); + document.body.appendChild(component); + + return flushTasks(); + } + + test('Initializes', async () => { + await initializeCalibrationRunPage(); + const statusMessage = component.shadowRoot.querySelector('#calibration'); + assertFalse(statusMessage.hidden); + }); + + test('NextButtonBeforeCalibrationCompleteFails', async () => { + const resolver = new PromiseResolver(); + await initializeCalibrationRunPage(); + let calibrationCompleteCalls = 0; + service.calibrationComplete = () => { + calibrationCompleteCalls++; + return resolver.promise; + }; + + let savedResult; + let savedError; + component.onNextButtonClick() + .then((result) => savedResult = result) + .catch((error) => savedError = error); + await flushTasks(); + + assertEquals(0, calibrationCompleteCalls); + assertTrue(savedError instanceof Error); + assertEquals(savedError.message, 'Calibration is not complete.'); + assertEquals(savedResult, undefined); + }); + + test('NextButtonAfterCalibrationCompleteTriggersContinue', async () => { + const resolver = new PromiseResolver(); + await initializeCalibrationRunPage(); + let calibrationCompleteCalls = 0; + service.calibrationComplete = () => { + calibrationCompleteCalls++; + return resolver.promise; + }; + service.triggerCalibrationOverallObserver( + CalibrationOverallStatus.kCalibrationOverallComplete, 0); + await flushTasks(); + + let expectedResult = {foo: 'bar'}; + let savedResult; + component.onNextButtonClick().then((result) => savedResult = result); + // Resolve to a distinct result to confirm it was not modified. + resolver.resolve(expectedResult); + await flushTasks(); + + assertEquals(1, calibrationCompleteCalls); + assertDeepEquals(savedResult, expectedResult); + }); + + test( + 'CalibrationOverallProgressRoundCompleteCallsContinueCalibration', + async () => { + const resolver = new PromiseResolver(); + await initializeCalibrationRunPage(); + let continueCalibrationCalls = 0; + service.continueCalibration = () => { + continueCalibrationCalls++; + return resolver.promise; + }; + service.triggerCalibrationOverallObserver( + CalibrationOverallStatus.kCalibrationOverallCurrentRoundComplete, + 0); + await flushTasks(); + + assertEquals(1, continueCalibrationCalls); + }); + + test( + 'CalibrationOverallProgressRoundFailedCallsContinueCalibration', + async () => { + const resolver = new PromiseResolver(); + await initializeCalibrationRunPage(); + let continueCalibrationCalls = 0; + service.continueCalibration = () => { + continueCalibrationCalls++; + return resolver.promise; + }; + service.triggerCalibrationOverallObserver( + CalibrationOverallStatus.kCalibrationOverallCurrentRoundFailed, 0); + await flushTasks(); + + assertEquals(1, continueCalibrationCalls); + }); + + test( + 'CalibrationOverallProgressIniitalizationFailedCallsContinueCalibration', + async () => { + const resolver = new PromiseResolver(); + await initializeCalibrationRunPage(); + let continueCalibrationCalls = 0; + service.continueCalibration = () => { + continueCalibrationCalls++; + return resolver.promise; + }; + service.triggerCalibrationOverallObserver( + CalibrationOverallStatus.kCalibrationOverallInitializationFailed, + 0); + await flushTasks(); + + assertEquals(1, continueCalibrationCalls); + }); + + test('CalibrationProgressUpdatesStatusMessage', async () => { + await initializeCalibrationRunPage(); + const statusMessage = component.shadowRoot.querySelector('#calibration'); + let message = statusMessage.innerHTML; + service.triggerCalibrationObserver( + { + component: ComponentType.kGyroscope, + status: CalibrationStatus.kCalibrationInProgress, + progress: 0.5 + }, + 0); + await flushTasks(); + let message2 = statusMessage.innerHTML; + assertNotEquals(message, statusMessage.innerHTML); + service.triggerCalibrationObserver( + { + component: ComponentType.kLidAccelerometer, + status: CalibrationStatus.kCalibrationWaiting, + progress: 0.0 + }, + 0); + await flushTasks(); + assertNotEquals(message, statusMessage.innerHTML); + assertNotEquals(message2, statusMessage.innerHTML); + }); +}
diff --git a/chrome/test/data/webui/chromeos/shimless_rma/shimless_rma_browsertest.js b/chrome/test/data/webui/chromeos/shimless_rma/shimless_rma_browsertest.js index 350705a6..9917d57 100644 --- a/chrome/test/data/webui/chromeos/shimless_rma/shimless_rma_browsertest.js +++ b/chrome/test/data/webui/chromeos/shimless_rma/shimless_rma_browsertest.js
@@ -49,6 +49,7 @@ 'OnboardingUpdatePageTest', 'OnboardingWaitForManualWpDisablePageTest', 'ReimagingCalibrationPageTest', + 'ReimagingCalibrationRunPageTest', 'ReimagingCalibrationSetupPageTest', 'ReimagingFirmwareUpdatePageTest', 'ReimagingDeviceInformationPageTest',
diff --git a/chrome/test/data/webui/chromeos/shimless_rma/shimless_rma_unified_test.js b/chrome/test/data/webui/chromeos/shimless_rma/shimless_rma_unified_test.js index 482e4ba..d3a4123 100644 --- a/chrome/test/data/webui/chromeos/shimless_rma/shimless_rma_unified_test.js +++ b/chrome/test/data/webui/chromeos/shimless_rma/shimless_rma_unified_test.js
@@ -14,6 +14,7 @@ import {onboardingUpdatePageTest} from './onboarding_update_page_test.js'; import {onboardingWaitForManualWpDisablePageTest} from './onboarding_wait_for_manual_wp_disable_page_test.js'; import {reimagingCalibrationPageTest} from './reimaging_calibration_page_test.js'; +import {reimagingCalibrationRunPageTest} from './reimaging_calibration_run_page_test.js'; import {reimagingCalibrationSetupPageTest} from './reimaging_calibration_setup_page_test.js'; import {reimagingDeviceInformationPageTest} from './reimaging_device_information_page_test.js'; import {reimagingFirmwareUpdatePageTest} from './reimaging_firmware_update_page_test.js'; @@ -47,6 +48,7 @@ 'OnboardingWaitForManualWpDisablePageTest', onboardingWaitForManualWpDisablePageTest); runSuite('ReimagingCalibrationPageTest', reimagingCalibrationPageTest); +runSuite('ReimagingCalibrationRunPageTest', reimagingCalibrationRunPageTest); runSuite( 'ReimagingCalibrationSetupPageTest', reimagingCalibrationSetupPageTest); runSuite('ReimagingFirmwareUpdatePageTest', reimagingFirmwareUpdatePageTest);
diff --git a/chrome/test/data/webui/print_preview/destination_item_test_cros.js b/chrome/test/data/webui/print_preview/destination_item_test_cros.js index d3e97716..200e791 100644 --- a/chrome/test/data/webui/print_preview/destination_item_test_cros.js +++ b/chrome/test/data/webui/print_preview/destination_item_test_cros.js
@@ -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 {Destination, DestinationConnectionStatus, DestinationOrigin, DestinationType, NativeLayerCros, NativeLayerCrosImpl, PrinterState, PrinterStatusReason, PrinterStatusSeverity, PrintPreviewDestinationListItemElement} from 'chrome://print/print_preview.js'; +import {Destination, DestinationConnectionStatus, DestinationOrigin, DestinationType, NativeLayerCrosImpl, PrinterState, PrinterStatusReason, PrinterStatusSeverity, PrintPreviewDestinationListItemElement} from 'chrome://print/print_preview.js'; import {assert} from 'chrome://resources/js/assert.m.js'; import {flush} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js';
diff --git a/chrome/test/data/webui/print_preview/destination_search_test.js b/chrome/test/data/webui/print_preview/destination_search_test.js index 16afeab7..5abb246 100644 --- a/chrome/test/data/webui/print_preview/destination_search_test.js +++ b/chrome/test/data/webui/print_preview/destination_search_test.js
@@ -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 {Destination, DestinationConnectionStatus, DestinationOrigin, DestinationStore, DestinationStoreEventType, DestinationType, NativeLayer, NativeLayerImpl, PrintPreviewDestinationDialogElement} from 'chrome://print/print_preview.js'; +import {Destination, DestinationConnectionStatus, DestinationOrigin, DestinationStore, DestinationStoreEventType, DestinationType, NativeLayerImpl, PrintPreviewDestinationDialogElement} from 'chrome://print/print_preview.js'; import {assert} from 'chrome://resources/js/assert.m.js'; import {NativeEventTarget as EventTarget} from 'chrome://resources/js/cr/event_target.m.js'; import {flush} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js';
diff --git a/chrome/test/data/webui/print_preview/destination_select_test_cros.js b/chrome/test/data/webui/print_preview/destination_select_test_cros.js index 5519aea..4b53fd4 100644 --- a/chrome/test/data/webui/print_preview/destination_select_test_cros.js +++ b/chrome/test/data/webui/print_preview/destination_select_test_cros.js
@@ -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 {Destination, DestinationConnectionStatus, DestinationOrigin, DestinationType, NativeLayer, NativeLayerCros, NativeLayerCrosImpl, NativeLayerImpl, PrinterStatusReason, PrinterStatusSeverity, PrintPreviewDestinationDropdownCrosElement, PrintPreviewDestinationSelectCrosElement, SAVE_TO_DRIVE_CROS_DESTINATION_KEY} from 'chrome://print/print_preview.js'; +import {Destination, DestinationConnectionStatus, DestinationOrigin, DestinationType, NativeLayerCrosImpl, NativeLayerImpl, PrinterStatusReason, PrinterStatusSeverity, PrintPreviewDestinationDropdownCrosElement, PrintPreviewDestinationSelectCrosElement, SAVE_TO_DRIVE_CROS_DESTINATION_KEY} from 'chrome://print/print_preview.js'; import {assert} from 'chrome://resources/js/assert.m.js'; import {loadTimeData} from 'chrome://resources/js/load_time_data.m.js'; import {Base, flush} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js';
diff --git a/chrome/test/data/webui/print_preview/destination_settings_test.js b/chrome/test/data/webui/print_preview/destination_settings_test.js index 8e35151..b4d5bc1 100644 --- a/chrome/test/data/webui/print_preview/destination_settings_test.js +++ b/chrome/test/data/webui/print_preview/destination_settings_test.js
@@ -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 {CloudPrintInterfaceEventType, CloudPrintInterfaceImpl, Destination, DestinationConnectionStatus, DestinationErrorType, DestinationOrigin, DestinationState, DestinationStore, DestinationStoreEventType, DestinationType, Error, GooglePromotedDestinationId, makeRecentDestination, NativeLayer, NativeLayerImpl, NUM_PERSISTED_DESTINATIONS, PrintPreviewDestinationSettingsElement, State} from 'chrome://print/print_preview.js'; +import {CloudPrintInterfaceEventType, CloudPrintInterfaceImpl, Destination, DestinationConnectionStatus, DestinationErrorType, DestinationOrigin, DestinationState, DestinationStore, DestinationStoreEventType, DestinationType, Error, GooglePromotedDestinationId, makeRecentDestination, NativeLayerImpl, NUM_PERSISTED_DESTINATIONS, PrintPreviewDestinationSettingsElement, State} from 'chrome://print/print_preview.js'; import {assert} from 'chrome://resources/js/assert.m.js'; import {isChromeOS, isLacros, webUIListenerCallback} from 'chrome://resources/js/cr.m.js'; import {flush} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js';
diff --git a/chrome/test/data/webui/print_preview/destination_settings_test_cros.js b/chrome/test/data/webui/print_preview/destination_settings_test_cros.js index 0aa8ae3..3b751f9a 100644 --- a/chrome/test/data/webui/print_preview/destination_settings_test_cros.js +++ b/chrome/test/data/webui/print_preview/destination_settings_test_cros.js
@@ -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 {Destination, DestinationStore, DestinationType, NativeLayer, NativeLayerCros, NativeLayerCrosImpl, NativeLayerImpl, NUM_PERSISTED_DESTINATIONS, PrintPreviewDestinationSettingsElement, State} from 'chrome://print/print_preview.js'; +import {Destination, DestinationStore, DestinationType, NativeLayerCrosImpl, NativeLayerImpl, NUM_PERSISTED_DESTINATIONS, PrintPreviewDestinationSettingsElement, State} from 'chrome://print/print_preview.js'; import {assert} from 'chrome://resources/js/assert.m.js'; import {flush} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js';
diff --git a/chrome/test/data/webui/print_preview/destination_store_test.js b/chrome/test/data/webui/print_preview/destination_store_test.js index 09ae381..5547a38 100644 --- a/chrome/test/data/webui/print_preview/destination_store_test.js +++ b/chrome/test/data/webui/print_preview/destination_store_test.js
@@ -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 {CloudPrintInterfaceEventType, Destination, DestinationConnectionStatus, DestinationErrorType, DestinationOrigin, DestinationStore, DestinationStoreEventType, DestinationType, GooglePromotedDestinationId, makeRecentDestination, NativeInitialSettings, NativeLayerImpl, PrinterType} from 'chrome://print/print_preview.js'; +import {CloudPrintInterfaceEventType, Destination, DestinationConnectionStatus, DestinationErrorType, DestinationOrigin, DestinationStore, DestinationStoreEventType, DestinationType, GooglePromotedDestinationId, makeRecentDestination, NativeLayerImpl, PrinterType} from 'chrome://print/print_preview.js'; import {assert} from 'chrome://resources/js/assert.m.js'; import {isChromeOS, isLacros} from 'chrome://resources/js/cr.m.js'; import {loadTimeData} from 'chrome://resources/js/load_time_data.m.js';
diff --git a/chrome/test/data/webui/print_preview/invalid_settings_browsertest.js b/chrome/test/data/webui/print_preview/invalid_settings_browsertest.js index 21f4a215..c05f2e4 100644 --- a/chrome/test/data/webui/print_preview/invalid_settings_browsertest.js +++ b/chrome/test/data/webui/print_preview/invalid_settings_browsertest.js
@@ -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 {CloudPrintInterfaceEventType, CloudPrintInterfaceImpl, Destination, DestinationConnectionStatus, DestinationOrigin, DestinationStore, DestinationStoreEventType, DestinationType, makeRecentDestination, MeasurementSystemUnitType, NativeInitialSettings, NativeLayer, NativeLayerImpl, PluginProxyImpl, PrintPreviewAppElement, PrintPreviewDestinationSettingsElement, PrintPreviewLayoutSettingsElement, PrintPreviewNumberSettingsSectionElement, PrintPreviewPreviewAreaElement, PrintPreviewSidebarElement, ScalingType, State, whenReady} from 'chrome://print/print_preview.js'; +import {CloudPrintInterfaceEventType, CloudPrintInterfaceImpl, Destination, DestinationConnectionStatus, DestinationOrigin, DestinationStore, DestinationStoreEventType, DestinationType, makeRecentDestination, MeasurementSystemUnitType, NativeLayerImpl, PluginProxyImpl, PrintPreviewAppElement, PrintPreviewDestinationSettingsElement, PrintPreviewLayoutSettingsElement, PrintPreviewNumberSettingsSectionElement, PrintPreviewPreviewAreaElement, PrintPreviewSidebarElement, ScalingType, State, whenReady} from 'chrome://print/print_preview.js'; import {assert} from 'chrome://resources/js/assert.m.js'; import {isWindows} from 'chrome://resources/js/cr.m.js'; import {loadTimeData} from 'chrome://resources/js/load_time_data.m.js';
diff --git a/chrome/test/data/webui/print_preview/key_event_test.js b/chrome/test/data/webui/print_preview/key_event_test.js index 09cb044..51d1bf93 100644 --- a/chrome/test/data/webui/print_preview/key_event_test.js +++ b/chrome/test/data/webui/print_preview/key_event_test.js
@@ -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 {NativeLayer, NativeLayerImpl, PluginProxyImpl, PrintPreviewAppElement} from 'chrome://print/print_preview.js'; +import {NativeLayerImpl, PluginProxyImpl, PrintPreviewAppElement} from 'chrome://print/print_preview.js'; import {assert} from 'chrome://resources/js/assert.m.js'; import {isChromeOS, isLacros, isMac, isWindows} from 'chrome://resources/js/cr.m.js'; import {keyEventOn} from 'chrome://resources/polymer/v3_0/iron-test-helpers/mock-interactions.js';
diff --git a/chrome/test/data/webui/print_preview/native_layer_cros_stub.js b/chrome/test/data/webui/print_preview/native_layer_cros_stub.js index f8b8c57..9159d00 100644 --- a/chrome/test/data/webui/print_preview/native_layer_cros_stub.js +++ b/chrome/test/data/webui/print_preview/native_layer_cros_stub.js
@@ -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 {NativeLayerCros, NativeLayerCrosImpl, PrinterSetupResponse, PrinterStatusReason, PrinterStatusSeverity, PrintServer, PrintServersConfig} from 'chrome://print/print_preview.js'; +import {NativeLayerCrosImpl, PrinterStatusReason, PrinterStatusSeverity} from 'chrome://print/print_preview.js'; import {assert} from 'chrome://resources/js/assert.m.js'; import {PromiseResolver} from 'chrome://resources/js/promise_resolver.m.js';
diff --git a/chrome/test/data/webui/print_preview/native_layer_stub.js b/chrome/test/data/webui/print_preview/native_layer_stub.js index 896a5550..92cea2b 100644 --- a/chrome/test/data/webui/print_preview/native_layer_stub.js +++ b/chrome/test/data/webui/print_preview/native_layer_stub.js
@@ -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 {CapabilitiesResponse, Destination, GooglePromotedDestinationId, NativeInitialSettings, NativeLayer, PrinterType} from 'chrome://print/print_preview.js'; +import {Destination, GooglePromotedDestinationId, PrinterType} from 'chrome://print/print_preview.js'; import {assert} from 'chrome://resources/js/assert.m.js'; import {webUIListenerCallback} from 'chrome://resources/js/cr.m.js'; import {PromiseResolver} from 'chrome://resources/js/promise_resolver.m.js';
diff --git a/chrome/test/data/webui/print_preview/preview_area_test.js b/chrome/test/data/webui/print_preview/preview_area_test.js index 7f8dbb7..24ceccd 100644 --- a/chrome/test/data/webui/print_preview/preview_area_test.js +++ b/chrome/test/data/webui/print_preview/preview_area_test.js
@@ -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 {Destination, DestinationConnectionStatus, DestinationOrigin, DestinationType, Error, Margins, MeasurementSystem, MeasurementSystemUnitType, NativeLayer, NativeLayerImpl, PluginProxyImpl, PreviewAreaState, Size, State} from 'chrome://print/print_preview.js'; +import {Destination, DestinationConnectionStatus, DestinationOrigin, DestinationType, Error, Margins, MeasurementSystem, MeasurementSystemUnitType, NativeLayerImpl, PluginProxyImpl, PreviewAreaState, Size, State} from 'chrome://print/print_preview.js'; import {assert} from 'chrome://resources/js/assert.m.js'; import {NativeLayerStub} from 'chrome://test/print_preview/native_layer_stub.js'; import {getCddTemplate} from 'chrome://test/print_preview/print_preview_test_utils.js';
diff --git a/chrome/test/data/webui/print_preview/preview_generation_test.js b/chrome/test/data/webui/print_preview/preview_generation_test.js index d96b4e828..9141c03d 100644 --- a/chrome/test/data/webui/print_preview/preview_generation_test.js +++ b/chrome/test/data/webui/print_preview/preview_generation_test.js
@@ -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 {ColorMode, Destination, DestinationConnectionStatus, DestinationOrigin, DestinationState, DestinationType, Margins, MarginsType, NativeLayer, NativeLayerImpl, PluginProxyImpl, PrintPreviewAppElement, ScalingType} from 'chrome://print/print_preview.js'; +import {ColorMode, Destination, DestinationConnectionStatus, DestinationOrigin, DestinationState, DestinationType, Margins, MarginsType, NativeLayerImpl, PluginProxyImpl, PrintPreviewAppElement, ScalingType} from 'chrome://print/print_preview.js'; import {assert} from 'chrome://resources/js/assert.m.js'; import {NativeLayerStub} from 'chrome://test/print_preview/native_layer_stub.js'; import {getCddTemplate, getDefaultInitialSettings} from 'chrome://test/print_preview/print_preview_test_utils.js';
diff --git a/chrome/test/data/webui/print_preview/print_button_test.js b/chrome/test/data/webui/print_preview/print_button_test.js index eeab3dbe..f068be2 100644 --- a/chrome/test/data/webui/print_preview/print_button_test.js +++ b/chrome/test/data/webui/print_preview/print_button_test.js
@@ -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 {Destination, GooglePromotedDestinationId, NativeLayer, NativeLayerImpl, PluginProxyImpl, PrintPreviewAppElement} from 'chrome://print/print_preview.js'; +import {Destination, GooglePromotedDestinationId, NativeLayerImpl, PluginProxyImpl, PrintPreviewAppElement} from 'chrome://print/print_preview.js'; import {assert} from 'chrome://resources/js/assert.m.js'; import {NativeLayerStub} from 'chrome://test/print_preview/native_layer_stub.js'; import {getDefaultInitialSettings} from 'chrome://test/print_preview/print_preview_test_utils.js';
diff --git a/chrome/test/data/webui/print_preview/print_preview_app_test.js b/chrome/test/data/webui/print_preview/print_preview_app_test.js index 79f4079..4332d76 100644 --- a/chrome/test/data/webui/print_preview/print_preview_app_test.js +++ b/chrome/test/data/webui/print_preview/print_preview_app_test.js
@@ -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 {CloudPrintInterfaceImpl, Destination, DuplexMode, NativeLayer, NativeLayerImpl, PluginProxyImpl, PrintPreviewAppElement} from 'chrome://print/print_preview.js'; +import {CloudPrintInterfaceImpl, Destination, DuplexMode, NativeLayerImpl, PluginProxyImpl, PrintPreviewAppElement} from 'chrome://print/print_preview.js'; import {assert} from 'chrome://resources/js/assert.m.js'; import {webUIListenerCallback} from 'chrome://resources/js/cr.m.js'; import {CloudPrintInterfaceStub} from 'chrome://test/print_preview/cloud_print_interface_stub.js';
diff --git a/chrome/test/data/webui/print_preview/print_preview_sidebar_test.js b/chrome/test/data/webui/print_preview/print_preview_sidebar_test.js index d6fa3bf..8b3aa87 100644 --- a/chrome/test/data/webui/print_preview/print_preview_sidebar_test.js +++ b/chrome/test/data/webui/print_preview/print_preview_sidebar_test.js
@@ -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 {CloudPrintInterfaceImpl, NativeLayer, NativeLayerImpl, PrintPreviewModelElement, PrintPreviewSidebarElement} from 'chrome://print/print_preview.js'; +import {CloudPrintInterfaceImpl, NativeLayerImpl, PrintPreviewModelElement, PrintPreviewSidebarElement} from 'chrome://print/print_preview.js'; import {assert} from 'chrome://resources/js/assert.m.js'; import {CloudPrintInterfaceStub} from 'chrome://test/print_preview/cloud_print_interface_stub.js'; import {NativeLayerStub} from 'chrome://test/print_preview/native_layer_stub.js';
diff --git a/chrome/test/data/webui/print_preview/print_preview_test_utils.js b/chrome/test/data/webui/print_preview/print_preview_test_utils.js index b3c8480b..d7c727e 100644 --- a/chrome/test/data/webui/print_preview/print_preview_test_utils.js +++ b/chrome/test/data/webui/print_preview/print_preview_test_utils.js
@@ -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 {CapabilitiesResponse, DEFAULT_MAX_COPIES, Destination, DestinationCertificateStatus, DestinationConnectionStatus, DestinationOrigin, DestinationStore, DestinationType, GooglePromotedDestinationId, MeasurementSystemUnitType, NativeInitialSettings, SelectOption} from 'chrome://print/print_preview.js'; +import {DEFAULT_MAX_COPIES, Destination, DestinationCertificateStatus, DestinationConnectionStatus, DestinationOrigin, DestinationStore, DestinationType, GooglePromotedDestinationId, MeasurementSystemUnitType, SelectOption} from 'chrome://print/print_preview.js'; import {assert} from 'chrome://resources/js/assert.m.js'; import {isChromeOS, isLacros} from 'chrome://resources/js/cr.m.js'; import {loadTimeData} from 'chrome://resources/js/load_time_data.m.js';
diff --git a/chrome/test/data/webui/print_preview/restore_state_test.js b/chrome/test/data/webui/print_preview/restore_state_test.js index b522df9..12baa53 100644 --- a/chrome/test/data/webui/print_preview/restore_state_test.js +++ b/chrome/test/data/webui/print_preview/restore_state_test.js
@@ -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 {getInstance, MarginsType, NativeLayer, NativeLayerImpl, PluginProxyImpl, ScalingType} from 'chrome://print/print_preview.js'; +import {getInstance, MarginsType, NativeLayerImpl, PluginProxyImpl, ScalingType} from 'chrome://print/print_preview.js'; import {assert} from 'chrome://resources/js/assert.m.js'; import {isChromeOS, isLacros} from 'chrome://resources/js/cr.m.js'; import {NativeLayerStub} from 'chrome://test/print_preview/native_layer_stub.js';
diff --git a/chrome/test/data/webui/print_preview/system_dialog_browsertest.js b/chrome/test/data/webui/print_preview/system_dialog_browsertest.js index ddfa1831..b29507aa 100644 --- a/chrome/test/data/webui/print_preview/system_dialog_browsertest.js +++ b/chrome/test/data/webui/print_preview/system_dialog_browsertest.js
@@ -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 {Destination, DestinationConnectionStatus, DestinationOrigin, DestinationType, NativeLayer, NativeLayerImpl, PluginProxyImpl, PrintPreviewLinkContainerElement, PrintPreviewSidebarElement, whenReady} from 'chrome://print/print_preview.js'; +import {Destination, DestinationConnectionStatus, DestinationOrigin, DestinationType, NativeLayerImpl, PluginProxyImpl, PrintPreviewLinkContainerElement, PrintPreviewSidebarElement, whenReady} from 'chrome://print/print_preview.js'; import {assert} from 'chrome://resources/js/assert.m.js'; import {isWindows} from 'chrome://resources/js/cr.m.js'; import {NativeLayerStub} from 'chrome://test/print_preview/native_layer_stub.js'; @@ -67,7 +67,7 @@ assertEquals('FooDevice', page.destination_.id); link = isWindows ? linkContainer.$.systemDialogLink : linkContainer.$.openPdfInPreviewLink; - printTicketKey = isWindows ? 'showSystemDialog' : 'OpenPDFInPreview'; + printTicketKey = isWindows ? 'showSystemDialog' : 'openPDFInPreview'; }); });
diff --git a/chrome/test/data/webui/print_preview/user_manager_test.js b/chrome/test/data/webui/print_preview/user_manager_test.js index ad57828..75d0443 100644 --- a/chrome/test/data/webui/print_preview/user_manager_test.js +++ b/chrome/test/data/webui/print_preview/user_manager_test.js
@@ -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 {CloudPrintInterfaceImpl, DestinationStore, NativeLayer, NativeLayerImpl} from 'chrome://print/print_preview.js'; +import {CloudPrintInterfaceImpl, DestinationStore, NativeLayerImpl} from 'chrome://print/print_preview.js'; import {assert} from 'chrome://resources/js/assert.m.js'; import {webUIListenerCallback} from 'chrome://resources/js/cr.m.js'; import {CloudPrintInterfaceStub} from 'chrome://test/print_preview/cloud_print_interface_stub.js';
diff --git a/chrome/tools/build/win/FILES.cfg b/chrome/tools/build/win/FILES.cfg index 1c964af..bfdb3d37 100644 --- a/chrome/tools/build/win/FILES.cfg +++ b/chrome/tools/build/win/FILES.cfg
@@ -740,11 +740,13 @@ { 'filename': 'UpdaterSetup.exe', 'buildtype': ['dev', 'official'], + 'optional': ['dev', 'official'], 'archive': 'updater.zip', }, { 'filename': 'UpdaterSigning', 'buildtype': ['dev', 'official'], + 'optional': ['dev', 'official'], 'archive': 'updater.zip', }, # Partner API files.
diff --git a/chrome/updater/app/app_install_mac.mm b/chrome/updater/app/app_install_mac.mm index f9f812e4..07c37ba 100644 --- a/chrome/updater/app/app_install_mac.mm +++ b/chrome/updater/app/app_install_mac.mm
@@ -16,7 +16,7 @@ void AppInstall::WakeCandidateDone() { PollLaunchctlList( - updater_scope(), GetUpdateServiceLaunchdName(), + updater_scope(), GetUpdateServiceLaunchdName(updater_scope()), LaunchctlPresence::kPresent, base::TimeDelta::FromSeconds(kWaitForLaunchctlUpdateSec), base::BindOnce([](scoped_refptr<AppInstall> installer,
diff --git a/chrome/updater/app/server/mac/server.mm b/chrome/updater/app/server/mac/server.mm index 5cd7f79..3ff86f6 100644 --- a/chrome/updater/app/server/mac/server.mm +++ b/chrome/updater/app/server/mac/server.mm
@@ -56,7 +56,9 @@ appServer:scoped_refptr<AppServerMac>(this)]); update_service_internal_listener_.reset([[NSXPCListener alloc] - initWithMachServiceName:GetUpdateServiceInternalMachName().get()]); + initWithMachServiceName:GetUpdateServiceInternalMachName( + updater_scope()) + .get()]); update_service_internal_listener_.get().delegate = update_service_internal_delegate_.get(); @@ -74,7 +76,8 @@ appServer:scoped_refptr<AppServerMac>(this)]); update_check_listener_.reset([[NSXPCListener alloc] - initWithMachServiceName:GetUpdateServiceMachName().get()]); + initWithMachServiceName:GetUpdateServiceMachName(updater_scope()) + .get()]); update_check_listener_.get().delegate = update_check_delegate_.get(); [update_check_listener_ resume];
diff --git a/chrome/updater/mac/setup/setup.mm b/chrome/updater/mac/setup/setup.mm index f65d04ce..698c823 100644 --- a/chrome/updater/mac/setup/setup.mm +++ b/chrome/updater/mac/setup/setup.mm
@@ -207,9 +207,9 @@ [program_arguments addObject:MakeProgramArgument(kSystemSwitch)]; NSDictionary<NSString*, id>* launchd_plist = @{ - @LAUNCH_JOBKEY_LABEL : GetUpdateServiceLaunchdLabel(), + @LAUNCH_JOBKEY_LABEL : GetUpdateServiceLaunchdLabel(scope), @LAUNCH_JOBKEY_PROGRAMARGUMENTS : program_arguments, - @LAUNCH_JOBKEY_MACHSERVICES : @{GetUpdateServiceMachName() : @YES}, + @LAUNCH_JOBKEY_MACHSERVICES : @{GetUpdateServiceMachName(scope) : @YES}, @LAUNCH_JOBKEY_ABANDONPROCESSGROUP : @YES, @LAUNCH_JOBKEY_LIMITLOADTOSESSIONTYPE : NSStringSessionType(scope) }; @@ -233,7 +233,7 @@ [program_arguments addObject:MakeProgramArgument(kSystemSwitch)]; NSDictionary<NSString*, id>* launchd_plist = @{ - @LAUNCH_JOBKEY_LABEL : GetWakeLaunchdLabel(), + @LAUNCH_JOBKEY_LABEL : GetWakeLaunchdLabel(scope), @LAUNCH_JOBKEY_PROGRAMARGUMENTS : program_arguments, @LAUNCH_JOBKEY_STARTINTERVAL : @3600, @LAUNCH_JOBKEY_ABANDONPROCESSGROUP : @YES, @@ -264,9 +264,10 @@ [program_arguments addObject:MakeProgramArgument(kSystemSwitch)]; NSDictionary<NSString*, id>* launchd_plist = @{ - @LAUNCH_JOBKEY_LABEL : GetUpdateServiceInternalLaunchdLabel(), + @LAUNCH_JOBKEY_LABEL : GetUpdateServiceInternalLaunchdLabel(scope), @LAUNCH_JOBKEY_PROGRAMARGUMENTS : program_arguments, - @LAUNCH_JOBKEY_MACHSERVICES : @{GetUpdateServiceInternalMachName() : @YES}, + @LAUNCH_JOBKEY_MACHSERVICES : + @{GetUpdateServiceInternalMachName(scope) : @YES}, @LAUNCH_JOBKEY_ABANDONPROCESSGROUP : @YES, @LAUNCH_JOBKEY_LIMITLOADTOSESSIONTYPE : NSStringSessionType(scope) }; @@ -286,7 +287,7 @@ CreateServiceLaunchdPlist(scope, updater_path)); return Launchd::GetInstance()->WritePlistToFile( LaunchdDomain(scope), ServiceLaunchdType(scope), - CopyUpdateServiceLaunchdName(), plist); + CopyUpdateServiceLaunchdName(scope), plist); } bool CreateWakeLaunchdJobPlist(UpdaterScope scope, @@ -296,9 +297,9 @@ base::BlockingType::MAY_BLOCK); base::ScopedCFTypeRef<CFDictionaryRef> plist( CreateWakeLaunchdPlist(scope, updater_path)); - return Launchd::GetInstance()->WritePlistToFile(LaunchdDomain(scope), - ServiceLaunchdType(scope), - CopyWakeLaunchdName(), plist); + return Launchd::GetInstance()->WritePlistToFile( + LaunchdDomain(scope), ServiceLaunchdType(scope), + CopyWakeLaunchdName(scope), plist); } bool CreateUpdateServiceInternalLaunchdJobPlist( @@ -311,7 +312,7 @@ CreateUpdateServiceInternalLaunchdPlist(scope, updater_path)); return Launchd::GetInstance()->WritePlistToFile( LaunchdDomain(scope), ServiceLaunchdType(scope), - CopyUpdateServiceInternalLaunchdName(), plist); + CopyUpdateServiceInternalLaunchdName(scope), plist); } bool StartUpdateServiceVersionedLaunchdJob( @@ -324,19 +325,19 @@ bool StartUpdateWakeVersionedLaunchdJob(UpdaterScope scope) { return Launchd::GetInstance()->RestartJob( - LaunchdDomain(scope), ServiceLaunchdType(scope), CopyWakeLaunchdName(), - CFSessionType(scope)); + LaunchdDomain(scope), ServiceLaunchdType(scope), + CopyWakeLaunchdName(scope), CFSessionType(scope)); } bool StartUpdateServiceInternalVersionedLaunchdJob(UpdaterScope scope) { return Launchd::GetInstance()->RestartJob( LaunchdDomain(scope), ServiceLaunchdType(scope), - CopyUpdateServiceInternalLaunchdName(), CFSessionType(scope)); + CopyUpdateServiceInternalLaunchdName(scope), CFSessionType(scope)); } bool StartLaunchdServiceJob(UpdaterScope scope) { - return StartUpdateServiceVersionedLaunchdJob(scope, - CopyUpdateServiceLaunchdName()); + return StartUpdateServiceVersionedLaunchdJob( + scope, CopyUpdateServiceLaunchdName(scope)); } bool RemoveServiceJobFromLaunchd(UpdaterScope scope, @@ -353,16 +354,16 @@ bool RemoveUpdateServiceJobFromLaunchd(UpdaterScope scope) { return RemoveUpdateServiceJobFromLaunchd(scope, - CopyUpdateServiceLaunchdName()); + CopyUpdateServiceLaunchdName(scope)); } bool RemoveUpdateWakeJobFromLaunchd(UpdaterScope scope) { - return RemoveServiceJobFromLaunchd(scope, CopyWakeLaunchdName()); + return RemoveServiceJobFromLaunchd(scope, CopyWakeLaunchdName(scope)); } bool RemoveUpdateServiceInternalJobFromLaunchd(UpdaterScope scope) { - return RemoveServiceJobFromLaunchd(scope, - CopyUpdateServiceInternalLaunchdName()); + return RemoveServiceJobFromLaunchd( + scope, CopyUpdateServiceInternalLaunchdName(scope)); } bool DeleteFolder(const absl::optional<base::FilePath>& installed_path) {
diff --git a/chrome/updater/mac/update_service_internal_proxy.mm b/chrome/updater/mac/update_service_internal_proxy.mm index 5470975..9fb53366 100644 --- a/chrome/updater/mac/update_service_internal_proxy.mm +++ b/chrome/updater/mac/update_service_internal_proxy.mm
@@ -19,7 +19,7 @@ @interface CRUUpdateServiceInternalProxyImpl : NSObject <CRUUpdateServicingInternal> -- (instancetype)initPrivileged; +- (instancetype)initWithScope:(updater::UpdaterScope)scope; @end @@ -27,18 +27,22 @@ base::scoped_nsobject<NSXPCConnection> _xpcConnection; } -- (instancetype)init { - return [self initWithConnectionOptions:0]; +- (instancetype)initWithScope:(updater::UpdaterScope)scope { + switch (scope) { + case updater::UpdaterScope::kUser: + return [self initWithConnectionOptions:0 withScope:scope]; + case updater::UpdaterScope::kSystem: + return [self initWithConnectionOptions:NSXPCConnectionPrivileged + withScope:scope]; + } + return nil; } -- (instancetype)initPrivileged { - return [self initWithConnectionOptions:NSXPCConnectionPrivileged]; -} - -- (instancetype)initWithConnectionOptions:(NSXPCConnectionOptions)options { +- (instancetype)initWithConnectionOptions:(NSXPCConnectionOptions)options + withScope:(updater::UpdaterScope)scope { if ((self = [super init])) { _xpcConnection.reset([[NSXPCConnection alloc] - initWithMachServiceName:updater::GetUpdateServiceInternalMachName() + initWithMachServiceName:updater::GetUpdateServiceInternalMachName(scope) .get() options:options]); @@ -92,14 +96,8 @@ UpdateServiceInternalProxy::UpdateServiceInternalProxy(UpdaterScope scope) : callback_runner_(base::SequencedTaskRunnerHandle::Get()) { - switch (scope) { - case UpdaterScope::kSystem: - client_.reset([[CRUUpdateServiceInternalProxyImpl alloc] initPrivileged]); - break; - case UpdaterScope::kUser: - client_.reset([[CRUUpdateServiceInternalProxyImpl alloc] init]); - break; - } + client_.reset( + [[CRUUpdateServiceInternalProxyImpl alloc] initWithScope:scope]); } void UpdateServiceInternalProxy::Run(base::OnceClosure callback) {
diff --git a/chrome/updater/mac/update_service_proxy.mm b/chrome/updater/mac/update_service_proxy.mm index cc09cf0..e554c03 100644 --- a/chrome/updater/mac/update_service_proxy.mm +++ b/chrome/updater/mac/update_service_proxy.mm
@@ -30,7 +30,7 @@ // Interface to communicate with the XPC Updater Service. @interface CRUUpdateServiceProxyImpl : NSObject <CRUUpdateServicing> -- (instancetype)initPrivileged; +- (instancetype)initWithScope:(updater::UpdaterScope)scope; @end @@ -38,18 +38,22 @@ base::scoped_nsobject<NSXPCConnection> _updateCheckXPCConnection; } -- (instancetype)init { - return [self initWithConnectionOptions:0]; +- (instancetype)initWithScope:(updater::UpdaterScope)scope { + switch (scope) { + case updater::UpdaterScope::kUser: + return [self initWithConnectionOptions:0 withScope:scope]; + case updater::UpdaterScope::kSystem: + return [self initWithConnectionOptions:NSXPCConnectionPrivileged + withScope:scope]; + } + return nil; } -- (instancetype)initPrivileged { - return [self initWithConnectionOptions:NSXPCConnectionPrivileged]; -} - -- (instancetype)initWithConnectionOptions:(NSXPCConnectionOptions)options { +- (instancetype)initWithConnectionOptions:(NSXPCConnectionOptions)options + withScope:(updater::UpdaterScope)scope { if ((self = [super init])) { _updateCheckXPCConnection.reset([[NSXPCConnection alloc] - initWithMachServiceName:updater::GetUpdateServiceMachName().get() + initWithMachServiceName:updater::GetUpdateServiceMachName(scope).get() options:options]); _updateCheckXPCConnection.get().remoteObjectInterface = @@ -155,14 +159,7 @@ namespace updater { UpdateServiceProxy::UpdateServiceProxy(UpdaterScope scope) { - switch (scope) { - case UpdaterScope::kSystem: - client_.reset([[CRUUpdateServiceProxyImpl alloc] initPrivileged]); - break; - case UpdaterScope::kUser: - client_.reset([[CRUUpdateServiceProxyImpl alloc] init]); - break; - } + client_.reset([[CRUUpdateServiceProxyImpl alloc] initWithScope:scope]); callback_runner_ = base::SequencedTaskRunnerHandle::Get(); }
diff --git a/chrome/updater/mac/xpc_service_names.h b/chrome/updater/mac/xpc_service_names.h index 1fe356a..4970759 100644 --- a/chrome/updater/mac/xpc_service_names.h +++ b/chrome/updater/mac/xpc_service_names.h
@@ -5,22 +5,32 @@ #ifndef CHROME_UPDATER_MAC_XPC_SERVICE_NAMES_H_ #define CHROME_UPDATER_MAC_XPC_SERVICE_NAMES_H_ +#import <CoreFoundation/CoreFoundation.h> +#import <Foundation/Foundation.h> +#include <string> + #include "base/mac/scoped_cftyperef.h" #include "base/mac/scoped_nsobject.h" +#include "chrome/updater/updater_scope.h" namespace updater { -std::string GetUpdateServiceLaunchdName(); -std::string GetUpdateServiceInternalLaunchdName(); +std::string GetUpdateServiceLaunchdName(UpdaterScope scope); +std::string GetUpdateServiceInternalLaunchdName(UpdaterScope scope); -base::ScopedCFTypeRef<CFStringRef> CopyUpdateServiceLaunchdName(); -base::ScopedCFTypeRef<CFStringRef> CopyWakeLaunchdName(); -base::ScopedCFTypeRef<CFStringRef> CopyUpdateServiceInternalLaunchdName(); -base::scoped_nsobject<NSString> GetUpdateServiceLaunchdLabel(); -base::scoped_nsobject<NSString> GetWakeLaunchdLabel(); -base::scoped_nsobject<NSString> GetUpdateServiceInternalLaunchdLabel(); -base::scoped_nsobject<NSString> GetUpdateServiceMachName(); -base::scoped_nsobject<NSString> GetUpdateServiceInternalMachName(); +base::ScopedCFTypeRef<CFStringRef> CopyUpdateServiceLaunchdName( + UpdaterScope scope); +base::ScopedCFTypeRef<CFStringRef> CopyWakeLaunchdName(UpdaterScope scope); +base::ScopedCFTypeRef<CFStringRef> CopyUpdateServiceInternalLaunchdName( + UpdaterScope scope); +base::scoped_nsobject<NSString> GetUpdateServiceLaunchdLabel( + UpdaterScope scope); +base::scoped_nsobject<NSString> GetWakeLaunchdLabel(UpdaterScope scope); +base::scoped_nsobject<NSString> GetUpdateServiceInternalLaunchdLabel( + UpdaterScope scope); +base::scoped_nsobject<NSString> GetUpdateServiceMachName(UpdaterScope scope); +base::scoped_nsobject<NSString> GetUpdateServiceInternalMachName( + UpdaterScope scope); } // namespace updater
diff --git a/chrome/updater/mac/xpc_service_names.mm b/chrome/updater/mac/xpc_service_names.mm index cf8510b..a9e9247 100644 --- a/chrome/updater/mac/xpc_service_names.mm +++ b/chrome/updater/mac/xpc_service_names.mm
@@ -4,11 +4,15 @@ #import "chrome/updater/mac/xpc_service_names.h" +#import <CoreFoundation/CoreFoundation.h> +#import <Foundation/Foundation.h> + #include "base/files/file_path.h" #include "base/mac/foundation_util.h" #include "base/strings/strcat.h" #include "base/strings/sys_string_conversions.h" #include "chrome/updater/updater_branding.h" +#include "chrome/updater/updater_scope.h" #include "chrome/updater/updater_version.h" namespace updater { @@ -18,43 +22,60 @@ const char kUpdateServiceInternalLaunchdPrefix[] = MAC_BUNDLE_IDENTIFIER_STRING ".update-internal."; const char kUpdateServiceLaunchdName[] = MAC_BUNDLE_IDENTIFIER_STRING ".update"; +const char kSystemLevelKeyword[] = ".system"; + +std::string GetNameWithScope(const std::string& name, UpdaterScope scope) { + return scope == UpdaterScope::kSystem + ? base::StrCat({name, kSystemLevelKeyword}) + : name; +} } // namespace -std::string GetUpdateServiceLaunchdName() { - return kUpdateServiceLaunchdName; +std::string GetUpdateServiceLaunchdName(UpdaterScope scope) { + return GetNameWithScope(kUpdateServiceLaunchdName, scope); } -std::string GetUpdateServiceInternalLaunchdName() { - return base::StrCat({kUpdateServiceInternalLaunchdPrefix, kUpdaterVersion}); +std::string GetUpdateServiceInternalLaunchdName(UpdaterScope scope) { + return GetNameWithScope( + base::StrCat({kUpdateServiceInternalLaunchdPrefix, kUpdaterVersion}), + scope); } -base::ScopedCFTypeRef<CFStringRef> CopyUpdateServiceLaunchdName() { - return base::SysUTF8ToCFStringRef(kUpdateServiceLaunchdName); +base::ScopedCFTypeRef<CFStringRef> CopyUpdateServiceLaunchdName( + UpdaterScope scope) { + return base::SysUTF8ToCFStringRef(GetUpdateServiceLaunchdName(scope)); } -base::ScopedCFTypeRef<CFStringRef> CopyWakeLaunchdName() { - return base::SysUTF8ToCFStringRef( - base::StrCat({MAC_BUNDLE_IDENTIFIER_STRING ".wake.", kUpdaterVersion})); +base::ScopedCFTypeRef<CFStringRef> CopyWakeLaunchdName(UpdaterScope scope) { + return scope == UpdaterScope::kSystem + ? base::SysUTF8ToCFStringRef( + base::StrCat({MAC_BUNDLE_IDENTIFIER_STRING ".wake.", + kUpdaterVersion, kSystemLevelKeyword})) + : base::SysUTF8ToCFStringRef(base::StrCat( + {MAC_BUNDLE_IDENTIFIER_STRING ".wake.", kUpdaterVersion})); } -base::ScopedCFTypeRef<CFStringRef> CopyUpdateServiceInternalLaunchdName() { - return base::SysUTF8ToCFStringRef(GetUpdateServiceInternalLaunchdName()); +base::ScopedCFTypeRef<CFStringRef> CopyUpdateServiceInternalLaunchdName( + UpdaterScope scope) { + return base::SysUTF8ToCFStringRef(GetUpdateServiceInternalLaunchdName(scope)); } -base::scoped_nsobject<NSString> GetUpdateServiceLaunchdLabel() { +base::scoped_nsobject<NSString> GetUpdateServiceLaunchdLabel( + UpdaterScope scope) { return base::scoped_nsobject<NSString>( - base::mac::CFToNSCast(CopyUpdateServiceLaunchdName().release())); + base::mac::CFToNSCast(CopyUpdateServiceLaunchdName(scope).release())); } -base::scoped_nsobject<NSString> GetWakeLaunchdLabel() { +base::scoped_nsobject<NSString> GetWakeLaunchdLabel(UpdaterScope scope) { return base::scoped_nsobject<NSString>( - base::mac::CFToNSCast(CopyWakeLaunchdName().release())); + base::mac::CFToNSCast(CopyWakeLaunchdName(scope).release())); } -base::scoped_nsobject<NSString> GetUpdateServiceInternalLaunchdLabel() { - return base::scoped_nsobject<NSString>( - base::mac::CFToNSCast(CopyUpdateServiceInternalLaunchdName().release())); +base::scoped_nsobject<NSString> GetUpdateServiceInternalLaunchdLabel( + UpdaterScope scope) { + return base::scoped_nsobject<NSString>(base::mac::CFToNSCast( + CopyUpdateServiceInternalLaunchdName(scope).release())); } base::scoped_nsobject<NSString> GetUpdateServiceMachName( @@ -63,12 +84,13 @@ [name stringByAppendingString:@".mach"], base::scoped_policy::RETAIN); } -base::scoped_nsobject<NSString> GetUpdateServiceMachName() { - return GetUpdateServiceMachName(GetUpdateServiceLaunchdLabel()); +base::scoped_nsobject<NSString> GetUpdateServiceMachName(UpdaterScope scope) { + return GetUpdateServiceMachName(GetUpdateServiceLaunchdLabel(scope)); } -base::scoped_nsobject<NSString> GetUpdateServiceInternalMachName() { - return GetUpdateServiceMachName(GetUpdateServiceInternalLaunchdLabel()); +base::scoped_nsobject<NSString> GetUpdateServiceInternalMachName( + UpdaterScope scope) { + return GetUpdateServiceMachName(GetUpdateServiceInternalLaunchdLabel(scope)); } } // namespace updater
diff --git a/chrome/updater/setup_mac.mm b/chrome/updater/setup_mac.mm index d3b1b39a..06445ba 100644 --- a/chrome/updater/setup_mac.mm +++ b/chrome/updater/setup_mac.mm
@@ -27,7 +27,8 @@ return; } PollLaunchctlList( - scope, GetUpdateServiceInternalLaunchdName(), LaunchctlPresence::kPresent, + scope, GetUpdateServiceInternalLaunchdName(scope), + LaunchctlPresence::kPresent, base::TimeDelta::FromSeconds(kWaitForLaunchctlUpdateSec), base::BindOnce( [](base::OnceCallback<void(int)> callback, bool service_exists) {
diff --git a/chrome/updater/test/integration_tests_mac.mm b/chrome/updater/test/integration_tests_mac.mm index 8c1beb2e..0155c142 100644 --- a/chrome/updater/test/integration_tests_mac.mm +++ b/chrome/updater/test/integration_tests_mac.mm
@@ -133,12 +133,13 @@ if (path) EXPECT_TRUE(base::DeletePathRecursively(*path)); EXPECT_TRUE(Launchd::GetInstance()->DeletePlist( - launchd_domain, launchd_type, updater::CopyWakeLaunchdName())); + launchd_domain, launchd_type, updater::CopyWakeLaunchdName(scope))); EXPECT_TRUE(Launchd::GetInstance()->DeletePlist( launchd_domain, launchd_type, - updater::CopyUpdateServiceInternalLaunchdName())); + updater::CopyUpdateServiceInternalLaunchdName(scope))); EXPECT_TRUE(Launchd::GetInstance()->DeletePlist( - launchd_domain, launchd_type, updater::CopyUpdateServiceLaunchdName())); + launchd_domain, launchd_type, + updater::CopyUpdateServiceLaunchdName(scope))); path = GetDataDirPath(scope); EXPECT_TRUE(path); @@ -152,11 +153,11 @@ @autoreleasepool { RemoveJobFromLaunchd(scope, launchd_domain, launchd_type, - CopyWakeLaunchdName()); + CopyWakeLaunchdName(scope)); RemoveJobFromLaunchd(scope, launchd_domain, launchd_type, - CopyUpdateServiceLaunchdName()); + CopyUpdateServiceLaunchdName(scope)); RemoveJobFromLaunchd(scope, launchd_domain, launchd_type, - CopyUpdateServiceInternalLaunchdName()); + CopyUpdateServiceInternalLaunchdName(scope)); } } @@ -170,12 +171,13 @@ if (path) EXPECT_FALSE(base::PathExists(*path)); EXPECT_FALSE(Launchd::GetInstance()->PlistExists( - launchd_domain, launchd_type, updater::CopyWakeLaunchdName())); + launchd_domain, launchd_type, updater::CopyWakeLaunchdName(scope))); EXPECT_FALSE(Launchd::GetInstance()->PlistExists( launchd_domain, launchd_type, - updater::CopyUpdateServiceInternalLaunchdName())); + updater::CopyUpdateServiceInternalLaunchdName(scope))); EXPECT_FALSE(Launchd::GetInstance()->PlistExists( - launchd_domain, launchd_type, updater::CopyUpdateServiceLaunchdName())); + launchd_domain, launchd_type, + updater::CopyUpdateServiceLaunchdName(scope))); path = GetDataDirPath(scope); EXPECT_TRUE(path); @@ -192,8 +194,8 @@ if (keystone_path) EXPECT_FALSE(base::PathExists(*keystone_path)); - ExpectServiceAbsent(scope, GetUpdateServiceLaunchdName()); - ExpectServiceAbsent(scope, GetUpdateServiceInternalLaunchdName()); + ExpectServiceAbsent(scope, GetUpdateServiceLaunchdName(scope)); + ExpectServiceAbsent(scope, GetUpdateServiceInternalLaunchdName(scope)); } void ExpectInstalled(UpdaterScope scope) { @@ -207,9 +209,10 @@ EXPECT_TRUE(base::PathExists(*path)); EXPECT_TRUE(Launchd::GetInstance()->PlistExists(launchd_domain, launchd_type, - CopyWakeLaunchdName())); + CopyWakeLaunchdName(scope))); EXPECT_TRUE(Launchd::GetInstance()->PlistExists( - launchd_domain, launchd_type, CopyUpdateServiceInternalLaunchdName())); + launchd_domain, launchd_type, + CopyUpdateServiceInternalLaunchdName(scope))); } void Install(UpdaterScope scope) { @@ -233,7 +236,7 @@ EXPECT_TRUE(base::PathExists(*path)); EXPECT_TRUE(Launchd::GetInstance()->PlistExists( - launchd_domain, launchd_type, CopyUpdateServiceLaunchdName())); + launchd_domain, launchd_type, CopyUpdateServiceLaunchdName(scope))); } absl::optional<base::FilePath> GetInstalledExecutablePath(UpdaterScope scope) { @@ -251,9 +254,10 @@ EXPECT_FALSE(base::PathExists(*versioned_folder_path)); EXPECT_FALSE(Launchd::GetInstance()->PlistExists(launchd_domain, launchd_type, - CopyWakeLaunchdName())); + CopyWakeLaunchdName(scope))); EXPECT_FALSE(Launchd::GetInstance()->PlistExists( - launchd_domain, launchd_type, CopyUpdateServiceInternalLaunchdName())); + launchd_domain, launchd_type, + CopyUpdateServiceInternalLaunchdName(scope))); } void Uninstall(UpdaterScope scope) {
diff --git a/chrome/updater/test/service/win/impersonate.py b/chrome/updater/test/service/win/impersonate.py index 116b555..d453d80 100644 --- a/chrome/updater/test/service/win/impersonate.py +++ b/chrome/updater/test/service/win/impersonate.py
@@ -37,9 +37,9 @@ security_attributes.bInheritHandle = 1 stdout_r, stdout_w = win32pipe.CreatePipe(security_attributes, 0) stderr_r, stderr_w = win32pipe.CreatePipe(security_attributes, 0) - self.stdout_r = stdout_r + self.stdout_r = stdout_r.Detach() self.stdout_w = self._MakeInheritable(stdout_w) - self.stderr_r = stderr_r + self.stderr_r = stderr_r.Detach() self.stderr_w = self._MakeInheritable(stderr_w) # Threads to read pipes and the actual contents returned. @@ -58,15 +58,21 @@ def _ReadStdout(self): """Read content from the stdout pipe.""" - logging.info('Into read thread for STDOUT...') - stdout_buf = os.fdopen(msvcrt.open_osfhandle(self.stdout_r, 0), 'rt') - self.stdout = stdout_buf.read() + try: + logging.info('Into read thread for STDOUT...') + stdout_buf = os.fdopen(msvcrt.open_osfhandle(self.stdout_r, 0), 'rt') + self.stdout = stdout_buf.read() + except Exception as err: + logging.exception(err) def _ReadStderr(self): """Read content from the stderr pipe.""" - logging.info('Into read thread for STDERR...') - stderr_buf = os.fdopen(msvcrt.open_osfhandle(self.stderr_r, 0), 'rt') - self.stderr = stderr_buf.read() + try: + logging.info('Into read thread for STDERR...') + stderr_buf = os.fdopen(msvcrt.open_osfhandle(self.stderr_r, 0), 'rt') + self.stderr = stderr_buf.read() + except Exception as err: + logging.exception(err) def ReadAll(self): """Fork threads to read stdout/stderr."""
diff --git a/chrome/updater/test/service/win/run_command_as_standard_user.py b/chrome/updater/test/service/win/run_command_as_standard_user.py index b552dc1c..927b539 100644 --- a/chrome/updater/test/service/win/run_command_as_standard_user.py +++ b/chrome/updater/test/service/win/run_command_as_standard_user.py
@@ -3,10 +3,10 @@ # found in the LICENSE file. # [VPYTHON:BEGIN] -# python_version: "2" +# python_version: "3" # wheel: < # name: "infra/python/wheels/pywin32/${vpython_platform}" -# version: "version:224" +# version: "version:300" # > # [VPYTHON:END]
diff --git a/chromeos/attestation/attestation_flow.h b/chromeos/attestation/attestation_flow.h index 7ad61231..5503328 100644 --- a/chromeos/attestation/attestation_flow.h +++ b/chromeos/attestation/attestation_flow.h
@@ -77,6 +77,9 @@ AttestationFlow(std::unique_ptr<ServerProxy> server_proxy, ::attestation::KeyType crypto_key_type); + AttestationFlow(const AttestationFlow&) = delete; + AttestationFlow& operator=(const AttestationFlow&) = delete; + virtual ~AttestationFlow(); // Sets the timeout for attestation to be ready. @@ -285,8 +288,6 @@ base::TimeDelta retry_delay_; base::WeakPtrFactory<AttestationFlow> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(AttestationFlow); }; } // namespace attestation
diff --git a/chromeos/attestation/mock_attestation_flow.h b/chromeos/attestation/mock_attestation_flow.h index 4302bb12..e1b89af 100644 --- a/chromeos/attestation/mock_attestation_flow.h +++ b/chromeos/attestation/mock_attestation_flow.h
@@ -23,6 +23,10 @@ class FakeServerProxy : public ServerProxy { public: FakeServerProxy(); + + FakeServerProxy(const FakeServerProxy&) = delete; + FakeServerProxy& operator=(const FakeServerProxy&) = delete; + ~FakeServerProxy() override; void set_result(bool result) { @@ -50,8 +54,6 @@ std::string enroll_response_; std::string cert_response_; - - DISALLOW_COPY_AND_ASSIGN(FakeServerProxy); }; class MockServerProxy : public FakeServerProxy {
diff --git a/chromeos/chromeos_strings.grd b/chromeos/chromeos_strings.grd index bffdcba..f3d81ab1 100644 --- a/chromeos/chromeos_strings.grd +++ b/chromeos/chromeos_strings.grd
@@ -1716,9 +1716,6 @@ <message name="IDS_NETWORK_DIAGNOSTICS_IP_CONFIG_INFO_DRAWER_GATEWAY" desc="Label for `Gateway` address data-point in `IP Configuration` drawer."> Gateway </message> - <message name="IDS_NETWORK_DIAGNOSTICS_IP_CONFIG_INFO_DRAWER_MAC_ADDRESS" desc="Label for `MAC Address` data-point in `IP Configuration` drawer."> - MAC Address - </message> <message name="IDS_NETWORK_DIAGNOSTICS_IP_CONFIG_INFO_DRAWER_SUBNET_MASK" desc="Label for `Subnet mask` data-point in `IP Configuration` drawer."> Subnet mask </message> @@ -1740,9 +1737,6 @@ <message name="IDS_NETWORK_DIAGNOSTICS_DNS_NOT_CONFIGURED" desc="Message for when no DNS servers are configured for display in `IP Configuration` drawer."> Not configured </message> - <message name="IDS_NETWORK_DIAGNOSTICS_DEFAULT_CONNECTION" desc="Label for `default connection` chip displayed above network card."> - Default connection - </message> <message name="IDS_NETWORK_DIAGNOSTICS_ARC_HTTP" desc="Label for Network diagnostics `ARC HTTP` test. This test ensures that the device's http requests inside ARC have an acceptable amount of latency"> (Android) HTTP Latency </message> @@ -1783,6 +1777,9 @@ <message translateable="false" name="IDS_NETWORK_DIAGNOSTICS_CELLULAR_UMTS" desc="Label for Cellular network technology `UMTS`."> UMTS </message> + <message translateable="false" name="IDS_NETWORK_DIAGNOSTICS_MAC_ADDRESS_LABEL" desc="Label for Mac Address."> + MAC + </message> <!-- Personalization App --> <message name="IDS_PERSONALIZATION_APP_TITLE" desc="Name of the system web app for personalizing ChromeOS.">
diff --git a/chromeos/chromeos_strings_grd/IDS_NETWORK_DIAGNOSTICS_DEFAULT_CONNECTION.png.sha1 b/chromeos/chromeos_strings_grd/IDS_NETWORK_DIAGNOSTICS_DEFAULT_CONNECTION.png.sha1 deleted file mode 100644 index 76ae02794f..0000000 --- a/chromeos/chromeos_strings_grd/IDS_NETWORK_DIAGNOSTICS_DEFAULT_CONNECTION.png.sha1 +++ /dev/null
@@ -1 +0,0 @@ -ba641aaaa8aedd0b8a833918a8bbc6d2e63a6116 \ No newline at end of file
diff --git a/chromeos/chromeos_strings_grd/IDS_NETWORK_DIAGNOSTICS_IP_CONFIG_INFO_DRAWER_MAC_ADDRESS.png.sha1 b/chromeos/chromeos_strings_grd/IDS_NETWORK_DIAGNOSTICS_IP_CONFIG_INFO_DRAWER_MAC_ADDRESS.png.sha1 deleted file mode 100644 index d945f3f..0000000 --- a/chromeos/chromeos_strings_grd/IDS_NETWORK_DIAGNOSTICS_IP_CONFIG_INFO_DRAWER_MAC_ADDRESS.png.sha1 +++ /dev/null
@@ -1 +0,0 @@ -ffd87ee4c6077604afe14b95bff1a515d8d43169 \ No newline at end of file
diff --git a/chromeos/chromeos_strings_grd/IDS_NETWORK_DIAGNOSTICS_MAC_ADDRESS_LABEL.png.sha1 b/chromeos/chromeos_strings_grd/IDS_NETWORK_DIAGNOSTICS_MAC_ADDRESS_LABEL.png.sha1 new file mode 100644 index 0000000..8efec41 --- /dev/null +++ b/chromeos/chromeos_strings_grd/IDS_NETWORK_DIAGNOSTICS_MAC_ADDRESS_LABEL.png.sha1
@@ -0,0 +1 @@ +f8c72cae6312a83d33bc67f3915f04621d935e35 \ No newline at end of file
diff --git a/chromeos/components/camera_app_ui/camera_app_helper_impl.h b/chromeos/components/camera_app_ui/camera_app_helper_impl.h index ecf2ef82..58a6d17d 100644 --- a/chromeos/components/camera_app_ui/camera_app_helper_impl.h +++ b/chromeos/components/camera_app_ui/camera_app_helper_impl.h
@@ -43,6 +43,10 @@ CameraResultCallback camera_result_callback, SendBroadcastCallback send_broadcast_callback, aura::Window* window); + + CameraAppHelperImpl(const CameraAppHelperImpl&) = delete; + CameraAppHelperImpl& operator=(const CameraAppHelperImpl&) = delete; + ~CameraAppHelperImpl() override; void Bind(mojo::PendingReceiver<mojom::CameraAppHelper> receiver); @@ -139,8 +143,6 @@ // Client to connect to document detection service. std::unique_ptr<chromeos::DocumentScannerServiceClient> document_scanner_service_; - - DISALLOW_COPY_AND_ASSIGN(CameraAppHelperImpl); }; } // namespace chromeos_camera
diff --git a/chromeos/components/camera_app_ui/camera_app_ui.h b/chromeos/components/camera_app_ui/camera_app_ui.h index 2d56f1b6..14b27546 100644 --- a/chromeos/components/camera_app_ui/camera_app_ui.h +++ b/chromeos/components/camera_app_ui/camera_app_ui.h
@@ -30,6 +30,10 @@ public: CameraAppUI(content::WebUI* web_ui, std::unique_ptr<CameraAppUIDelegate> delegate); + + CameraAppUI(const CameraAppUI&) = delete; + CameraAppUI& operator=(const CameraAppUI&) = delete; + ~CameraAppUI() override; // Instantiates implementor of the cros::mojom::CameraAppDeviceProvider mojo @@ -67,8 +71,6 @@ std::unique_ptr<chromeos_camera::CameraAppHelperImpl> helper_; WEB_UI_CONTROLLER_TYPE_DECL(); - - DISALLOW_COPY_AND_ASSIGN(CameraAppUI); }; } // namespace chromeos
diff --git a/chromeos/components/multidevice/debug_webui/proximity_auth_ui.h b/chromeos/components/multidevice/debug_webui/proximity_auth_ui.h index 7fb3ffd2..5250355 100644 --- a/chromeos/components/multidevice/debug_webui/proximity_auth_ui.h +++ b/chromeos/components/multidevice/debug_webui/proximity_auth_ui.h
@@ -35,6 +35,10 @@ device_sync::DeviceSyncClient* device_sync_client, secure_channel::SecureChannelClient* secure_channel_client, MultiDeviceSetupBinder multidevice_setup_binder); + + ProximityAuthUI(const ProximityAuthUI&) = delete; + ProximityAuthUI& operator=(const ProximityAuthUI&) = delete; + ~ProximityAuthUI() override; // Instantiates implementor of the mojom::MultiDeviceSetup mojo interface @@ -47,8 +51,6 @@ const MultiDeviceSetupBinder multidevice_setup_binder_; WEB_UI_CONTROLLER_TYPE_DECL(); - - DISALLOW_COPY_AND_ASSIGN(ProximityAuthUI); }; } // namespace multidevice
diff --git a/chromeos/components/multidevice/debug_webui/proximity_auth_webui_handler.h b/chromeos/components/multidevice/debug_webui/proximity_auth_webui_handler.h index c1343fd7..7b225d7 100644 --- a/chromeos/components/multidevice/debug_webui/proximity_auth_webui_handler.h +++ b/chromeos/components/multidevice/debug_webui/proximity_auth_webui_handler.h
@@ -41,6 +41,11 @@ ProximityAuthWebUIHandler( device_sync::DeviceSyncClient* device_sync_client, secure_channel::SecureChannelClient* secure_channel_client); + + ProximityAuthWebUIHandler(const ProximityAuthWebUIHandler&) = delete; + ProximityAuthWebUIHandler& operator=(const ProximityAuthWebUIHandler&) = + delete; + ~ProximityAuthWebUIHandler() override; // content::WebUIMessageHandler: @@ -129,8 +134,6 @@ bool get_local_state_update_waiting_for_debug_info_ = false; base::WeakPtrFactory<ProximityAuthWebUIHandler> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ProximityAuthWebUIHandler); }; } // namespace multidevice
diff --git a/chromeos/components/multidevice/expiring_remote_device_cache.h b/chromeos/components/multidevice/expiring_remote_device_cache.h index 28ade2e9..2488e001 100644 --- a/chromeos/components/multidevice/expiring_remote_device_cache.h +++ b/chromeos/components/multidevice/expiring_remote_device_cache.h
@@ -36,6 +36,11 @@ class ExpiringRemoteDeviceCache { public: ExpiringRemoteDeviceCache(); + + ExpiringRemoteDeviceCache(const ExpiringRemoteDeviceCache&) = delete; + ExpiringRemoteDeviceCache& operator=(const ExpiringRemoteDeviceCache&) = + delete; + virtual ~ExpiringRemoteDeviceCache(); void SetRemoteDevicesAndInvalidateOldEntries( @@ -64,8 +69,6 @@ base::flat_set<std::string> legacy_device_ids_from_last_set_call_; base::flat_set<std::string> instance_ids_from_last_set_call_; - - DISALLOW_COPY_AND_ASSIGN(ExpiringRemoteDeviceCache); }; } // namespace multidevice
diff --git a/chromeos/components/multidevice/fake_secure_message_delegate.h b/chromeos/components/multidevice/fake_secure_message_delegate.h index 8bf3d17f..5809b39 100644 --- a/chromeos/components/multidevice/fake_secure_message_delegate.h +++ b/chromeos/components/multidevice/fake_secure_message_delegate.h
@@ -21,6 +21,11 @@ class FakeSecureMessageDelegate : public SecureMessageDelegate { public: FakeSecureMessageDelegate(); + + FakeSecureMessageDelegate(const FakeSecureMessageDelegate&) = delete; + FakeSecureMessageDelegate& operator=(const FakeSecureMessageDelegate&) = + delete; + ~FakeSecureMessageDelegate() override; // SecureMessageDelegate: @@ -48,14 +53,18 @@ private: std::string next_public_key_; - - DISALLOW_COPY_AND_ASSIGN(FakeSecureMessageDelegate); }; class FakeSecureMessageDelegateFactory : public multidevice::SecureMessageDelegateImpl::Factory { public: FakeSecureMessageDelegateFactory() = default; + + FakeSecureMessageDelegateFactory(const FakeSecureMessageDelegateFactory&) = + delete; + FakeSecureMessageDelegateFactory& operator=( + const FakeSecureMessageDelegateFactory&) = delete; + ~FakeSecureMessageDelegateFactory() override = default; multidevice::FakeSecureMessageDelegate* instance() { return instance_; } @@ -65,8 +74,6 @@ std::unique_ptr<multidevice::SecureMessageDelegate> CreateInstance() override; multidevice::FakeSecureMessageDelegate* instance_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakeSecureMessageDelegateFactory); }; } // namespace multidevice
diff --git a/chromeos/components/multidevice/logging/log_buffer.h b/chromeos/components/multidevice/logging/log_buffer.h index 4367443..3a78933 100644 --- a/chromeos/components/multidevice/logging/log_buffer.h +++ b/chromeos/components/multidevice/logging/log_buffer.h
@@ -48,6 +48,10 @@ }; LogBuffer(); + + LogBuffer(const LogBuffer&) = delete; + LogBuffer& operator=(const LogBuffer&) = delete; + ~LogBuffer(); // Returns the global instance. @@ -76,8 +80,6 @@ // List of observers. base::ObserverList<Observer>::Unchecked observers_; - - DISALLOW_COPY_AND_ASSIGN(LogBuffer); }; } // namespace multidevice
diff --git a/chromeos/components/multidevice/logging/logging.h b/chromeos/components/multidevice/logging/logging.h index d08fb346..7c35c69 100644 --- a/chromeos/components/multidevice/logging/logging.h +++ b/chromeos/components/multidevice/logging/logging.h
@@ -44,6 +44,10 @@ class ScopedLogMessage { public: ScopedLogMessage(const char* file, int line, logging::LogSeverity severity); + + ScopedLogMessage(const ScopedLogMessage&) = delete; + ScopedLogMessage& operator=(const ScopedLogMessage&) = delete; + ~ScopedLogMessage(); std::ostream& stream() { return stream_; } @@ -53,8 +57,6 @@ int line_; logging::LogSeverity severity_; std::ostringstream stream_; - - DISALLOW_COPY_AND_ASSIGN(ScopedLogMessage); }; } // namespace multidevice
diff --git a/chromeos/components/proximity_auth/fake_lock_handler.h b/chromeos/components/proximity_auth/fake_lock_handler.h index 11493d3..aa1ad70ff 100644 --- a/chromeos/components/proximity_auth/fake_lock_handler.h +++ b/chromeos/components/proximity_auth/fake_lock_handler.h
@@ -13,6 +13,10 @@ class FakeLockHandler : public ScreenlockBridge::LockHandler { public: FakeLockHandler(); + + FakeLockHandler(const FakeLockHandler&) = delete; + FakeLockHandler& operator=(const FakeLockHandler&) = delete; + ~FakeLockHandler() override; // LockHandler: @@ -32,9 +36,6 @@ void AttemptEasySignin(const AccountId& account_id, const std::string& secret, const std::string& key_label) override; - - private: - DISALLOW_COPY_AND_ASSIGN(FakeLockHandler); }; } // namespace proximity_auth
diff --git a/chromeos/components/proximity_auth/fake_remote_device_life_cycle.h b/chromeos/components/proximity_auth/fake_remote_device_life_cycle.h index 5bf2404..2b7af60a 100644 --- a/chromeos/components/proximity_auth/fake_remote_device_life_cycle.h +++ b/chromeos/components/proximity_auth/fake_remote_device_life_cycle.h
@@ -19,6 +19,11 @@ explicit FakeRemoteDeviceLifeCycle( chromeos::multidevice::RemoteDeviceRef remote_device, absl::optional<chromeos::multidevice::RemoteDeviceRef> local_device); + + FakeRemoteDeviceLifeCycle(const FakeRemoteDeviceLifeCycle&) = delete; + FakeRemoteDeviceLifeCycle& operator=(const FakeRemoteDeviceLifeCycle&) = + delete; + ~FakeRemoteDeviceLifeCycle() override; // RemoteDeviceLifeCycle: @@ -55,8 +60,6 @@ State state_; chromeos::secure_channel::ClientChannel* channel_; Messenger* messenger_; - - DISALLOW_COPY_AND_ASSIGN(FakeRemoteDeviceLifeCycle); }; } // namespace proximity_auth
diff --git a/chromeos/components/proximity_auth/messenger_impl.h b/chromeos/components/proximity_auth/messenger_impl.h index 7481088..315902f1 100644 --- a/chromeos/components/proximity_auth/messenger_impl.h +++ b/chromeos/components/proximity_auth/messenger_impl.h
@@ -31,6 +31,10 @@ // The messenger begins observing messages as soon as it is constructed. explicit MessengerImpl( std::unique_ptr<chromeos::secure_channel::ClientChannel> channel); + + MessengerImpl(const MessengerImpl&) = delete; + MessengerImpl& operator=(const MessengerImpl&) = delete; + ~MessengerImpl() override; // Messenger: @@ -102,8 +106,6 @@ std::unique_ptr<PendingMessage> pending_message_; base::WeakPtrFactory<MessengerImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(MessengerImpl); }; } // namespace proximity_auth
diff --git a/chromeos/components/proximity_auth/messenger_impl_unittest.cc b/chromeos/components/proximity_auth/messenger_impl_unittest.cc index ac1dca5..95b8000 100644 --- a/chromeos/components/proximity_auth/messenger_impl_unittest.cc +++ b/chromeos/components/proximity_auth/messenger_impl_unittest.cc
@@ -37,6 +37,10 @@ explicit MockMessengerObserver(Messenger* messenger) : messenger_(messenger) { messenger_->AddObserver(this); } + + MockMessengerObserver(const MockMessengerObserver&) = delete; + MockMessengerObserver& operator=(const MockMessengerObserver&) = delete; + virtual ~MockMessengerObserver() { messenger_->RemoveObserver(this); } MOCK_METHOD1(OnUnlockEventSent, void(bool success)); @@ -54,8 +58,6 @@ private: // The messenger that |this| instance observes. Messenger* const messenger_; - - DISALLOW_COPY_AND_ASSIGN(MockMessengerObserver); }; class TestMessenger : public MessengerImpl { @@ -63,10 +65,11 @@ TestMessenger( std::unique_ptr<chromeos::secure_channel::ClientChannel> channel) : MessengerImpl(std::move(channel)) {} - ~TestMessenger() override {} - private: - DISALLOW_COPY_AND_ASSIGN(TestMessenger); + TestMessenger(const TestMessenger&) = delete; + TestMessenger& operator=(const TestMessenger&) = delete; + + ~TestMessenger() override {} }; } // namespace
diff --git a/chromeos/components/proximity_auth/mock_proximity_auth_client.h b/chromeos/components/proximity_auth/mock_proximity_auth_client.h index 547184a0..43183b2 100644 --- a/chromeos/components/proximity_auth/mock_proximity_auth_client.h +++ b/chromeos/components/proximity_auth/mock_proximity_auth_client.h
@@ -18,6 +18,10 @@ class MockProximityAuthClient : public ProximityAuthClient { public: MockProximityAuthClient(); + + MockProximityAuthClient(const MockProximityAuthClient&) = delete; + MockProximityAuthClient& operator=(const MockProximityAuthClient&) = delete; + ~MockProximityAuthClient() override; // ProximityAuthClient: @@ -32,9 +36,6 @@ base::OnceCallback<void(const std::string& challenge)> callback)); MOCK_CONST_METHOD0(GetAuthenticatedUsername, std::string(void)); MOCK_METHOD0(GetPrefManager, ProximityAuthPrefManager*(void)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockProximityAuthClient); }; } // namespace proximity_auth
diff --git a/chromeos/components/proximity_auth/proximity_auth_local_state_pref_manager.h b/chromeos/components/proximity_auth/proximity_auth_local_state_pref_manager.h index cffcf95..a7ebadd 100644 --- a/chromeos/components/proximity_auth/proximity_auth_local_state_pref_manager.h +++ b/chromeos/components/proximity_auth/proximity_auth_local_state_pref_manager.h
@@ -27,6 +27,12 @@ class ProximityAuthLocalStatePrefManager : public ProximityAuthPrefManager { public: explicit ProximityAuthLocalStatePrefManager(PrefService* local_state); + + ProximityAuthLocalStatePrefManager( + const ProximityAuthLocalStatePrefManager&) = delete; + ProximityAuthLocalStatePrefManager& operator=( + const ProximityAuthLocalStatePrefManager&) = delete; + ~ProximityAuthLocalStatePrefManager() override; // Registers the prefs used by this class to the given |pref_service|. @@ -64,8 +70,6 @@ // The account id of the active user for which to fetch the prefs. AccountId active_user_; - - DISALLOW_COPY_AND_ASSIGN(ProximityAuthLocalStatePrefManager); }; } // namespace proximity_auth
diff --git a/chromeos/components/proximity_auth/proximity_auth_pref_manager.h b/chromeos/components/proximity_auth/proximity_auth_pref_manager.h index bfa1325c..7685c918 100644 --- a/chromeos/components/proximity_auth/proximity_auth_pref_manager.h +++ b/chromeos/components/proximity_auth/proximity_auth_pref_manager.h
@@ -17,6 +17,10 @@ class ProximityAuthPrefManager { public: ProximityAuthPrefManager() {} + + ProximityAuthPrefManager(const ProximityAuthPrefManager&) = delete; + ProximityAuthPrefManager& operator=(const ProximityAuthPrefManager&) = delete; + virtual ~ProximityAuthPrefManager() {} // Returns true if EasyUnlock is allowed. Note: there is no corresponding @@ -60,9 +64,6 @@ // message on the login screen has been shown. virtual void SetHasShownLoginDisabledMessage(bool has_shown) = 0; virtual bool HasShownLoginDisabledMessage() const = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(ProximityAuthPrefManager); }; } // namespace proximity_auth
diff --git a/chromeos/components/proximity_auth/proximity_auth_profile_pref_manager.h b/chromeos/components/proximity_auth/proximity_auth_profile_pref_manager.h index 7a3c7cc..58e31fe 100644 --- a/chromeos/components/proximity_auth/proximity_auth_profile_pref_manager.h +++ b/chromeos/components/proximity_auth/proximity_auth_profile_pref_manager.h
@@ -38,6 +38,12 @@ PrefService* pref_service, chromeos::multidevice_setup::MultiDeviceSetupClient* multidevice_setup_client); + + ProximityAuthProfilePrefManager(const ProximityAuthProfilePrefManager&) = + delete; + ProximityAuthProfilePrefManager& operator=( + const ProximityAuthProfilePrefManager&) = delete; + ~ProximityAuthProfilePrefManager() override; // Initializes the manager to listen to pref changes and sync prefs to the @@ -92,8 +98,6 @@ multidevice_setup_client_ = nullptr; base::WeakPtrFactory<ProximityAuthProfilePrefManager> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ProximityAuthProfilePrefManager); }; } // namespace proximity_auth
diff --git a/chromeos/components/proximity_auth/proximity_auth_system.h b/chromeos/components/proximity_auth/proximity_auth_system.h index 448cd2a..93e7b36b 100644 --- a/chromeos/components/proximity_auth/proximity_auth_system.h +++ b/chromeos/components/proximity_auth/proximity_auth_system.h
@@ -38,6 +38,10 @@ ScreenlockType screenlock_type, ProximityAuthClient* proximity_auth_client, chromeos::secure_channel::SecureChannelClient* secure_channel_client); + + ProximityAuthSystem(const ProximityAuthSystem&) = delete; + ProximityAuthSystem& operator=(const ProximityAuthSystem&) = delete; + ~ProximityAuthSystem() override; // Starts the system to connect and authenticate when a registered user is @@ -128,8 +132,6 @@ // True if the system is started_. bool started_; - - DISALLOW_COPY_AND_ASSIGN(ProximityAuthSystem); }; } // namespace proximity_auth
diff --git a/chromeos/components/proximity_auth/proximity_auth_system_unittest.cc b/chromeos/components/proximity_auth/proximity_auth_system_unittest.cc index 7573ee38..e2f7a977 100644 --- a/chromeos/components/proximity_auth/proximity_auth_system_unittest.cc +++ b/chromeos/components/proximity_auth/proximity_auth_system_unittest.cc
@@ -65,15 +65,16 @@ class MockUnlockManager : public UnlockManager { public: MockUnlockManager() {} + + MockUnlockManager(const MockUnlockManager&) = delete; + MockUnlockManager& operator=(const MockUnlockManager&) = delete; + ~MockUnlockManager() override {} MOCK_METHOD0(IsUnlockAllowed, bool()); MOCK_METHOD1(SetRemoteDeviceLifeCycle, void(RemoteDeviceLifeCycle*)); MOCK_METHOD1(OnAuthAttempted, void(mojom::AuthType)); MOCK_METHOD0(CancelConnectionAttempt, void()); MOCK_METHOD0(GetLastRemoteStatusUnlockForLogging, std::string()); - - private: - DISALLOW_COPY_AND_ASSIGN(MockUnlockManager); }; // Mock implementation of ProximityAuthProfilePrefManager. @@ -84,11 +85,13 @@ fake_multidevice_setup_client) : ProximityAuthProfilePrefManager(nullptr, fake_multidevice_setup_client) {} + + MockProximityAuthPrefManager(const MockProximityAuthPrefManager&) = delete; + MockProximityAuthPrefManager& operator=(const MockProximityAuthPrefManager&) = + delete; + ~MockProximityAuthPrefManager() override {} MOCK_CONST_METHOD0(GetLastPasswordEntryTimestampMs, int64_t()); - - private: - DISALLOW_COPY_AND_ASSIGN(MockProximityAuthPrefManager); }; // Harness for ProximityAuthSystem to make it testable. @@ -100,6 +103,11 @@ ProximityAuthPrefManager* pref_manager) : ProximityAuthSystem(secure_channel_client, std::move(unlock_manager)), life_cycle_(nullptr) {} + + TestableProximityAuthSystem(const TestableProximityAuthSystem&) = delete; + TestableProximityAuthSystem& operator=(const TestableProximityAuthSystem&) = + delete; + ~TestableProximityAuthSystem() override {} FakeRemoteDeviceLifeCycle* life_cycle() { return life_cycle_; } @@ -116,8 +124,6 @@ } FakeRemoteDeviceLifeCycle* life_cycle_; - - DISALLOW_COPY_AND_ASSIGN(TestableProximityAuthSystem); }; } // namespace
diff --git a/chromeos/components/proximity_auth/proximity_monitor_impl.h b/chromeos/components/proximity_auth/proximity_monitor_impl.h index f1dd5af..744c56b 100644 --- a/chromeos/components/proximity_auth/proximity_monitor_impl.h +++ b/chromeos/components/proximity_auth/proximity_monitor_impl.h
@@ -33,6 +33,10 @@ // The |connection| is not owned, and must outlive |this| instance. ProximityMonitorImpl(chromeos::multidevice::RemoteDeviceRef remote_device, chromeos::secure_channel::ClientChannel* channel); + + ProximityMonitorImpl(const ProximityMonitorImpl&) = delete; + ProximityMonitorImpl& operator=(const ProximityMonitorImpl&) = delete; + ~ProximityMonitorImpl() override; // ProximityMonitor: @@ -110,8 +114,6 @@ // Used to vend all other weak pointers. base::WeakPtrFactory<ProximityMonitorImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ProximityMonitorImpl); }; } // namespace proximity_auth
diff --git a/chromeos/components/proximity_auth/proximity_monitor_impl_unittest.cc b/chromeos/components/proximity_auth/proximity_monitor_impl_unittest.cc index 7199e21..a605789 100644 --- a/chromeos/components/proximity_auth/proximity_monitor_impl_unittest.cc +++ b/chromeos/components/proximity_auth/proximity_monitor_impl_unittest.cc
@@ -45,12 +45,14 @@ class MockProximityMonitorObserver : public ProximityMonitorObserver { public: MockProximityMonitorObserver() {} + + MockProximityMonitorObserver(const MockProximityMonitorObserver&) = delete; + MockProximityMonitorObserver& operator=(const MockProximityMonitorObserver&) = + delete; + ~MockProximityMonitorObserver() override {} MOCK_METHOD0(OnProximityStateChanged, void()); - - private: - DISALLOW_COPY_AND_ASSIGN(MockProximityMonitorObserver); }; // Creates a mock Bluetooth adapter and sets it as the global adapter for
diff --git a/chromeos/components/proximity_auth/remote_device_life_cycle_impl.h b/chromeos/components/proximity_auth/remote_device_life_cycle_impl.h index a06138b3..8351274 100644 --- a/chromeos/components/proximity_auth/remote_device_life_cycle_impl.h +++ b/chromeos/components/proximity_auth/remote_device_life_cycle_impl.h
@@ -41,6 +41,11 @@ chromeos::multidevice::RemoteDeviceRef remote_device, absl::optional<chromeos::multidevice::RemoteDeviceRef> local_device, chromeos::secure_channel::SecureChannelClient* secure_channel_client); + + RemoteDeviceLifeCycleImpl(const RemoteDeviceLifeCycleImpl&) = delete; + RemoteDeviceLifeCycleImpl& operator=(const RemoteDeviceLifeCycleImpl&) = + delete; + ~RemoteDeviceLifeCycleImpl() override; // RemoteDeviceLifeCycle: @@ -105,8 +110,6 @@ base::OneShotTimer authentication_recovery_timer_; base::WeakPtrFactory<RemoteDeviceLifeCycleImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(RemoteDeviceLifeCycleImpl); }; } // namespace proximity_auth
diff --git a/chromeos/components/proximity_auth/remote_device_life_cycle_impl_unittest.cc b/chromeos/components/proximity_auth/remote_device_life_cycle_impl_unittest.cc index 35daa3c..30d30bd1 100644 --- a/chromeos/components/proximity_auth/remote_device_life_cycle_impl_unittest.cc +++ b/chromeos/components/proximity_auth/remote_device_life_cycle_impl_unittest.cc
@@ -45,12 +45,15 @@ secure_channel_client), remote_device_(remote_device) {} + TestableRemoteDeviceLifeCycleImpl(const TestableRemoteDeviceLifeCycleImpl&) = + delete; + TestableRemoteDeviceLifeCycleImpl& operator=( + const TestableRemoteDeviceLifeCycleImpl&) = delete; + ~TestableRemoteDeviceLifeCycleImpl() override {} private: const chromeos::multidevice::RemoteDeviceRef remote_device_; - - DISALLOW_COPY_AND_ASSIGN(TestableRemoteDeviceLifeCycleImpl); }; } // namespace
diff --git a/chromeos/components/proximity_auth/unlock_manager_impl.h b/chromeos/components/proximity_auth/unlock_manager_impl.h index 7425c29..6a15c6b 100644 --- a/chromeos/components/proximity_auth/unlock_manager_impl.h +++ b/chromeos/components/proximity_auth/unlock_manager_impl.h
@@ -46,6 +46,10 @@ // unlock manager. UnlockManagerImpl(ProximityAuthSystem::ScreenlockType screenlock_type, ProximityAuthClient* proximity_auth_client); + + UnlockManagerImpl(const UnlockManagerImpl&) = delete; + UnlockManagerImpl& operator=(const UnlockManagerImpl&) = delete; + ~UnlockManagerImpl() override; // UnlockManager: @@ -315,8 +319,6 @@ // Used to vend all other weak pointers. base::WeakPtrFactory<UnlockManagerImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(UnlockManagerImpl); }; } // namespace proximity_auth
diff --git a/chromeos/components/proximity_auth/unlock_manager_impl_unittest.cc b/chromeos/components/proximity_auth/unlock_manager_impl_unittest.cc index f039265..1b70b76c 100644 --- a/chromeos/components/proximity_auth/unlock_manager_impl_unittest.cc +++ b/chromeos/components/proximity_auth/unlock_manager_impl_unittest.cc
@@ -63,6 +63,10 @@ class MockMessenger : public Messenger { public: MockMessenger() {} + + MockMessenger(const MockMessenger&) = delete; + MockMessenger& operator=(const MockMessenger&) = delete; + ~MockMessenger() override {} MOCK_METHOD1(AddObserver, void(MessengerObserver* observer)); @@ -72,9 +76,6 @@ MOCK_METHOD0(RequestUnlock, void()); MOCK_CONST_METHOD0(GetConnection, chromeos::secure_channel::Connection*()); MOCK_CONST_METHOD0(GetChannel, chromeos::secure_channel::ClientChannel*()); - - private: - DISALLOW_COPY_AND_ASSIGN(MockMessenger); }; class MockProximityMonitor : public ProximityMonitor { @@ -83,6 +84,10 @@ : destroy_callback_(std::move(destroy_callback)), started_(false) { ON_CALL(*this, IsUnlockAllowed()).WillByDefault(Return(true)); } + + MockProximityMonitor(const MockProximityMonitor&) = delete; + MockProximityMonitor& operator=(const MockProximityMonitor&) = delete; + ~MockProximityMonitor() override { std::move(destroy_callback_).Run(); } void Start() override { started_ = true; } @@ -95,8 +100,6 @@ private: base::OnceClosure destroy_callback_; bool started_; - - DISALLOW_COPY_AND_ASSIGN(MockProximityMonitor); }; class TestUnlockManager : public UnlockManagerImpl { @@ -104,6 +107,10 @@ TestUnlockManager(ProximityAuthSystem::ScreenlockType screenlock_type, ProximityAuthClient* proximity_auth_client) : UnlockManagerImpl(screenlock_type, proximity_auth_client) {} + + TestUnlockManager(const TestUnlockManager&) = delete; + TestUnlockManager& operator=(const TestUnlockManager&) = delete; + ~TestUnlockManager() override {} using MessengerObserver::OnDecryptResponse; @@ -134,8 +141,6 @@ // Owned by the super class. MockProximityMonitor* proximity_monitor_ = nullptr; bool proximity_monitor_destroyed_ = false; - - DISALLOW_COPY_AND_ASSIGN(TestUnlockManager); }; // Creates a mock Bluetooth adapter and sets it as the global adapter for
diff --git a/chromeos/components/string_matching/fuzzy_tokenized_string_match.h b/chromeos/components/string_matching/fuzzy_tokenized_string_match.h index 52d5bbdc..8a37257a 100644 --- a/chromeos/components/string_matching/fuzzy_tokenized_string_match.h +++ b/chromeos/components/string_matching/fuzzy_tokenized_string_match.h
@@ -26,6 +26,11 @@ typedef std::vector<gfx::Range> Hits; FuzzyTokenizedStringMatch(); + + FuzzyTokenizedStringMatch(const FuzzyTokenizedStringMatch&) = delete; + FuzzyTokenizedStringMatch& operator=(const FuzzyTokenizedStringMatch&) = + delete; + ~FuzzyTokenizedStringMatch(); // TokenSetRatio takes two sets of tokens, finds their intersection and @@ -92,8 +97,6 @@ // Score in range of [0,1] representing how well the query matches the text. double relevance_ = 0; Hits hits_; - - DISALLOW_COPY_AND_ASSIGN(FuzzyTokenizedStringMatch); }; } // namespace string_matching
diff --git a/chromeos/components/string_matching/sequence_matcher.h b/chromeos/components/string_matching/sequence_matcher.h index 91b7fe9..07d8fe20 100644 --- a/chromeos/components/string_matching/sequence_matcher.h +++ b/chromeos/components/string_matching/sequence_matcher.h
@@ -42,6 +42,9 @@ bool use_edit_distance, double num_matching_blocks_penalty); + SequenceMatcher(const SequenceMatcher&) = delete; + SequenceMatcher& operator=(const SequenceMatcher&) = delete; + ~SequenceMatcher() = default; // Calculates similarity ratio of |first_string_| and |second_string_|. @@ -81,7 +84,6 @@ std::unordered_map<char, std::vector<int>> char_to_positions_; // Memory for dynamic programming algorithm used in FindLongestMatch(). std::vector<int> dp_common_string_; - DISALLOW_COPY_AND_ASSIGN(SequenceMatcher); }; } // namespace string_matching
diff --git a/chromeos/components/string_matching/term_break_iterator.h b/chromeos/components/string_matching/term_break_iterator.h index ba5a9d3d8..c2a43cf6 100644 --- a/chromeos/components/string_matching/term_break_iterator.h +++ b/chromeos/components/string_matching/term_break_iterator.h
@@ -31,6 +31,10 @@ public: // Note that |word| must out live this iterator. explicit TermBreakIterator(const std::u16string& word); + + TermBreakIterator(const TermBreakIterator&) = delete; + TermBreakIterator& operator=(const TermBreakIterator&) = delete; + ~TermBreakIterator(); // Advance to the next term. Returns false if at the end of the word. @@ -64,8 +68,6 @@ std::unique_ptr<base::i18n::UTF16CharIterator> iter_; State state_; - - DISALLOW_COPY_AND_ASSIGN(TermBreakIterator); }; } // namespace string_matching
diff --git a/chromeos/components/string_matching/tokenized_string.h b/chromeos/components/string_matching/tokenized_string.h index 79a8bfc..a3c1c03 100644 --- a/chromeos/components/string_matching/tokenized_string.h +++ b/chromeos/components/string_matching/tokenized_string.h
@@ -29,6 +29,10 @@ explicit TokenizedString(const std::u16string& text, Mode mode = Mode::kCamelCase); + + TokenizedString(const TokenizedString&) = delete; + TokenizedString& operator=(const TokenizedString&) = delete; + ~TokenizedString(); const std::u16string& text() const { return text_; } @@ -45,8 +49,6 @@ // Broken down tokens and the index mapping of tokens in original string. Tokens tokens_; Mappings mappings_; - - DISALLOW_COPY_AND_ASSIGN(TokenizedString); }; } // namespace string_matching
diff --git a/chromeos/components/string_matching/tokenized_string_char_iterator.h b/chromeos/components/string_matching/tokenized_string_char_iterator.h index dc9abfa..8dcda8a3 100644 --- a/chromeos/components/string_matching/tokenized_string_char_iterator.h +++ b/chromeos/components/string_matching/tokenized_string_char_iterator.h
@@ -35,6 +35,11 @@ // Requires |tokenized| out-lives this iterator. explicit TokenizedStringCharIterator(const TokenizedString& tokenized); + + TokenizedStringCharIterator(const TokenizedStringCharIterator&) = delete; + TokenizedStringCharIterator& operator=(const TokenizedStringCharIterator&) = + delete; + ~TokenizedStringCharIterator(); // Advances to the next char. Returns false if there is no next char. @@ -72,8 +77,6 @@ size_t current_token_; std::unique_ptr<base::i18n::UTF16CharIterator> current_token_iter_; - - DISALLOW_COPY_AND_ASSIGN(TokenizedStringCharIterator); }; } // namespace string_matching
diff --git a/chromeos/components/string_matching/tokenized_string_match.h b/chromeos/components/string_matching/tokenized_string_match.h index e4453ef6..52b7fdd 100644 --- a/chromeos/components/string_matching/tokenized_string_match.h +++ b/chromeos/components/string_matching/tokenized_string_match.h
@@ -27,6 +27,10 @@ typedef std::vector<gfx::Range> Hits; TokenizedStringMatch(); + + TokenizedStringMatch(const TokenizedStringMatch&) = delete; + TokenizedStringMatch& operator=(const TokenizedStringMatch&) = delete; + ~TokenizedStringMatch(); // Calculates the relevance and hits. Returns true if the two strings are @@ -45,8 +49,6 @@ // Char index ranges in |text| of where matches are found. Hits hits_; - - DISALLOW_COPY_AND_ASSIGN(TokenizedStringMatch); }; } // namespace string_matching
diff --git a/chromeos/components/sync_wifi/fake_local_network_collector.h b/chromeos/components/sync_wifi/fake_local_network_collector.h index 6b13e1fec..e6c8092e 100644 --- a/chromeos/components/sync_wifi/fake_local_network_collector.h +++ b/chromeos/components/sync_wifi/fake_local_network_collector.h
@@ -19,6 +19,11 @@ class FakeLocalNetworkCollector : public LocalNetworkCollector { public: FakeLocalNetworkCollector(); + + FakeLocalNetworkCollector(const FakeLocalNetworkCollector&) = delete; + FakeLocalNetworkCollector& operator=(const FakeLocalNetworkCollector&) = + delete; + ~FakeLocalNetworkCollector() override; // sync_wifi::LocalNetworkCollector:: @@ -44,8 +49,6 @@ private: std::vector<sync_pb::WifiConfigurationSpecifics> networks_; bool has_fixed_autoconnect_ = false; - - DISALLOW_COPY_AND_ASSIGN(FakeLocalNetworkCollector); }; } // namespace sync_wifi
diff --git a/chromeos/components/sync_wifi/fake_one_shot_timer.h b/chromeos/components/sync_wifi/fake_one_shot_timer.h index 0b94f188..9cdb5006 100644 --- a/chromeos/components/sync_wifi/fake_one_shot_timer.h +++ b/chromeos/components/sync_wifi/fake_one_shot_timer.h
@@ -21,6 +21,10 @@ public: FakeOneShotTimer(base::OnceCallback<void(const base::UnguessableToken&)> destructor_callback); + + FakeOneShotTimer(const FakeOneShotTimer&) = delete; + FakeOneShotTimer& operator=(const FakeOneShotTimer&) = delete; + ~FakeOneShotTimer() override; const base::UnguessableToken& id() const { return id_; } @@ -28,8 +32,6 @@ private: base::OnceCallback<void(const base::UnguessableToken&)> destructor_callback_; base::UnguessableToken id_; - - DISALLOW_COPY_AND_ASSIGN(FakeOneShotTimer); }; } // namespace sync_wifi
diff --git a/chromeos/components/sync_wifi/fake_pending_network_configuration_tracker.h b/chromeos/components/sync_wifi/fake_pending_network_configuration_tracker.h index d6bdffff..0c0d30e 100644 --- a/chromeos/components/sync_wifi/fake_pending_network_configuration_tracker.h +++ b/chromeos/components/sync_wifi/fake_pending_network_configuration_tracker.h
@@ -19,6 +19,12 @@ : public PendingNetworkConfigurationTracker { public: FakePendingNetworkConfigurationTracker(); + + FakePendingNetworkConfigurationTracker( + const FakePendingNetworkConfigurationTracker&) = delete; + FakePendingNetworkConfigurationTracker& operator=( + const FakePendingNetworkConfigurationTracker&) = delete; + ~FakePendingNetworkConfigurationTracker() override; // sync_wifi::PendingNetworkConfigurationtracker:: @@ -51,8 +57,6 @@ // This map is not cleared when MarkComplete is called to allow tests to // verify that the expected number of retries were performed before removal. std::map<NetworkIdentifier, int> id_to_completed_attempts_map_; - - DISALLOW_COPY_AND_ASSIGN(FakePendingNetworkConfigurationTracker); }; } // namespace sync_wifi
diff --git a/chromeos/components/sync_wifi/fake_timer_factory.h b/chromeos/components/sync_wifi/fake_timer_factory.h index 0fcce0ec..c5881b5 100644 --- a/chromeos/components/sync_wifi/fake_timer_factory.h +++ b/chromeos/components/sync_wifi/fake_timer_factory.h
@@ -26,6 +26,10 @@ class FakeTimerFactory : public TimerFactory { public: FakeTimerFactory(); + + FakeTimerFactory(const FakeTimerFactory&) = delete; + FakeTimerFactory& operator=(const FakeTimerFactory&) = delete; + ~FakeTimerFactory() override; // TimerFactory: @@ -38,8 +42,6 @@ base::flat_map<base::UnguessableToken, FakeOneShotTimer*> id_to_timer_map_; base::WeakPtrFactory<FakeTimerFactory> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeTimerFactory); }; } // namespace sync_wifi
diff --git a/chromeos/components/sync_wifi/local_network_collector_impl_unittest.cc b/chromeos/components/sync_wifi/local_network_collector_impl_unittest.cc index bc70221..5656130 100644 --- a/chromeos/components/sync_wifi/local_network_collector_impl_unittest.cc +++ b/chromeos/components/sync_wifi/local_network_collector_impl_unittest.cc
@@ -57,6 +57,11 @@ ash::GetNetworkConfigService( remote_cros_network_config_.BindNewPipeAndPassReceiver()); } + + LocalNetworkCollectorImplTest(const LocalNetworkCollectorImplTest&) = delete; + LocalNetworkCollectorImplTest& operator=( + const LocalNetworkCollectorImplTest&) = delete; + ~LocalNetworkCollectorImplTest() override = default; void SetUp() override { @@ -137,8 +142,6 @@ remote_cros_network_config_; size_t on_get_all_syncable_networks_count_; - - DISALLOW_COPY_AND_ASSIGN(LocalNetworkCollectorImplTest); }; TEST_F(LocalNetworkCollectorImplTest, TestGetAllSyncableNetworks) {
diff --git a/chromeos/components/sync_wifi/pending_network_configuration_tracker.h b/chromeos/components/sync_wifi/pending_network_configuration_tracker.h index fa989c30..9c5986e 100644 --- a/chromeos/components/sync_wifi/pending_network_configuration_tracker.h +++ b/chromeos/components/sync_wifi/pending_network_configuration_tracker.h
@@ -23,6 +23,12 @@ class PendingNetworkConfigurationTracker { public: PendingNetworkConfigurationTracker() = default; + + PendingNetworkConfigurationTracker( + const PendingNetworkConfigurationTracker&) = delete; + PendingNetworkConfigurationTracker& operator=( + const PendingNetworkConfigurationTracker&) = delete; + virtual ~PendingNetworkConfigurationTracker() = default; // Adds an update to the list of in flight changes. |change_uuid| is a @@ -50,9 +56,6 @@ // that the |change_guid| and |ssid| exist in the tracker before calling. virtual void IncrementCompletedAttempts(const std::string& change_guid, const NetworkIdentifier& id) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(PendingNetworkConfigurationTracker); }; } // namespace sync_wifi
diff --git a/chromeos/components/sync_wifi/pending_network_configuration_tracker_impl.h b/chromeos/components/sync_wifi/pending_network_configuration_tracker_impl.h index c36ac8a..56a62e27 100644 --- a/chromeos/components/sync_wifi/pending_network_configuration_tracker_impl.h +++ b/chromeos/components/sync_wifi/pending_network_configuration_tracker_impl.h
@@ -22,6 +22,12 @@ : public PendingNetworkConfigurationTracker { public: explicit PendingNetworkConfigurationTrackerImpl(PrefService* pref_service); + + PendingNetworkConfigurationTrackerImpl( + const PendingNetworkConfigurationTrackerImpl&) = delete; + PendingNetworkConfigurationTrackerImpl& operator=( + const PendingNetworkConfigurationTrackerImpl&) = delete; + ~PendingNetworkConfigurationTrackerImpl() override; // Registers preferences used by this class in the provided |registry|. @@ -44,8 +50,6 @@ private: PrefService* pref_service_; base::Value dict_; - - DISALLOW_COPY_AND_ASSIGN(PendingNetworkConfigurationTrackerImpl); }; } // namespace sync_wifi
diff --git a/chromeos/components/sync_wifi/synced_network_metrics_logger_unittest.cc b/chromeos/components/sync_wifi/synced_network_metrics_logger_unittest.cc index abf7d31..5429874 100644 --- a/chromeos/components/sync_wifi/synced_network_metrics_logger_unittest.cc +++ b/chromeos/components/sync_wifi/synced_network_metrics_logger_unittest.cc
@@ -30,6 +30,12 @@ : task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) { network_test_helper_ = std::make_unique<NetworkTestHelper>(); } + + SyncedNetworkMetricsLoggerTest(const SyncedNetworkMetricsLoggerTest&) = + delete; + SyncedNetworkMetricsLoggerTest& operator=( + const SyncedNetworkMetricsLoggerTest&) = delete; + ~SyncedNetworkMetricsLoggerTest() override = default; void SetUp() override { @@ -106,8 +112,6 @@ private: std::unique_ptr<NetworkTestHelper> network_test_helper_; std::unique_ptr<SyncedNetworkMetricsLogger> synced_network_metrics_logger_; - - DISALLOW_COPY_AND_ASSIGN(SyncedNetworkMetricsLoggerTest); }; TEST_F(SyncedNetworkMetricsLoggerTest,
diff --git a/chromeos/components/sync_wifi/synced_network_updater.h b/chromeos/components/sync_wifi/synced_network_updater.h index 843ddeb..6d67836 100644 --- a/chromeos/components/sync_wifi/synced_network_updater.h +++ b/chromeos/components/sync_wifi/synced_network_updater.h
@@ -22,6 +22,9 @@ // Applies updates to synced networks to the local networking stack. class SyncedNetworkUpdater { public: + SyncedNetworkUpdater(const SyncedNetworkUpdater&) = delete; + SyncedNetworkUpdater& operator=(const SyncedNetworkUpdater&) = delete; + virtual ~SyncedNetworkUpdater() = default; virtual void AddOrUpdateNetwork( @@ -31,9 +34,6 @@ protected: SyncedNetworkUpdater() = default; - - private: - DISALLOW_COPY_AND_ASSIGN(SyncedNetworkUpdater); }; } // namespace sync_wifi
diff --git a/chromeos/components/sync_wifi/synced_network_updater_impl_unittest.cc b/chromeos/components/sync_wifi/synced_network_updater_impl_unittest.cc index b8bcf363..470bb67e 100644 --- a/chromeos/components/sync_wifi/synced_network_updater_impl_unittest.cc +++ b/chromeos/components/sync_wifi/synced_network_updater_impl_unittest.cc
@@ -74,6 +74,10 @@ remote_cros_network_config_.BindNewPipeAndPassReceiver()); } + SyncedNetworkUpdaterImplTest(const SyncedNetworkUpdaterImplTest&) = delete; + SyncedNetworkUpdaterImplTest& operator=(const SyncedNetworkUpdaterImplTest&) = + delete; + ~SyncedNetworkUpdaterImplTest() override { local_test_helper_.reset(); } void SetUp() override { @@ -132,8 +136,6 @@ NetworkIdentifier fred_network_id_ = GeneratePskNetworkId(kFredSsid); NetworkIdentifier mango_network_id_ = GeneratePskNetworkId(kMangoSsid); - - DISALLOW_COPY_AND_ASSIGN(SyncedNetworkUpdaterImplTest); }; TEST_F(SyncedNetworkUpdaterImplTest, TestAdd_OneNetwork) {
diff --git a/chromeos/components/sync_wifi/wifi_configuration_bridge.h b/chromeos/components/sync_wifi/wifi_configuration_bridge.h index a24c7ea..4fb4985 100644 --- a/chromeos/components/sync_wifi/wifi_configuration_bridge.h +++ b/chromeos/components/sync_wifi/wifi_configuration_bridge.h
@@ -58,6 +58,10 @@ PrefService* pref_service, std::unique_ptr<syncer::ModelTypeChangeProcessor> change_processor, syncer::OnceModelTypeStoreFactory create_store_callback); + + WifiConfigurationBridge(const WifiConfigurationBridge&) = delete; + WifiConfigurationBridge& operator=(const WifiConfigurationBridge&) = delete; + ~WifiConfigurationBridge() override; static void RegisterPrefs(PrefRegistrySimple* registry); @@ -163,8 +167,6 @@ base::WeakPtr<NetworkMetadataStore> network_metadata_store_; base::WeakPtrFactory<WifiConfigurationBridge> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(WifiConfigurationBridge); }; } // namespace sync_wifi
diff --git a/chromeos/components/sync_wifi/wifi_configuration_sync_service.h b/chromeos/components/sync_wifi/wifi_configuration_sync_service.h index 58743ac6..968b6ba 100644 --- a/chromeos/components/sync_wifi/wifi_configuration_sync_service.h +++ b/chromeos/components/sync_wifi/wifi_configuration_sync_service.h
@@ -41,6 +41,11 @@ version_info::Channel channel, PrefService* pref_service, syncer::OnceModelTypeStoreFactory create_store_callback); + + WifiConfigurationSyncService(const WifiConfigurationSyncService&) = delete; + WifiConfigurationSyncService& operator=(const WifiConfigurationSyncService&) = + delete; + ~WifiConfigurationSyncService() override; base::WeakPtr<syncer::ModelTypeControllerDelegate> GetControllerDelegate(); @@ -55,8 +60,6 @@ std::unique_ptr<SyncedNetworkUpdaterImpl> updater_; std::unique_ptr<LocalNetworkCollectorImpl> collector_; std::unique_ptr<WifiConfigurationBridge> bridge_; - - DISALLOW_COPY_AND_ASSIGN(WifiConfigurationSyncService); }; } // namespace sync_wifi
diff --git a/chromeos/components/tether/active_host.h b/chromeos/components/tether/active_host.h index 79d38c3..ba39575 100644 --- a/chromeos/components/tether/active_host.h +++ b/chromeos/components/tether/active_host.h
@@ -80,6 +80,10 @@ }; ActiveHost(TetherHostFetcher* tether_host_fetcher, PrefService* pref_service); + + ActiveHost(const ActiveHost&) = delete; + ActiveHost& operator=(const ActiveHost&) = delete; + virtual ~ActiveHost(); // Registers the prefs used by this class to the given |registry|. @@ -156,8 +160,6 @@ base::ObserverList<Observer>::Unchecked observer_list_; base::WeakPtrFactory<ActiveHost> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ActiveHost); }; } // namespace tether
diff --git a/chromeos/components/tether/active_host_network_state_updater.h b/chromeos/components/tether/active_host_network_state_updater.h index 87ae0b80..8ed85807 100644 --- a/chromeos/components/tether/active_host_network_state_updater.h +++ b/chromeos/components/tether/active_host_network_state_updater.h
@@ -21,6 +21,11 @@ public: ActiveHostNetworkStateUpdater(ActiveHost* active_host, NetworkStateHandler* network_state_handler); + + ActiveHostNetworkStateUpdater(const ActiveHostNetworkStateUpdater&) = delete; + ActiveHostNetworkStateUpdater& operator=( + const ActiveHostNetworkStateUpdater&) = delete; + ~ActiveHostNetworkStateUpdater(); // ActiveHost::Observer: @@ -30,8 +35,6 @@ private: ActiveHost* active_host_; NetworkStateHandler* network_state_handler_; - - DISALLOW_COPY_AND_ASSIGN(ActiveHostNetworkStateUpdater); }; } // namespace tether
diff --git a/chromeos/components/tether/asynchronous_shutdown_object_container.h b/chromeos/components/tether/asynchronous_shutdown_object_container.h index d3e9a3e..77a2800 100644 --- a/chromeos/components/tether/asynchronous_shutdown_object_container.h +++ b/chromeos/components/tether/asynchronous_shutdown_object_container.h
@@ -23,6 +23,12 @@ class AsynchronousShutdownObjectContainer { public: AsynchronousShutdownObjectContainer() {} + + AsynchronousShutdownObjectContainer( + const AsynchronousShutdownObjectContainer&) = delete; + AsynchronousShutdownObjectContainer& operator=( + const AsynchronousShutdownObjectContainer&) = delete; + virtual ~AsynchronousShutdownObjectContainer() {} // Shuts down the objects contained by this class and invokes @@ -35,9 +41,6 @@ disconnect_tethering_request_sender() = 0; virtual NetworkConfigurationRemover* network_configuration_remover() = 0; virtual WifiHotspotDisconnector* wifi_hotspot_disconnector() = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(AsynchronousShutdownObjectContainer); }; } // namespace tether
diff --git a/chromeos/components/tether/connect_tethering_operation.h b/chromeos/components/tether/connect_tethering_operation.h index 9ac6c5f..c8c30e8 100644 --- a/chromeos/components/tether/connect_tethering_operation.h +++ b/chromeos/components/tether/connect_tethering_operation.h
@@ -92,6 +92,10 @@ HostResponseErrorCode error_code) = 0; }; + ConnectTetheringOperation(const ConnectTetheringOperation&) = delete; + ConnectTetheringOperation& operator=(const ConnectTetheringOperation&) = + delete; + ~ConnectTetheringOperation() override; void AddObserver(Observer* observer); @@ -159,8 +163,6 @@ base::Time connect_tethering_request_start_time_; base::ObserverList<Observer>::Unchecked observer_list_; - - DISALLOW_COPY_AND_ASSIGN(ConnectTetheringOperation); }; } // namespace tether
diff --git a/chromeos/components/tether/connect_tethering_operation_unittest.cc b/chromeos/components/tether/connect_tethering_operation_unittest.cc index 35a0c26..62836e6 100644 --- a/chromeos/components/tether/connect_tethering_operation_unittest.cc +++ b/chromeos/components/tether/connect_tethering_operation_unittest.cc
@@ -44,6 +44,10 @@ class MockOperationObserver : public ConnectTetheringOperation::Observer { public: MockOperationObserver() = default; + + MockOperationObserver(const MockOperationObserver&) = delete; + MockOperationObserver& operator=(const MockOperationObserver&) = delete; + ~MockOperationObserver() = default; MOCK_METHOD1(OnConnectTetheringRequestSent, @@ -55,9 +59,6 @@ MOCK_METHOD2(OnConnectTetheringFailure, void(multidevice::RemoteDeviceRef, ConnectTetheringOperation::HostResponseErrorCode)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockOperationObserver); }; } // namespace
diff --git a/chromeos/components/tether/connection_preserver.h b/chromeos/components/tether/connection_preserver.h index c5d2c9f..40e623e5 100644 --- a/chromeos/components/tether/connection_preserver.h +++ b/chromeos/components/tether/connection_preserver.h
@@ -20,15 +20,16 @@ class ConnectionPreserver { public: ConnectionPreserver(); + + ConnectionPreserver(const ConnectionPreserver&) = delete; + ConnectionPreserver& operator=(const ConnectionPreserver&) = delete; + virtual ~ConnectionPreserver(); // Should be called after each successful host scan result, to request that // the Connection with that device be preserved. virtual void HandleSuccessfulTetherAvailabilityResponse( const std::string& device_id) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(ConnectionPreserver); }; } // namespace tether
diff --git a/chromeos/components/tether/connection_preserver_impl.h b/chromeos/components/tether/connection_preserver_impl.h index fec7470..5abe35a 100644 --- a/chromeos/components/tether/connection_preserver_impl.h +++ b/chromeos/components/tether/connection_preserver_impl.h
@@ -46,6 +46,10 @@ NetworkStateHandler* network_state_handler, ActiveHost* active_host, TetherHostResponseRecorder* tether_host_response_recorder); + + ConnectionPreserverImpl(const ConnectionPreserverImpl&) = delete; + ConnectionPreserverImpl& operator=(const ConnectionPreserverImpl&) = delete; + ~ConnectionPreserverImpl() override; // ConnectionPreserver: @@ -96,8 +100,6 @@ std::unique_ptr<secure_channel::ClientChannel> client_channel_; base::WeakPtrFactory<ConnectionPreserverImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ConnectionPreserverImpl); }; } // namespace tether
diff --git a/chromeos/components/tether/crash_recovery_manager.h b/chromeos/components/tether/crash_recovery_manager.h index c7df7cd7..cf31a7d 100644 --- a/chromeos/components/tether/crash_recovery_manager.h +++ b/chromeos/components/tether/crash_recovery_manager.h
@@ -16,6 +16,10 @@ class CrashRecoveryManager { public: CrashRecoveryManager() {} + + CrashRecoveryManager(const CrashRecoveryManager&) = delete; + CrashRecoveryManager& operator=(const CrashRecoveryManager&) = delete; + virtual ~CrashRecoveryManager() {} // Restores state which was lost by a browser crash. If a crash did not occur @@ -27,9 +31,6 @@ // TetherComponent. virtual void RestorePreCrashStateIfNecessary( base::OnceClosure on_restoration_finished) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(CrashRecoveryManager); }; } // namespace tether
diff --git a/chromeos/components/tether/device_id_tether_network_guid_map.h b/chromeos/components/tether/device_id_tether_network_guid_map.h index 2d78ca2..5803aa99 100644 --- a/chromeos/components/tether/device_id_tether_network_guid_map.h +++ b/chromeos/components/tether/device_id_tether_network_guid_map.h
@@ -21,6 +21,11 @@ class DeviceIdTetherNetworkGuidMap { public: DeviceIdTetherNetworkGuidMap(); + + DeviceIdTetherNetworkGuidMap(const DeviceIdTetherNetworkGuidMap&) = delete; + DeviceIdTetherNetworkGuidMap& operator=(const DeviceIdTetherNetworkGuidMap&) = + delete; + virtual ~DeviceIdTetherNetworkGuidMap(); // Returns the device ID for a given tether network GUID. @@ -30,9 +35,6 @@ // Returns the tether network GUID for a given device ID. virtual std::string GetTetherNetworkGuidForDeviceId( const std::string& device_id); - - private: - DISALLOW_COPY_AND_ASSIGN(DeviceIdTetherNetworkGuidMap); }; } // namespace tether
diff --git a/chromeos/components/tether/disconnect_tethering_operation.h b/chromeos/components/tether/disconnect_tethering_operation.h index 39570a2..57f7556f 100644 --- a/chromeos/components/tether/disconnect_tethering_operation.h +++ b/chromeos/components/tether/disconnect_tethering_operation.h
@@ -54,6 +54,10 @@ bool success) = 0; }; + DisconnectTetheringOperation(const DisconnectTetheringOperation&) = delete; + DisconnectTetheringOperation& operator=(const DisconnectTetheringOperation&) = + delete; + ~DisconnectTetheringOperation() override; void AddObserver(Observer* observer); @@ -90,8 +94,6 @@ base::Clock* clock_; base::Time disconnect_start_time_; - - DISALLOW_COPY_AND_ASSIGN(DisconnectTetheringOperation); }; } // namespace tether
diff --git a/chromeos/components/tether/disconnect_tethering_operation_unittest.cc b/chromeos/components/tether/disconnect_tethering_operation_unittest.cc index c3aedf6..80debc1 100644 --- a/chromeos/components/tether/disconnect_tethering_operation_unittest.cc +++ b/chromeos/components/tether/disconnect_tethering_operation_unittest.cc
@@ -38,12 +38,13 @@ class MockOperationObserver : public DisconnectTetheringOperation::Observer { public: MockOperationObserver() = default; + + MockOperationObserver(const MockOperationObserver&) = delete; + MockOperationObserver& operator=(const MockOperationObserver&) = delete; + ~MockOperationObserver() = default; MOCK_METHOD2(OnOperationFinished, void(const std::string&, bool)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockOperationObserver); }; } // namespace
diff --git a/chromeos/components/tether/disconnect_tethering_request_sender.h b/chromeos/components/tether/disconnect_tethering_request_sender.h index 1b7af13..576e614 100644 --- a/chromeos/components/tether/disconnect_tethering_request_sender.h +++ b/chromeos/components/tether/disconnect_tethering_request_sender.h
@@ -25,6 +25,12 @@ }; DisconnectTetheringRequestSender(); + + DisconnectTetheringRequestSender(const DisconnectTetheringRequestSender&) = + delete; + DisconnectTetheringRequestSender& operator=( + const DisconnectTetheringRequestSender&) = delete; + virtual ~DisconnectTetheringRequestSender(); // Sends a DisconnectTetheringRequest to the device with the given ID. @@ -42,8 +48,6 @@ private: base::ObserverList<Observer>::Unchecked observer_list_; - - DISALLOW_COPY_AND_ASSIGN(DisconnectTetheringRequestSender); }; } // namespace tether
diff --git a/chromeos/components/tether/disconnect_tethering_request_sender_impl_unittest.cc b/chromeos/components/tether/disconnect_tethering_request_sender_impl_unittest.cc index b5451dae..efff6b5 100644 --- a/chromeos/components/tether/disconnect_tethering_request_sender_impl_unittest.cc +++ b/chromeos/components/tether/disconnect_tethering_request_sender_impl_unittest.cc
@@ -98,6 +98,12 @@ public: DisconnectTetheringRequestSenderTest() : test_devices_(multidevice::CreateRemoteDeviceRefListForTest(2u)) {} + + DisconnectTetheringRequestSenderTest( + const DisconnectTetheringRequestSenderTest&) = delete; + DisconnectTetheringRequestSenderTest& operator=( + const DisconnectTetheringRequestSenderTest&) = delete; + ~DisconnectTetheringRequestSenderTest() override = default; void SetUp() override { @@ -196,9 +202,6 @@ disconnect_tethering_request_sender_; std::unique_ptr<FakeDisconnectTetheringRequestSenderObserver> fake_disconnect_tethering_request_sender_observer_; - - private: - DISALLOW_COPY_AND_ASSIGN(DisconnectTetheringRequestSenderTest); }; TEST_F(DisconnectTetheringRequestSenderTest, DISABLED_SendRequest_Success) {
diff --git a/chromeos/components/tether/fake_active_host.h b/chromeos/components/tether/fake_active_host.h index d411116..2813248 100644 --- a/chromeos/components/tether/fake_active_host.h +++ b/chromeos/components/tether/fake_active_host.h
@@ -20,6 +20,10 @@ class FakeActiveHost : public ActiveHost { public: FakeActiveHost(); + + FakeActiveHost(const FakeActiveHost&) = delete; + FakeActiveHost& operator=(const FakeActiveHost&) = delete; + ~FakeActiveHost() override; // ActiveHost: @@ -46,8 +50,6 @@ std::string active_host_device_id_; std::string tether_network_guid_; std::string wifi_network_guid_; - - DISALLOW_COPY_AND_ASSIGN(FakeActiveHost); }; } // namespace tether
diff --git a/chromeos/components/tether/fake_asynchronous_shutdown_object_container.h b/chromeos/components/tether/fake_asynchronous_shutdown_object_container.h index 47f5da2..0d7bb548 100644 --- a/chromeos/components/tether/fake_asynchronous_shutdown_object_container.h +++ b/chromeos/components/tether/fake_asynchronous_shutdown_object_container.h
@@ -22,6 +22,12 @@ // |deletion_callback| will be invoked when the object is deleted. FakeAsynchronousShutdownObjectContainer( base::OnceClosure deletion_callback = base::DoNothing()); + + FakeAsynchronousShutdownObjectContainer( + const FakeAsynchronousShutdownObjectContainer&) = delete; + FakeAsynchronousShutdownObjectContainer& operator=( + const FakeAsynchronousShutdownObjectContainer&) = delete; + ~FakeAsynchronousShutdownObjectContainer() override; base::OnceClosure TakeShutdownCompleteCallback() { @@ -64,8 +70,6 @@ nullptr; NetworkConfigurationRemover* network_configuration_remover_ = nullptr; WifiHotspotDisconnector* wifi_hotspot_disconnector_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakeAsynchronousShutdownObjectContainer); }; } // namespace tether
diff --git a/chromeos/components/tether/fake_connection_preserver.h b/chromeos/components/tether/fake_connection_preserver.h index 95d175f..20a8ecb3 100644 --- a/chromeos/components/tether/fake_connection_preserver.h +++ b/chromeos/components/tether/fake_connection_preserver.h
@@ -18,6 +18,10 @@ class FakeConnectionPreserver : public ConnectionPreserver { public: FakeConnectionPreserver(); + + FakeConnectionPreserver(const FakeConnectionPreserver&) = delete; + FakeConnectionPreserver& operator=(const FakeConnectionPreserver&) = delete; + ~FakeConnectionPreserver() override; void HandleSuccessfulTetherAvailabilityResponse( @@ -29,8 +33,6 @@ private: std::string last_requested_preserved_connection_device_id_; - - DISALLOW_COPY_AND_ASSIGN(FakeConnectionPreserver); }; } // namespace tether
diff --git a/chromeos/components/tether/fake_crash_recovery_manager.h b/chromeos/components/tether/fake_crash_recovery_manager.h index 4484611..1fc5592 100644 --- a/chromeos/components/tether/fake_crash_recovery_manager.h +++ b/chromeos/components/tether/fake_crash_recovery_manager.h
@@ -17,6 +17,10 @@ class FakeCrashRecoveryManager : public CrashRecoveryManager { public: FakeCrashRecoveryManager(); + + FakeCrashRecoveryManager(const FakeCrashRecoveryManager&) = delete; + FakeCrashRecoveryManager& operator=(const FakeCrashRecoveryManager&) = delete; + ~FakeCrashRecoveryManager() override; base::OnceClosure TakeOnRestorationFinishedCallback() { @@ -29,8 +33,6 @@ private: base::OnceClosure on_restoration_finished_callback_; - - DISALLOW_COPY_AND_ASSIGN(FakeCrashRecoveryManager); }; } // namespace tether
diff --git a/chromeos/components/tether/fake_disconnect_tethering_request_sender.h b/chromeos/components/tether/fake_disconnect_tethering_request_sender.h index e4b6d48..349ba1f4 100644 --- a/chromeos/components/tether/fake_disconnect_tethering_request_sender.h +++ b/chromeos/components/tether/fake_disconnect_tethering_request_sender.h
@@ -20,6 +20,12 @@ : public DisconnectTetheringRequestSender { public: FakeDisconnectTetheringRequestSender(); + + FakeDisconnectTetheringRequestSender( + const FakeDisconnectTetheringRequestSender&) = delete; + FakeDisconnectTetheringRequestSender& operator=( + const FakeDisconnectTetheringRequestSender&) = delete; + ~FakeDisconnectTetheringRequestSender() override; void NotifyPendingDisconnectRequestsComplete(); @@ -39,8 +45,6 @@ private: bool has_pending_requests_ = false; std::vector<std::string> device_ids_sent_requests_; - - DISALLOW_COPY_AND_ASSIGN(FakeDisconnectTetheringRequestSender); }; } // namespace tether
diff --git a/chromeos/components/tether/fake_gms_core_notifications_state_tracker.h b/chromeos/components/tether/fake_gms_core_notifications_state_tracker.h index f1dea712..39469dc 100644 --- a/chromeos/components/tether/fake_gms_core_notifications_state_tracker.h +++ b/chromeos/components/tether/fake_gms_core_notifications_state_tracker.h
@@ -20,6 +20,12 @@ : public GmsCoreNotificationsStateTracker { public: FakeGmsCoreNotificationsStateTracker(); + + FakeGmsCoreNotificationsStateTracker( + const FakeGmsCoreNotificationsStateTracker&) = delete; + FakeGmsCoreNotificationsStateTracker& operator=( + const FakeGmsCoreNotificationsStateTracker&) = delete; + ~FakeGmsCoreNotificationsStateTracker() override; void set_device_names(const std::vector<std::string>& device_names) { @@ -34,8 +40,6 @@ private: std::vector<std::string> device_names_; - - DISALLOW_COPY_AND_ASSIGN(FakeGmsCoreNotificationsStateTracker); }; } // namespace tether
diff --git a/chromeos/components/tether/fake_host_scan_cache.h b/chromeos/components/tether/fake_host_scan_cache.h index 1ba3b6a3..9a1b5b6 100644 --- a/chromeos/components/tether/fake_host_scan_cache.h +++ b/chromeos/components/tether/fake_host_scan_cache.h
@@ -20,6 +20,10 @@ class FakeHostScanCache : virtual public HostScanCache { public: FakeHostScanCache(); + + FakeHostScanCache(const FakeHostScanCache&) = delete; + FakeHostScanCache& operator=(const FakeHostScanCache&) = delete; + ~FakeHostScanCache() override; // Getters for contents of the cache. @@ -43,8 +47,6 @@ private: std::unordered_map<std::string, HostScanCacheEntry> cache_; - - DISALLOW_COPY_AND_ASSIGN(FakeHostScanCache); }; } // namespace tether
diff --git a/chromeos/components/tether/fake_host_scan_scheduler.h b/chromeos/components/tether/fake_host_scan_scheduler.h index 4537509..bd4d4e4c 100644 --- a/chromeos/components/tether/fake_host_scan_scheduler.h +++ b/chromeos/components/tether/fake_host_scan_scheduler.h
@@ -16,6 +16,10 @@ class FakeHostScanScheduler : public HostScanScheduler { public: FakeHostScanScheduler(); + + FakeHostScanScheduler(const FakeHostScanScheduler&) = delete; + FakeHostScanScheduler& operator=(const FakeHostScanScheduler&) = delete; + ~FakeHostScanScheduler() override; int num_attempted_scans() { return num_attempted_scans_; } @@ -25,8 +29,6 @@ private: int num_attempted_scans_ = 0; - - DISALLOW_COPY_AND_ASSIGN(FakeHostScanScheduler); }; } // namespace tether
diff --git a/chromeos/components/tether/fake_host_scanner.h b/chromeos/components/tether/fake_host_scanner.h index 711df25..ffc8fb7 100644 --- a/chromeos/components/tether/fake_host_scanner.h +++ b/chromeos/components/tether/fake_host_scanner.h
@@ -15,6 +15,10 @@ class FakeHostScanner : public HostScanner { public: FakeHostScanner(); + + FakeHostScanner(const FakeHostScanner&) = delete; + FakeHostScanner& operator=(const FakeHostScanner&) = delete; + ~FakeHostScanner() override; size_t num_scans_started() { return num_scans_started_; } @@ -29,8 +33,6 @@ private: size_t num_scans_started_ = 0u; bool is_active_ = false; - - DISALLOW_COPY_AND_ASSIGN(FakeHostScanner); }; } // namespace tether
diff --git a/chromeos/components/tether/fake_network_configuration_remover.h b/chromeos/components/tether/fake_network_configuration_remover.h index 2a2781b..5282fa08 100644 --- a/chromeos/components/tether/fake_network_configuration_remover.h +++ b/chromeos/components/tether/fake_network_configuration_remover.h
@@ -18,6 +18,12 @@ class FakeNetworkConfigurationRemover : public NetworkConfigurationRemover { public: FakeNetworkConfigurationRemover(); + + FakeNetworkConfigurationRemover(const FakeNetworkConfigurationRemover&) = + delete; + FakeNetworkConfigurationRemover& operator=( + const FakeNetworkConfigurationRemover&) = delete; + ~FakeNetworkConfigurationRemover() override; std::string last_removed_wifi_network_path() { @@ -30,8 +36,6 @@ private: std::string last_removed_wifi_network_path_; - - DISALLOW_COPY_AND_ASSIGN(FakeNetworkConfigurationRemover); }; } // namespace tether
diff --git a/chromeos/components/tether/fake_notification_presenter.h b/chromeos/components/tether/fake_notification_presenter.h index 0f54d4a..d0570d8 100644 --- a/chromeos/components/tether/fake_notification_presenter.h +++ b/chromeos/components/tether/fake_notification_presenter.h
@@ -19,6 +19,11 @@ class FakeNotificationPresenter : public NotificationPresenter { public: FakeNotificationPresenter(); + + FakeNotificationPresenter(const FakeNotificationPresenter&) = delete; + FakeNotificationPresenter& operator=(const FakeNotificationPresenter&) = + delete; + ~FakeNotificationPresenter() override; // Note: This function fails a test if potential_hotspot_state() is not @@ -52,8 +57,6 @@ absl::optional<multidevice::RemoteDeviceRef> potential_hotspot_remote_device_; bool is_setup_required_notification_shown_; bool is_connection_failed_notification_shown_; - - DISALLOW_COPY_AND_ASSIGN(FakeNotificationPresenter); }; } // namespace tether
diff --git a/chromeos/components/tether/fake_synchronous_shutdown_object_container.h b/chromeos/components/tether/fake_synchronous_shutdown_object_container.h index afdfb39..07fd930 100644 --- a/chromeos/components/tether/fake_synchronous_shutdown_object_container.h +++ b/chromeos/components/tether/fake_synchronous_shutdown_object_container.h
@@ -22,6 +22,12 @@ // |deletion_callback| will be invoked when the object is deleted. FakeSynchronousShutdownObjectContainer( base::OnceClosure deletion_callback = base::DoNothing()); + + FakeSynchronousShutdownObjectContainer( + const FakeSynchronousShutdownObjectContainer&) = delete; + FakeSynchronousShutdownObjectContainer& operator=( + const FakeSynchronousShutdownObjectContainer&) = delete; + ~FakeSynchronousShutdownObjectContainer() override; void set_active_host(ActiveHost* active_host) { active_host_ = active_host; } @@ -51,8 +57,6 @@ HostScanCache* host_scan_cache_ = nullptr; HostScanScheduler* host_scan_scheduler_ = nullptr; TetherDisconnector* tether_disconnector_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakeSynchronousShutdownObjectContainer); }; } // namespace tether
diff --git a/chromeos/components/tether/fake_tether_component.h b/chromeos/components/tether/fake_tether_component.h index f7efa9f..9c171a9 100644 --- a/chromeos/components/tether/fake_tether_component.h +++ b/chromeos/components/tether/fake_tether_component.h
@@ -17,6 +17,10 @@ class FakeTetherComponent : public TetherComponent { public: explicit FakeTetherComponent(bool has_asynchronous_shutdown); + + FakeTetherComponent(const FakeTetherComponent&) = delete; + FakeTetherComponent& operator=(const FakeTetherComponent&) = delete; + ~FakeTetherComponent() override; void set_has_asynchronous_shutdown(bool has_asynchronous_shutdown) { @@ -34,8 +38,6 @@ private: bool has_asynchronous_shutdown_; std::unique_ptr<ShutdownReason> last_shutdown_reason_; - - DISALLOW_COPY_AND_ASSIGN(FakeTetherComponent); }; } // namespace tether
diff --git a/chromeos/components/tether/fake_tether_connector.h b/chromeos/components/tether/fake_tether_connector.h index 935f905b..e1bf672 100644 --- a/chromeos/components/tether/fake_tether_connector.h +++ b/chromeos/components/tether/fake_tether_connector.h
@@ -18,6 +18,10 @@ class FakeTetherConnector : public TetherConnector { public: FakeTetherConnector(); + + FakeTetherConnector(const FakeTetherConnector&) = delete; + FakeTetherConnector& operator=(const FakeTetherConnector&) = delete; + ~FakeTetherConnector() override; std::string last_connected_tether_network_guid() { @@ -48,8 +52,6 @@ std::string last_canceled_tether_network_guid_; bool should_cancel_successfully_; - - DISALLOW_COPY_AND_ASSIGN(FakeTetherConnector); }; } // namespace tether
diff --git a/chromeos/components/tether/fake_tether_disconnector.h b/chromeos/components/tether/fake_tether_disconnector.h index d0752a45..78b2fd97 100644 --- a/chromeos/components/tether/fake_tether_disconnector.h +++ b/chromeos/components/tether/fake_tether_disconnector.h
@@ -19,6 +19,10 @@ class FakeTetherDisconnector : public TetherDisconnector { public: FakeTetherDisconnector(); + + FakeTetherDisconnector(const FakeTetherDisconnector&) = delete; + FakeTetherDisconnector& operator=(const FakeTetherDisconnector&) = delete; + ~FakeTetherDisconnector() override; std::string last_disconnected_tether_network_guid() { @@ -48,8 +52,6 @@ std::string disconnection_error_name_; std::unique_ptr<TetherSessionCompletionLogger::SessionCompletionReason> last_session_completion_reason_; - - DISALLOW_COPY_AND_ASSIGN(FakeTetherDisconnector); }; } // namespace tether
diff --git a/chromeos/components/tether/fake_tether_host_fetcher.h b/chromeos/components/tether/fake_tether_host_fetcher.h index 0894ed8e..e5fb83e 100644 --- a/chromeos/components/tether/fake_tether_host_fetcher.h +++ b/chromeos/components/tether/fake_tether_host_fetcher.h
@@ -21,6 +21,10 @@ explicit FakeTetherHostFetcher( const multidevice::RemoteDeviceRefList& tether_hosts); FakeTetherHostFetcher(); + + FakeTetherHostFetcher(const FakeTetherHostFetcher&) = delete; + FakeTetherHostFetcher& operator=(const FakeTetherHostFetcher&) = delete; + ~FakeTetherHostFetcher() override; void set_tether_hosts(const multidevice::RemoteDeviceRefList& tether_hosts) { @@ -38,8 +42,6 @@ private: multidevice::RemoteDeviceRefList tether_hosts_; - - DISALLOW_COPY_AND_ASSIGN(FakeTetherHostFetcher); }; } // namespace tether
diff --git a/chromeos/components/tether/fake_tether_session_completion_logger.h b/chromeos/components/tether/fake_tether_session_completion_logger.h index f70ef03..fa35c6c6 100644 --- a/chromeos/components/tether/fake_tether_session_completion_logger.h +++ b/chromeos/components/tether/fake_tether_session_completion_logger.h
@@ -18,6 +18,12 @@ class FakeTetherSessionCompletionLogger : public TetherSessionCompletionLogger { public: FakeTetherSessionCompletionLogger(); + + FakeTetherSessionCompletionLogger(const FakeTetherSessionCompletionLogger&) = + delete; + FakeTetherSessionCompletionLogger& operator=( + const FakeTetherSessionCompletionLogger&) = delete; + ~FakeTetherSessionCompletionLogger() override; TetherSessionCompletionLogger::SessionCompletionReason* @@ -32,8 +38,6 @@ private: std::unique_ptr<TetherSessionCompletionLogger::SessionCompletionReason> last_session_completion_reason_; - - DISALLOW_COPY_AND_ASSIGN(FakeTetherSessionCompletionLogger); }; } // namespace tether
diff --git a/chromeos/components/tether/fake_wifi_hotspot_connector.h b/chromeos/components/tether/fake_wifi_hotspot_connector.h index dbcce10..ff4f306 100644 --- a/chromeos/components/tether/fake_wifi_hotspot_connector.h +++ b/chromeos/components/tether/fake_wifi_hotspot_connector.h
@@ -18,6 +18,10 @@ class FakeWifiHotspotConnector : public WifiHotspotConnector { public: FakeWifiHotspotConnector(NetworkStateHandler* network_state_handler); + + FakeWifiHotspotConnector(const FakeWifiHotspotConnector&) = delete; + FakeWifiHotspotConnector& operator=(const FakeWifiHotspotConnector&) = delete; + ~FakeWifiHotspotConnector() override; // Pass an empty string for |wifi_guid| to signify a failed connection. @@ -43,8 +47,6 @@ std::string most_recent_password_; std::string most_recent_tether_network_guid_; WifiHotspotConnector::WifiConnectionCallback most_recent_callback_; - - DISALLOW_COPY_AND_ASSIGN(FakeWifiHotspotConnector); }; } // namespace tether
diff --git a/chromeos/components/tether/fake_wifi_hotspot_disconnector.h b/chromeos/components/tether/fake_wifi_hotspot_disconnector.h index 2d693ad..ff2c65f 100644 --- a/chromeos/components/tether/fake_wifi_hotspot_disconnector.h +++ b/chromeos/components/tether/fake_wifi_hotspot_disconnector.h
@@ -17,6 +17,11 @@ class FakeWifiHotspotDisconnector : public WifiHotspotDisconnector { public: FakeWifiHotspotDisconnector(); + + FakeWifiHotspotDisconnector(const FakeWifiHotspotDisconnector&) = delete; + FakeWifiHotspotDisconnector& operator=(const FakeWifiHotspotDisconnector&) = + delete; + ~FakeWifiHotspotDisconnector() override; std::string last_disconnected_wifi_network_guid() { @@ -36,8 +41,6 @@ private: std::string last_disconnected_wifi_network_guid_; std::string disconnection_error_name_; - - DISALLOW_COPY_AND_ASSIGN(FakeWifiHotspotDisconnector); }; } // namespace tether
diff --git a/chromeos/components/tether/gms_core_notifications_state_tracker.h b/chromeos/components/tether/gms_core_notifications_state_tracker.h index 604f692..fa091fb 100644 --- a/chromeos/components/tether/gms_core_notifications_state_tracker.h +++ b/chromeos/components/tether/gms_core_notifications_state_tracker.h
@@ -26,6 +26,12 @@ }; GmsCoreNotificationsStateTracker(); + + GmsCoreNotificationsStateTracker(const GmsCoreNotificationsStateTracker&) = + delete; + GmsCoreNotificationsStateTracker& operator=( + const GmsCoreNotificationsStateTracker&) = delete; + virtual ~GmsCoreNotificationsStateTracker(); // Returns a list of names of all potential Tether hosts which replied that @@ -42,8 +48,6 @@ private: base::ObserverList<Observer>::Unchecked observer_list_; - - DISALLOW_COPY_AND_ASSIGN(GmsCoreNotificationsStateTracker); }; } // namespace tether
diff --git a/chromeos/components/tether/gms_core_notifications_state_tracker_impl.h b/chromeos/components/tether/gms_core_notifications_state_tracker_impl.h index ac183b7..0dc981fe 100644 --- a/chromeos/components/tether/gms_core_notifications_state_tracker_impl.h +++ b/chromeos/components/tether/gms_core_notifications_state_tracker_impl.h
@@ -24,6 +24,12 @@ public HostScannerOperation::Observer { public: GmsCoreNotificationsStateTrackerImpl(); + + GmsCoreNotificationsStateTrackerImpl( + const GmsCoreNotificationsStateTrackerImpl&) = delete; + GmsCoreNotificationsStateTrackerImpl& operator=( + const GmsCoreNotificationsStateTrackerImpl&) = delete; + ~GmsCoreNotificationsStateTrackerImpl() override; // GmsCoreNotificationsStateTracker: @@ -45,8 +51,6 @@ void SendDeviceNamesChangeEvent(); std::map<std::string, std::string> device_id_to_name_map_; - - DISALLOW_COPY_AND_ASSIGN(GmsCoreNotificationsStateTrackerImpl); }; } // namespace tether
diff --git a/chromeos/components/tether/gms_core_notifications_state_tracker_impl_unittest.cc b/chromeos/components/tether/gms_core_notifications_state_tracker_impl_unittest.cc index 5d07c35..dfd3f23 100644 --- a/chromeos/components/tether/gms_core_notifications_state_tracker_impl_unittest.cc +++ b/chromeos/components/tether/gms_core_notifications_state_tracker_impl_unittest.cc
@@ -42,6 +42,9 @@ explicit TestObserver(GmsCoreNotificationsStateTrackerImpl* tracker) : tracker_(tracker) {} + TestObserver(const TestObserver&) = delete; + TestObserver& operator=(const TestObserver&) = delete; + ~TestObserver() = default; uint32_t change_count() const { return change_count_; } @@ -62,8 +65,6 @@ uint32_t change_count_ = 0; std::vector<std::string> names_from_last_update_; - - DISALLOW_COPY_AND_ASSIGN(TestObserver); }; } // namespace
diff --git a/chromeos/components/tether/host_connection_metrics_logger.h b/chromeos/components/tether/host_connection_metrics_logger.h index fc9a612..64281c8 100644 --- a/chromeos/components/tether/host_connection_metrics_logger.h +++ b/chromeos/components/tether/host_connection_metrics_logger.h
@@ -49,6 +49,11 @@ const std::string& device_id); HostConnectionMetricsLogger(ActiveHost* active_host); + + HostConnectionMetricsLogger(const HostConnectionMetricsLogger&) = delete; + HostConnectionMetricsLogger& operator=(const HostConnectionMetricsLogger&) = + delete; + virtual ~HostConnectionMetricsLogger(); protected: @@ -202,8 +207,6 @@ base::Time connect_to_host_start_time_; std::string active_host_device_id_; - - DISALLOW_COPY_AND_ASSIGN(HostConnectionMetricsLogger); }; } // namespace tether
diff --git a/chromeos/components/tether/host_scan_cache.h b/chromeos/components/tether/host_scan_cache.h index 4bc0d98e..19891a7 100644 --- a/chromeos/components/tether/host_scan_cache.h +++ b/chromeos/components/tether/host_scan_cache.h
@@ -20,6 +20,10 @@ class HostScanCache { public: HostScanCache(); + + HostScanCache(const HostScanCache&) = delete; + HostScanCache& operator=(const HostScanCache&) = delete; + virtual ~HostScanCache(); class Observer { @@ -59,8 +63,6 @@ private: base::ObserverList<Observer>::Unchecked observer_list_; - - DISALLOW_COPY_AND_ASSIGN(HostScanCache); }; } // namespace tether
diff --git a/chromeos/components/tether/host_scan_device_prioritizer.h b/chromeos/components/tether/host_scan_device_prioritizer.h index b40eee4..37ca623 100644 --- a/chromeos/components/tether/host_scan_device_prioritizer.h +++ b/chromeos/components/tether/host_scan_device_prioritizer.h
@@ -23,14 +23,16 @@ class HostScanDevicePrioritizer { public: HostScanDevicePrioritizer() {} + + HostScanDevicePrioritizer(const HostScanDevicePrioritizer&) = delete; + HostScanDevicePrioritizer& operator=(const HostScanDevicePrioritizer&) = + delete; + virtual ~HostScanDevicePrioritizer() {} // Prioritizes |remote_devices| using the rules described above. virtual void SortByHostScanOrder( multidevice::RemoteDeviceRefList* remote_devices) const = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(HostScanDevicePrioritizer); }; } // namespace tether
diff --git a/chromeos/components/tether/host_scan_device_prioritizer_impl.h b/chromeos/components/tether/host_scan_device_prioritizer_impl.h index 585fede..3a00bea 100644 --- a/chromeos/components/tether/host_scan_device_prioritizer_impl.h +++ b/chromeos/components/tether/host_scan_device_prioritizer_impl.h
@@ -20,6 +20,11 @@ public: HostScanDevicePrioritizerImpl( TetherHostResponseRecorder* tether_host_response_recorder); + + HostScanDevicePrioritizerImpl(const HostScanDevicePrioritizerImpl&) = delete; + HostScanDevicePrioritizerImpl& operator=( + const HostScanDevicePrioritizerImpl&) = delete; + ~HostScanDevicePrioritizerImpl() override; // HostScanDevicePrioritizer: @@ -28,8 +33,6 @@ private: TetherHostResponseRecorder* tether_host_response_recorder_; - - DISALLOW_COPY_AND_ASSIGN(HostScanDevicePrioritizerImpl); }; } // namespace tether
diff --git a/chromeos/components/tether/host_scan_scheduler.h b/chromeos/components/tether/host_scan_scheduler.h index 7505685c..8949f7f8 100644 --- a/chromeos/components/tether/host_scan_scheduler.h +++ b/chromeos/components/tether/host_scan_scheduler.h
@@ -15,15 +15,16 @@ class HostScanScheduler { public: HostScanScheduler() {} + + HostScanScheduler(const HostScanScheduler&) = delete; + HostScanScheduler& operator=(const HostScanScheduler&) = delete; + virtual ~HostScanScheduler() {} // Attempts to perform a Tether host scan. If the device is already connected // to the internet, a scan will not be performed. If a scan is already active, // this function is a no-op. virtual void AttemptScanIfOffline() = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(HostScanScheduler); }; } // namespace tether
diff --git a/chromeos/components/tether/host_scan_scheduler_impl.h b/chromeos/components/tether/host_scan_scheduler_impl.h index c88e96a..d7a533e 100644 --- a/chromeos/components/tether/host_scan_scheduler_impl.h +++ b/chromeos/components/tether/host_scan_scheduler_impl.h
@@ -45,6 +45,10 @@ HostScanSchedulerImpl(NetworkStateHandler* network_state_handler, HostScanner* host_scanner, session_manager::SessionManager* session_manager); + + HostScanSchedulerImpl(const HostScanSchedulerImpl&) = delete; + HostScanSchedulerImpl& operator=(const HostScanSchedulerImpl&) = delete; + ~HostScanSchedulerImpl() override; // HostScanScheduler: @@ -87,8 +91,6 @@ bool is_screen_locked_; base::WeakPtrFactory<HostScanSchedulerImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(HostScanSchedulerImpl); }; } // namespace tether
diff --git a/chromeos/components/tether/host_scanner_impl.h b/chromeos/components/tether/host_scanner_impl.h index 1af125855..6723ec72 100644 --- a/chromeos/components/tether/host_scanner_impl.h +++ b/chromeos/components/tether/host_scanner_impl.h
@@ -73,6 +73,10 @@ HostScanCache* host_scan_cache, ConnectionPreserver* connection_preserver, base::Clock* clock); + + HostScannerImpl(const HostScannerImpl&) = delete; + HostScannerImpl& operator=(const HostScannerImpl&) = delete; + ~HostScannerImpl() override; // HostScanner: @@ -138,8 +142,6 @@ base::ObserverList<Observer>::Unchecked observer_list_; base::WeakPtrFactory<HostScannerImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(HostScannerImpl); }; } // namespace tether
diff --git a/chromeos/components/tether/host_scanner_operation.h b/chromeos/components/tether/host_scanner_operation.h index a98d393..11ea110 100644 --- a/chromeos/components/tether/host_scanner_operation.h +++ b/chromeos/components/tether/host_scanner_operation.h
@@ -92,6 +92,9 @@ bool is_final_scan_result) = 0; }; + HostScannerOperation(const HostScannerOperation&) = delete; + HostScannerOperation& operator=(const HostScannerOperation&) = delete; + ~HostScannerOperation() override; void AddObserver(Observer* observer); @@ -149,8 +152,6 @@ device_id_to_tether_availability_request_start_time_map_; base::WeakPtrFactory<HostScannerOperation> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(HostScannerOperation); }; } // namespace tether
diff --git a/chromeos/components/tether/host_scanner_operation_unittest.cc b/chromeos/components/tether/host_scanner_operation_unittest.cc index c2d4d286..7943401 100644 --- a/chromeos/components/tether/host_scanner_operation_unittest.cc +++ b/chromeos/components/tether/host_scanner_operation_unittest.cc
@@ -50,15 +50,16 @@ class MockOperationObserver : public HostScannerOperation::Observer { public: MockOperationObserver() = default; + + MockOperationObserver(const MockOperationObserver&) = delete; + MockOperationObserver& operator=(const MockOperationObserver&) = delete; + ~MockOperationObserver() = default; MOCK_METHOD3(OnTetherAvailabilityResponse, void(const std::vector<HostScannerOperation::ScannedDeviceInfo>&, const multidevice::RemoteDeviceRefList&, bool)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockOperationObserver); }; DeviceStatus CreateFakeDeviceStatus() {
diff --git a/chromeos/components/tether/hotspot_usage_duration_tracker.h b/chromeos/components/tether/hotspot_usage_duration_tracker.h index 3616cf1..a103102c 100644 --- a/chromeos/components/tether/hotspot_usage_duration_tracker.h +++ b/chromeos/components/tether/hotspot_usage_duration_tracker.h
@@ -23,6 +23,11 @@ public: explicit HotspotUsageDurationTracker(ActiveHost* active_host, base::Clock* clock); + + HotspotUsageDurationTracker(const HotspotUsageDurationTracker&) = delete; + HotspotUsageDurationTracker& operator=(const HotspotUsageDurationTracker&) = + delete; + virtual ~HotspotUsageDurationTracker(); protected: @@ -38,8 +43,6 @@ base::Clock* clock_; base::Time last_connection_start_; - - DISALLOW_COPY_AND_ASSIGN(HotspotUsageDurationTracker); }; } // namespace tether
diff --git a/chromeos/components/tether/keep_alive_operation.h b/chromeos/components/tether/keep_alive_operation.h index 6e0474a..af4358e 100644 --- a/chromeos/components/tether/keep_alive_operation.h +++ b/chromeos/components/tether/keep_alive_operation.h
@@ -55,6 +55,9 @@ std::unique_ptr<DeviceStatus> device_status) = 0; }; + KeepAliveOperation(const KeepAliveOperation&) = delete; + KeepAliveOperation& operator=(const KeepAliveOperation&) = delete; + ~KeepAliveOperation() override; void AddObserver(Observer* observer); @@ -90,8 +93,6 @@ base::ObserverList<Observer>::Unchecked observer_list_; base::Time keep_alive_tickle_request_start_time_; - - DISALLOW_COPY_AND_ASSIGN(KeepAliveOperation); }; } // namespace tether
diff --git a/chromeos/components/tether/keep_alive_operation_unittest.cc b/chromeos/components/tether/keep_alive_operation_unittest.cc index 4158f0e..92b8c30c 100644 --- a/chromeos/components/tether/keep_alive_operation_unittest.cc +++ b/chromeos/components/tether/keep_alive_operation_unittest.cc
@@ -36,6 +36,10 @@ class MockOperationObserver : public KeepAliveOperation::Observer { public: MockOperationObserver() = default; + + MockOperationObserver(const MockOperationObserver&) = delete; + MockOperationObserver& operator=(const MockOperationObserver&) = delete; + ~MockOperationObserver() = default; MOCK_METHOD2(OnOperationFinishedRaw, @@ -45,9 +49,6 @@ std::unique_ptr<DeviceStatus> device_status) { OnOperationFinishedRaw(remote_device, device_status.get()); } - - private: - DISALLOW_COPY_AND_ASSIGN(MockOperationObserver); }; } // namespace
diff --git a/chromeos/components/tether/keep_alive_scheduler.h b/chromeos/components/tether/keep_alive_scheduler.h index ca41f191..954b3be 100644 --- a/chromeos/components/tether/keep_alive_scheduler.h +++ b/chromeos/components/tether/keep_alive_scheduler.h
@@ -43,6 +43,10 @@ ActiveHost* active_host, HostScanCache* host_scan_cache, DeviceIdTetherNetworkGuidMap* device_id_tether_network_guid_map); + + KeepAliveScheduler(const KeepAliveScheduler&) = delete; + KeepAliveScheduler& operator=(const KeepAliveScheduler&) = delete; + virtual ~KeepAliveScheduler(); // ActiveHost::Observer: @@ -80,8 +84,6 @@ std::unique_ptr<KeepAliveOperation> keep_alive_operation_; base::WeakPtrFactory<KeepAliveScheduler> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(KeepAliveScheduler); }; } // namespace tether
diff --git a/chromeos/components/tether/message_transfer_operation.h b/chromeos/components/tether/message_transfer_operation.h index 4c74422..548eff50 100644 --- a/chromeos/components/tether/message_transfer_operation.h +++ b/chromeos/components/tether/message_transfer_operation.h
@@ -36,6 +36,10 @@ secure_channel::ConnectionPriority connection_priority, device_sync::DeviceSyncClient* device_sync_client, secure_channel::SecureChannelClient* secure_channel_client); + + MessageTransferOperation(const MessageTransferOperation&) = delete; + MessageTransferOperation& operator=(const MessageTransferOperation&) = delete; + virtual ~MessageTransferOperation(); // Initializes the operation by registering device connection listeners with @@ -201,8 +205,6 @@ std::unique_ptr<base::OneShotTimer>> remote_device_to_timer_map_; base::WeakPtrFactory<MessageTransferOperation> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(MessageTransferOperation); }; } // namespace tether
diff --git a/chromeos/components/tether/message_wrapper.h b/chromeos/components/tether/message_wrapper.h index 81b7f72..3578bcf0 100644 --- a/chromeos/components/tether/message_wrapper.h +++ b/chromeos/components/tether/message_wrapper.h
@@ -38,6 +38,9 @@ MessageWrapper(const TetherAvailabilityRequest& request); MessageWrapper(const TetherAvailabilityResponse& response); + MessageWrapper(const MessageWrapper&) = delete; + MessageWrapper& operator=(const MessageWrapper&) = delete; + ~MessageWrapper(); std::shared_ptr<google::protobuf::MessageLite> GetProto() const; @@ -54,8 +57,6 @@ private: MessageType type_; std::shared_ptr<google::protobuf::MessageLite> proto_; - - DISALLOW_COPY_AND_ASSIGN(MessageWrapper); }; } // namespace tether
diff --git a/chromeos/components/tether/mock_host_connection_metrics_logger.h b/chromeos/components/tether/mock_host_connection_metrics_logger.h index d5a38bc..6702a18 100644 --- a/chromeos/components/tether/mock_host_connection_metrics_logger.h +++ b/chromeos/components/tether/mock_host_connection_metrics_logger.h
@@ -19,14 +19,17 @@ class MockHostConnectionMetricsLogger : public HostConnectionMetricsLogger { public: MockHostConnectionMetricsLogger(ActiveHost* active_host); + + MockHostConnectionMetricsLogger(const MockHostConnectionMetricsLogger&) = + delete; + MockHostConnectionMetricsLogger& operator=( + const MockHostConnectionMetricsLogger&) = delete; + ~MockHostConnectionMetricsLogger() override; MOCK_METHOD2(RecordConnectionToHostResult, void(HostConnectionMetricsLogger::ConnectionToHostResult, const std::string&)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockHostConnectionMetricsLogger); }; } // namespace tether
diff --git a/chromeos/components/tether/mock_tether_host_response_recorder.h b/chromeos/components/tether/mock_tether_host_response_recorder.h index d47d956..a25be2c 100644 --- a/chromeos/components/tether/mock_tether_host_response_recorder.h +++ b/chromeos/components/tether/mock_tether_host_response_recorder.h
@@ -20,6 +20,12 @@ class MockTetherHostResponseRecorder : public TetherHostResponseRecorder { public: MockTetherHostResponseRecorder(); + + MockTetherHostResponseRecorder(const MockTetherHostResponseRecorder&) = + delete; + MockTetherHostResponseRecorder& operator=( + const MockTetherHostResponseRecorder&) = delete; + ~MockTetherHostResponseRecorder() override; MOCK_METHOD1(RecordSuccessfulTetherAvailabilityResponse, @@ -28,9 +34,6 @@ void(multidevice::RemoteDeviceRef)); MOCK_CONST_METHOD0(GetPreviouslyAvailableHostIds, std::vector<std::string>()); MOCK_CONST_METHOD0(GetPreviouslyConnectedHostIds, std::vector<std::string>()); - - private: - DISALLOW_COPY_AND_ASSIGN(MockTetherHostResponseRecorder); }; } // namespace tether
diff --git a/chromeos/components/tether/network_configuration_remover.h b/chromeos/components/tether/network_configuration_remover.h index e589d6d5..9947371 100644 --- a/chromeos/components/tether/network_configuration_remover.h +++ b/chromeos/components/tether/network_configuration_remover.h
@@ -20,6 +20,11 @@ public: NetworkConfigurationRemover(ManagedNetworkConfigurationHandler* managed_network_configuration_handler); + + NetworkConfigurationRemover(const NetworkConfigurationRemover&) = delete; + NetworkConfigurationRemover& operator=(const NetworkConfigurationRemover&) = + delete; + virtual ~NetworkConfigurationRemover(); // Remove the network configuration of the Wi-Fi hotspot referenced by @@ -31,8 +36,6 @@ friend class NetworkConfigurationRemoverTest; ManagedNetworkConfigurationHandler* managed_network_configuration_handler_; - - DISALLOW_COPY_AND_ASSIGN(NetworkConfigurationRemover); }; } // namespace tether
diff --git a/chromeos/components/tether/network_connection_handler_tether_delegate.h b/chromeos/components/tether/network_connection_handler_tether_delegate.h index 16f4758..0dc6915c 100644 --- a/chromeos/components/tether/network_connection_handler_tether_delegate.h +++ b/chromeos/components/tether/network_connection_handler_tether_delegate.h
@@ -30,6 +30,12 @@ ActiveHost* active_host, TetherConnector* tether_connector, TetherDisconnector* tether_disconnector); + + NetworkConnectionHandlerTetherDelegate( + const NetworkConnectionHandlerTetherDelegate&) = delete; + NetworkConnectionHandlerTetherDelegate& operator=( + const NetworkConnectionHandlerTetherDelegate&) = delete; + ~NetworkConnectionHandlerTetherDelegate() override; // NetworkConnectionHandler::TetherDelegate: @@ -67,8 +73,6 @@ base::WeakPtrFactory<NetworkConnectionHandlerTetherDelegate> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(NetworkConnectionHandlerTetherDelegate); }; } // namespace tether
diff --git a/chromeos/components/tether/network_host_scan_cache.h b/chromeos/components/tether/network_host_scan_cache.h index 15b45a1..c3a0bf5 100644 --- a/chromeos/components/tether/network_host_scan_cache.h +++ b/chromeos/components/tether/network_host_scan_cache.h
@@ -32,6 +32,10 @@ NetworkStateHandler* network_state_handler, TetherHostResponseRecorder* tether_host_response_recorder, DeviceIdTetherNetworkGuidMap* device_id_tether_network_guid_map); + + NetworkHostScanCache(const NetworkHostScanCache&) = delete; + NetworkHostScanCache& operator=(const NetworkHostScanCache&) = delete; + ~NetworkHostScanCache() override; // HostScanCache: @@ -55,8 +59,6 @@ NetworkStateHandler* network_state_handler_; TetherHostResponseRecorder* tether_host_response_recorder_; DeviceIdTetherNetworkGuidMap* device_id_tether_network_guid_map_; - - DISALLOW_COPY_AND_ASSIGN(NetworkHostScanCache); }; } // namespace tether
diff --git a/chromeos/components/tether/network_list_sorter.h b/chromeos/components/tether/network_list_sorter.h index abc93099..2272b3b3 100644 --- a/chromeos/components/tether/network_list_sorter.h +++ b/chromeos/components/tether/network_list_sorter.h
@@ -22,14 +22,15 @@ class NetworkListSorter : public NetworkStateHandler::TetherSortDelegate { public: NetworkListSorter(); + + NetworkListSorter(const NetworkListSorter&) = delete; + NetworkListSorter& operator=(const NetworkListSorter&) = delete; + virtual ~NetworkListSorter(); // NetworkStateHandler::TetherNetworkListSorter: void SortTetherNetworkList( NetworkStateHandler::ManagedStateList* tether_networks) const override; - - private: - DISALLOW_COPY_AND_ASSIGN(NetworkListSorter); }; } // namespace tether
diff --git a/chromeos/components/tether/notification_presenter.h b/chromeos/components/tether/notification_presenter.h index 17817a5d..4620e5b 100644 --- a/chromeos/components/tether/notification_presenter.h +++ b/chromeos/components/tether/notification_presenter.h
@@ -22,6 +22,10 @@ }; NotificationPresenter() {} + + NotificationPresenter(const NotificationPresenter&) = delete; + NotificationPresenter& operator=(const NotificationPresenter&) = delete; + virtual ~NotificationPresenter() {} // Notifies the user that a nearby device can potentially provide a tether @@ -58,9 +62,6 @@ // Removes the notification created by NotifyConnectionToHostFailed(), or does // nothing if that notification is not currently displayed. virtual void RemoveConnectionToHostFailedNotification() = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(NotificationPresenter); }; } // namespace tether
diff --git a/chromeos/components/tether/notification_remover.h b/chromeos/components/tether/notification_remover.h index dcbe8d8..bf7cecc5 100644 --- a/chromeos/components/tether/notification_remover.h +++ b/chromeos/components/tether/notification_remover.h
@@ -31,6 +31,9 @@ HostScanCache* host_scan_cache, ActiveHost* active_host); + NotificationRemover(const NotificationRemover&) = delete; + NotificationRemover& operator=(const NotificationRemover&) = delete; + ~NotificationRemover() override; // HostScanCache::Observer: @@ -48,8 +51,6 @@ NotificationPresenter* notification_presenter_; HostScanCache* host_scan_cache_; ActiveHost* active_host_; - - DISALLOW_COPY_AND_ASSIGN(NotificationRemover); }; } // namespace tether
diff --git a/chromeos/components/tether/persistent_host_scan_cache.h b/chromeos/components/tether/persistent_host_scan_cache.h index 066a163..5cd428da 100644 --- a/chromeos/components/tether/persistent_host_scan_cache.h +++ b/chromeos/components/tether/persistent_host_scan_cache.h
@@ -17,15 +17,16 @@ class PersistentHostScanCache : virtual public HostScanCache { public: PersistentHostScanCache() {} + + PersistentHostScanCache(const PersistentHostScanCache&) = delete; + PersistentHostScanCache& operator=(const PersistentHostScanCache&) = delete; + ~PersistentHostScanCache() override {} // Returns the cache entries that are currently stored in user prefs as a map // from Tether network GUID to entry. virtual std::unordered_map<std::string, HostScanCacheEntry> GetStoredCacheEntries() = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(PersistentHostScanCache); }; } // namespace tether
diff --git a/chromeos/components/tether/persistent_host_scan_cache_impl.h b/chromeos/components/tether/persistent_host_scan_cache_impl.h index 1ac580a..9d937111 100644 --- a/chromeos/components/tether/persistent_host_scan_cache_impl.h +++ b/chromeos/components/tether/persistent_host_scan_cache_impl.h
@@ -27,6 +27,11 @@ static void RegisterPrefs(PrefRegistrySimple* registry); PersistentHostScanCacheImpl(PrefService* pref_service); + + PersistentHostScanCacheImpl(const PersistentHostScanCacheImpl&) = delete; + PersistentHostScanCacheImpl& operator=(const PersistentHostScanCacheImpl&) = + delete; + ~PersistentHostScanCacheImpl() override; // HostScanCache: @@ -48,8 +53,6 @@ const std::unordered_map<std::string, HostScanCacheEntry>& entries); PrefService* pref_service_; - - DISALLOW_COPY_AND_ASSIGN(PersistentHostScanCacheImpl); }; } // namespace tether
diff --git a/chromeos/components/tether/synchronous_shutdown_object_container.h b/chromeos/components/tether/synchronous_shutdown_object_container.h index 90dead6..4e9693d 100644 --- a/chromeos/components/tether/synchronous_shutdown_object_container.h +++ b/chromeos/components/tether/synchronous_shutdown_object_container.h
@@ -23,15 +23,18 @@ class SynchronousShutdownObjectContainer { public: SynchronousShutdownObjectContainer() {} + + SynchronousShutdownObjectContainer( + const SynchronousShutdownObjectContainer&) = delete; + SynchronousShutdownObjectContainer& operator=( + const SynchronousShutdownObjectContainer&) = delete; + virtual ~SynchronousShutdownObjectContainer() {} virtual ActiveHost* active_host() = 0; virtual HostScanCache* host_scan_cache() = 0; virtual HostScanScheduler* host_scan_scheduler() = 0; virtual TetherDisconnector* tether_disconnector() = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(SynchronousShutdownObjectContainer); }; } // namespace tether
diff --git a/chromeos/components/tether/tether_component.h b/chromeos/components/tether/tether_component.h index 3f5789e3..8964db39 100644 --- a/chromeos/components/tether/tether_component.h +++ b/chromeos/components/tether/tether_component.h
@@ -38,6 +38,10 @@ }; TetherComponent(); + + TetherComponent(const TetherComponent&) = delete; + TetherComponent& operator=(const TetherComponent&) = delete; + virtual ~TetherComponent(); // Requests that the Tether component shuts down. If the component can be shut @@ -57,8 +61,6 @@ private: Status status_ = Status::ACTIVE; base::ObserverList<Observer>::Unchecked observer_list_; - - DISALLOW_COPY_AND_ASSIGN(TetherComponent); }; } // namespace tether
diff --git a/chromeos/components/tether/tether_connector.h b/chromeos/components/tether/tether_connector.h index 52c9efa..d8437d8 100644 --- a/chromeos/components/tether/tether_connector.h +++ b/chromeos/components/tether/tether_connector.h
@@ -24,6 +24,10 @@ NetworkConnectionHandler::TetherDelegate::StringErrorCallback; TetherConnector() {} + + TetherConnector(const TetherConnector&) = delete; + TetherConnector& operator=(const TetherConnector&) = delete; + virtual ~TetherConnector() {} virtual void ConnectToNetwork(const std::string& tether_network_guid, @@ -33,9 +37,6 @@ // Returns whether the connection attempt was successfully canceled. virtual bool CancelConnectionAttempt( const std::string& tether_network_guid) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(TetherConnector); }; } // namespace tether
diff --git a/chromeos/components/tether/tether_connector_impl.h b/chromeos/components/tether/tether_connector_impl.h index 2f012e29..495e7f8 100644 --- a/chromeos/components/tether/tether_connector_impl.h +++ b/chromeos/components/tether/tether_connector_impl.h
@@ -59,6 +59,10 @@ HostConnectionMetricsLogger* host_connection_metrics_logger, DisconnectTetheringRequestSender* disconnect_tethering_request_sender, WifiHotspotDisconnector* wifi_hotspot_disconnector); + + TetherConnectorImpl(const TetherConnectorImpl&) = delete; + TetherConnectorImpl& operator=(const TetherConnectorImpl&) = delete; + ~TetherConnectorImpl() override; void ConnectToNetwork(const std::string& tether_network_guid, @@ -120,8 +124,6 @@ std::unique_ptr<ConnectTetheringOperation> connect_tethering_operation_; base::Time connect_to_host_start_time_; base::WeakPtrFactory<TetherConnectorImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(TetherConnectorImpl); }; } // namespace tether
diff --git a/chromeos/components/tether/tether_connector_impl_unittest.cc b/chromeos/components/tether/tether_connector_impl_unittest.cc index a8b7ad5..d7d35da 100644 --- a/chromeos/components/tether/tether_connector_impl_unittest.cc +++ b/chromeos/components/tether/tether_connector_impl_unittest.cc
@@ -137,6 +137,10 @@ public: TetherConnectorImplTest() : test_devices_(multidevice::CreateRemoteDeviceRefListForTest(2u)) {} + + TetherConnectorImplTest(const TetherConnectorImplTest&) = delete; + TetherConnectorImplTest& operator=(const TetherConnectorImplTest&) = delete; + ~TetherConnectorImplTest() override = default; void SetUp() override { @@ -340,9 +344,6 @@ base::HistogramTester histogram_tester_; std::unique_ptr<TetherConnectorImpl> tether_connector_; - - private: - DISALLOW_COPY_AND_ASSIGN(TetherConnectorImplTest); }; TEST_F(TetherConnectorImplTest, DISABLED_TestCannotFetchDevice) {
diff --git a/chromeos/components/tether/tether_disconnector.h b/chromeos/components/tether/tether_disconnector.h index 9de63d5..708d414 100644 --- a/chromeos/components/tether/tether_disconnector.h +++ b/chromeos/components/tether/tether_disconnector.h
@@ -25,6 +25,10 @@ NetworkConnectionHandler::TetherDelegate::StringErrorCallback; TetherDisconnector() {} + + TetherDisconnector(const TetherDisconnector&) = delete; + TetherDisconnector& operator=(const TetherDisconnector&) = delete; + virtual ~TetherDisconnector() {} // Disconnects from the network with GUID |tether_network_guid|. This GUID @@ -37,9 +41,6 @@ StringErrorCallback error_callback, const TetherSessionCompletionLogger::SessionCompletionReason& session_completion_reason) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(TetherDisconnector); }; } // namespace tether
diff --git a/chromeos/components/tether/tether_disconnector_impl.h b/chromeos/components/tether/tether_disconnector_impl.h index 3e5793a1..159fab9 100644 --- a/chromeos/components/tether/tether_disconnector_impl.h +++ b/chromeos/components/tether/tether_disconnector_impl.h
@@ -33,6 +33,10 @@ TetherConnector* tether_connector, DeviceIdTetherNetworkGuidMap* device_id_tether_network_guid_map, TetherSessionCompletionLogger* tether_session_completion_logger); + + TetherDisconnectorImpl(const TetherDisconnectorImpl&) = delete; + TetherDisconnectorImpl& operator=(const TetherDisconnectorImpl&) = delete; + ~TetherDisconnectorImpl() override; void DisconnectFromNetwork( @@ -58,8 +62,6 @@ TetherSessionCompletionLogger* tether_session_completion_logger_; base::WeakPtrFactory<TetherDisconnectorImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(TetherDisconnectorImpl); }; } // namespace tether
diff --git a/chromeos/components/tether/tether_disconnector_impl_unittest.cc b/chromeos/components/tether/tether_disconnector_impl_unittest.cc index 18f32c3d..cfa667d 100644 --- a/chromeos/components/tether/tether_disconnector_impl_unittest.cc +++ b/chromeos/components/tether/tether_disconnector_impl_unittest.cc
@@ -33,6 +33,11 @@ public: TetherDisconnectorImplTest() : test_devices_(multidevice::CreateRemoteDeviceRefListForTest(2u)) {} + + TetherDisconnectorImplTest(const TetherDisconnectorImplTest&) = delete; + TetherDisconnectorImplTest& operator=(const TetherDisconnectorImplTest&) = + delete; + ~TetherDisconnectorImplTest() override = default; void SetUp() override { @@ -124,9 +129,6 @@ std::string disconnection_result_; std::unique_ptr<TetherDisconnectorImpl> tether_disconnector_; - - private: - DISALLOW_COPY_AND_ASSIGN(TetherDisconnectorImplTest); }; TEST_F(TetherDisconnectorImplTest, DisconnectWhenAlreadyDisconnected) {
diff --git a/chromeos/components/tether/tether_host_fetcher.h b/chromeos/components/tether/tether_host_fetcher.h index 0890780..e5461d5 100644 --- a/chromeos/components/tether/tether_host_fetcher.h +++ b/chromeos/components/tether/tether_host_fetcher.h
@@ -31,6 +31,10 @@ }; TetherHostFetcher(); + + TetherHostFetcher(const TetherHostFetcher&) = delete; + TetherHostFetcher& operator=(const TetherHostFetcher&) = delete; + virtual ~TetherHostFetcher(); void AddObserver(Observer* observer); @@ -62,8 +66,6 @@ private: base::ObserverList<Observer>::Unchecked observers_; - - DISALLOW_COPY_AND_ASSIGN(TetherHostFetcher); }; } // namespace tether
diff --git a/chromeos/components/tether/tether_host_response_recorder.h b/chromeos/components/tether/tether_host_response_recorder.h index c1f7ab7..65215c39 100644 --- a/chromeos/components/tether/tether_host_response_recorder.h +++ b/chromeos/components/tether/tether_host_response_recorder.h
@@ -40,6 +40,11 @@ // Note: The PrefService* passed here must be created using the same registry // passed to RegisterPrefs(). explicit TetherHostResponseRecorder(PrefService* pref_service); + + TetherHostResponseRecorder(const TetherHostResponseRecorder&) = delete; + TetherHostResponseRecorder& operator=(const TetherHostResponseRecorder&) = + delete; + virtual ~TetherHostResponseRecorder(); void AddObserver(Observer* observer); @@ -84,8 +89,6 @@ PrefService* pref_service_; base::ObserverList<Observer>::Unchecked observer_list_; - - DISALLOW_COPY_AND_ASSIGN(TetherHostResponseRecorder); }; } // namespace tether
diff --git a/chromeos/components/tether/tether_network_disconnection_handler.h b/chromeos/components/tether/tether_network_disconnection_handler.h index 0cb5f55..5012b48 100644 --- a/chromeos/components/tether/tether_network_disconnection_handler.h +++ b/chromeos/components/tether/tether_network_disconnection_handler.h
@@ -38,6 +38,12 @@ NetworkConfigurationRemover* network_configuration_remover, DisconnectTetheringRequestSender* disconnect_tethering_request_sender, TetherSessionCompletionLogger* tether_session_completion_logger); + + TetherNetworkDisconnectionHandler(const TetherNetworkDisconnectionHandler&) = + delete; + TetherNetworkDisconnectionHandler& operator=( + const TetherNetworkDisconnectionHandler&) = delete; + ~TetherNetworkDisconnectionHandler() override; // NetworkStateHandlerObserver: @@ -61,8 +67,6 @@ scoped_refptr<base::TaskRunner> task_runner_; base::WeakPtrFactory<TetherNetworkDisconnectionHandler> weak_ptr_factory_{ this}; - - DISALLOW_COPY_AND_ASSIGN(TetherNetworkDisconnectionHandler); }; } // namespace tether
diff --git a/chromeos/components/tether/tether_session_completion_logger.h b/chromeos/components/tether/tether_session_completion_logger.h index 6ec7607..ace18c6 100644 --- a/chromeos/components/tether/tether_session_completion_logger.h +++ b/chromeos/components/tether/tether_session_completion_logger.h
@@ -31,6 +31,11 @@ }; TetherSessionCompletionLogger(); + + TetherSessionCompletionLogger(const TetherSessionCompletionLogger&) = delete; + TetherSessionCompletionLogger& operator=( + const TetherSessionCompletionLogger&) = delete; + virtual ~TetherSessionCompletionLogger(); virtual void RecordTetherSessionCompletion( @@ -38,8 +43,6 @@ private: friend class TetherSessionCompletionLoggerTest; - - DISALLOW_COPY_AND_ASSIGN(TetherSessionCompletionLogger); }; } // namespace tether
diff --git a/chromeos/components/tether/top_level_host_scan_cache.h b/chromeos/components/tether/top_level_host_scan_cache.h index e3030e7b..b14f20d 100644 --- a/chromeos/components/tether/top_level_host_scan_cache.h +++ b/chromeos/components/tether/top_level_host_scan_cache.h
@@ -46,6 +46,10 @@ ActiveHost* active_host, HostScanCache* network_host_scan_cache, PersistentHostScanCache* persistent_host_scan_cache); + + TopLevelHostScanCache(const TopLevelHostScanCache&) = delete; + TopLevelHostScanCache& operator=(const TopLevelHostScanCache&) = delete; + ~TopLevelHostScanCache() override; // HostScanCache: @@ -79,8 +83,6 @@ std::unordered_map<std::string, std::unique_ptr<base::OneShotTimer>> tether_guid_to_timer_map_; base::WeakPtrFactory<TopLevelHostScanCache> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(TopLevelHostScanCache); }; } // namespace tether
diff --git a/chromeos/components/tether/wifi_hotspot_connector.h b/chromeos/components/tether/wifi_hotspot_connector.h index a6e4300c..849f4e7a 100644 --- a/chromeos/components/tether/wifi_hotspot_connector.h +++ b/chromeos/components/tether/wifi_hotspot_connector.h
@@ -32,6 +32,10 @@ public: WifiHotspotConnector(NetworkStateHandler* network_state_handler, NetworkConnect* network_connect); + + WifiHotspotConnector(const WifiHotspotConnector&) = delete; + WifiHotspotConnector& operator=(const WifiHotspotConnector&) = delete; + ~WifiHotspotConnector() override; // Function which receives the GUID of the connected Wi-Fi hotspot. If @@ -90,8 +94,6 @@ scoped_refptr<base::TaskRunner> task_runner_; base::WeakPtrFactory<WifiHotspotConnector> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(WifiHotspotConnector); }; } // namespace tether
diff --git a/chromeos/components/tether/wifi_hotspot_disconnector.h b/chromeos/components/tether/wifi_hotspot_disconnector.h index ca904bc..84ccc303 100644 --- a/chromeos/components/tether/wifi_hotspot_disconnector.h +++ b/chromeos/components/tether/wifi_hotspot_disconnector.h
@@ -20,6 +20,10 @@ NetworkConnectionHandler::TetherDelegate::StringErrorCallback; WifiHotspotDisconnector() {} + + WifiHotspotDisconnector(const WifiHotspotDisconnector&) = delete; + WifiHotspotDisconnector& operator=(const WifiHotspotDisconnector&) = delete; + virtual ~WifiHotspotDisconnector() {} // Disconnects from the Wi-Fi network with GUID |wifi_network_guid| and @@ -29,9 +33,6 @@ const std::string& wifi_network_guid, base::OnceClosure success_callback, StringErrorCallback error_callback) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(WifiHotspotDisconnector); }; } // namespace tether
diff --git a/chromeos/components/tether/wifi_hotspot_disconnector_impl.h b/chromeos/components/tether/wifi_hotspot_disconnector_impl.h index 6ba92d1..5e5030cf 100644 --- a/chromeos/components/tether/wifi_hotspot_disconnector_impl.h +++ b/chromeos/components/tether/wifi_hotspot_disconnector_impl.h
@@ -32,6 +32,11 @@ NetworkStateHandler* network_state_handler, PrefService* pref_service, NetworkConfigurationRemover* network_configuration_remover); + + WifiHotspotDisconnectorImpl(const WifiHotspotDisconnectorImpl&) = delete; + WifiHotspotDisconnectorImpl& operator=(const WifiHotspotDisconnectorImpl&) = + delete; + ~WifiHotspotDisconnectorImpl() override; // WifiHotspotDisconnector: @@ -60,8 +65,6 @@ NetworkConfigurationRemover* network_configuration_remover_; base::WeakPtrFactory<WifiHotspotDisconnectorImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(WifiHotspotDisconnectorImpl); }; } // namespace tether
diff --git a/chromeos/components/tether/wifi_hotspot_disconnector_impl_unittest.cc b/chromeos/components/tether/wifi_hotspot_disconnector_impl_unittest.cc index 9dd488cc..6f4c2ad 100644 --- a/chromeos/components/tether/wifi_hotspot_disconnector_impl_unittest.cc +++ b/chromeos/components/tether/wifi_hotspot_disconnector_impl_unittest.cc
@@ -94,6 +94,12 @@ class WifiHotspotDisconnectorImplTest : public testing::Test { public: WifiHotspotDisconnectorImplTest() = default; + + WifiHotspotDisconnectorImplTest(const WifiHotspotDisconnectorImplTest&) = + delete; + WifiHotspotDisconnectorImplTest& operator=( + const WifiHotspotDisconnectorImplTest&) = delete; + ~WifiHotspotDisconnectorImplTest() override = default; void SetUp() override { @@ -215,9 +221,6 @@ bool should_disconnect_successfully_; std::unique_ptr<WifiHotspotDisconnectorImpl> wifi_hotspot_disconnector_; - - private: - DISALLOW_COPY_AND_ASSIGN(WifiHotspotDisconnectorImplTest); }; TEST_F(WifiHotspotDisconnectorImplTest, NetworkDoesNotExist) {
diff --git a/chromeos/components/trial_group/trial_group_checker.h b/chromeos/components/trial_group/trial_group_checker.h index 089801b5..df7f6739 100644 --- a/chromeos/components/trial_group/trial_group_checker.h +++ b/chromeos/components/trial_group/trial_group_checker.h
@@ -41,6 +41,9 @@ explicit TrialGroupChecker(GroupId group_id); + TrialGroupChecker(const TrialGroupChecker&) = delete; + TrialGroupChecker& operator=(const TrialGroupChecker&) = delete; + ~TrialGroupChecker(); // Checks user's membership and passes the result to a callback. The @@ -67,8 +70,6 @@ std::unique_ptr<network::SimpleURLLoader> loader_; base::WeakPtrFactory<TrialGroupChecker> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(TrialGroupChecker); }; } // namespace trial_group
diff --git a/chromeos/dbus/arc/arc_appfuse_provider_client.cc b/chromeos/dbus/arc/arc_appfuse_provider_client.cc index e427642..70ad078 100644 --- a/chromeos/dbus/arc/arc_appfuse_provider_client.cc +++ b/chromeos/dbus/arc/arc_appfuse_provider_client.cc
@@ -22,6 +22,11 @@ class ArcAppfuseProviderClientImpl : public ArcAppfuseProviderClient { public: ArcAppfuseProviderClientImpl() {} + + ArcAppfuseProviderClientImpl(const ArcAppfuseProviderClientImpl&) = delete; + ArcAppfuseProviderClientImpl& operator=(const ArcAppfuseProviderClientImpl&) = + delete; + ~ArcAppfuseProviderClientImpl() override = default; // ArcAppfuseProviderClient override: @@ -105,8 +110,6 @@ dbus::ObjectProxy* proxy_ = nullptr; base::WeakPtrFactory<ArcAppfuseProviderClientImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ArcAppfuseProviderClientImpl); }; } // namespace
diff --git a/chromeos/dbus/arc/arc_camera_client.cc b/chromeos/dbus/arc/arc_camera_client.cc index 30c19a0f..6c398c4 100644 --- a/chromeos/dbus/arc/arc_camera_client.cc +++ b/chromeos/dbus/arc/arc_camera_client.cc
@@ -28,6 +28,9 @@ arc_camera::kArcCameraServiceName, dbus::ObjectPath(arc_camera::kArcCameraServicePath))) {} + ArcCameraClientImpl(const ArcCameraClientImpl&) = delete; + ArcCameraClientImpl& operator=(const ArcCameraClientImpl&) = delete; + ~ArcCameraClientImpl() override = default; // ArcCameraClient overrides: @@ -52,8 +55,6 @@ dbus::ObjectProxy* proxy_; base::WeakPtrFactory<ArcCameraClientImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ArcCameraClientImpl); }; } // namespace
diff --git a/chromeos/dbus/arc/arc_keymaster_client.cc b/chromeos/dbus/arc/arc_keymaster_client.cc index fcdd680..4f02b6e 100644 --- a/chromeos/dbus/arc/arc_keymaster_client.cc +++ b/chromeos/dbus/arc/arc_keymaster_client.cc
@@ -26,6 +26,10 @@ class ArcKeymasterClientImpl : public ArcKeymasterClient { public: ArcKeymasterClientImpl() = default; + + ArcKeymasterClientImpl(const ArcKeymasterClientImpl&) = delete; + ArcKeymasterClientImpl& operator=(const ArcKeymasterClientImpl&) = delete; + ~ArcKeymasterClientImpl() override = default; void BootstrapMojoConnection(base::ScopedFD fd, @@ -50,8 +54,6 @@ private: // Owned by the D-Bus implementation, who outlives this class. dbus::ObjectProxy* proxy_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(ArcKeymasterClientImpl); }; } // namespace
diff --git a/chromeos/dbus/arc/arc_keymaster_client.h b/chromeos/dbus/arc/arc_keymaster_client.h index da082bc..48a80d4 100644 --- a/chromeos/dbus/arc/arc_keymaster_client.h +++ b/chromeos/dbus/arc/arc_keymaster_client.h
@@ -21,6 +21,9 @@ class COMPONENT_EXPORT(CHROMEOS_DBUS_ARC) ArcKeymasterClient : public DBusClient { public: + ArcKeymasterClient(const ArcKeymasterClient&) = delete; + ArcKeymasterClient& operator=(const ArcKeymasterClient&) = delete; + ~ArcKeymasterClient() override; // Factory function. @@ -34,9 +37,6 @@ protected: // Create() should be used instead. ArcKeymasterClient(); - - private: - DISALLOW_COPY_AND_ASSIGN(ArcKeymasterClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/arc/arc_midis_client.cc b/chromeos/dbus/arc/arc_midis_client.cc index 9766452..1e2950e 100644 --- a/chromeos/dbus/arc/arc_midis_client.cc +++ b/chromeos/dbus/arc/arc_midis_client.cc
@@ -26,6 +26,9 @@ public: ArcMidisClientImpl() {} + ArcMidisClientImpl(const ArcMidisClientImpl&) = delete; + ArcMidisClientImpl& operator=(const ArcMidisClientImpl&) = delete; + ~ArcMidisClientImpl() override = default; void BootstrapMojoConnection(base::ScopedFD fd, @@ -58,8 +61,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<ArcMidisClientImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ArcMidisClientImpl); }; } // namespace
diff --git a/chromeos/dbus/arc/arc_midis_client.h b/chromeos/dbus/arc/arc_midis_client.h index e98664bd..e88a0c6fc 100644 --- a/chromeos/dbus/arc/arc_midis_client.h +++ b/chromeos/dbus/arc/arc_midis_client.h
@@ -22,6 +22,9 @@ // initialization. class COMPONENT_EXPORT(CHROMEOS_DBUS_ARC) ArcMidisClient : public DBusClient { public: + ArcMidisClient(const ArcMidisClient&) = delete; + ArcMidisClient& operator=(const ArcMidisClient&) = delete; + ~ArcMidisClient() override = default; // Factory function. @@ -35,9 +38,6 @@ protected: // Create() should be used instead. ArcMidisClient() = default; - - private: - DISALLOW_COPY_AND_ASSIGN(ArcMidisClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/arc/arc_obb_mounter_client.cc b/chromeos/dbus/arc/arc_obb_mounter_client.cc index 0dc53d9..b932011 100644 --- a/chromeos/dbus/arc/arc_obb_mounter_client.cc +++ b/chromeos/dbus/arc/arc_obb_mounter_client.cc
@@ -21,6 +21,10 @@ class ArcObbMounterClientImpl : public ArcObbMounterClient { public: ArcObbMounterClientImpl() {} + + ArcObbMounterClientImpl(const ArcObbMounterClientImpl&) = delete; + ArcObbMounterClientImpl& operator=(const ArcObbMounterClientImpl&) = delete; + ~ArcObbMounterClientImpl() override = default; // ArcObbMounterClient override: @@ -70,8 +74,6 @@ dbus::ObjectProxy* proxy_ = nullptr; base::WeakPtrFactory<ArcObbMounterClientImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ArcObbMounterClientImpl); }; } // namespace
diff --git a/chromeos/dbus/arc/fake_arc_appfuse_provider_client.h b/chromeos/dbus/arc/fake_arc_appfuse_provider_client.h index dab1a51..9c04252 100644 --- a/chromeos/dbus/arc/fake_arc_appfuse_provider_client.h +++ b/chromeos/dbus/arc/fake_arc_appfuse_provider_client.h
@@ -14,6 +14,11 @@ : public ArcAppfuseProviderClient { public: FakeArcAppfuseProviderClient(); + + FakeArcAppfuseProviderClient(const FakeArcAppfuseProviderClient&) = delete; + FakeArcAppfuseProviderClient& operator=(const FakeArcAppfuseProviderClient&) = + delete; + ~FakeArcAppfuseProviderClient() override; // DBusClient override. @@ -31,9 +36,6 @@ int32_t file_id, int32_t flags, DBusMethodCallback<base::ScopedFD> callback) override; - - private: - DISALLOW_COPY_AND_ASSIGN(FakeArcAppfuseProviderClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/arc/fake_arc_keymaster_client.h b/chromeos/dbus/arc/fake_arc_keymaster_client.h index f304f99b..e02a5c33 100644 --- a/chromeos/dbus/arc/fake_arc_keymaster_client.h +++ b/chromeos/dbus/arc/fake_arc_keymaster_client.h
@@ -14,6 +14,10 @@ : public ArcKeymasterClient { public: FakeArcKeymasterClient() = default; + + FakeArcKeymasterClient(const FakeArcKeymasterClient&) = delete; + FakeArcKeymasterClient& operator=(const FakeArcKeymasterClient&) = delete; + ~FakeArcKeymasterClient() override = default; // DBusClient override: @@ -22,9 +26,6 @@ // ArcKeymasterClient override: void BootstrapMojoConnection(base::ScopedFD fd, VoidDBusMethodCallback callback) override; - - private: - DISALLOW_COPY_AND_ASSIGN(FakeArcKeymasterClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/arc/fake_arc_midis_client.h b/chromeos/dbus/arc/fake_arc_midis_client.h index 5ff0f86..4d582c0 100644 --- a/chromeos/dbus/arc/fake_arc_midis_client.h +++ b/chromeos/dbus/arc/fake_arc_midis_client.h
@@ -14,6 +14,10 @@ : public ArcMidisClient { public: FakeArcMidisClient() = default; + + FakeArcMidisClient(const FakeArcMidisClient&) = delete; + FakeArcMidisClient& operator=(const FakeArcMidisClient&) = delete; + ~FakeArcMidisClient() override = default; // DBusClient override: @@ -22,9 +26,6 @@ // ArcMidisClient override: void BootstrapMojoConnection(base::ScopedFD fd, VoidDBusMethodCallback callback) override; - - private: - DISALLOW_COPY_AND_ASSIGN(FakeArcMidisClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/arc/fake_arc_obb_mounter_client.h b/chromeos/dbus/arc/fake_arc_obb_mounter_client.h index 0609d450..01ec49d 100644 --- a/chromeos/dbus/arc/fake_arc_obb_mounter_client.h +++ b/chromeos/dbus/arc/fake_arc_obb_mounter_client.h
@@ -16,6 +16,10 @@ : public ArcObbMounterClient { public: FakeArcObbMounterClient(); + + FakeArcObbMounterClient(const FakeArcObbMounterClient&) = delete; + FakeArcObbMounterClient& operator=(const FakeArcObbMounterClient&) = delete; + ~FakeArcObbMounterClient() override; // DBusClient override. @@ -28,9 +32,6 @@ VoidDBusMethodCallback callback) override; void UnmountObb(const std::string& mount_path, VoidDBusMethodCallback callback) override; - - private: - DISALLOW_COPY_AND_ASSIGN(FakeArcObbMounterClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/audio/cras_audio_client.cc b/chromeos/dbus/audio/cras_audio_client.cc index 313c2147..adc95c38 100644 --- a/chromeos/dbus/audio/cras_audio_client.cc +++ b/chromeos/dbus/audio/cras_audio_client.cc
@@ -129,6 +129,9 @@ weak_ptr_factory_.GetWeakPtr())); } + CrasAudioClientImpl(const CrasAudioClientImpl&) = delete; + CrasAudioClientImpl& operator=(const CrasAudioClientImpl&) = delete; + ~CrasAudioClientImpl() override = default; // CrasAudioClient overrides: @@ -1017,8 +1020,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<CrasAudioClientImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(CrasAudioClientImpl); }; } // namespace
diff --git a/chromeos/dbus/audio/fake_cras_audio_client.h b/chromeos/dbus/audio/fake_cras_audio_client.h index 25708a69..0d7c6f0 100644 --- a/chromeos/dbus/audio/fake_cras_audio_client.h +++ b/chromeos/dbus/audio/fake_cras_audio_client.h
@@ -23,6 +23,10 @@ using ClientTypeToInputStreamCount = base::flat_map<std::string, uint32_t>; FakeCrasAudioClient(); + + FakeCrasAudioClient(const FakeCrasAudioClient&) = delete; + FakeCrasAudioClient& operator=(const FakeCrasAudioClient&) = delete; + ~FakeCrasAudioClient() override; static FakeCrasAudioClient* Get(); @@ -136,8 +140,6 @@ ClientTypeToInputStreamCount active_input_streams_; base::ObserverList<Observer>::Unchecked observers_; - - DISALLOW_COPY_AND_ASSIGN(FakeCrasAudioClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/authpolicy/authpolicy_client.cc b/chromeos/dbus/authpolicy/authpolicy_client.cc index a3b13e14..15bda361 100644 --- a/chromeos/dbus/authpolicy/authpolicy_client.cc +++ b/chromeos/dbus/authpolicy/authpolicy_client.cc
@@ -65,6 +65,9 @@ public: AuthPolicyClientImpl() {} + AuthPolicyClientImpl(const AuthPolicyClientImpl&) = delete; + AuthPolicyClientImpl& operator=(const AuthPolicyClientImpl&) = delete; + ~AuthPolicyClientImpl() override = default; // AuthPolicyClient override. @@ -229,8 +232,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<AuthPolicyClientImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(AuthPolicyClientImpl); }; } // namespace
diff --git a/chromeos/dbus/authpolicy/fake_authpolicy_client.h b/chromeos/dbus/authpolicy/fake_authpolicy_client.h index c2b4fd5..2c31cfc8 100644 --- a/chromeos/dbus/authpolicy/fake_authpolicy_client.h +++ b/chromeos/dbus/authpolicy/fake_authpolicy_client.h
@@ -27,6 +27,10 @@ : public AuthPolicyClient { public: FakeAuthPolicyClient(); + + FakeAuthPolicyClient(const FakeAuthPolicyClient&) = delete; + FakeAuthPolicyClient& operator=(const FakeAuthPolicyClient&) = delete; + ~FakeAuthPolicyClient() override; // Returns the fake global instance if initialized. May return null. @@ -185,8 +189,6 @@ absl::optional<authpolicy::ErrorType> refresh_user_policy_error_; base::WeakPtrFactory<FakeAuthPolicyClient> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeAuthPolicyClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/biod/biod_client.cc b/chromeos/dbus/biod/biod_client.cc index d0c9e69e..c573af2 100644 --- a/chromeos/dbus/biod/biod_client.cc +++ b/chromeos/dbus/biod/biod_client.cc
@@ -40,6 +40,10 @@ class BiodClientImpl : public BiodClient { public: BiodClientImpl() = default; + + BiodClientImpl(const BiodClientImpl&) = delete; + BiodClientImpl& operator=(const BiodClientImpl&) = delete; + ~BiodClientImpl() override = default; // BiodClient overrides: @@ -408,8 +412,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<BiodClientImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(BiodClientImpl); }; BiodClient::BiodClient() {
diff --git a/chromeos/dbus/biod/biod_client_unittest.cc b/chromeos/dbus/biod/biod_client_unittest.cc index c323e95..2d058fd 100644 --- a/chromeos/dbus/biod/biod_client_unittest.cc +++ b/chromeos/dbus/biod/biod_client_unittest.cc
@@ -61,6 +61,10 @@ class BiodClientTest : public testing::Test { public: BiodClientTest() = default; + + BiodClientTest(const BiodClientTest&) = delete; + BiodClientTest& operator=(const BiodClientTest&) = delete; + ~BiodClientTest() override = default; void SetUp() override { @@ -201,8 +205,6 @@ FROM_HERE, base::BindOnce(&RunResponseCallback, std::move(*callback), std::move(pending_response))); } - - DISALLOW_COPY_AND_ASSIGN(BiodClientTest); }; TEST_F(BiodClientTest, TestStartEnrollSession) {
diff --git a/chromeos/dbus/biod/fake_biod_client.h b/chromeos/dbus/biod/fake_biod_client.h index 5511a3fa..9202e43 100644 --- a/chromeos/dbus/biod/fake_biod_client.h +++ b/chromeos/dbus/biod/fake_biod_client.h
@@ -27,6 +27,10 @@ class COMPONENT_EXPORT(BIOD_CLIENT) FakeBiodClient : public BiodClient { public: FakeBiodClient(); + + FakeBiodClient(const FakeBiodClient&) = delete; + FakeBiodClient& operator=(const FakeBiodClient&) = delete; + ~FakeBiodClient() override; // Checks that a FakeBiodClient instance was initialized and returns it. @@ -102,8 +106,6 @@ FingerprintSession current_session_ = FingerprintSession::NONE; base::ObserverList<Observer>::Unchecked observers_; - - DISALLOW_COPY_AND_ASSIGN(FakeBiodClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/biod/fake_biod_client_unittest.cc b/chromeos/dbus/biod/fake_biod_client_unittest.cc index 82a72fa..65f1c222 100644 --- a/chromeos/dbus/biod/fake_biod_client_unittest.cc +++ b/chromeos/dbus/biod/fake_biod_client_unittest.cc
@@ -35,6 +35,10 @@ FakeBiodClientTest() : task_runner_(new base::TestSimpleTaskRunner), task_runner_handle_(task_runner_) {} + + FakeBiodClientTest(const FakeBiodClientTest&) = delete; + FakeBiodClientTest& operator=(const FakeBiodClientTest&) = delete; + ~FakeBiodClientTest() override = default; // Returns the stored records for |user_id|. Verified to work in @@ -105,9 +109,6 @@ // This number is incremented each time GenerateTestFingerprint is called to // ensure each fingerprint is unique. int num_test_fingerprints_ = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(FakeBiodClientTest); }; TEST_F(FakeBiodClientTest, TestEnrollSessionWorkflow) {
diff --git a/chromeos/dbus/biod/test_utils.h b/chromeos/dbus/biod/test_utils.h index 28a39a2..481bd801 100644 --- a/chromeos/dbus/biod/test_utils.h +++ b/chromeos/dbus/biod/test_utils.h
@@ -36,6 +36,10 @@ class TestBiodObserver : public BiodClient::Observer { public: TestBiodObserver(); + + TestBiodObserver(const TestBiodObserver&) = delete; + TestBiodObserver& operator=(const TestBiodObserver&) = delete; + ~TestBiodObserver() override; int num_complete_enroll_scans_received() const { @@ -78,8 +82,6 @@ // When auth scan is received, store the result. AuthScanMatches last_auth_scan_matches_; - - DISALLOW_COPY_AND_ASSIGN(TestBiodObserver); }; } // namespace test_utils
diff --git a/chromeos/dbus/blocking_method_caller.h b/chromeos/dbus/blocking_method_caller.h index c41cd6d..1e757e3 100644 --- a/chromeos/dbus/blocking_method_caller.h +++ b/chromeos/dbus/blocking_method_caller.h
@@ -28,6 +28,10 @@ class COMPONENT_EXPORT(CHROMEOS_DBUS) BlockingMethodCaller { public: BlockingMethodCaller(dbus::Bus* bus, dbus::ObjectProxy* proxy); + + BlockingMethodCaller(const BlockingMethodCaller&) = delete; + BlockingMethodCaller& operator=(const BlockingMethodCaller&) = delete; + virtual ~BlockingMethodCaller(); // Calls the method and blocks until it returns. @@ -44,8 +48,6 @@ dbus::Bus* bus_; dbus::ObjectProxy* proxy_; base::WaitableEvent on_blocking_method_call_; - - DISALLOW_COPY_AND_ASSIGN(BlockingMethodCaller); }; } // namespace chromeos
diff --git a/chromeos/dbus/cdm_factory_daemon/cdm_factory_daemon_client.cc b/chromeos/dbus/cdm_factory_daemon/cdm_factory_daemon_client.cc index 4b295f92..022b1011 100644 --- a/chromeos/dbus/cdm_factory_daemon/cdm_factory_daemon_client.cc +++ b/chromeos/dbus/cdm_factory_daemon/cdm_factory_daemon_client.cc
@@ -26,6 +26,11 @@ class CdmFactoryDaemonClientImpl : public CdmFactoryDaemonClient { public: CdmFactoryDaemonClientImpl() = default; + + CdmFactoryDaemonClientImpl(const CdmFactoryDaemonClientImpl&) = delete; + CdmFactoryDaemonClientImpl& operator=(const CdmFactoryDaemonClientImpl&) = + delete; + ~CdmFactoryDaemonClientImpl() override = default; // CdmFactoryDaemonClient overrides: @@ -60,7 +65,6 @@ dbus::ObjectProxy* proxy_ = nullptr; base::WeakPtrFactory<CdmFactoryDaemonClientImpl> weak_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(CdmFactoryDaemonClientImpl); }; } // namespace
diff --git a/chromeos/dbus/cdm_factory_daemon/fake_cdm_factory_daemon_client.h b/chromeos/dbus/cdm_factory_daemon/fake_cdm_factory_daemon_client.h index c059da5..54c2d49 100644 --- a/chromeos/dbus/cdm_factory_daemon/fake_cdm_factory_daemon_client.h +++ b/chromeos/dbus/cdm_factory_daemon/fake_cdm_factory_daemon_client.h
@@ -18,15 +18,17 @@ class FakeCdmFactoryDaemonClient : public CdmFactoryDaemonClient { public: FakeCdmFactoryDaemonClient(); + + FakeCdmFactoryDaemonClient(const FakeCdmFactoryDaemonClient&) = delete; + FakeCdmFactoryDaemonClient& operator=(const FakeCdmFactoryDaemonClient&) = + delete; + ~FakeCdmFactoryDaemonClient() override; // CdmFactoryDaemonClient: void BootstrapMojoConnection( base::ScopedFD fd, base::OnceCallback<void(bool success)> callback) override; - - private: - DISALLOW_COPY_AND_ASSIGN(FakeCdmFactoryDaemonClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/cec_service/cec_service_client.cc b/chromeos/dbus/cec_service/cec_service_client.cc index 33b9d445..f5063ab0 100644 --- a/chromeos/dbus/cec_service/cec_service_client.cc +++ b/chromeos/dbus/cec_service/cec_service_client.cc
@@ -83,6 +83,9 @@ public: CecServiceClientImpl() = default; + CecServiceClientImpl(const CecServiceClientImpl&) = delete; + CecServiceClientImpl& operator=(const CecServiceClientImpl&) = delete; + ~CecServiceClientImpl() override = default; void SendStandBy() override { @@ -118,8 +121,6 @@ private: scoped_refptr<dbus::ObjectProxy> cec_service_proxy_; - - DISALLOW_COPY_AND_ASSIGN(CecServiceClientImpl); }; } // namespace
diff --git a/chromeos/dbus/cec_service/cec_service_client.h b/chromeos/dbus/cec_service/cec_service_client.h index 1de62bc..766b6545 100644 --- a/chromeos/dbus/cec_service/cec_service_client.h +++ b/chromeos/dbus/cec_service/cec_service_client.h
@@ -24,6 +24,9 @@ class COMPONENT_EXPORT(CHROMEOS_DBUS_CEC_SERVICE) CecServiceClient : public DBusClient { public: + CecServiceClient(const CecServiceClient&) = delete; + CecServiceClient& operator=(const CecServiceClient&) = delete; + ~CecServiceClient() override; enum class PowerState { @@ -72,9 +75,6 @@ friend class CecServiceClientTest; CecServiceClient(); - - private: - DISALLOW_COPY_AND_ASSIGN(CecServiceClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/cec_service/fake_cec_service_client.h b/chromeos/dbus/cec_service/fake_cec_service_client.h index c59be42..5c97af57 100644 --- a/chromeos/dbus/cec_service/fake_cec_service_client.h +++ b/chromeos/dbus/cec_service/fake_cec_service_client.h
@@ -17,6 +17,10 @@ : public CecServiceClient { public: FakeCecServiceClient(); + + FakeCecServiceClient(const FakeCecServiceClient&) = delete; + FakeCecServiceClient& operator=(const FakeCecServiceClient&) = delete; + ~FakeCecServiceClient() override; // CecServiceClient @@ -45,8 +49,6 @@ int wake_up_call_count_ = 0; std::vector<PowerState> tv_power_states_; - - DISALLOW_COPY_AND_ASSIGN(FakeCecServiceClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/cicerone/cicerone_client.cc b/chromeos/dbus/cicerone/cicerone_client.cc index 89b4be15..a9c1e1b8 100644 --- a/chromeos/dbus/cicerone/cicerone_client.cc +++ b/chromeos/dbus/cicerone/cicerone_client.cc
@@ -41,6 +41,9 @@ public: CiceroneClientImpl() = default; + CiceroneClientImpl(const CiceroneClientImpl&) = delete; + CiceroneClientImpl& operator=(const CiceroneClientImpl&) = delete; + ~CiceroneClientImpl() override = default; void AddObserver(Observer* observer) override { @@ -1100,8 +1103,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<CiceroneClientImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(CiceroneClientImpl); }; CiceroneClient::CiceroneClient() {
diff --git a/chromeos/dbus/concierge/concierge_client.cc b/chromeos/dbus/concierge/concierge_client.cc index faa73f01..f1d7dbe3 100644 --- a/chromeos/dbus/concierge/concierge_client.cc +++ b/chromeos/dbus/concierge/concierge_client.cc
@@ -37,6 +37,9 @@ public: ConciergeClientImpl() = default; + ConciergeClientImpl(const ConciergeClientImpl&) = delete; + ConciergeClientImpl& operator=(const ConciergeClientImpl&) = delete; + ~ConciergeClientImpl() override = default; void AddObserver(Observer* observer) override { @@ -460,8 +463,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<ConciergeClientImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ConciergeClientImpl); }; ConciergeClient::ConciergeClient() {
diff --git a/chromeos/dbus/cros_disks/cros_disks_client.h b/chromeos/dbus/cros_disks/cros_disks_client.h index baa2e2eee..ea09b33 100644 --- a/chromeos/dbus/cros_disks/cros_disks_client.h +++ b/chromeos/dbus/cros_disks/cros_disks_client.h
@@ -335,6 +335,9 @@ const std::string& device_path) = 0; }; + CrosDisksClient(const CrosDisksClient&) = delete; + CrosDisksClient& operator=(const CrosDisksClient&) = delete; + ~CrosDisksClient() override; // Registers the given |observer| to listen D-Bus signals. @@ -419,9 +422,6 @@ protected: // Create() should be used instead. CrosDisksClient(); - - private: - DISALLOW_COPY_AND_ASSIGN(CrosDisksClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/cros_disks/fake_cros_disks_client.h b/chromeos/dbus/cros_disks/fake_cros_disks_client.h index 875f3c5..aaee68b86 100644 --- a/chromeos/dbus/cros_disks/fake_cros_disks_client.h +++ b/chromeos/dbus/cros_disks/fake_cros_disks_client.h
@@ -27,6 +27,10 @@ base::RepeatingCallback<base::FilePath(const std::string&, const std::vector<std::string>&)>; FakeCrosDisksClient(); + + FakeCrosDisksClient(const FakeCrosDisksClient&) = delete; + FakeCrosDisksClient& operator=(const FakeCrosDisksClient&) = delete; + ~FakeCrosDisksClient() override; // CrosDisksClient overrides @@ -195,8 +199,6 @@ bool block_mount_ = false; base::WeakPtrFactory<FakeCrosDisksClient> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeCrosDisksClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/cros_healthd/cros_healthd_client.cc b/chromeos/dbus/cros_healthd/cros_healthd_client.cc index 0ce8e39..eee15d66 100644 --- a/chromeos/dbus/cros_healthd/cros_healthd_client.cc +++ b/chromeos/dbus/cros_healthd/cros_healthd_client.cc
@@ -26,6 +26,10 @@ class CrosHealthdClientImpl : public CrosHealthdClient { public: CrosHealthdClientImpl() = default; + + CrosHealthdClientImpl(const CrosHealthdClientImpl&) = delete; + CrosHealthdClientImpl& operator=(const CrosHealthdClientImpl&) = delete; + ~CrosHealthdClientImpl() override = default; // CrosHealthdClient overrides: @@ -107,8 +111,6 @@ // Must be last class member. This WeakPtrFactory is specifically for the // bootstrapping callbacks. base::WeakPtrFactory<CrosHealthdClientImpl> bootstrap_weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(CrosHealthdClientImpl); }; } // namespace
diff --git a/chromeos/dbus/cros_healthd/fake_cros_healthd_client.h b/chromeos/dbus/cros_healthd/fake_cros_healthd_client.h index 01fb45d..a61d6cf 100644 --- a/chromeos/dbus/cros_healthd/fake_cros_healthd_client.h +++ b/chromeos/dbus/cros_healthd/fake_cros_healthd_client.h
@@ -31,6 +31,10 @@ // instance will set the global instance for the fake and for the base class, // so the static Get() accessor can be used with that pattern. FakeCrosHealthdClient(); + + FakeCrosHealthdClient(const FakeCrosHealthdClient&) = delete; + FakeCrosHealthdClient& operator=(const FakeCrosHealthdClient&) = delete; + ~FakeCrosHealthdClient() override; // Checks that a FakeCrosHealthdClient instance was initialized and returns @@ -144,8 +148,6 @@ private: FakeCrosHealthdService fake_service_; mojo::Receiver<mojom::CrosHealthdServiceFactory> receiver_{&fake_service_}; - - DISALLOW_COPY_AND_ASSIGN(FakeCrosHealthdClient); }; } // namespace cros_healthd
diff --git a/chromeos/dbus/cros_healthd/fake_cros_healthd_service.h b/chromeos/dbus/cros_healthd/fake_cros_healthd_service.h index 21516035b..935bdd9 100644 --- a/chromeos/dbus/cros_healthd/fake_cros_healthd_service.h +++ b/chromeos/dbus/cros_healthd/fake_cros_healthd_service.h
@@ -48,6 +48,10 @@ }; FakeCrosHealthdService(); + + FakeCrosHealthdService(const FakeCrosHealthdService&) = delete; + FakeCrosHealthdService& operator=(const FakeCrosHealthdService&) = delete; + ~FakeCrosHealthdService() override; // CrosHealthdServiceFactory overrides: @@ -314,8 +318,6 @@ network_diagnostics_routines_; base::TimeDelta callback_delay_; - - DISALLOW_COPY_AND_ASSIGN(FakeCrosHealthdService); }; } // namespace cros_healthd
diff --git a/chromeos/dbus/cups_proxy/cups_proxy_client.cc b/chromeos/dbus/cups_proxy/cups_proxy_client.cc index b290520..5c641f6 100644 --- a/chromeos/dbus/cups_proxy/cups_proxy_client.cc +++ b/chromeos/dbus/cups_proxy/cups_proxy_client.cc
@@ -24,6 +24,10 @@ class CupsProxyClientImpl : public CupsProxyClient { public: CupsProxyClientImpl() = default; + + CupsProxyClientImpl(const CupsProxyClientImpl&) = delete; + CupsProxyClientImpl& operator=(const CupsProxyClientImpl&) = delete; + ~CupsProxyClientImpl() override = default; // CupsProxyClient overrides. @@ -66,7 +70,6 @@ // Must be last class member. base::WeakPtrFactory<CupsProxyClientImpl> weak_ptr_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(CupsProxyClientImpl); }; } // namespace
diff --git a/chromeos/dbus/cups_proxy/fake_cups_proxy_client.h b/chromeos/dbus/cups_proxy/fake_cups_proxy_client.h index 0c9620f..a806bfbe 100644 --- a/chromeos/dbus/cups_proxy/fake_cups_proxy_client.h +++ b/chromeos/dbus/cups_proxy/fake_cups_proxy_client.h
@@ -17,6 +17,10 @@ class FakeCupsProxyClient : public CupsProxyClient { public: FakeCupsProxyClient(); + + FakeCupsProxyClient(const FakeCupsProxyClient&) = delete; + FakeCupsProxyClient& operator=(const FakeCupsProxyClient&) = delete; + ~FakeCupsProxyClient() override; // CupsProxyClient: @@ -25,9 +29,6 @@ void BootstrapMojoConnection( base::ScopedFD fd, base::OnceCallback<void(bool success)> result_callback) override; - - private: - DISALLOW_COPY_AND_ASSIGN(FakeCupsProxyClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/dbus_clients_browser.h b/chromeos/dbus/dbus_clients_browser.h index e9c5a2e..5c4e055c 100644 --- a/chromeos/dbus/dbus_clients_browser.h +++ b/chromeos/dbus/dbus_clients_browser.h
@@ -47,6 +47,10 @@ // Creates real implementations if |use_real_clients| is true and fakes // otherwise. Fakes are used when running on Linux desktop and in tests. explicit DBusClientsBrowser(bool use_real_clients); + + DBusClientsBrowser(const DBusClientsBrowser&) = delete; + DBusClientsBrowser& operator=(const DBusClientsBrowser&) = delete; + ~DBusClientsBrowser(); void Initialize(dbus::Bus* system_bus); @@ -76,8 +80,6 @@ std::unique_ptr<UpdateEngineClient> update_engine_client_; std::unique_ptr<VirtualFileProviderClient> virtual_file_provider_client_; std::unique_ptr<VmPluginDispatcherClient> vm_plugin_dispatcher_client_; - - DISALLOW_COPY_AND_ASSIGN(DBusClientsBrowser); }; } // namespace chromeos
diff --git a/chromeos/dbus/debug_daemon/debug_daemon_client.cc b/chromeos/dbus/debug_daemon/debug_daemon_client.cc index f97448e..eb02376 100644 --- a/chromeos/dbus/debug_daemon/debug_daemon_client.cc +++ b/chromeos/dbus/debug_daemon/debug_daemon_client.cc
@@ -137,6 +137,9 @@ public: DebugDaemonClientImpl() : debugdaemon_proxy_(nullptr) {} + DebugDaemonClientImpl(const DebugDaemonClientImpl&) = delete; + DebugDaemonClientImpl& operator=(const DebugDaemonClientImpl&) = delete; + ~DebugDaemonClientImpl() override = default; // DebugDaemonClient override. @@ -1100,8 +1103,6 @@ scoped_refptr<base::TaskRunner> stop_agent_tracing_task_runner_; base::ObserverList<Observer> observers_; base::WeakPtrFactory<DebugDaemonClientImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DebugDaemonClientImpl); }; DebugDaemonClient::DebugDaemonClient() = default;
diff --git a/chromeos/dbus/debug_daemon/debug_daemon_client.h b/chromeos/dbus/debug_daemon/debug_daemon_client.h index 009234c..b2513f74 100644 --- a/chromeos/dbus/debug_daemon/debug_daemon_client.h +++ b/chromeos/dbus/debug_daemon/debug_daemon_client.h
@@ -43,6 +43,9 @@ : public DBusClient, public base::trace_event::TracingAgent { public: + DebugDaemonClient(const DebugDaemonClient&) = delete; + DebugDaemonClient& operator=(const DebugDaemonClient&) = delete; + ~DebugDaemonClient() override; // Observes the signals that are received from D-Bus. @@ -332,9 +335,6 @@ // Create() should be used instead. DebugDaemonClient(); - - private: - DISALLOW_COPY_AND_ASSIGN(DebugDaemonClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/debug_daemon/debug_daemon_client_provider.h b/chromeos/dbus/debug_daemon/debug_daemon_client_provider.h index 7d572a2..e59c517e 100644 --- a/chromeos/dbus/debug_daemon/debug_daemon_client_provider.h +++ b/chromeos/dbus/debug_daemon/debug_daemon_client_provider.h
@@ -33,6 +33,11 @@ class COMPONENT_EXPORT(DEBUG_DAEMON) DebugDaemonClientProvider { public: DebugDaemonClientProvider(); + + DebugDaemonClientProvider(const DebugDaemonClientProvider&) = delete; + DebugDaemonClientProvider& operator=(const DebugDaemonClientProvider&) = + delete; + ~DebugDaemonClientProvider(); DebugDaemonClient* debug_daemon_client() const { @@ -44,8 +49,6 @@ scoped_refptr<dbus::Bus> dbus_bus_; scoped_refptr<base::SequencedTaskRunner> dbus_task_runner_; std::unique_ptr<DebugDaemonClient> debug_daemon_client_; - - DISALLOW_COPY_AND_ASSIGN(DebugDaemonClientProvider); }; } // namespace chromeos
diff --git a/chromeos/dbus/debug_daemon/fake_debug_daemon_client.h b/chromeos/dbus/debug_daemon/fake_debug_daemon_client.h index 50a7776..f31f59a 100644 --- a/chromeos/dbus/debug_daemon/fake_debug_daemon_client.h +++ b/chromeos/dbus/debug_daemon/fake_debug_daemon_client.h
@@ -27,6 +27,10 @@ : public DebugDaemonClient { public: FakeDebugDaemonClient(); + + FakeDebugDaemonClient(const FakeDebugDaemonClient&) = delete; + FakeDebugDaemonClient& operator=(const FakeDebugDaemonClient&) = delete; + ~FakeDebugDaemonClient() override; void Init(dbus::Bus* bus) override; @@ -135,8 +139,6 @@ std::string scheduler_configuration_name_; std::set<std::string> u2f_flags_; base::ObserverList<Observer> observers_; - - DISALLOW_COPY_AND_ASSIGN(FakeDebugDaemonClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/dlcservice/dlcservice_client.cc b/chromeos/dbus/dlcservice/dlcservice_client.cc index 0fbc885..a28366a 100644 --- a/chromeos/dbus/dlcservice/dlcservice_client.cc +++ b/chromeos/dbus/dlcservice/dlcservice_client.cc
@@ -52,6 +52,11 @@ VLOG(1) << "Handling err=" << err_ << " err_msg=" << err_msg_; } + DlcserviceErrorResponseHandler(const DlcserviceErrorResponseHandler&) = + delete; + DlcserviceErrorResponseHandler& operator=( + const DlcserviceErrorResponseHandler&) = delete; + ~DlcserviceErrorResponseHandler() = default; std::string get_err() { return err_; } @@ -91,8 +96,6 @@ // Holds the entire error message from error response. std::string err_msg_; - - DISALLOW_COPY_AND_ASSIGN(DlcserviceErrorResponseHandler); }; } // namespace @@ -102,6 +105,9 @@ public: DlcserviceClientImpl() : dlcservice_proxy_(nullptr) {} + DlcserviceClientImpl(const DlcserviceClientImpl&) = delete; + DlcserviceClientImpl& operator=(const DlcserviceClientImpl&) = delete; + ~DlcserviceClientImpl() override = default; void Install(const std::string& dlc_id, @@ -454,8 +460,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<DlcserviceClientImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DlcserviceClientImpl); }; DlcserviceClient::DlcserviceClient() {
diff --git a/chromeos/dbus/easy_unlock/fake_easy_unlock_client.h b/chromeos/dbus/easy_unlock/fake_easy_unlock_client.h index 73650a2..38474ca 100644 --- a/chromeos/dbus/easy_unlock/fake_easy_unlock_client.h +++ b/chromeos/dbus/easy_unlock/fake_easy_unlock_client.h
@@ -23,6 +23,10 @@ const std::string& public_key); FakeEasyUnlockClient(); + + FakeEasyUnlockClient(const FakeEasyUnlockClient&) = delete; + FakeEasyUnlockClient& operator=(const FakeEasyUnlockClient&) = delete; + ~FakeEasyUnlockClient() override; // EasyUnlockClient overrides @@ -43,8 +47,6 @@ private: int generated_keys_count_; - - DISALLOW_COPY_AND_ASSIGN(FakeEasyUnlockClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/gnubby/fake_gnubby_client.h b/chromeos/dbus/gnubby/fake_gnubby_client.h index 32c32004..60bcb988 100644 --- a/chromeos/dbus/gnubby/fake_gnubby_client.h +++ b/chromeos/dbus/gnubby/fake_gnubby_client.h
@@ -17,6 +17,10 @@ : public GnubbyClient { public: FakeGnubbyClient(); + + FakeGnubbyClient(const FakeGnubbyClient&) = delete; + FakeGnubbyClient& operator=(const FakeGnubbyClient&) = delete; + ~FakeGnubbyClient() override; // GnubbyClient overrides @@ -32,8 +36,6 @@ base::ObserverList<Observer>::Unchecked observer_list_; base::WeakPtrFactory<FakeGnubbyClient> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeGnubbyClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/hammerd/fake_hammerd_client.h b/chromeos/dbus/hammerd/fake_hammerd_client.h index 6d56217..e90ae07 100644 --- a/chromeos/dbus/hammerd/fake_hammerd_client.h +++ b/chromeos/dbus/hammerd/fake_hammerd_client.h
@@ -17,6 +17,10 @@ class COMPONENT_EXPORT(HAMMERD) FakeHammerdClient : public HammerdClient { public: FakeHammerdClient(); + + FakeHammerdClient(const FakeHammerdClient&) = delete; + FakeHammerdClient& operator=(const FakeHammerdClient&) = delete; + ~FakeHammerdClient() override; // Checks that a FakeHammerdClient instance was initialized and returns it. @@ -37,8 +41,6 @@ private: base::ObserverList<Observer>::Unchecked observers_; - - DISALLOW_COPY_AND_ASSIGN(FakeHammerdClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/hammerd/hammerd_client.cc b/chromeos/dbus/hammerd/hammerd_client.cc index 07f01f49..65e2af87 100644 --- a/chromeos/dbus/hammerd/hammerd_client.cc +++ b/chromeos/dbus/hammerd/hammerd_client.cc
@@ -27,6 +27,10 @@ class HammerdClientImpl : public HammerdClient { public: HammerdClientImpl() = default; + + HammerdClientImpl(const HammerdClientImpl&) = delete; + HammerdClientImpl& operator=(const HammerdClientImpl&) = delete; + ~HammerdClientImpl() override = default; // HammerdClient: @@ -153,8 +157,6 @@ base::ObserverList<Observer>::Unchecked observers_; base::WeakPtrFactory<HammerdClientImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(HammerdClientImpl); }; } // namespace
diff --git a/chromeos/dbus/image_burner/fake_image_burner_client.h b/chromeos/dbus/image_burner/fake_image_burner_client.h index 211aed4..c5b9b9d6 100644 --- a/chromeos/dbus/image_burner/fake_image_burner_client.h +++ b/chromeos/dbus/image_burner/fake_image_burner_client.h
@@ -18,6 +18,10 @@ : public ImageBurnerClient { public: FakeImageBurnerClient(); + + FakeImageBurnerClient(const FakeImageBurnerClient&) = delete; + FakeImageBurnerClient& operator=(const FakeImageBurnerClient&) = delete; + ~FakeImageBurnerClient() override; // ImageBurnerClient overrides @@ -29,9 +33,6 @@ BurnFinishedHandler burn_finished_handler, const BurnProgressUpdateHandler& burn_progress_update_handler) override; void ResetEventHandlers() override; - - private: - DISALLOW_COPY_AND_ASSIGN(FakeImageBurnerClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/image_burner/image_burner_client.cc b/chromeos/dbus/image_burner/image_burner_client.cc index 6367bf0..49c60fc 100644 --- a/chromeos/dbus/image_burner/image_burner_client.cc +++ b/chromeos/dbus/image_burner/image_burner_client.cc
@@ -25,6 +25,9 @@ public: ImageBurnerClientImpl() : proxy_(nullptr) {} + ImageBurnerClientImpl(const ImageBurnerClientImpl&) = delete; + ImageBurnerClientImpl& operator=(const ImageBurnerClientImpl&) = delete; + ~ImageBurnerClientImpl() override = default; // ImageBurnerClient override. @@ -131,8 +134,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<ImageBurnerClientImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ImageBurnerClientImpl); }; } // namespace
diff --git a/chromeos/dbus/image_burner/image_burner_client.h b/chromeos/dbus/image_burner/image_burner_client.h index c8764ed..7174dcb 100644 --- a/chromeos/dbus/image_burner/image_burner_client.h +++ b/chromeos/dbus/image_burner/image_burner_client.h
@@ -23,6 +23,9 @@ class COMPONENT_EXPORT(CHROMEOS_DBUS_IMAGE_BURNER) ImageBurnerClient : public DBusClient { public: + ImageBurnerClient(const ImageBurnerClient&) = delete; + ImageBurnerClient& operator=(const ImageBurnerClient&) = delete; + ~ImageBurnerClient() override; // A callback to be called when DBus method call fails. @@ -64,9 +67,6 @@ protected: // Create() should be used instead. ImageBurnerClient(); - - private: - DISALLOW_COPY_AND_ASSIGN(ImageBurnerClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/image_loader/fake_image_loader_client.h b/chromeos/dbus/image_loader/fake_image_loader_client.h index 9b4a7da..9e9ba4bf 100644 --- a/chromeos/dbus/image_loader/fake_image_loader_client.h +++ b/chromeos/dbus/image_loader/fake_image_loader_client.h
@@ -24,6 +24,10 @@ : public ImageLoaderClient { public: FakeImageLoaderClient(); + + FakeImageLoaderClient(const FakeImageLoaderClient&) = delete; + FakeImageLoaderClient& operator=(const FakeImageLoaderClient&) = delete; + ~FakeImageLoaderClient() override; // Sets intended mount path for a component. @@ -77,8 +81,6 @@ // Maps a loaded component to the path from which it was loaded. std::map<std::string, base::FilePath> component_install_paths_; - - DISALLOW_COPY_AND_ASSIGN(FakeImageLoaderClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/image_loader/image_loader_client.cc b/chromeos/dbus/image_loader/image_loader_client.cc index c707371..8aceed4 100644 --- a/chromeos/dbus/image_loader/image_loader_client.cc +++ b/chromeos/dbus/image_loader/image_loader_client.cc
@@ -24,6 +24,9 @@ public: ImageLoaderClientImpl() = default; + ImageLoaderClientImpl(const ImageLoaderClientImpl&) = delete; + ImageLoaderClientImpl& operator=(const ImageLoaderClientImpl&) = delete; + ~ImageLoaderClientImpl() override = default; void RegisterComponent(const std::string& name, @@ -158,8 +161,6 @@ } dbus::ObjectProxy* proxy_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(ImageLoaderClientImpl); }; } // namespace
diff --git a/chromeos/dbus/image_loader/image_loader_client.h b/chromeos/dbus/image_loader/image_loader_client.h index 54af840..160c3d0 100644 --- a/chromeos/dbus/image_loader/image_loader_client.h +++ b/chromeos/dbus/image_loader/image_loader_client.h
@@ -22,6 +22,9 @@ class COMPONENT_EXPORT(CHROMEOS_DBUS_IMAGE_LOADER) ImageLoaderClient : public DBusClient { public: + ImageLoaderClient(const ImageLoaderClient&) = delete; + ImageLoaderClient& operator=(const ImageLoaderClient&) = delete; + ~ImageLoaderClient() override; // Registers a component by copying from |component_folder_abs_path| into its @@ -63,9 +66,6 @@ protected: // Create() should be used instead. ImageLoaderClient(); - - private: - DISALLOW_COPY_AND_ASSIGN(ImageLoaderClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/kerberos/fake_kerberos_client.h b/chromeos/dbus/kerberos/fake_kerberos_client.h index 944bafa1..74715785 100644 --- a/chromeos/dbus/kerberos/fake_kerberos_client.h +++ b/chromeos/dbus/kerberos/fake_kerberos_client.h
@@ -22,6 +22,10 @@ public KerberosClient::TestInterface { public: FakeKerberosClient(); + + FakeKerberosClient(const FakeKerberosClient&) = delete; + FakeKerberosClient& operator=(const FakeKerberosClient&) = delete; + ~FakeKerberosClient() override; // KerberosClient: @@ -118,8 +122,6 @@ KerberosFilesChangedCallback kerberos_files_changed_callback_; KerberosTicketExpiringCallback kerberos_ticket_expiring_callback_; - - DISALLOW_COPY_AND_ASSIGN(FakeKerberosClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/kerberos/kerberos_client.cc b/chromeos/dbus/kerberos/kerberos_client.cc index ec304f5..dd3dfd8e 100644 --- a/chromeos/dbus/kerberos/kerberos_client.cc +++ b/chromeos/dbus/kerberos/kerberos_client.cc
@@ -52,6 +52,10 @@ class KerberosClientImpl : public KerberosClient { public: KerberosClientImpl() = default; + + KerberosClientImpl(const KerberosClientImpl&) = delete; + KerberosClientImpl& operator=(const KerberosClientImpl&) = delete; + ~KerberosClientImpl() override = default; // KerberosClient overrides: @@ -228,7 +232,6 @@ KerberosTicketExpiringCallback kerberos_ticket_expiring_callback_; base::WeakPtrFactory<KerberosClientImpl> weak_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(KerberosClientImpl); }; } // namespace
diff --git a/chromeos/dbus/machine_learning/fake_machine_learning_client.h b/chromeos/dbus/machine_learning/fake_machine_learning_client.h index 84576fb..c2679c6d 100644 --- a/chromeos/dbus/machine_learning/fake_machine_learning_client.h +++ b/chromeos/dbus/machine_learning/fake_machine_learning_client.h
@@ -16,15 +16,17 @@ class FakeMachineLearningClient : public MachineLearningClient { public: FakeMachineLearningClient(); + + FakeMachineLearningClient(const FakeMachineLearningClient&) = delete; + FakeMachineLearningClient& operator=(const FakeMachineLearningClient&) = + delete; + ~FakeMachineLearningClient() override; // MachineLearningClient: void BootstrapMojoConnection( base::ScopedFD fd, base::OnceCallback<void(bool success)> result_callback) override; - - private: - DISALLOW_COPY_AND_ASSIGN(FakeMachineLearningClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/machine_learning/machine_learning_client.cc b/chromeos/dbus/machine_learning/machine_learning_client.cc index eda6a5e2..94fbb745 100644 --- a/chromeos/dbus/machine_learning/machine_learning_client.cc +++ b/chromeos/dbus/machine_learning/machine_learning_client.cc
@@ -29,6 +29,11 @@ class MachineLearningClientImpl : public MachineLearningClient { public: MachineLearningClientImpl() = default; + + MachineLearningClientImpl(const MachineLearningClientImpl&) = delete; + MachineLearningClientImpl& operator=(const MachineLearningClientImpl&) = + delete; + ~MachineLearningClientImpl() override = default; // MachineLearningClient: @@ -65,8 +70,6 @@ // Must be last class member. base::WeakPtrFactory<MachineLearningClientImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(MachineLearningClientImpl); }; } // namespace
diff --git a/chromeos/dbus/media_analytics/fake_media_analytics_client.h b/chromeos/dbus/media_analytics/fake_media_analytics_client.h index d85d53d..3c00628 100644 --- a/chromeos/dbus/media_analytics/fake_media_analytics_client.h +++ b/chromeos/dbus/media_analytics/fake_media_analytics_client.h
@@ -21,6 +21,10 @@ : public MediaAnalyticsClient { public: FakeMediaAnalyticsClient(); + + FakeMediaAnalyticsClient(const FakeMediaAnalyticsClient&) = delete; + FakeMediaAnalyticsClient& operator=(const FakeMediaAnalyticsClient&) = delete; + ~FakeMediaAnalyticsClient() override; // Checks that a FakeMediaAnalyticsClient instance was initialized and returns @@ -75,8 +79,6 @@ bool process_running_; base::WeakPtrFactory<FakeMediaAnalyticsClient> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeMediaAnalyticsClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/media_analytics/media_analytics_client.cc b/chromeos/dbus/media_analytics/media_analytics_client.cc index 5170e18..be919a4 100644 --- a/chromeos/dbus/media_analytics/media_analytics_client.cc +++ b/chromeos/dbus/media_analytics/media_analytics_client.cc
@@ -32,6 +32,9 @@ public: MediaAnalyticsClientImpl() = default; + MediaAnalyticsClientImpl(const MediaAnalyticsClientImpl&) = delete; + MediaAnalyticsClientImpl& operator=(const MediaAnalyticsClientImpl&) = delete; + ~MediaAnalyticsClientImpl() override = default; void AddObserver(Observer* observer) override { @@ -174,8 +177,6 @@ dbus::ObjectProxy* dbus_proxy_ = nullptr; base::ObserverList<Observer>::Unchecked observer_list_; base::WeakPtrFactory<MediaAnalyticsClientImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(MediaAnalyticsClientImpl); }; MediaAnalyticsClient::MediaAnalyticsClient() {
diff --git a/chromeos/dbus/native_timer_unittest.cc b/chromeos/dbus/native_timer_unittest.cc index e8df6399..6e642f6 100644 --- a/chromeos/dbus/native_timer_unittest.cc +++ b/chromeos/dbus/native_timer_unittest.cc
@@ -22,6 +22,9 @@ : task_environment_(base::test::TaskEnvironment::MainThreadType::IO, base::test::TaskEnvironment::TimeSource::MOCK_TIME) {} + NativeTimerTest(const NativeTimerTest&) = delete; + NativeTimerTest& operator=(const NativeTimerTest&) = delete; + ~NativeTimerTest() override = default; // testing::Test: @@ -56,9 +59,6 @@ } base::test::TaskEnvironment task_environment_; - - private: - DISALLOW_COPY_AND_ASSIGN(NativeTimerTest); }; TEST_F(NativeTimerTest, CheckCreateFailure) {
diff --git a/chromeos/dbus/oobe_config/fake_oobe_configuration_client.h b/chromeos/dbus/oobe_config/fake_oobe_configuration_client.h index 62660bf..d300a7f 100644 --- a/chromeos/dbus/oobe_config/fake_oobe_configuration_client.h +++ b/chromeos/dbus/oobe_config/fake_oobe_configuration_client.h
@@ -17,15 +17,17 @@ : public OobeConfigurationClient { public: FakeOobeConfigurationClient(); + + FakeOobeConfigurationClient(const FakeOobeConfigurationClient&) = delete; + FakeOobeConfigurationClient& operator=(const FakeOobeConfigurationClient&) = + delete; + ~FakeOobeConfigurationClient() override; void Init(dbus::Bus* bus) override; // EasyUnlockClient overrides void CheckForOobeConfiguration(ConfigurationCallback callback) override; - - private: - DISALLOW_COPY_AND_ASSIGN(FakeOobeConfigurationClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/oobe_config/oobe_configuration_client.cc b/chromeos/dbus/oobe_config/oobe_configuration_client.cc index f095229..2858a90 100644 --- a/chromeos/dbus/oobe_config/oobe_configuration_client.cc +++ b/chromeos/dbus/oobe_config/oobe_configuration_client.cc
@@ -25,6 +25,10 @@ public: OobeConfigurationClientImpl() {} + OobeConfigurationClientImpl(const OobeConfigurationClientImpl&) = delete; + OobeConfigurationClientImpl& operator=(const OobeConfigurationClientImpl&) = + delete; + ~OobeConfigurationClientImpl() override = default; // OobeConfigurationClient override: @@ -83,8 +87,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<OobeConfigurationClientImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(OobeConfigurationClientImpl); }; // static
diff --git a/chromeos/dbus/oobe_config/oobe_configuration_client.h b/chromeos/dbus/oobe_config/oobe_configuration_client.h index 7ce22fe8..f202232 100644 --- a/chromeos/dbus/oobe_config/oobe_configuration_client.h +++ b/chromeos/dbus/oobe_config/oobe_configuration_client.h
@@ -26,6 +26,9 @@ base::OnceCallback<void(bool has_configuration, const std::string& configuration)>; + OobeConfigurationClient(const OobeConfigurationClient&) = delete; + OobeConfigurationClient& operator=(const OobeConfigurationClient&) = delete; + ~OobeConfigurationClient() override = default; // Factory function. @@ -39,9 +42,6 @@ // Create() should be used instead. OobeConfigurationClient() = default; - - private: - DISALLOW_COPY_AND_ASSIGN(OobeConfigurationClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/permission_broker/fake_permission_broker_client.h b/chromeos/dbus/permission_broker/fake_permission_broker_client.h index ffa9cdb..cff0675d 100644 --- a/chromeos/dbus/permission_broker/fake_permission_broker_client.h +++ b/chromeos/dbus/permission_broker/fake_permission_broker_client.h
@@ -21,6 +21,11 @@ : public PermissionBrokerClient { public: FakePermissionBrokerClient(); + + FakePermissionBrokerClient(const FakePermissionBrokerClient&) = delete; + FakePermissionBrokerClient& operator=(const FakePermissionBrokerClient&) = + delete; + ~FakePermissionBrokerClient() override; // Checks that a fake instance was initialized and returns it. @@ -104,8 +109,6 @@ RuleSet tcp_deny_rule_set_; RuleSet udp_deny_rule_set_; - - DISALLOW_COPY_AND_ASSIGN(FakePermissionBrokerClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/permission_broker/permission_broker_client.cc b/chromeos/dbus/permission_broker/permission_broker_client.cc index 2d724f9..b848cf82 100644 --- a/chromeos/dbus/permission_broker/permission_broker_client.cc +++ b/chromeos/dbus/permission_broker/permission_broker_client.cc
@@ -45,6 +45,11 @@ class PermissionBrokerClientImpl : public PermissionBrokerClient { public: PermissionBrokerClientImpl() = default; + + PermissionBrokerClientImpl(const PermissionBrokerClientImpl&) = delete; + PermissionBrokerClientImpl& operator=(const PermissionBrokerClientImpl&) = + delete; + ~PermissionBrokerClientImpl() override = default; void CheckPathAccess(const std::string& path, @@ -268,8 +273,6 @@ // first, invalidating its weak pointers, before the other members are // destroyed. base::WeakPtrFactory<PermissionBrokerClientImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PermissionBrokerClientImpl); }; PermissionBrokerClient::PermissionBrokerClient() {
diff --git a/chromeos/dbus/pipe_reader.h b/chromeos/dbus/pipe_reader.h index b43a0c9..9ba08207 100644 --- a/chromeos/dbus/pipe_reader.h +++ b/chromeos/dbus/pipe_reader.h
@@ -41,6 +41,10 @@ base::OnceCallback<void(absl::optional<std::string> data)>; explicit PipeReader(const scoped_refptr<base::TaskRunner>& task_runner); + + PipeReader(const PipeReader&) = delete; + PipeReader& operator=(const PipeReader&) = delete; + ~PipeReader(); // Starts data collection. @@ -68,8 +72,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<PipeReader> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PipeReader); }; } // namespace chromeos
diff --git a/chromeos/dbus/power/fake_power_manager_client.h b/chromeos/dbus/power/fake_power_manager_client.h index 22f4eb3d..ed4e38a 100644 --- a/chromeos/dbus/power/fake_power_manager_client.h +++ b/chromeos/dbus/power/fake_power_manager_client.h
@@ -40,6 +40,10 @@ : public PowerManagerClient { public: FakePowerManagerClient(); + + FakePowerManagerClient(const FakePowerManagerClient&) = delete; + FakePowerManagerClient& operator=(const FakePowerManagerClient&) = delete; + ~FakePowerManagerClient() override; // Checks that FakePowerManagerClient was initialized and returns it. @@ -326,8 +330,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<FakePowerManagerClient> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakePowerManagerClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/power/fake_power_manager_client_unittest.cc b/chromeos/dbus/power/fake_power_manager_client_unittest.cc index 6b598db..01857a2 100644 --- a/chromeos/dbus/power/fake_power_manager_client_unittest.cc +++ b/chromeos/dbus/power/fake_power_manager_client_unittest.cc
@@ -22,6 +22,10 @@ class TestObserver : public PowerManagerClient::Observer { public: TestObserver() : num_power_changed_(0) {} + + TestObserver(const TestObserver&) = delete; + TestObserver& operator=(const TestObserver&) = delete; + ~TestObserver() override = default; const power_manager::PowerSupplyProperties& props() const { return props_; } @@ -38,8 +42,6 @@ private: int num_power_changed_; power_manager::PowerSupplyProperties props_; - - DISALLOW_COPY_AND_ASSIGN(TestObserver); }; void SetTestProperties(power_manager::PowerSupplyProperties* props) {
diff --git a/chromeos/dbus/power/native_timer.h b/chromeos/dbus/power/native_timer.h index 14bcab7..0bcb201 100644 --- a/chromeos/dbus/power/native_timer.h +++ b/chromeos/dbus/power/native_timer.h
@@ -31,6 +31,9 @@ public: explicit NativeTimer(const std::string& tag); + NativeTimer(const NativeTimer&) = delete; + NativeTimer& operator=(const NativeTimer&) = delete; + ~NativeTimer(); // Starts a timer to expire at |absolute_expiration_time|. Runs @@ -93,8 +96,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<NativeTimer> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(NativeTimer); }; } // namespace chromeos
diff --git a/chromeos/dbus/power/power_manager_client.cc b/chromeos/dbus/power/power_manager_client.cc index bb6207b..5c7dda9 100644 --- a/chromeos/dbus/power/power_manager_client.cc +++ b/chromeos/dbus/power/power_manager_client.cc
@@ -171,6 +171,9 @@ PowerManagerClientImpl() : origin_thread_id_(base::PlatformThread::CurrentId()) {} + PowerManagerClientImpl(const PowerManagerClientImpl&) = delete; + PowerManagerClientImpl& operator=(const PowerManagerClientImpl&) = delete; + ~PowerManagerClientImpl() override { // Here we should unregister suspend notifications from powerd, // however: @@ -1385,8 +1388,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<PowerManagerClientImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PowerManagerClientImpl); }; PowerManagerClient::PowerManagerClient() {
diff --git a/chromeos/dbus/power/power_manager_client.h b/chromeos/dbus/power/power_manager_client.h index 4c4e447..2e4a757b 100644 --- a/chromeos/dbus/power/power_manager_client.h +++ b/chromeos/dbus/power/power_manager_client.h
@@ -370,6 +370,10 @@ DBusMethodCallback<bool> callback) = 0; PowerManagerClient(); + + PowerManagerClient(const PowerManagerClient&) = delete; + PowerManagerClient& operator=(const PowerManagerClient&) = delete; + virtual ~PowerManagerClient(); // Creates and initializes the global instance. |bus| must not be null. @@ -383,9 +387,6 @@ // Returns the global instance if initialized. May return null. static PowerManagerClient* Get(); - - private: - DISALLOW_COPY_AND_ASSIGN(PowerManagerClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/power/power_manager_client_unittest.cc b/chromeos/dbus/power/power_manager_client_unittest.cc index 4a82fe0..f01953b1 100644 --- a/chromeos/dbus/power/power_manager_client_unittest.cc +++ b/chromeos/dbus/power/power_manager_client_unittest.cc
@@ -91,6 +91,10 @@ explicit TestObserver(PowerManagerClient* client) : client_(client) { client_->AddObserver(this); } + + TestObserver(const TestObserver&) = delete; + TestObserver& operator=(const TestObserver&) = delete; + ~TestObserver() override { client_->RemoveObserver(this); } int num_suspend_imminent() const { return num_suspend_imminent_; } @@ -168,7 +172,6 @@ // Ambient color temperature int32_t ambient_color_temperature_ = 0; - DISALLOW_COPY_AND_ASSIGN(TestObserver); }; // Stub implementation of PowerManagerClient::RenderProcessManagerDelegate. @@ -177,6 +180,10 @@ explicit TestDelegate(PowerManagerClient* client) { client->SetRenderProcessManagerDelegate(weak_ptr_factory_.GetWeakPtr()); } + + TestDelegate(const TestDelegate&) = delete; + TestDelegate& operator=(const TestDelegate&) = delete; + ~TestDelegate() override = default; int num_suspend_imminent() const { return num_suspend_imminent_; } @@ -192,8 +199,6 @@ int num_suspend_done_ = 0; base::WeakPtrFactory<TestDelegate> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(TestDelegate); }; // Local implementation of base::test::PowerMonitorTestObserver to add callback @@ -225,6 +230,10 @@ class PowerManagerClientTest : public testing::Test { public: PowerManagerClientTest() = default; + + PowerManagerClientTest(const PowerManagerClientTest&) = delete; + PowerManagerClientTest& operator=(const PowerManagerClientTest&) = delete; + ~PowerManagerClientTest() override = default; void SetUp() override { @@ -392,8 +401,6 @@ FROM_HERE, base::BindOnce(&RunResponseCallback, std::move(*callback), std::move(response))); } - - DISALLOW_COPY_AND_ASSIGN(PowerManagerClientTest); }; // Tests that suspend readiness is reported immediately when there are no
diff --git a/chromeos/dbus/power/power_policy_controller_unittest.cc b/chromeos/dbus/power/power_policy_controller_unittest.cc index bf22809..d237a1f 100644 --- a/chromeos/dbus/power/power_policy_controller_unittest.cc +++ b/chromeos/dbus/power/power_policy_controller_unittest.cc
@@ -17,6 +17,11 @@ class PowerPolicyControllerTest : public testing::Test { public: PowerPolicyControllerTest() = default; + + PowerPolicyControllerTest(const PowerPolicyControllerTest&) = delete; + PowerPolicyControllerTest& operator=(const PowerPolicyControllerTest&) = + delete; + ~PowerPolicyControllerTest() override = default; void SetUp() override { @@ -39,9 +44,6 @@ PowerPolicyController* policy_controller_; base::test::SingleThreadTaskEnvironment task_environment_; - - private: - DISALLOW_COPY_AND_ASSIGN(PowerPolicyControllerTest); }; TEST_F(PowerPolicyControllerTest, Prefs) {
diff --git a/chromeos/dbus/runtime_probe/fake_runtime_probe_client.h b/chromeos/dbus/runtime_probe/fake_runtime_probe_client.h index 6bdefc2..2aa9bf6a 100644 --- a/chromeos/dbus/runtime_probe/fake_runtime_probe_client.h +++ b/chromeos/dbus/runtime_probe/fake_runtime_probe_client.h
@@ -18,6 +18,10 @@ : public RuntimeProbeClient { public: FakeRuntimeProbeClient(); + + FakeRuntimeProbeClient(const FakeRuntimeProbeClient&) = delete; + FakeRuntimeProbeClient& operator=(const FakeRuntimeProbeClient&) = delete; + ~FakeRuntimeProbeClient() override; // RuntimeProbeClient overrides: @@ -36,8 +40,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<FakeRuntimeProbeClient> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeRuntimeProbeClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/runtime_probe/runtime_probe_client.cc b/chromeos/dbus/runtime_probe/runtime_probe_client.cc index 9e6738d..125e46b 100644 --- a/chromeos/dbus/runtime_probe/runtime_probe_client.cc +++ b/chromeos/dbus/runtime_probe/runtime_probe_client.cc
@@ -23,6 +23,9 @@ public: RuntimeProbeClientImpl() {} + RuntimeProbeClientImpl(const RuntimeProbeClientImpl&) = delete; + RuntimeProbeClientImpl& operator=(const RuntimeProbeClientImpl&) = delete; + ~RuntimeProbeClientImpl() override = default; // RuntimeProbeClient override: @@ -76,8 +79,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<RuntimeProbeClientImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(RuntimeProbeClientImpl); }; RuntimeProbeClient::RuntimeProbeClient() = default;
diff --git a/chromeos/dbus/runtime_probe/runtime_probe_client.h b/chromeos/dbus/runtime_probe/runtime_probe_client.h index a463303..e6879b7 100644 --- a/chromeos/dbus/runtime_probe/runtime_probe_client.h +++ b/chromeos/dbus/runtime_probe/runtime_probe_client.h
@@ -25,6 +25,9 @@ // Creates an instance of RuntimeProbeClient. static std::unique_ptr<RuntimeProbeClient> Create(); + RuntimeProbeClient(const RuntimeProbeClient&) = delete; + RuntimeProbeClient& operator=(const RuntimeProbeClient&) = delete; + ~RuntimeProbeClient() override; // Probes categories. @@ -34,9 +37,6 @@ protected: // Create() should be used instead. RuntimeProbeClient(); - - private: - DISALLOW_COPY_AND_ASSIGN(RuntimeProbeClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/seneschal/seneschal_client.cc b/chromeos/dbus/seneschal/seneschal_client.cc index 45da71aa..0133333 100644 --- a/chromeos/dbus/seneschal/seneschal_client.cc +++ b/chromeos/dbus/seneschal/seneschal_client.cc
@@ -29,6 +29,9 @@ public: SeneschalClientImpl() = default; + SeneschalClientImpl(const SeneschalClientImpl&) = delete; + SeneschalClientImpl& operator=(const SeneschalClientImpl&) = delete; + ~SeneschalClientImpl() override = default; void AddObserver(Observer* observer) override { @@ -135,8 +138,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<SeneschalClientImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SeneschalClientImpl); }; SeneschalClient::SeneschalClient() {
diff --git a/chromeos/dbus/seneschal/seneschal_client.h b/chromeos/dbus/seneschal/seneschal_client.h index 0fa0b49b..120dca7 100644 --- a/chromeos/dbus/seneschal/seneschal_client.h +++ b/chromeos/dbus/seneschal/seneschal_client.h
@@ -32,6 +32,9 @@ // Removes an observer if added. virtual void RemoveObserver(Observer* observer) = 0; + SeneschalClient(const SeneschalClient&) = delete; + SeneschalClient& operator=(const SeneschalClient&) = delete; + ~SeneschalClient() override; // Factory function, creates a new instance and returns ownership. @@ -74,9 +77,6 @@ protected: // Initialize() should be used instead. SeneschalClient(); - - private: - DISALLOW_COPY_AND_ASSIGN(SeneschalClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/services/cros_dbus_service.cc b/chromeos/dbus/services/cros_dbus_service.cc index 2a84742..001240f 100644 --- a/chromeos/dbus/services/cros_dbus_service.cc +++ b/chromeos/dbus/services/cros_dbus_service.cc
@@ -36,6 +36,9 @@ DCHECK(object_path_.IsValid()); } + CrosDBusServiceImpl(const CrosDBusServiceImpl&) = delete; + CrosDBusServiceImpl& operator=(const CrosDBusServiceImpl&) = delete; + ~CrosDBusServiceImpl() override = default; // Starts the D-Bus service. @@ -88,8 +91,6 @@ // Service providers that form CrosDBusService. ServiceProviderList service_providers_; - - DISALLOW_COPY_AND_ASSIGN(CrosDBusServiceImpl); }; // The stub CrosDBusService implementation used on Linux desktop, @@ -97,10 +98,11 @@ class CrosDBusServiceStubImpl : public CrosDBusService { public: CrosDBusServiceStubImpl() = default; - ~CrosDBusServiceStubImpl() override = default; - private: - DISALLOW_COPY_AND_ASSIGN(CrosDBusServiceStubImpl); + CrosDBusServiceStubImpl(const CrosDBusServiceStubImpl&) = delete; + CrosDBusServiceStubImpl& operator=(const CrosDBusServiceStubImpl&) = delete; + + ~CrosDBusServiceStubImpl() override = default; }; // static
diff --git a/chromeos/dbus/services/cros_dbus_service.h b/chromeos/dbus/services/cros_dbus_service.h index 1ea51c1f..a912c63 100644 --- a/chromeos/dbus/services/cros_dbus_service.h +++ b/chromeos/dbus/services/cros_dbus_service.h
@@ -55,6 +55,9 @@ static ServiceProviderList CreateServiceProviderList( std::unique_ptr<ServiceProviderInterface> provider); + CrosDBusService(const CrosDBusService&) = delete; + CrosDBusService& operator=(const CrosDBusService&) = delete; + virtual ~CrosDBusService(); protected: @@ -71,8 +74,6 @@ const std::string& service_name, const dbus::ObjectPath& object_path, ServiceProviderList service_providers); - - DISALLOW_COPY_AND_ASSIGN(CrosDBusService); }; } // namespace chromeos
diff --git a/chromeos/dbus/session_manager/fake_session_manager_client.h b/chromeos/dbus/session_manager/fake_session_manager_client.h index 17e1e7d..cae47e5 100644 --- a/chromeos/dbus/session_manager/fake_session_manager_client.h +++ b/chromeos/dbus/session_manager/fake_session_manager_client.h
@@ -46,6 +46,9 @@ explicit FakeSessionManagerClient(PolicyStorageType policy_storage); + FakeSessionManagerClient(const FakeSessionManagerClient&) = delete; + FakeSessionManagerClient& operator=(const FakeSessionManagerClient&) = delete; + ~FakeSessionManagerClient() override; // Returns the fake global instance if initialized. May return null. @@ -390,7 +393,6 @@ absl::optional<std::string> primary_user_id_; base::WeakPtrFactory<FakeSessionManagerClient> weak_ptr_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(FakeSessionManagerClient); }; class COMPONENT_EXPORT(SESSION_MANAGER) ScopedFakeSessionManagerClient {
diff --git a/chromeos/dbus/session_manager/session_manager_client.cc b/chromeos/dbus/session_manager/session_manager_client.cc index 690540a..912b4564 100644 --- a/chromeos/dbus/session_manager/session_manager_client.cc +++ b/chromeos/dbus/session_manager/session_manager_client.cc
@@ -166,6 +166,10 @@ class SessionManagerClientImpl : public SessionManagerClient { public: SessionManagerClientImpl() = default; + + SessionManagerClientImpl(const SessionManagerClientImpl&) = delete; + SessionManagerClientImpl& operator=(const SessionManagerClientImpl&) = delete; + ~SessionManagerClientImpl() override = default; // SessionManagerClient overrides: @@ -1100,8 +1104,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<SessionManagerClientImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SessionManagerClientImpl); }; SessionManagerClient::SessionManagerClient() {
diff --git a/chromeos/dbus/shill/fake_modem_messaging_client.h b/chromeos/dbus/shill/fake_modem_messaging_client.h index e3aeebd..ae75dedd 100644 --- a/chromeos/dbus/shill/fake_modem_messaging_client.h +++ b/chromeos/dbus/shill/fake_modem_messaging_client.h
@@ -21,6 +21,10 @@ public ModemMessagingClient::TestInterface { public: FakeModemMessagingClient(); + + FakeModemMessagingClient(const FakeModemMessagingClient&) = delete; + FakeModemMessagingClient& operator=(const FakeModemMessagingClient&) = delete; + ~FakeModemMessagingClient() override; void SetSmsReceivedHandler(const std::string& service_name, @@ -45,8 +49,6 @@ private: std::map<dbus::ObjectPath, SmsReceivedHandler> sms_received_handlers_; std::map<dbus::ObjectPath, std::vector<dbus::ObjectPath>> message_paths_map_; - - DISALLOW_COPY_AND_ASSIGN(FakeModemMessagingClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/shill/fake_shill_device_client.h b/chromeos/dbus/shill/fake_shill_device_client.h index d88c3ad..a7377e3 100644 --- a/chromeos/dbus/shill/fake_shill_device_client.h +++ b/chromeos/dbus/shill/fake_shill_device_client.h
@@ -26,6 +26,10 @@ public ShillDeviceClient::TestInterface { public: FakeShillDeviceClient(); + + FakeShillDeviceClient(const FakeShillDeviceClient&) = delete; + FakeShillDeviceClient& operator=(const FakeShillDeviceClient&) = delete; + ~FakeShillDeviceClient() override; // ShillDeviceClient overrides @@ -166,8 +170,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<FakeShillDeviceClient> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeShillDeviceClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/shill/fake_shill_ipconfig_client.h b/chromeos/dbus/shill/fake_shill_ipconfig_client.h index 9b7df20..1437570 100644 --- a/chromeos/dbus/shill/fake_shill_ipconfig_client.h +++ b/chromeos/dbus/shill/fake_shill_ipconfig_client.h
@@ -20,6 +20,10 @@ public ShillIPConfigClient::TestInterface { public: FakeShillIPConfigClient(); + + FakeShillIPConfigClient(const FakeShillIPConfigClient&) = delete; + FakeShillIPConfigClient& operator=(const FakeShillIPConfigClient&) = delete; + ~FakeShillIPConfigClient() override; // ShillIPConfigClient overrides @@ -53,8 +57,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<FakeShillIPConfigClient> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeShillIPConfigClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/shill/fake_shill_manager_client.h b/chromeos/dbus/shill/fake_shill_manager_client.h index 0cca1ec3..a3014afd 100644 --- a/chromeos/dbus/shill/fake_shill_manager_client.h +++ b/chromeos/dbus/shill/fake_shill_manager_client.h
@@ -25,6 +25,10 @@ public ShillManagerClient::TestInterface { public: FakeShillManagerClient(); + + FakeShillManagerClient(const FakeShillManagerClient&) = delete; + FakeShillManagerClient& operator=(const FakeShillManagerClient&) = delete; + ~FakeShillManagerClient() override; // ShillManagerClient overrides @@ -168,8 +172,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<FakeShillManagerClient> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeShillManagerClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/shill/fake_shill_profile_client.h b/chromeos/dbus/shill/fake_shill_profile_client.h index cdd92e7..0c026142 100644 --- a/chromeos/dbus/shill/fake_shill_profile_client.h +++ b/chromeos/dbus/shill/fake_shill_profile_client.h
@@ -22,6 +22,10 @@ public ShillProfileClient::TestInterface { public: FakeShillProfileClient(); + + FakeShillProfileClient(const FakeShillProfileClient&) = delete; + FakeShillProfileClient& operator=(const FakeShillProfileClient&) = delete; + ~FakeShillProfileClient() override; // ShillProfileClient overrides @@ -91,8 +95,6 @@ FakeShillSimulatedResult simulate_delete_result_ = FakeShillSimulatedResult::kSuccess; - - DISALLOW_COPY_AND_ASSIGN(FakeShillProfileClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/shill/fake_shill_service_client.h b/chromeos/dbus/shill/fake_shill_service_client.h index 120824b..a9921db4 100644 --- a/chromeos/dbus/shill/fake_shill_service_client.h +++ b/chromeos/dbus/shill/fake_shill_service_client.h
@@ -27,6 +27,10 @@ public ShillServiceClient::TestInterface { public: FakeShillServiceClient(); + + FakeShillServiceClient(const FakeShillServiceClient&) = delete; + FakeShillServiceClient& operator=(const FakeShillServiceClient&) = delete; + ~FakeShillServiceClient() override; // ShillServiceClient overrides @@ -170,8 +174,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<FakeShillServiceClient> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeShillServiceClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/shill/fake_shill_third_party_vpn_driver_client.h b/chromeos/dbus/shill/fake_shill_third_party_vpn_driver_client.h index 2874866..d7d7f06 100644 --- a/chromeos/dbus/shill/fake_shill_third_party_vpn_driver_client.h +++ b/chromeos/dbus/shill/fake_shill_third_party_vpn_driver_client.h
@@ -26,6 +26,12 @@ public ShillThirdPartyVpnDriverClient::TestInterface { public: FakeShillThirdPartyVpnDriverClient(); + + FakeShillThirdPartyVpnDriverClient( + const FakeShillThirdPartyVpnDriverClient&) = delete; + FakeShillThirdPartyVpnDriverClient& operator=( + const FakeShillThirdPartyVpnDriverClient&) = delete; + ~FakeShillThirdPartyVpnDriverClient() override; // ShillThirdPartyVpnDriverClient overrides @@ -58,8 +64,6 @@ using ObserverMap = std::map<std::string, ShillThirdPartyVpnObserver*>; ObserverMap observer_map_; - - DISALLOW_COPY_AND_ASSIGN(FakeShillThirdPartyVpnDriverClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/shill/fake_sms_client.h b/chromeos/dbus/shill/fake_sms_client.h index 54a32b2b..f5ca21af 100644 --- a/chromeos/dbus/shill/fake_sms_client.h +++ b/chromeos/dbus/shill/fake_sms_client.h
@@ -15,15 +15,16 @@ class FakeSMSClient : public SMSClient { public: FakeSMSClient(); + + FakeSMSClient(const FakeSMSClient&) = delete; + FakeSMSClient& operator=(const FakeSMSClient&) = delete; + ~FakeSMSClient() override; // SMSClient overrides. void GetAll(const std::string& service_name, const dbus::ObjectPath& object_path, GetAllCallback callback) override; - - private: - DISALLOW_COPY_AND_ASSIGN(FakeSMSClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/shill/modem_messaging_client.cc b/chromeos/dbus/shill/modem_messaging_client.cc index 7458d12..106f914 100644 --- a/chromeos/dbus/shill/modem_messaging_client.cc +++ b/chromeos/dbus/shill/modem_messaging_client.cc
@@ -45,6 +45,10 @@ base::BindOnce(&ModemMessagingProxy::OnSignalConnected, weak_ptr_factory_.GetWeakPtr())); } + + ModemMessagingProxy(const ModemMessagingProxy&) = delete; + ModemMessagingProxy& operator=(const ModemMessagingProxy&) = delete; + virtual ~ModemMessagingProxy() = default; // Sets SmsReceived signal handler. @@ -130,14 +134,16 @@ // 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<ModemMessagingProxy> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ModemMessagingProxy); }; class COMPONENT_EXPORT(CHROMEOS_DBUS) ModemMessagingClientImpl : public ModemMessagingClient { public: explicit ModemMessagingClientImpl(dbus::Bus* bus) : bus_(bus) {} + + ModemMessagingClientImpl(const ModemMessagingClientImpl&) = delete; + ModemMessagingClientImpl& operator=(const ModemMessagingClientImpl&) = delete; + ~ModemMessagingClientImpl() override = default; void SetSmsReceivedHandler(const std::string& service_name, @@ -188,8 +194,6 @@ dbus::Bus* bus_; ProxyMap proxies_; - - DISALLOW_COPY_AND_ASSIGN(ModemMessagingClientImpl); }; } // namespace
diff --git a/chromeos/dbus/shill/shill_client_helper.h b/chromeos/dbus/shill/shill_client_helper.h index d5077c64..7b03cd0 100644 --- a/chromeos/dbus/shill/shill_client_helper.h +++ b/chromeos/dbus/shill/shill_client_helper.h
@@ -57,6 +57,9 @@ explicit ShillClientHelper(dbus::ObjectProxy* proxy); + ShillClientHelper(const ShillClientHelper&) = delete; + ShillClientHelper& operator=(const ShillClientHelper&) = delete; + virtual ~ShillClientHelper(); // Sets |released_callback_|. This is optional and should only be called at @@ -160,8 +163,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<ShillClientHelper> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ShillClientHelper); }; } // namespace chromeos
diff --git a/chromeos/dbus/shill/shill_device_client.cc b/chromeos/dbus/shill/shill_device_client.cc index 21813de0..e0c80e5 100644 --- a/chromeos/dbus/shill/shill_device_client.cc +++ b/chromeos/dbus/shill/shill_device_client.cc
@@ -32,6 +32,9 @@ public: explicit ShillDeviceClientImpl(dbus::Bus* bus) : bus_(bus) {} + ShillDeviceClientImpl(const ShillDeviceClientImpl&) = delete; + ShillDeviceClientImpl& operator=(const ShillDeviceClientImpl&) = delete; + ~ShillDeviceClientImpl() override { for (HelperMap::iterator iter = helpers_.begin(); iter != helpers_.end(); ++iter) { @@ -214,8 +217,6 @@ dbus::Bus* bus_; HelperMap helpers_; - - DISALLOW_COPY_AND_ASSIGN(ShillDeviceClientImpl); }; } // namespace
diff --git a/chromeos/dbus/shill/shill_ipconfig_client.cc b/chromeos/dbus/shill/shill_ipconfig_client.cc index 4b20809f..d18f481 100644 --- a/chromeos/dbus/shill/shill_ipconfig_client.cc +++ b/chromeos/dbus/shill/shill_ipconfig_client.cc
@@ -31,6 +31,10 @@ class ShillIPConfigClientImpl : public ShillIPConfigClient { public: explicit ShillIPConfigClientImpl(dbus::Bus* bus) : bus_(bus) {} + + ShillIPConfigClientImpl(const ShillIPConfigClientImpl&) = delete; + ShillIPConfigClientImpl& operator=(const ShillIPConfigClientImpl&) = delete; + ~ShillIPConfigClientImpl() override = default; //////////////////////////////////// @@ -81,8 +85,6 @@ dbus::Bus* bus_; HelperMap helpers_; - - DISALLOW_COPY_AND_ASSIGN(ShillIPConfigClientImpl); }; void ShillIPConfigClientImpl::GetProperties(
diff --git a/chromeos/dbus/shill/shill_manager_client.cc b/chromeos/dbus/shill/shill_manager_client.cc index 96b84e0..e58aacd 100644 --- a/chromeos/dbus/shill/shill_manager_client.cc +++ b/chromeos/dbus/shill/shill_manager_client.cc
@@ -31,6 +31,10 @@ class ShillManagerClientImpl : public ShillManagerClient { public: ShillManagerClientImpl() = default; + + ShillManagerClientImpl(const ShillManagerClientImpl&) = delete; + ShillManagerClientImpl& operator=(const ShillManagerClientImpl&) = delete; + ~ShillManagerClientImpl() override = default; //////////////////////////////////// @@ -197,8 +201,6 @@ dbus::ObjectProxy* proxy_ = nullptr; std::unique_ptr<ShillClientHelper> helper_; - - DISALLOW_COPY_AND_ASSIGN(ShillManagerClientImpl); }; } // namespace
diff --git a/chromeos/dbus/shill/shill_profile_client.cc b/chromeos/dbus/shill/shill_profile_client.cc index 05d7b31..b42a178 100644 --- a/chromeos/dbus/shill/shill_profile_client.cc +++ b/chromeos/dbus/shill/shill_profile_client.cc
@@ -30,6 +30,10 @@ class ShillProfileClientImpl : public ShillProfileClient { public: explicit ShillProfileClientImpl(dbus::Bus* bus) : bus_(bus) {} + + ShillProfileClientImpl(const ShillProfileClientImpl&) = delete; + ShillProfileClientImpl& operator=(const ShillProfileClientImpl&) = delete; + ~ShillProfileClientImpl() override = default; void AddPropertyChangedObserver( @@ -76,8 +80,6 @@ dbus::Bus* bus_; HelperMap helpers_; - - DISALLOW_COPY_AND_ASSIGN(ShillProfileClientImpl); }; ShillClientHelper* ShillProfileClientImpl::GetHelper(
diff --git a/chromeos/dbus/shill/shill_service_client.cc b/chromeos/dbus/shill/shill_service_client.cc index e479c27..65f0c62 100644 --- a/chromeos/dbus/shill/shill_service_client.cc +++ b/chromeos/dbus/shill/shill_service_client.cc
@@ -57,6 +57,9 @@ public: explicit ShillServiceClientImpl(dbus::Bus* bus) : bus_(bus) {} + ShillServiceClientImpl(const ShillServiceClientImpl&) = delete; + ShillServiceClientImpl& operator=(const ShillServiceClientImpl&) = delete; + ~ShillServiceClientImpl() override { for (HelperMap::iterator iter = helpers_.begin(); iter != helpers_.end(); ++iter) { @@ -302,8 +305,6 @@ dbus::Bus* bus_; HelperMap helpers_; base::WeakPtrFactory<ShillServiceClientImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ShillServiceClientImpl); }; } // namespace
diff --git a/chromeos/dbus/shill/shill_third_party_vpn_driver_client.cc b/chromeos/dbus/shill/shill_third_party_vpn_driver_client.cc index 23d79e3..154d562 100644 --- a/chromeos/dbus/shill/shill_third_party_vpn_driver_client.cc +++ b/chromeos/dbus/shill/shill_third_party_vpn_driver_client.cc
@@ -44,6 +44,12 @@ : public ShillThirdPartyVpnDriverClient { public: explicit ShillThirdPartyVpnDriverClientImpl(dbus::Bus* bus); + + ShillThirdPartyVpnDriverClientImpl( + const ShillThirdPartyVpnDriverClientImpl&) = delete; + ShillThirdPartyVpnDriverClientImpl& operator=( + const ShillThirdPartyVpnDriverClientImpl&) = delete; + ~ShillThirdPartyVpnDriverClientImpl() override; // ShillThirdPartyVpnDriverClient overrides @@ -121,8 +127,6 @@ dbus::Bus* bus_; HelperMap helpers_; std::set<std::string> valid_keys_; - - DISALLOW_COPY_AND_ASSIGN(ShillThirdPartyVpnDriverClientImpl); }; ShillThirdPartyVpnDriverClientImpl::HelperInfo::HelperInfo(
diff --git a/chromeos/dbus/shill/sms_client.cc b/chromeos/dbus/shill/sms_client.cc index 4654098d..8dcf9de 100644 --- a/chromeos/dbus/shill/sms_client.cc +++ b/chromeos/dbus/shill/sms_client.cc
@@ -45,6 +45,9 @@ property_set_->Get(&state_, dbus::PropertySet::GetCallback()); } + SMSReceiveHandler(const SMSReceiveHandler&) = delete; + SMSReceiveHandler& operator=(const SMSReceiveHandler&) = delete; + ~SMSReceiveHandler() = default; private: @@ -91,8 +94,6 @@ dbus::Property<std::string> timestamp_; std::unique_ptr<dbus::PropertySet> property_set_; base::WeakPtrFactory<SMSReceiveHandler> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SMSReceiveHandler); }; // SMSClient is used to communicate with the @@ -102,6 +103,10 @@ class SMSClientImpl : public SMSClient { public: explicit SMSClientImpl(dbus::Bus* bus) : bus_(bus) {} + + SMSClientImpl(const SMSClientImpl&) = delete; + SMSClientImpl& operator=(const SMSClientImpl&) = delete; + ~SMSClientImpl() override = default; // Calls GetAll method. |callback| is called after the method call succeeds. @@ -131,8 +136,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<SMSClientImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SMSClientImpl); }; } // namespace
diff --git a/chromeos/dbus/smbprovider/fake_smb_provider_client.h b/chromeos/dbus/smbprovider/fake_smb_provider_client.h index c85d223..42d5a434 100644 --- a/chromeos/dbus/smbprovider/fake_smb_provider_client.h +++ b/chromeos/dbus/smbprovider/fake_smb_provider_client.h
@@ -21,6 +21,10 @@ public: FakeSmbProviderClient(); explicit FakeSmbProviderClient(bool should_run_synchronously); + + FakeSmbProviderClient(const FakeSmbProviderClient&) = delete; + FakeSmbProviderClient& operator=(const FakeSmbProviderClient&) = delete; + ~FakeSmbProviderClient() override; // Adds an entry in the |netbios_parse_results_| map for <packetid, @@ -74,8 +78,6 @@ // Mapping of a server url to its shares. std::map<std::string, ShareResult> shares_; - - DISALLOW_COPY_AND_ASSIGN(FakeSmbProviderClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/smbprovider/smb_provider_client.cc b/chromeos/dbus/smbprovider/smb_provider_client.cc index f4d4ee0..b1a27f53 100644 --- a/chromeos/dbus/smbprovider/smb_provider_client.cc +++ b/chromeos/dbus/smbprovider/smb_provider_client.cc
@@ -53,6 +53,9 @@ public: SmbProviderClientImpl() = default; + SmbProviderClientImpl(const SmbProviderClientImpl&) = delete; + SmbProviderClientImpl& operator=(const SmbProviderClientImpl&) = delete; + ~SmbProviderClientImpl() override {} void GetShares(const base::FilePath& server_url, @@ -218,8 +221,6 @@ } dbus::ObjectProxy* proxy_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(SmbProviderClientImpl); }; } // namespace
diff --git a/chromeos/dbus/smbprovider/smb_provider_client.h b/chromeos/dbus/smbprovider/smb_provider_client.h index 232fe430..faf4517 100644 --- a/chromeos/dbus/smbprovider/smb_provider_client.h +++ b/chromeos/dbus/smbprovider/smb_provider_client.h
@@ -36,6 +36,9 @@ using ParseNetBiosPacketCallback = base::OnceCallback<void(const std::vector<std::string>&)>; + SmbProviderClient(const SmbProviderClient&) = delete; + SmbProviderClient& operator=(const SmbProviderClient&) = delete; + ~SmbProviderClient() override; // Factory function, creates a new instance and returns ownership. @@ -65,9 +68,6 @@ protected: // Create() should be used instead. SmbProviderClient(); - - private: - DISALLOW_COPY_AND_ASSIGN(SmbProviderClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/system_clock/fake_system_clock_client.h b/chromeos/dbus/system_clock/fake_system_clock_client.h index c14615d2..d1a2038 100644 --- a/chromeos/dbus/system_clock/fake_system_clock_client.h +++ b/chromeos/dbus/system_clock/fake_system_clock_client.h
@@ -21,6 +21,10 @@ public SystemClockClient::TestInterface { public: FakeSystemClockClient(); + + FakeSystemClockClient(const FakeSystemClockClient&) = delete; + FakeSystemClockClient& operator=(const FakeSystemClockClient&) = delete; + ~FakeSystemClockClient() override; // TestInterface @@ -46,8 +50,6 @@ std::vector<dbus::ObjectProxy::WaitForServiceToBeAvailableCallback> callbacks_; base::ObserverList<Observer>::Unchecked observers_; - - DISALLOW_COPY_AND_ASSIGN(FakeSystemClockClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/system_clock/system_clock_client.cc b/chromeos/dbus/system_clock/system_clock_client.cc index f7b4772..42293b8 100644 --- a/chromeos/dbus/system_clock/system_clock_client.cc +++ b/chromeos/dbus/system_clock/system_clock_client.cc
@@ -57,6 +57,9 @@ InitDBus(bus); } + SystemClockClientImpl(const SystemClockClientImpl&) = delete; + SystemClockClientImpl& operator=(const SystemClockClientImpl&) = delete; + ~SystemClockClientImpl() override = default; void AddObserver(Observer* observer) override { @@ -187,8 +190,6 @@ base::ObserverList<Observer>::Unchecked observers_; base::WeakPtrFactory<SystemClockClientImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SystemClockClientImpl); }; SystemClockClient::SystemClockClient() {
diff --git a/chromeos/dbus/update_engine/fake_update_engine_client.h b/chromeos/dbus/update_engine/fake_update_engine_client.h index b5277f89..b15ed35b 100644 --- a/chromeos/dbus/update_engine/fake_update_engine_client.h +++ b/chromeos/dbus/update_engine/fake_update_engine_client.h
@@ -23,6 +23,10 @@ : public UpdateEngineClient { public: FakeUpdateEngineClient(); + + FakeUpdateEngineClient(const FakeUpdateEngineClient&) = delete; + FakeUpdateEngineClient& operator=(const FakeUpdateEngineClient&) = delete; + ~FakeUpdateEngineClient() override; // UpdateEngineClient overrides @@ -115,8 +119,6 @@ int update_over_cellular_permission_count_ = 0; int update_over_cellular_one_time_permission_count_ = 0; base::Time eol_date_; - - DISALLOW_COPY_AND_ASSIGN(FakeUpdateEngineClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/update_engine/update_engine_client.cc b/chromeos/dbus/update_engine/update_engine_client.cc index 5ba441b..bcf9e68 100644 --- a/chromeos/dbus/update_engine/update_engine_client.cc +++ b/chromeos/dbus/update_engine/update_engine_client.cc
@@ -67,6 +67,9 @@ public: UpdateEngineClientImpl() : update_engine_proxy_(nullptr), last_status_() {} + UpdateEngineClientImpl(const UpdateEngineClientImpl&) = delete; + UpdateEngineClientImpl& operator=(const UpdateEngineClientImpl&) = delete; + ~UpdateEngineClientImpl() override = default; // UpdateEngineClient implementation: @@ -505,8 +508,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<UpdateEngineClientImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(UpdateEngineClientImpl); }; // The UpdateEngineClient implementation used on Linux desktop,
diff --git a/chromeos/dbus/update_engine/update_engine_client.h b/chromeos/dbus/update_engine/update_engine_client.h index e2723956..a164355c 100644 --- a/chromeos/dbus/update_engine/update_engine_client.h +++ b/chromeos/dbus/update_engine/update_engine_client.h
@@ -56,6 +56,9 @@ virtual void OnUpdateOverCellularOneTimePermissionGranted() {} }; + UpdateEngineClient(const UpdateEngineClient&) = delete; + UpdateEngineClient& operator=(const UpdateEngineClient&) = delete; + ~UpdateEngineClient() override; // Adds and removes the observer. @@ -165,9 +168,6 @@ protected: // Create() should be used instead. UpdateEngineClient(); - - private: - DISALLOW_COPY_AND_ASSIGN(UpdateEngineClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/upstart/fake_upstart_client.h b/chromeos/dbus/upstart/fake_upstart_client.h index 68b5a9117..01d87a9 100644 --- a/chromeos/dbus/upstart/fake_upstart_client.h +++ b/chromeos/dbus/upstart/fake_upstart_client.h
@@ -20,6 +20,10 @@ const std::vector<std::string>& upstart_env)>; FakeUpstartClient(); + + FakeUpstartClient(const FakeUpstartClient&) = delete; + FakeUpstartClient& operator=(const FakeUpstartClient&) = delete; + ~FakeUpstartClient() override; // Returns the fake global instance if initialized. May return null. @@ -54,8 +58,6 @@ // callbacks decide the result StartJob() or StopJob() returns. StartStopJobCallback start_job_cb_; StartStopJobCallback stop_job_cb_; - - DISALLOW_COPY_AND_ASSIGN(FakeUpstartClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/upstart/upstart_client.cc b/chromeos/dbus/upstart/upstart_client.cc index dfc3155..90c03a2 100644 --- a/chromeos/dbus/upstart/upstart_client.cc +++ b/chromeos/dbus/upstart/upstart_client.cc
@@ -44,6 +44,9 @@ public: explicit UpstartClientImpl(dbus::Bus* bus) : bus_(bus) {} + UpstartClientImpl(const UpstartClientImpl&) = delete; + UpstartClientImpl& operator=(const UpstartClientImpl&) = delete; + ~UpstartClientImpl() override = default; // UpstartClient overrides: @@ -137,8 +140,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<UpstartClientImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(UpstartClientImpl); }; } // namespace
diff --git a/chromeos/dbus/upstart/upstart_client.h b/chromeos/dbus/upstart/upstart_client.h index 26a8a5f..16c2360 100644 --- a/chromeos/dbus/upstart/upstart_client.h +++ b/chromeos/dbus/upstart/upstart_client.h
@@ -24,6 +24,9 @@ // initializes the DBusThreadManager instance. class COMPONENT_EXPORT(UPSTART_CLIENT) UpstartClient { public: + UpstartClient(const UpstartClient&) = delete; + UpstartClient& operator=(const UpstartClient&) = delete; + virtual ~UpstartClient(); // Creates and initializes the global instance. |bus| must not be null. @@ -100,9 +103,6 @@ protected: // Initialize() should be used instead. UpstartClient(); - - private: - DISALLOW_COPY_AND_ASSIGN(UpstartClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/usb/fake_usbguard_client.h b/chromeos/dbus/usb/fake_usbguard_client.h index 0c44725..ddb4589 100644 --- a/chromeos/dbus/usb/fake_usbguard_client.h +++ b/chromeos/dbus/usb/fake_usbguard_client.h
@@ -19,6 +19,10 @@ : public UsbguardClient { public: FakeUsbguardClient(); + + FakeUsbguardClient(const FakeUsbguardClient&) = delete; + FakeUsbguardClient& operator=(const FakeUsbguardClient&) = delete; + ~FakeUsbguardClient() override; // Returns the global instance if initialized. May return null. @@ -40,8 +44,6 @@ private: base::ObserverList<UsbguardObserver> observers_; - - DISALLOW_COPY_AND_ASSIGN(FakeUsbguardClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/usb/usbguard_client.cc b/chromeos/dbus/usb/usbguard_client.cc index bf03b8f..4dd176d 100644 --- a/chromeos/dbus/usb/usbguard_client.cc +++ b/chromeos/dbus/usb/usbguard_client.cc
@@ -26,6 +26,10 @@ class UsbguardClientImpl : public UsbguardClient { public: UsbguardClientImpl() = default; + + UsbguardClientImpl(const UsbguardClientImpl&) = delete; + UsbguardClientImpl& operator=(const UsbguardClientImpl&) = delete; + ~UsbguardClientImpl() override = default; // UsbguardClient: @@ -118,8 +122,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<UsbguardClientImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(UsbguardClientImpl); }; UsbguardClient::UsbguardClient() {
diff --git a/chromeos/dbus/usb/usbguard_client.h b/chromeos/dbus/usb/usbguard_client.h index 145670d..7f231c93 100644 --- a/chromeos/dbus/usb/usbguard_client.h +++ b/chromeos/dbus/usb/usbguard_client.h
@@ -17,6 +17,9 @@ class COMPONENT_EXPORT(CHROMEOS_DBUS) UsbguardClient { public: + UsbguardClient(const UsbguardClient&) = delete; + UsbguardClient& operator=(const UsbguardClient&) = delete; + virtual ~UsbguardClient(); // Creates and initializes the global instance. |bus| must not be null. @@ -41,9 +44,6 @@ protected: // Initialize/Shutdown should be used instead. UsbguardClient(); - - private: - DISALLOW_COPY_AND_ASSIGN(UsbguardClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/virtual_file_provider/fake_virtual_file_provider_client.h b/chromeos/dbus/virtual_file_provider/fake_virtual_file_provider_client.h index 7bd48cbf..ac5cb317 100644 --- a/chromeos/dbus/virtual_file_provider/fake_virtual_file_provider_client.h +++ b/chromeos/dbus/virtual_file_provider/fake_virtual_file_provider_client.h
@@ -18,6 +18,11 @@ FakeVirtualFileProviderClient : public VirtualFileProviderClient { public: FakeVirtualFileProviderClient(); + + FakeVirtualFileProviderClient(const FakeVirtualFileProviderClient&) = delete; + FakeVirtualFileProviderClient& operator=( + const FakeVirtualFileProviderClient&) = delete; + ~FakeVirtualFileProviderClient() override; // DBusClient override. @@ -37,8 +42,6 @@ int64_t expected_size_ = 0; // Expectation for GenerateVirtualFileId. std::string result_id_; // Returned by GenerateVirtualFileId. base::ScopedFD result_fd_; // Returned by OpenFileById. - - DISALLOW_COPY_AND_ASSIGN(FakeVirtualFileProviderClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/virtual_file_provider/virtual_file_provider_client.cc b/chromeos/dbus/virtual_file_provider/virtual_file_provider_client.cc index 171a1b2..ccf58fa 100644 --- a/chromeos/dbus/virtual_file_provider/virtual_file_provider_client.cc +++ b/chromeos/dbus/virtual_file_provider/virtual_file_provider_client.cc
@@ -22,6 +22,11 @@ class VirtualFileProviderClientImpl : public VirtualFileProviderClient { public: VirtualFileProviderClientImpl() {} + + VirtualFileProviderClientImpl(const VirtualFileProviderClientImpl&) = delete; + VirtualFileProviderClientImpl& operator=( + const VirtualFileProviderClientImpl&) = delete; + ~VirtualFileProviderClientImpl() override = default; // VirtualFileProviderClient override: @@ -96,8 +101,6 @@ dbus::ObjectProxy* proxy_ = nullptr; base::WeakPtrFactory<VirtualFileProviderClientImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(VirtualFileProviderClientImpl); }; } // namespace
diff --git a/chromeos/dbus/vm_plugin_dispatcher/fake_vm_plugin_dispatcher_client.h b/chromeos/dbus/vm_plugin_dispatcher/fake_vm_plugin_dispatcher_client.h index 48863e7..3da5764 100644 --- a/chromeos/dbus/vm_plugin_dispatcher/fake_vm_plugin_dispatcher_client.h +++ b/chromeos/dbus/vm_plugin_dispatcher/fake_vm_plugin_dispatcher_client.h
@@ -16,6 +16,11 @@ FakeVmPluginDispatcherClient : public VmPluginDispatcherClient { public: FakeVmPluginDispatcherClient(); + + FakeVmPluginDispatcherClient(const FakeVmPluginDispatcherClient&) = delete; + FakeVmPluginDispatcherClient& operator=(const FakeVmPluginDispatcherClient&) = + delete; + ~FakeVmPluginDispatcherClient() override; void AddObserver(Observer* observer) override; @@ -84,8 +89,6 @@ vm_tools::plugin_dispatcher::ListVmResponse list_vms_response_; base::ObserverList<Observer> observer_list_; - - DISALLOW_COPY_AND_ASSIGN(FakeVmPluginDispatcherClient); }; } // namespace chromeos
diff --git a/chromeos/dbus/vm_plugin_dispatcher/vm_plugin_dispatcher_client.cc b/chromeos/dbus/vm_plugin_dispatcher/vm_plugin_dispatcher_client.cc index 962063d..2bc1ab33 100644 --- a/chromeos/dbus/vm_plugin_dispatcher/vm_plugin_dispatcher_client.cc +++ b/chromeos/dbus/vm_plugin_dispatcher/vm_plugin_dispatcher_client.cc
@@ -25,6 +25,10 @@ public: VmPluginDispatcherClientImpl() {} + VmPluginDispatcherClientImpl(const VmPluginDispatcherClientImpl&) = delete; + VmPluginDispatcherClientImpl& operator=(const VmPluginDispatcherClientImpl&) = + delete; + ~VmPluginDispatcherClientImpl() override = default; void AddObserver(Observer* observer) override { @@ -186,8 +190,6 @@ base::ObserverList<Observer> observer_list_; base::WeakPtrFactory<VmPluginDispatcherClientImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(VmPluginDispatcherClientImpl); }; VmPluginDispatcherClient::VmPluginDispatcherClient() = default;
diff --git a/chromeos/disks/disk.h b/chromeos/disks/disk.h index eba17fac..5d3cb2a 100644 --- a/chromeos/disks/disk.h +++ b/chromeos/disks/disk.h
@@ -180,6 +180,10 @@ class COMPONENT_EXPORT(CHROMEOS_DISKS) Disk::Builder { public: Builder(); + + Builder(const Builder&) = delete; + Builder& operator=(const Builder&) = delete; + ~Builder(); Builder& SetDevicePath(const std::string& device_path); @@ -212,8 +216,6 @@ private: std::unique_ptr<Disk> disk_; - - DISALLOW_COPY_AND_ASSIGN(Builder); }; COMPONENT_EXPORT(CHROMEOS_DISKS) base::FilePath GetStatefulPartitionPath();
diff --git a/chromeos/disks/disk_mount_manager.cc b/chromeos/disks/disk_mount_manager.cc index 3efaa056..8a7e4ef 100644 --- a/chromeos/disks/disk_mount_manager.cc +++ b/chromeos/disks/disk_mount_manager.cc
@@ -78,6 +78,9 @@ cros_disks_client_->AddObserver(this); } + DiskMountManagerImpl(const DiskMountManagerImpl&) = delete; + DiskMountManagerImpl& operator=(const DiskMountManagerImpl&) = delete; + ~DiskMountManagerImpl() override { cros_disks_client_->RemoveObserver(this); } // DiskMountManager override. @@ -1065,8 +1068,6 @@ AccessModeMap access_modes_; base::WeakPtrFactory<DiskMountManagerImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DiskMountManagerImpl); }; } // namespace
diff --git a/chromeos/disks/mock_disk_mount_manager.h b/chromeos/disks/mock_disk_mount_manager.h index a4b4daf..0e977d4 100644 --- a/chromeos/disks/mock_disk_mount_manager.h +++ b/chromeos/disks/mock_disk_mount_manager.h
@@ -24,6 +24,10 @@ class MockDiskMountManager : public DiskMountManager { public: MockDiskMountManager(); + + MockDiskMountManager(const MockDiskMountManager&) = delete; + MockDiskMountManager& operator=(const MockDiskMountManager&) = delete; + virtual ~MockDiskMountManager(); // DiskMountManager override. @@ -128,8 +132,6 @@ // The list of existing mount points. DiskMountManager::MountPointMap mount_points_; - - DISALLOW_COPY_AND_ASSIGN(MockDiskMountManager); }; } // namespace disks
diff --git a/chromeos/disks/suspend_unmount_manager.h b/chromeos/disks/suspend_unmount_manager.h index 3298b91dd..d1bc074c 100644 --- a/chromeos/disks/suspend_unmount_manager.h +++ b/chromeos/disks/suspend_unmount_manager.h
@@ -26,6 +26,10 @@ public: // The ownership of these raw pointers still remains with the caller. explicit SuspendUnmountManager(DiskMountManager* disk_mount_manager); + + SuspendUnmountManager(const SuspendUnmountManager&) = delete; + SuspendUnmountManager& operator=(const SuspendUnmountManager&) = delete; + ~SuspendUnmountManager() override; private: @@ -46,8 +50,6 @@ base::TimeTicks block_suspend_time_; base::WeakPtrFactory<SuspendUnmountManager> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SuspendUnmountManager); }; } // namespace disks
diff --git a/chromeos/disks/suspend_unmount_manager_unittest.cc b/chromeos/disks/suspend_unmount_manager_unittest.cc index 9aac18c..433b9a8 100644 --- a/chromeos/disks/suspend_unmount_manager_unittest.cc +++ b/chromeos/disks/suspend_unmount_manager_unittest.cc
@@ -54,6 +54,10 @@ std::make_unique<SuspendUnmountManager>(&disk_mount_manager_); } + SuspendUnmountManagerTest(const SuspendUnmountManagerTest&) = delete; + SuspendUnmountManagerTest& operator=(const SuspendUnmountManagerTest&) = + delete; + ~SuspendUnmountManagerTest() override { suspend_unmount_manager_.reset(); PowerManagerClient::Shutdown(); @@ -62,9 +66,6 @@ protected: FakeDiskMountManager disk_mount_manager_; std::unique_ptr<SuspendUnmountManager> suspend_unmount_manager_; - - private: - DISALLOW_COPY_AND_ASSIGN(SuspendUnmountManagerTest); }; TEST_F(SuspendUnmountManagerTest, Basic) {
diff --git a/chromeos/geolocation/simple_geolocation_provider.h b/chromeos/geolocation/simple_geolocation_provider.h index 160647c..3860747 100644 --- a/chromeos/geolocation/simple_geolocation_provider.h +++ b/chromeos/geolocation/simple_geolocation_provider.h
@@ -36,6 +36,11 @@ SimpleGeolocationProvider( scoped_refptr<network::SharedURLLoaderFactory> factory, const GURL& url); + + SimpleGeolocationProvider(const SimpleGeolocationProvider&) = delete; + SimpleGeolocationProvider& operator=(const SimpleGeolocationProvider&) = + delete; + virtual ~SimpleGeolocationProvider(); // Initiates new request. If |send_wifi_access_points|, WiFi AP information @@ -81,8 +86,6 @@ // Creation and destruction should happen on the same thread. base::ThreadChecker thread_checker_; - - DISALLOW_COPY_AND_ASSIGN(SimpleGeolocationProvider); }; } // namespace chromeos
diff --git a/chromeos/geolocation/simple_geolocation_request.h b/chromeos/geolocation/simple_geolocation_request.h index abce4b5..b536e63 100644 --- a/chromeos/geolocation/simple_geolocation_request.h +++ b/chromeos/geolocation/simple_geolocation_request.h
@@ -59,6 +59,9 @@ std::unique_ptr<WifiAccessPointVector> wifi_data, std::unique_ptr<CellTowerVector> cell_tower_data); + SimpleGeolocationRequest(const SimpleGeolocationRequest&) = delete; + SimpleGeolocationRequest& operator=(const SimpleGeolocationRequest&) = delete; + ~SimpleGeolocationRequest(); // Initiates request. @@ -137,8 +140,6 @@ // Creation and destruction should happen on the same thread. base::ThreadChecker thread_checker_; - - DISALLOW_COPY_AND_ASSIGN(SimpleGeolocationRequest); }; } // namespace chromeos
diff --git a/chromeos/geolocation/simple_geolocation_request_test_monitor.h b/chromeos/geolocation/simple_geolocation_request_test_monitor.h index cd4c5893..f92a9b7 100644 --- a/chromeos/geolocation/simple_geolocation_request_test_monitor.h +++ b/chromeos/geolocation/simple_geolocation_request_test_monitor.h
@@ -21,12 +21,14 @@ public: SimpleGeolocationRequestTestMonitor(); + SimpleGeolocationRequestTestMonitor( + const SimpleGeolocationRequestTestMonitor&) = delete; + SimpleGeolocationRequestTestMonitor& operator=( + const SimpleGeolocationRequestTestMonitor&) = delete; + virtual ~SimpleGeolocationRequestTestMonitor(); virtual void OnRequestCreated(SimpleGeolocationRequest* request); virtual void OnStart(SimpleGeolocationRequest* request); - - private: - DISALLOW_COPY_AND_ASSIGN(SimpleGeolocationRequestTestMonitor); }; } // namespace chromeos
diff --git a/chromeos/geolocation/simple_geolocation_unittest.cc b/chromeos/geolocation/simple_geolocation_unittest.cc index 334f7114..5c9ae9d 100644 --- a/chromeos/geolocation/simple_geolocation_unittest.cc +++ b/chromeos/geolocation/simple_geolocation_unittest.cc
@@ -311,6 +311,10 @@ public: SimpleGeolocationWirelessTest() : manager_test_(nullptr) {} + SimpleGeolocationWirelessTest(const SimpleGeolocationWirelessTest&) = delete; + SimpleGeolocationWirelessTest& operator=( + const SimpleGeolocationWirelessTest&) = delete; + ~SimpleGeolocationWirelessTest() override = default; void SetUp() override { @@ -375,9 +379,6 @@ ShillManagerClient::TestInterface* manager_test_; WifiAccessPointVector wifi_access_points_; CellTowerVector cell_towers_; - - private: - DISALLOW_COPY_AND_ASSIGN(SimpleGeolocationWirelessTest); }; // Parameter is enable/disable sending of WiFi data.
diff --git a/chromeos/login/auth/auth_attempt_state.h b/chromeos/login/auth/auth_attempt_state.h index 05688bf3..99bdf22 100644 --- a/chromeos/login/auth/auth_attempt_state.h +++ b/chromeos/login/auth/auth_attempt_state.h
@@ -25,6 +25,9 @@ // Used to initialize for a login attempt. AuthAttemptState(const UserContext& user_context, bool unlock); + AuthAttemptState(const AuthAttemptState&) = delete; + AuthAttemptState& operator=(const AuthAttemptState&) = delete; + virtual ~AuthAttemptState(); // Deprecated legacy method, will be removed soon. @@ -87,8 +90,6 @@ // After the username hash request is completed, this marks whether // the request was successful. bool username_hash_valid_ = true; - - DISALLOW_COPY_AND_ASSIGN(AuthAttemptState); }; } // namespace chromeos
diff --git a/chromeos/login/auth/login_event_recorder.h b/chromeos/login/auth/login_event_recorder.h index 02c220df..1bdbf79 100644 --- a/chromeos/login/auth/login_event_recorder.h +++ b/chromeos/login/auth/login_event_recorder.h
@@ -30,6 +30,10 @@ virtual void RecordAuthenticationFailure() = 0; }; LoginEventRecorder(); + + LoginEventRecorder(const LoginEventRecorder&) = delete; + LoginEventRecorder& operator=(const LoginEventRecorder&) = delete; + virtual ~LoginEventRecorder(); static LoginEventRecorder* Get(); @@ -50,8 +54,6 @@ private: Delegate* delegate_; - - DISALLOW_COPY_AND_ASSIGN(LoginEventRecorder); }; } // namespace chromeos
diff --git a/chromeos/login/auth/login_performer.h b/chromeos/login/auth/login_performer.h index b6d41ca..20ded95 100644 --- a/chromeos/login/auth/login_performer.h +++ b/chromeos/login/auth/login_performer.h
@@ -62,6 +62,10 @@ LoginPerformer(scoped_refptr<base::SequencedTaskRunner> task_runner, Delegate* delegate); + + LoginPerformer(const LoginPerformer&) = delete; + LoginPerformer& operator=(const LoginPerformer&) = delete; + ~LoginPerformer() override; // Performs a login for |user_context|. @@ -207,7 +211,6 @@ AuthorizationMode auth_mode_ = AuthorizationMode::kInternal; base::WeakPtrFactory<LoginPerformer> weak_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(LoginPerformer); }; } // namespace chromeos
diff --git a/chromeos/login/auth/stub_authenticator_builder.h b/chromeos/login/auth/stub_authenticator_builder.h index a9a6a94c..4d42da9 100644 --- a/chromeos/login/auth/stub_authenticator_builder.h +++ b/chromeos/login/auth/stub_authenticator_builder.h
@@ -22,6 +22,10 @@ class COMPONENT_EXPORT(CHROMEOS_LOGIN_AUTH) StubAuthenticatorBuilder { public: explicit StubAuthenticatorBuilder(const UserContext& expected_user_context); + + StubAuthenticatorBuilder(const StubAuthenticatorBuilder&) = delete; + StubAuthenticatorBuilder& operator=(const StubAuthenticatorBuilder&) = delete; + ~StubAuthenticatorBuilder(); scoped_refptr<Authenticator> Create(AuthStatusConsumer* consumer); @@ -65,8 +69,6 @@ // For kAuthFailure action - the failure reason. AuthFailure::FailureReason failure_reason_ = AuthFailure::NONE; - - DISALLOW_COPY_AND_ASSIGN(StubAuthenticatorBuilder); }; } // namespace chromeos
diff --git a/chromeos/login/auth/test_attempt_state.h b/chromeos/login/auth/test_attempt_state.h index b515985..c87acb0 100644 --- a/chromeos/login/auth/test_attempt_state.h +++ b/chromeos/login/auth/test_attempt_state.h
@@ -21,6 +21,9 @@ public: explicit TestAttemptState(const UserContext& credentials); + TestAttemptState(const TestAttemptState&) = delete; + TestAttemptState& operator=(const TestAttemptState&) = delete; + ~TestAttemptState() override; // Act as though an online login attempt completed already. @@ -33,9 +36,6 @@ bool online_complete() override; bool cryptohome_complete() override; cryptohome::MountError cryptohome_code() override; - - private: - DISALLOW_COPY_AND_ASSIGN(TestAttemptState); }; } // namespace chromeos
diff --git a/chromeos/login/login_state/login_state_unittest.cc b/chromeos/login/login_state/login_state_unittest.cc index 5e04cd29..d951908 100644 --- a/chromeos/login/login_state/login_state_unittest.cc +++ b/chromeos/login/login_state/login_state_unittest.cc
@@ -20,6 +20,10 @@ LoginStateTest() : logged_in_user_type_(LoginState::LOGGED_IN_USER_NONE), login_state_changes_count_(0) {} + + LoginStateTest(const LoginStateTest&) = delete; + LoginStateTest& operator=(const LoginStateTest&) = delete; + ~LoginStateTest() override = default; // testing::Test @@ -53,8 +57,6 @@ private: unsigned int login_state_changes_count_; - - DISALLOW_COPY_AND_ASSIGN(LoginStateTest); }; TEST_F(LoginStateTest, TestLoginState) {
diff --git a/chromeos/login/login_state/scoped_test_public_session_login_state.h b/chromeos/login/login_state/scoped_test_public_session_login_state.h index f0754ab..11dec88 100644 --- a/chromeos/login/login_state/scoped_test_public_session_login_state.h +++ b/chromeos/login/login_state/scoped_test_public_session_login_state.h
@@ -18,12 +18,16 @@ explicit ScopedTestPublicSessionLoginState( LoginState::LoggedInUserType user_type = LoginState::LOGGED_IN_USER_PUBLIC_ACCOUNT); + + ScopedTestPublicSessionLoginState(const ScopedTestPublicSessionLoginState&) = + delete; + ScopedTestPublicSessionLoginState& operator=( + const ScopedTestPublicSessionLoginState&) = delete; + ~ScopedTestPublicSessionLoginState(); private: bool needs_shutdown_ = false; - - DISALLOW_COPY_AND_ASSIGN(ScopedTestPublicSessionLoginState); }; } // namespace chromeos
diff --git a/chromeos/login/session/session_termination_manager.h b/chromeos/login/session/session_termination_manager.h index 3ce17cb..2e571cc 100644 --- a/chromeos/login/session/session_termination_manager.h +++ b/chromeos/login/session/session_termination_manager.h
@@ -25,6 +25,11 @@ }; SessionTerminationManager(); + + SessionTerminationManager(const SessionTerminationManager&) = delete; + SessionTerminationManager& operator=(const SessionTerminationManager&) = + delete; + ~SessionTerminationManager(); static SessionTerminationManager* Get(); @@ -56,8 +61,6 @@ base::ObserverList<Observer> observers_; bool is_locked_to_single_user_ = false; base::WeakPtrFactory<SessionTerminationManager> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SessionTerminationManager); }; } // namespace chromeos
diff --git a/chromeos/login/session/session_termination_manager_unittest.cc b/chromeos/login/session/session_termination_manager_unittest.cc index cc02e00..32e46998 100644 --- a/chromeos/login/session/session_termination_manager_unittest.cc +++ b/chromeos/login/session/session_termination_manager_unittest.cc
@@ -20,6 +20,11 @@ CryptohomeMiscClient::InitializeFake(); SessionManagerClient::InitializeFake(); } + + SessionTerminationManagerTest(const SessionTerminationManagerTest&) = delete; + SessionTerminationManagerTest& operator=( + const SessionTerminationManagerTest&) = delete; + ~SessionTerminationManagerTest() override { CryptohomeMiscClient::Shutdown(); PowerManagerClient::Shutdown(); @@ -29,8 +34,6 @@ protected: FakePowerManagerClient* power_client_; SessionTerminationManager session_termination_manager_; - - DISALLOW_COPY_AND_ASSIGN(SessionTerminationManagerTest); }; // The device is not locked to single user. Check that no reboot is triggered
diff --git a/chromeos/memory/pagemap.h b/chromeos/memory/pagemap.h index 1539dc60..faceb8f 100644 --- a/chromeos/memory/pagemap.h +++ b/chromeos/memory/pagemap.h
@@ -36,6 +36,10 @@ "PagemapEntry is expected to be 8 bytes"); explicit Pagemap(pid_t pid); + + Pagemap(const Pagemap&) = delete; + Pagemap& operator=(const Pagemap&) = delete; + ~Pagemap(); bool IsValid() const; @@ -65,8 +69,6 @@ friend class PagemapTest; base::ScopedFD fd_; - - DISALLOW_COPY_AND_ASSIGN(Pagemap); }; } // namespace memory
diff --git a/chromeos/memory/pressure/system_memory_pressure_evaluator_unittest.cc b/chromeos/memory/pressure/system_memory_pressure_evaluator_unittest.cc index a3a3695..ac57384 100644 --- a/chromeos/memory/pressure/system_memory_pressure_evaluator_unittest.cc +++ b/chromeos/memory/pressure/system_memory_pressure_evaluator_unittest.cc
@@ -51,10 +51,12 @@ SystemMemoryPressureEvaluator::OnMemoryPressure(level, reclaim_target_kb); } - ~TestSystemMemoryPressureEvaluator() override = default; + TestSystemMemoryPressureEvaluator(const TestSystemMemoryPressureEvaluator&) = + delete; + TestSystemMemoryPressureEvaluator& operator=( + const TestSystemMemoryPressureEvaluator&) = delete; - private: - DISALLOW_COPY_AND_ASSIGN(TestSystemMemoryPressureEvaluator); + ~TestSystemMemoryPressureEvaluator() override = default; }; TEST(ChromeOSSystemMemoryPressureEvaluatorTest, CheckMemoryPressure) {
diff --git a/chromeos/memory/userspace_swap/swap_storage.cc b/chromeos/memory/userspace_swap/swap_storage.cc index 5faa15c7..e4a7e1c 100644 --- a/chromeos/memory/userspace_swap/swap_storage.cc +++ b/chromeos/memory/userspace_swap/swap_storage.cc
@@ -41,6 +41,9 @@ // Adds a compression layer to a SwapFile. class CompressedSwapFile : public SwapFile { public: + CompressedSwapFile(const CompressedSwapFile&) = delete; + CompressedSwapFile& operator=(const CompressedSwapFile&) = delete; + ~CompressedSwapFile() override; // SwapFile impl: @@ -64,14 +67,14 @@ // that |dest| be large enough to hold the decompressed buffer, the return // value is the number of decompressed bytes. static ssize_t Decompress(const Region& src, const Region& dest); - - private: - DISALLOW_COPY_AND_ASSIGN(CompressedSwapFile); }; // Adds an encryption layer to a SwapFile. class EncryptedSwapFile : public SwapFile { public: + EncryptedSwapFile(const EncryptedSwapFile&) = delete; + EncryptedSwapFile& operator=(const EncryptedSwapFile&) = delete; + ~EncryptedSwapFile() override; // SwapFile impl: @@ -87,14 +90,15 @@ crypto::Aead aead_; std::vector<uint8_t> key_; std::vector<uint8_t> nonce_; - - private: - DISALLOW_COPY_AND_ASSIGN(EncryptedSwapFile); }; // Adds a encryption layer to a compressed swap file. class EncryptedCompressedSwapFile : public EncryptedSwapFile { public: + EncryptedCompressedSwapFile(const EncryptedCompressedSwapFile&) = delete; + EncryptedCompressedSwapFile& operator=(const EncryptedCompressedSwapFile&) = + delete; + ~EncryptedCompressedSwapFile() override; // SwapFile impl: @@ -105,9 +109,6 @@ friend class SwapFile; explicit EncryptedCompressedSwapFile(base::ScopedFD fd); - - private: - DISALLOW_COPY_AND_ASSIGN(EncryptedCompressedSwapFile); }; // Because for some inputs that aren't compressible it can result in a size
diff --git a/chromeos/memory/userspace_swap/swap_storage.h b/chromeos/memory/userspace_swap/swap_storage.h index 6969411..78abb57 100644 --- a/chromeos/memory/userspace_swap/swap_storage.h +++ b/chromeos/memory/userspace_swap/swap_storage.h
@@ -21,6 +21,9 @@ // thread safe as synchronization is handled internally where necessary. class CHROMEOS_EXPORT SwapFile { public: + SwapFile(const SwapFile&) = delete; + SwapFile& operator=(const SwapFile&) = delete; + virtual ~SwapFile(); enum Type { @@ -84,8 +87,6 @@ // drops are safe, because they use syscalls which do not rely on the file // pointer, specifically pread(2) and fallocate(2) respectively). base::Lock write_lock_; - - DISALLOW_COPY_AND_ASSIGN(SwapFile); }; } // namespace userspace_swap
diff --git a/chromeos/memory/userspace_swap/userfaultfd.h b/chromeos/memory/userspace_swap/userfaultfd.h index 9b409dd..b42355bd 100644 --- a/chromeos/memory/userspace_swap/userfaultfd.h +++ b/chromeos/memory/userspace_swap/userfaultfd.h
@@ -175,6 +175,9 @@ // Wrap FD is used to take a donated FD and assume ownership of it. static std::unique_ptr<UserfaultFD> WrapFD(base::ScopedFD fd); + UserfaultFD(const UserfaultFD&) = delete; + UserfaultFD& operator=(const UserfaultFD&) = delete; + ~UserfaultFD(); base::ScopedFD ReleaseFD(); @@ -205,8 +208,6 @@ std::unique_ptr<UserfaultFDHandler> handler_; std::unique_ptr<base::FileDescriptorWatcher::Controller> watcher_controller_; - - DISALLOW_COPY_AND_ASSIGN(UserfaultFD); }; } // namespace userspace_swap
diff --git a/chromeos/memory/userspace_swap/userfaultfd_unittest.cc b/chromeos/memory/userspace_swap/userfaultfd_unittest.cc index 4a91f82..3336c80 100644 --- a/chromeos/memory/userspace_swap/userfaultfd_unittest.cc +++ b/chromeos/memory/userspace_swap/userfaultfd_unittest.cc
@@ -44,6 +44,9 @@ // tests. class ScopedMemory { public: + ScopedMemory(const ScopedMemory&) = delete; + ScopedMemory& operator=(const ScopedMemory&) = delete; + ~ScopedMemory() { Free(); } ScopedMemory() = default; @@ -92,8 +95,6 @@ private: void* ptr_ = nullptr; size_t len_ = 0; - - DISALLOW_COPY_AND_ASSIGN(ScopedMemory); }; const size_t kPageSize = base::GetPageSize(); @@ -150,6 +151,10 @@ class MockUserfaultFDHandler : public UserfaultFDHandler { public: MockUserfaultFDHandler() = default; + + MockUserfaultFDHandler(const MockUserfaultFDHandler&) = delete; + MockUserfaultFDHandler& operator=(const MockUserfaultFDHandler&) = delete; + ~MockUserfaultFDHandler() override = default; MOCK_METHOD3(Pagefault, @@ -163,9 +168,6 @@ uintptr_t new_address, uint64_t original_length)); MOCK_METHOD1(Closed, void(int err)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockUserfaultFDHandler); }; uintptr_t GetPageBase(uintptr_t addr) {
diff --git a/chromeos/memory/userspace_swap/userspace_swap_renderer_initialization_impl.h b/chromeos/memory/userspace_swap/userspace_swap_renderer_initialization_impl.h index 987e888..37a1334 100644 --- a/chromeos/memory/userspace_swap/userspace_swap_renderer_initialization_impl.h +++ b/chromeos/memory/userspace_swap/userspace_swap_renderer_initialization_impl.h
@@ -18,6 +18,12 @@ class CHROMEOS_EXPORT UserspaceSwapRendererInitializationImpl { public: UserspaceSwapRendererInitializationImpl(); + + UserspaceSwapRendererInitializationImpl( + const UserspaceSwapRendererInitializationImpl&) = delete; + UserspaceSwapRendererInitializationImpl& operator=( + const UserspaceSwapRendererInitializationImpl&) = delete; + ~UserspaceSwapRendererInitializationImpl(); static bool UserspaceSwapSupportedAndEnabled(); @@ -40,8 +46,6 @@ int mmap_errno_ = 0; uint64_t swap_area_ = 0; uint64_t swap_area_len_ = 0; - - DISALLOW_COPY_AND_ASSIGN(UserspaceSwapRendererInitializationImpl); }; } // namespace userspace_swap
diff --git a/chromeos/network/auto_connect_handler.h b/chromeos/network/auto_connect_handler.h index c747036..995e89977 100644 --- a/chromeos/network/auto_connect_handler.h +++ b/chromeos/network/auto_connect_handler.h
@@ -41,6 +41,9 @@ virtual void OnAutoConnectedInitiated(int auto_connect_reasons) = 0; }; + AutoConnectHandler(const AutoConnectHandler&) = delete; + AutoConnectHandler& operator=(const AutoConnectHandler&) = delete; + ~AutoConnectHandler() override; // LoginState::Observer @@ -163,8 +166,6 @@ base::ObserverList<Observer>::Unchecked observer_list_; base::WeakPtrFactory<AutoConnectHandler> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(AutoConnectHandler); }; } // namespace chromeos
diff --git a/chromeos/network/cellular_metrics_logger.h b/chromeos/network/cellular_metrics_logger.h index 6ab154a..47972754 100644 --- a/chromeos/network/cellular_metrics_logger.h +++ b/chromeos/network/cellular_metrics_logger.h
@@ -75,6 +75,10 @@ const absl::optional<std::string>& shill_error_name = absl::nullopt); CellularMetricsLogger(); + + CellularMetricsLogger(const CellularMetricsLogger&) = delete; + CellularMetricsLogger& operator=(const CellularMetricsLogger&) = delete; + ~CellularMetricsLogger() override; void Init(NetworkStateHandler* network_state_handler, @@ -382,8 +386,6 @@ // Tracks ESim feature usage for the Standard Feature Usage Logging Framework. std::unique_ptr<ESimFeatureUsageMetrics> esim_feature_usage_metrics_; - - DISALLOW_COPY_AND_ASSIGN(CellularMetricsLogger); }; } // namespace chromeos
diff --git a/chromeos/network/cellular_metrics_logger_unittest.cc b/chromeos/network/cellular_metrics_logger_unittest.cc index db17a01..6cdc5f6 100644 --- a/chromeos/network/cellular_metrics_logger_unittest.cc +++ b/chromeos/network/cellular_metrics_logger_unittest.cc
@@ -70,6 +70,11 @@ public: CellularMetricsLoggerTest() : task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {} + + CellularMetricsLoggerTest(const CellularMetricsLoggerTest&) = delete; + CellularMetricsLoggerTest& operator=(const CellularMetricsLoggerTest&) = + delete; + ~CellularMetricsLoggerTest() override = default; void SetUp() override { @@ -208,7 +213,6 @@ std::unique_ptr<TestCellularESimProfileHandler> cellular_esim_profile_handler_; std::unique_ptr<CellularMetricsLogger> cellular_metrics_logger_; - DISALLOW_COPY_AND_ASSIGN(CellularMetricsLoggerTest); }; TEST_F(CellularMetricsLoggerTest, ActiveProfileExists) {
diff --git a/chromeos/network/cellular_policy_handler.cc b/chromeos/network/cellular_policy_handler.cc index 02a66df..eb43f44 100644 --- a/chromeos/network/cellular_policy_handler.cc +++ b/chromeos/network/cellular_policy_handler.cc
@@ -58,6 +58,16 @@ void CellularPolicyHandler::InstallESim( const std::string& smdp_address, const base::DictionaryValue& onc_config) { + const std::string* guid = + onc_config.FindStringKey(::onc::network_config::kGUID); + DCHECK(guid); + // Invalidate current request if a new install request for the same policy is + // received. This prevents retry requests for bad SMDP address from + // unnecessarily blocking the queue. + if (retry_backoff_.failure_count() >= 1 && GetCurrentPolicyGuid() == *guid) { + InvalidateCurrentRequest(); + } + remaining_install_requests_.push_back( std::make_unique<InstallPolicyESimRequest>(smdp_address, onc_config)); ProcessRequests(); @@ -77,8 +87,9 @@ retry_backoff_.Reset(); is_installing_ = true; - NET_LOG(EVENT) << "Starting installing policy eSim profile with SMDP: " - << GetCurrentSmdpAddress(); + NET_LOG(EVENT) + << "Starting installing policy eSIM profile with SMDP address: " + << GetCurrentSmdpAddress(); AttemptInstallESim(); } @@ -87,13 +98,13 @@ absl::optional<dbus::ObjectPath> euicc_path = GetCurrentEuiccPath(); if (!euicc_path) { - NET_LOG(ERROR) << "Error installing policy eSim profile for SMDP: " + NET_LOG(ERROR) << "Error installing policy eSIM profile for SMDP address: " << GetCurrentSmdpAddress() << ": euicc is not found."; PopRequestAndProcessNext(); return; } - NET_LOG(EVENT) << "Attempt installing policy eSim profile with SMDP: " + NET_LOG(EVENT) << "Attempt installing policy eSIM profile with SMDP address: " << GetCurrentSmdpAddress() << " on euicc path: " << euicc_path->value(); @@ -109,7 +120,7 @@ *profile, *guid, /*global_policy=*/nullptr, remaining_install_requests_.front()->onc_config.get(), /*user_settings=*/nullptr); - NET_LOG(EVENT) << "Install policy eSim profile with properties: " + NET_LOG(EVENT) << "Install policy eSIM profile with properties: " << new_shill_properties; // Remote provisioning of eSIM profiles via SMDP address in policy does not // require confirmation code. @@ -127,6 +138,15 @@ return remaining_install_requests_.front()->smdp_address; } +std::string CellularPolicyHandler::GetCurrentPolicyGuid() const { + DCHECK(is_installing_); + + const std::string* guid = + remaining_install_requests_.front()->onc_config->FindStringKey( + ::onc::network_config::kGUID); + return guid ? *guid : std::string(); +} + void CellularPolicyHandler::OnESimProfileInstallAttemptComplete( HermesResponseStatus hermes_status, absl::optional<dbus::ObjectPath> profile_path, @@ -134,6 +154,8 @@ DCHECK(is_installing_); if (hermes_status == HermesResponseStatus::kSuccess) { + NET_LOG(EVENT) << "Successfully installed eSIM profile with SMDP address: " + << GetCurrentSmdpAddress(); retry_backoff_.InformOfRequest(/*succeeded=*/true); managed_network_configuration_handler_->NotifyPolicyAppliedToNetwork( *service_path); @@ -142,28 +164,34 @@ } if (retry_backoff_.failure_count() >= kInstallRetryLimit) { - NET_LOG(ERROR) << "Install policy eSim profile with SMDP: " + NET_LOG(ERROR) << "Install policy eSIM profile with SMDP address: " << GetCurrentSmdpAddress() << " failed three times."; PopRequestAndProcessNext(); return; } retry_backoff_.InformOfRequest(/*succeeded=*/false); - NET_LOG(EVENT) << "Install policy eSim profile failed. Retrying in " + NET_LOG(ERROR) << "Install policy eSIM profile failed. Retrying in " << retry_backoff_.GetTimeUntilRelease(); - base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( - FROM_HERE, - base::BindOnce(&CellularPolicyHandler::AttemptInstallESim, - weak_ptr_factory_.GetWeakPtr()), - retry_backoff_.GetTimeUntilRelease()); + retry_timer_.Start(FROM_HERE, retry_backoff_.GetTimeUntilRelease(), + base::BindOnce(&CellularPolicyHandler::AttemptInstallESim, + weak_ptr_factory_.GetWeakPtr())); } void CellularPolicyHandler::PopRequestAndProcessNext() { - // Pop out the completed smdp and process next request. + // Pop out the completed request and process next request. remaining_install_requests_.pop_front(); is_installing_ = false; ProcessRequests(); } +void CellularPolicyHandler::InvalidateCurrentRequest() { + NET_LOG(EVENT) << "Invalidate current request with SMDP address: " + << GetCurrentSmdpAddress(); + if (retry_timer_.IsRunning()) + retry_timer_.Stop(); + remaining_install_requests_.pop_front(); + is_installing_ = false; +} } // namespace chromeos \ No newline at end of file
diff --git a/chromeos/network/cellular_policy_handler.h b/chromeos/network/cellular_policy_handler.h index 73b1661..969b521a9 100644 --- a/chromeos/network/cellular_policy_handler.h +++ b/chromeos/network/cellular_policy_handler.h
@@ -9,6 +9,7 @@ #include "base/containers/queue.h" #include "base/gtest_prod_util.h" #include "base/memory/weak_ptr.h" +#include "base/timer/timer.h" #include "base/values.h" #include "net/base/backoff_entry.h" #include "third_party/abseil-cpp/absl/types/optional.h" @@ -73,11 +74,13 @@ void ProcessRequests(); void AttemptInstallESim(); const std::string& GetCurrentSmdpAddress() const; + std::string GetCurrentPolicyGuid() const; void OnESimProfileInstallAttemptComplete( HermesResponseStatus hermes_status, absl::optional<dbus::ObjectPath> profile_path, absl::optional<std::string> service_path); void PopRequestAndProcessNext(); + void InvalidateCurrentRequest(); CellularESimInstaller* cellular_esim_installer_ = nullptr; NetworkProfileHandler* network_profile_handler_ = nullptr; @@ -87,6 +90,7 @@ bool is_installing_ = false; base::circular_deque<std::unique_ptr<InstallPolicyESimRequest>> remaining_install_requests_; + base::OneShotTimer retry_timer_; // Provides us the backoff timers for AttemptInstallESim(). net::BackoffEntry retry_backoff_;
diff --git a/chromeos/network/cellular_policy_handler_unittest.cc b/chromeos/network/cellular_policy_handler_unittest.cc index 60cc8fd0..20fdf8b5 100644 --- a/chromeos/network/cellular_policy_handler_unittest.cc +++ b/chromeos/network/cellular_policy_handler_unittest.cc
@@ -257,4 +257,23 @@ CheckShillConfiguration(/*is_installed=*/false); } +TEST_F(CellularPolicyHandlerTest, UpdateSMDPAddress) { + // Verify that the first request should be invalidated when the second + // request is queued. + std::string policy = GenerateCellularPolicy("000"); + InstallESimPolicy(policy, + /*activation_code=*/"000", + /*expect_install_success=*/false); + policy = GenerateCellularPolicy(HermesEuiccClient::Get() + ->GetTestInterface() + ->GenerateFakeActivationCode()); + + InstallESimPolicy(policy, + HermesEuiccClient::Get() + ->GetTestInterface() + ->GenerateFakeActivationCode(), + /*expect_install_success=*/true); + CheckShillConfiguration(/*is_installed=*/true); +} + } // namespace chromeos
diff --git a/chromeos/network/client_cert_resolver_unittest.cc b/chromeos/network/client_cert_resolver_unittest.cc index 1ae07c9..9e8d67ba 100644 --- a/chromeos/network/client_cert_resolver_unittest.cc +++ b/chromeos/network/client_cert_resolver_unittest.cc
@@ -100,6 +100,10 @@ public ClientCertResolver::Observer { public: ClientCertResolverTest() = default; + + ClientCertResolverTest(const ClientCertResolverTest&) = delete; + ClientCertResolverTest& operator=(const ClientCertResolverTest&) = delete; + ~ClientCertResolverTest() override = default; void SetUp() override { @@ -505,8 +509,6 @@ std::string test_ca_cert_pem_; crypto::ScopedTestNSSDB test_nssdb_; crypto::ScopedTestNSSDB test_system_nssdb_; - - DISALLOW_COPY_AND_ASSIGN(ClientCertResolverTest); }; TEST_F(ClientCertResolverTest, NoMatchingCertificates) {
diff --git a/chromeos/network/device_state.h b/chromeos/network/device_state.h index d0f0d0c..4b31745 100644 --- a/chromeos/network/device_state.h +++ b/chromeos/network/device_state.h
@@ -22,6 +22,10 @@ typedef std::vector<CellularSIMSlotInfo> CellularSIMSlotInfos; explicit DeviceState(const std::string& path); + + DeviceState(const DeviceState&) = delete; + DeviceState& operator=(const DeviceState&) = delete; + ~DeviceState() override; // ManagedState overrides @@ -136,8 +140,6 @@ // Dictionary of IPConfig properties, keyed by IpConfig path. base::DictionaryValue ip_configs_; - - DISALLOW_COPY_AND_ASSIGN(DeviceState); }; } // namespace chromeos
diff --git a/chromeos/network/fake_network_activation_handler.h b/chromeos/network/fake_network_activation_handler.h index 719e970..d384440 100644 --- a/chromeos/network/fake_network_activation_handler.h +++ b/chromeos/network/fake_network_activation_handler.h
@@ -19,6 +19,11 @@ : public NetworkActivationHandler { public: FakeNetworkActivationHandler(); + + FakeNetworkActivationHandler(const FakeNetworkActivationHandler&) = delete; + FakeNetworkActivationHandler& operator=(const FakeNetworkActivationHandler&) = + delete; + ~FakeNetworkActivationHandler() override; // Parameters captured by calls to CompleteActivation(). @@ -56,8 +61,6 @@ network_handler::ErrorCallback error_callback) override; std::vector<ActivationParams> complete_activation_calls_; - - DISALLOW_COPY_AND_ASSIGN(FakeNetworkActivationHandler); }; } // namespace chromeos
diff --git a/chromeos/network/fake_network_connection_handler.h b/chromeos/network/fake_network_connection_handler.h index 6ce0ee8..647fee7 100644 --- a/chromeos/network/fake_network_connection_handler.h +++ b/chromeos/network/fake_network_connection_handler.h
@@ -21,6 +21,11 @@ : public NetworkConnectionHandler { public: FakeNetworkConnectionHandler(); + + FakeNetworkConnectionHandler(const FakeNetworkConnectionHandler&) = delete; + FakeNetworkConnectionHandler& operator=(const FakeNetworkConnectionHandler&) = + delete; + ~FakeNetworkConnectionHandler() override; // Parameters captured by calls to ConnectToNetwork() and DisconnectNetwork(). @@ -87,8 +92,6 @@ std::vector<ConnectionParams> connect_calls_; std::vector<ConnectionParams> disconnect_calls_; - - DISALLOW_COPY_AND_ASSIGN(FakeNetworkConnectionHandler); }; } // namespace chromeos
diff --git a/chromeos/network/fake_network_device_handler.h b/chromeos/network/fake_network_device_handler.h index 4b1a7292..a8b008e 100644 --- a/chromeos/network/fake_network_device_handler.h +++ b/chromeos/network/fake_network_device_handler.h
@@ -21,6 +21,10 @@ : public NetworkDeviceHandler { public: FakeNetworkDeviceHandler(); + + FakeNetworkDeviceHandler(const FakeNetworkDeviceHandler&) = delete; + FakeNetworkDeviceHandler& operator=(const FakeNetworkDeviceHandler&) = delete; + ~FakeNetworkDeviceHandler() override; // NetworkDeviceHandler overrides @@ -68,9 +72,6 @@ bool policy_allow_roaming) override; void SetUsbEthernetMacAddressSource(const std::string& source) override; - - private: - DISALLOW_COPY_AND_ASSIGN(FakeNetworkDeviceHandler); }; } // namespace chromeos
diff --git a/chromeos/network/fast_transition_observer.h b/chromeos/network/fast_transition_observer.h index 35b36c16..a75c384 100644 --- a/chromeos/network/fast_transition_observer.h +++ b/chromeos/network/fast_transition_observer.h
@@ -22,6 +22,10 @@ class COMPONENT_EXPORT(CHROMEOS_NETWORK) FastTransitionObserver { public: explicit FastTransitionObserver(PrefService* local_state); + + FastTransitionObserver(const FastTransitionObserver&) = delete; + FastTransitionObserver& operator=(const FastTransitionObserver&) = delete; + ~FastTransitionObserver(); static void RegisterPrefs(PrefRegistrySimple* registry); @@ -32,8 +36,6 @@ PrefService* local_state_; PrefChangeRegistrar pref_change_registrar_; - - DISALLOW_COPY_AND_ASSIGN(FastTransitionObserver); }; } // namespace chromeos
diff --git a/chromeos/network/fast_transition_observer_unittest.cc b/chromeos/network/fast_transition_observer_unittest.cc index 046d852..6426a809 100644 --- a/chromeos/network/fast_transition_observer_unittest.cc +++ b/chromeos/network/fast_transition_observer_unittest.cc
@@ -26,6 +26,10 @@ observer_ = std::make_unique<FastTransitionObserver>(local_state_.get()); } + FastTransitionObserverTest(const FastTransitionObserverTest&) = delete; + FastTransitionObserverTest& operator=(const FastTransitionObserverTest&) = + delete; + ~FastTransitionObserverTest() override { observer_.reset(); local_state_.reset(); @@ -44,8 +48,6 @@ NetworkHandlerTestHelper network_handler_test_helper_; std::unique_ptr<TestingPrefServiceSimple> local_state_; std::unique_ptr<FastTransitionObserver> observer_; - - DISALLOW_COPY_AND_ASSIGN(FastTransitionObserverTest); }; TEST_F(FastTransitionObserverTest, FastTransitionChangeCallsShill) {
diff --git a/chromeos/network/geolocation_handler.h b/chromeos/network/geolocation_handler.h index e8f52ee..11a4398 100644 --- a/chromeos/network/geolocation_handler.h +++ b/chromeos/network/geolocation_handler.h
@@ -34,6 +34,9 @@ class COMPONENT_EXPORT(CHROMEOS_NETWORK) GeolocationHandler : public ShillPropertyChangedObserver { public: + GeolocationHandler(const GeolocationHandler&) = delete; + GeolocationHandler& operator=(const GeolocationHandler&) = delete; + ~GeolocationHandler() override; // This sends a request for geolocation (both wifi AP and cell tower) data. @@ -91,8 +94,6 @@ // For Shill client callbacks base::WeakPtrFactory<GeolocationHandler> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(GeolocationHandler); }; } // namespace chromeos
diff --git a/chromeos/network/geolocation_handler_unittest.cc b/chromeos/network/geolocation_handler_unittest.cc index a905adf..c29af61 100644 --- a/chromeos/network/geolocation_handler_unittest.cc +++ b/chromeos/network/geolocation_handler_unittest.cc
@@ -25,6 +25,9 @@ : task_environment_( base::test::SingleThreadTaskEnvironment::MainThreadType::UI) {} + GeolocationHandlerTest(const GeolocationHandlerTest&) = delete; + GeolocationHandlerTest& operator=(const GeolocationHandlerTest&) = delete; + ~GeolocationHandlerTest() override = default; void SetUp() override { @@ -94,9 +97,6 @@ ShillManagerClient::TestInterface* manager_test_ = nullptr; WifiAccessPointVector wifi_access_points_; CellTowerVector cell_towers_; - - private: - DISALLOW_COPY_AND_ASSIGN(GeolocationHandlerTest); }; TEST_F(GeolocationHandlerTest, NoAccessPoints) {
diff --git a/chromeos/network/managed_network_configuration_handler_impl.h b/chromeos/network/managed_network_configuration_handler_impl.h index 5d8815f..7c811e2f 100644 --- a/chromeos/network/managed_network_configuration_handler_impl.h +++ b/chromeos/network/managed_network_configuration_handler_impl.h
@@ -38,6 +38,11 @@ public NetworkProfileObserver, public PolicyApplicator::ConfigurationHandler { public: + ManagedNetworkConfigurationHandlerImpl( + const ManagedNetworkConfigurationHandlerImpl&) = delete; + ManagedNetworkConfigurationHandlerImpl& operator=( + const ManagedNetworkConfigurationHandlerImpl&) = delete; + ~ManagedNetworkConfigurationHandlerImpl() override; // ManagedNetworkConfigurationHandler overrides @@ -265,8 +270,6 @@ // For Shill client callbacks base::WeakPtrFactory<ManagedNetworkConfigurationHandlerImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ManagedNetworkConfigurationHandlerImpl); }; } // namespace chromeos
diff --git a/chromeos/network/managed_network_configuration_handler_unittest.cc b/chromeos/network/managed_network_configuration_handler_unittest.cc index 2d05fef..bb880d61 100644 --- a/chromeos/network/managed_network_configuration_handler_unittest.cc +++ b/chromeos/network/managed_network_configuration_handler_unittest.cc
@@ -188,6 +188,11 @@ base::RunLoop().RunUntilIdle(); } + ManagedNetworkConfigurationHandlerTest( + const ManagedNetworkConfigurationHandlerTest&) = delete; + ManagedNetworkConfigurationHandlerTest& operator=( + const ManagedNetworkConfigurationHandlerTest&) = delete; + ~ManagedNetworkConfigurationHandlerTest() override { ResetManagedNetworkConfigurationHandler(); cellular_policy_handler_.reset(); @@ -336,8 +341,6 @@ sync_preferences::TestingPrefServiceSyncable user_prefs_; TestingPrefServiceSimple local_state_; - - DISALLOW_COPY_AND_ASSIGN(ManagedNetworkConfigurationHandlerTest); }; TEST_F(ManagedNetworkConfigurationHandlerTest, RemoveIrrelevantFields) {
diff --git a/chromeos/network/managed_state.h b/chromeos/network/managed_state.h index 1c3996f..dbd44af 100644 --- a/chromeos/network/managed_state.h +++ b/chromeos/network/managed_state.h
@@ -37,6 +37,9 @@ MANAGED_TYPE_DEVICE }; + ManagedState(const ManagedState&) = delete; + ManagedState& operator=(const ManagedState&) = delete; + virtual ~ManagedState(); // This will construct and return a new instance of the appropriate class @@ -141,8 +144,6 @@ // Tracks when an update has been requested. bool update_requested_ = false; - - DISALLOW_COPY_AND_ASSIGN(ManagedState); }; } // namespace chromeos
diff --git a/chromeos/network/mock_managed_network_configuration_handler.h b/chromeos/network/mock_managed_network_configuration_handler.h index 65de65b..05c3cf28 100644 --- a/chromeos/network/mock_managed_network_configuration_handler.h +++ b/chromeos/network/mock_managed_network_configuration_handler.h
@@ -19,6 +19,12 @@ : public ManagedNetworkConfigurationHandler { public: MockManagedNetworkConfigurationHandler(); + + MockManagedNetworkConfigurationHandler( + const MockManagedNetworkConfigurationHandler&) = delete; + MockManagedNetworkConfigurationHandler& operator=( + const MockManagedNetworkConfigurationHandler&) = delete; + virtual ~MockManagedNetworkConfigurationHandler(); // ManagedNetworkConfigurationHandler overrides @@ -86,9 +92,6 @@ MOCK_CONST_METHOD0(AllowOnlyPolicyWiFiToConnectIfAvailable, bool()); MOCK_CONST_METHOD0(AllowOnlyPolicyNetworksToAutoconnect, bool()); MOCK_CONST_METHOD0(GetBlockedHexSSIDs, std::vector<std::string>()); - - private: - DISALLOW_COPY_AND_ASSIGN(MockManagedNetworkConfigurationHandler); }; } // namespace chromeos
diff --git a/chromeos/network/mock_network_device_handler.h b/chromeos/network/mock_network_device_handler.h index 1be9b212..f6566511 100644 --- a/chromeos/network/mock_network_device_handler.h +++ b/chromeos/network/mock_network_device_handler.h
@@ -23,6 +23,10 @@ : public NetworkDeviceHandler { public: MockNetworkDeviceHandler(); + + MockNetworkDeviceHandler(const MockNetworkDeviceHandler&) = delete; + MockNetworkDeviceHandler& operator=(const MockNetworkDeviceHandler&) = delete; + virtual ~MockNetworkDeviceHandler(); MOCK_CONST_METHOD2(GetDeviceProperties, @@ -76,9 +80,6 @@ MOCK_METHOD1(SetUsbEthernetMacAddressSource, void(const std::string& enabled)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockNetworkDeviceHandler); }; } // namespace chromeos
diff --git a/chromeos/network/mock_network_state_handler.h b/chromeos/network/mock_network_state_handler.h index cb995e1..4dd07290 100644 --- a/chromeos/network/mock_network_state_handler.h +++ b/chromeos/network/mock_network_state_handler.h
@@ -14,6 +14,10 @@ : public NetworkStateHandler { public: MockNetworkStateHandler(); + + MockNetworkStateHandler(const MockNetworkStateHandler&) = delete; + MockNetworkStateHandler& operator=(const MockNetworkStateHandler&) = delete; + virtual ~MockNetworkStateHandler(); // Constructs and initializes an instance for testing. @@ -22,9 +26,6 @@ // NetworkStateHandler overrides MOCK_METHOD3(UpdateBlockedWifiNetworks, void(bool, bool, const std::vector<std::string>&)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockNetworkStateHandler); }; } // namespace chromeos
diff --git a/chromeos/network/network_activation_handler.h b/chromeos/network/network_activation_handler.h index 94981266..b2fda39 100644 --- a/chromeos/network/network_activation_handler.h +++ b/chromeos/network/network_activation_handler.h
@@ -17,6 +17,9 @@ // calls required for activation on mobile networks. class COMPONENT_EXPORT(CHROMEOS_NETWORK) NetworkActivationHandler { public: + NetworkActivationHandler(const NetworkActivationHandler&) = delete; + NetworkActivationHandler& operator=(const NetworkActivationHandler&) = delete; + virtual ~NetworkActivationHandler() = default; // CompleteActivation() will start an asynchronous activation completion @@ -32,9 +35,6 @@ protected: NetworkActivationHandler() = default; - - private: - DISALLOW_COPY_AND_ASSIGN(NetworkActivationHandler); }; } // namespace chromeos
diff --git a/chromeos/network/network_activation_handler_impl.h b/chromeos/network/network_activation_handler_impl.h index a2a3cae0..fb55354 100644 --- a/chromeos/network/network_activation_handler_impl.h +++ b/chromeos/network/network_activation_handler_impl.h
@@ -21,6 +21,10 @@ : public NetworkActivationHandler, public base::SupportsWeakPtr<NetworkActivationHandlerImpl> { public: + NetworkActivationHandlerImpl(const NetworkActivationHandlerImpl&) = delete; + NetworkActivationHandlerImpl& operator=(const NetworkActivationHandlerImpl&) = + delete; + ~NetworkActivationHandlerImpl() override; private: @@ -36,8 +40,6 @@ NetworkActivationHandlerImpl(); void HandleShillSuccess(base::OnceClosure success_callback); - - DISALLOW_COPY_AND_ASSIGN(NetworkActivationHandlerImpl); }; } // namespace chromeos
diff --git a/chromeos/network/network_cert_loader.cc b/chromeos/network/network_cert_loader.cc index a8b052d..9a4f620 100644 --- a/chromeos/network/network_cert_loader.cc +++ b/chromeos/network/network_cert_loader.cc
@@ -139,6 +139,9 @@ explicit CertCache(base::RepeatingClosure certificates_updated_callback) : certificates_updated_callback_(certificates_updated_callback) {} + CertCache(const CertCache&) = delete; + CertCache& operator=(const CertCache&) = delete; + ~CertCache() override { net::CertDatabase::GetInstance()->RemoveObserver(this); } @@ -286,8 +289,6 @@ THREAD_CHECKER(thread_checker_); base::WeakPtrFactory<CertCache> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(CertCache); }; NetworkCertLoader::NetworkCert::NetworkCert(net::ScopedCERTCertificate cert,
diff --git a/chromeos/network/network_cert_migrator.h b/chromeos/network/network_cert_migrator.h index eaba214df..aeac487 100644 --- a/chromeos/network/network_cert_migrator.h +++ b/chromeos/network/network_cert_migrator.h
@@ -21,6 +21,9 @@ : public NetworkStateHandlerObserver, public NetworkCertLoader::Observer { public: + NetworkCertMigrator(const NetworkCertMigrator&) = delete; + NetworkCertMigrator& operator=(const NetworkCertMigrator&) = delete; + ~NetworkCertMigrator() override; private: @@ -41,8 +44,6 @@ NetworkStateHandler* network_state_handler_; base::WeakPtrFactory<NetworkCertMigrator> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(NetworkCertMigrator); }; } // namespace chromeos
diff --git a/chromeos/network/network_cert_migrator_unittest.cc b/chromeos/network/network_cert_migrator_unittest.cc index c5fa4f3..2ba1ead7 100644 --- a/chromeos/network/network_cert_migrator_unittest.cc +++ b/chromeos/network/network_cert_migrator_unittest.cc
@@ -46,6 +46,10 @@ base::test::TaskEnvironment::MainThreadType::DEFAULT, base::test::TaskEnvironment::ThreadPoolExecutionMode::QUEUED), service_test_(nullptr) {} + + NetworkCertMigratorTest(const NetworkCertMigratorTest&) = delete; + NetworkCertMigratorTest& operator=(const NetworkCertMigratorTest&) = delete; + ~NetworkCertMigratorTest() override = default; void SetUp() override { @@ -220,8 +224,6 @@ private: std::unique_ptr<NetworkStateHandler> network_state_handler_; std::unique_ptr<NetworkCertMigrator> network_cert_migrator_; - - DISALLOW_COPY_AND_ASSIGN(NetworkCertMigratorTest); }; // Test that migration of user profile networks is deferred until the user's NSS
diff --git a/chromeos/network/network_certificate_handler.h b/chromeos/network/network_certificate_handler.h index 915ffe3..3d7fe6d99 100644 --- a/chromeos/network/network_certificate_handler.h +++ b/chromeos/network/network_certificate_handler.h
@@ -21,6 +21,9 @@ public: class Observer { public: + Observer(const Observer&) = delete; + Observer& operator=(const Observer&) = delete; + virtual ~Observer() {} // Called for any Observers whenever the certificates are loaded and any @@ -29,9 +32,6 @@ protected: Observer() {} - - private: - DISALLOW_COPY_AND_ASSIGN(Observer); }; struct Certificate {
diff --git a/chromeos/network/network_configuration_handler.h b/chromeos/network/network_configuration_handler.h index c8a5386..44ff945 100644 --- a/chromeos/network/network_configuration_handler.h +++ b/chromeos/network/network_configuration_handler.h
@@ -56,6 +56,10 @@ class COMPONENT_EXPORT(CHROMEOS_NETWORK) NetworkConfigurationHandler : public NetworkStateHandlerObserver { public: + NetworkConfigurationHandler(const NetworkConfigurationHandler&) = delete; + NetworkConfigurationHandler& operator=(const NetworkConfigurationHandler&) = + delete; + ~NetworkConfigurationHandler() override; // Manages the observer list. @@ -229,8 +233,6 @@ base::ObserverList<NetworkConfigurationObserver, true>::Unchecked observers_; base::WeakPtrFactory<NetworkConfigurationHandler> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(NetworkConfigurationHandler); }; } // namespace chromeos
diff --git a/chromeos/network/network_connect.cc b/chromeos/network/network_connect.cc index e81bcfc..f9b7ee58 100644 --- a/chromeos/network/network_connect.cc +++ b/chromeos/network/network_connect.cc
@@ -54,6 +54,10 @@ class NetworkConnectImpl : public NetworkConnect { public: explicit NetworkConnectImpl(Delegate* delegate); + + NetworkConnectImpl(const NetworkConnectImpl&) = delete; + NetworkConnectImpl& operator=(const NetworkConnectImpl&) = delete; + ~NetworkConnectImpl() override; // NetworkConnect @@ -105,8 +109,6 @@ Delegate* delegate_; base::WeakPtrFactory<NetworkConnectImpl> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(NetworkConnectImpl); }; NetworkConnectImpl::NetworkConnectImpl(Delegate* delegate)
diff --git a/chromeos/network/network_connect_unittest.cc b/chromeos/network/network_connect_unittest.cc index 2c2da5d..0d75f1f 100644 --- a/chromeos/network/network_connect_unittest.cc +++ b/chromeos/network/network_connect_unittest.cc
@@ -90,6 +90,10 @@ class NetworkConnectTest : public testing::Test { public: NetworkConnectTest() = default; + + NetworkConnectTest(const NetworkConnectTest&) = delete; + NetworkConnectTest& operator=(const NetworkConnectTest&) = delete; + ~NetworkConnectTest() override = default; void SetUp() override { @@ -192,9 +196,6 @@ NetworkHandlerTestHelper network_handler_test_helper_; ShillDeviceClient::TestInterface* device_test_; ShillServiceClient::TestInterface* service_test_; - - private: - DISALLOW_COPY_AND_ASSIGN(NetworkConnectTest); }; TEST_F(NetworkConnectTest, ConnectToNetworkId_NoConfiguration) {
diff --git a/chromeos/network/network_connection_handler_impl.h b/chromeos/network/network_connection_handler_impl.h index 31ba6feb..b1890bb6 100644 --- a/chromeos/network/network_connection_handler_impl.h +++ b/chromeos/network/network_connection_handler_impl.h
@@ -22,6 +22,11 @@ public base::SupportsWeakPtr<NetworkConnectionHandlerImpl> { public: NetworkConnectionHandlerImpl(); + + NetworkConnectionHandlerImpl(const NetworkConnectionHandlerImpl&) = delete; + NetworkConnectionHandlerImpl& operator=(const NetworkConnectionHandlerImpl&) = + delete; + ~NetworkConnectionHandlerImpl() override; // NetworkConnectionHandler: @@ -164,8 +169,6 @@ // Track certificate loading state. bool certificates_loaded_; - - DISALLOW_COPY_AND_ASSIGN(NetworkConnectionHandlerImpl); }; } // namespace chromeos
diff --git a/chromeos/network/network_connection_handler_impl_unittest.cc b/chromeos/network/network_connection_handler_impl_unittest.cc index 43c7a8c0..8191b56 100644 --- a/chromeos/network/network_connection_handler_impl_unittest.cc +++ b/chromeos/network/network_connection_handler_impl_unittest.cc
@@ -68,6 +68,11 @@ class TestNetworkConnectionObserver : public NetworkConnectionObserver { public: TestNetworkConnectionObserver() = default; + + TestNetworkConnectionObserver(const TestNetworkConnectionObserver&) = delete; + TestNetworkConnectionObserver& operator=( + const TestNetworkConnectionObserver&) = delete; + ~TestNetworkConnectionObserver() override = default; // NetworkConnectionObserver @@ -108,8 +113,6 @@ std::set<std::string> disconnect_requests_; std::set<std::string> requests_; std::map<std::string, std::string> results_; - - DISALLOW_COPY_AND_ASSIGN(TestNetworkConnectionObserver); }; class FakeTetherDelegate : public NetworkConnectionHandler::TetherDelegate { @@ -160,6 +163,12 @@ class NetworkConnectionHandlerImplTest : public testing::Test { public: NetworkConnectionHandlerImplTest() = default; + + NetworkConnectionHandlerImplTest(const NetworkConnectionHandlerImplTest&) = + delete; + NetworkConnectionHandlerImplTest& operator=( + const NetworkConnectionHandlerImplTest&) = delete; + ~NetworkConnectionHandlerImplTest() override = default; void SetUp() override { @@ -537,8 +546,6 @@ std::unique_ptr<net::NSSCertDatabaseChromeOS> test_nsscertdb_; std::string result_; std::unique_ptr<FakeTetherDelegate> fake_tether_delegate_; - - DISALLOW_COPY_AND_ASSIGN(NetworkConnectionHandlerImplTest); }; namespace {
diff --git a/chromeos/network/network_device_handler.h b/chromeos/network/network_device_handler.h index dbcb167..fb474f2 100644 --- a/chromeos/network/network_device_handler.h +++ b/chromeos/network/network_device_handler.h
@@ -48,6 +48,10 @@ static const char kErrorUnknown[]; NetworkDeviceHandler(); + + NetworkDeviceHandler(const NetworkDeviceHandler&) = delete; + NetworkDeviceHandler& operator=(const NetworkDeviceHandler&) = delete; + virtual ~NetworkDeviceHandler(); // Invokes |callback| with the properties for the device matching @@ -166,9 +170,6 @@ static std::unique_ptr<NetworkDeviceHandler> InitializeForTesting( NetworkStateHandler* network_state_handler); - - private: - DISALLOW_COPY_AND_ASSIGN(NetworkDeviceHandler); }; } // namespace chromeos
diff --git a/chromeos/network/network_device_handler_impl.h b/chromeos/network/network_device_handler_impl.h index fbb40024..4710a54 100644 --- a/chromeos/network/network_device_handler_impl.h +++ b/chromeos/network/network_device_handler_impl.h
@@ -27,6 +27,9 @@ : public NetworkDeviceHandler, public NetworkStateHandlerObserver { public: + NetworkDeviceHandlerImpl(const NetworkDeviceHandlerImpl&) = delete; + NetworkDeviceHandlerImpl& operator=(const NetworkDeviceHandlerImpl&) = delete; + ~NetworkDeviceHandlerImpl() override; // NetworkDeviceHandler overrides @@ -186,8 +189,6 @@ std::unordered_set<std::string> mac_address_change_not_supported_; base::WeakPtrFactory<NetworkDeviceHandlerImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(NetworkDeviceHandlerImpl); }; } // namespace chromeos
diff --git a/chromeos/network/network_device_handler_unittest.cc b/chromeos/network/network_device_handler_unittest.cc index 2c809d3..a70bb21 100644 --- a/chromeos/network/network_device_handler_unittest.cc +++ b/chromeos/network/network_device_handler_unittest.cc
@@ -45,6 +45,10 @@ NetworkDeviceHandlerTest() : task_environment_( base::test::SingleThreadTaskEnvironment::MainThreadType::UI) {} + + NetworkDeviceHandlerTest(const NetworkDeviceHandlerTest&) = delete; + NetworkDeviceHandlerTest& operator=(const NetworkDeviceHandlerTest&) = delete; + ~NetworkDeviceHandlerTest() override = default; void SetUp() override { @@ -140,9 +144,6 @@ std::unique_ptr<NetworkDeviceHandler> network_device_handler_; std::unique_ptr<NetworkStateHandler> network_state_handler_; std::unique_ptr<base::DictionaryValue> properties_; - - private: - DISALLOW_COPY_AND_ASSIGN(NetworkDeviceHandlerTest); }; TEST_F(NetworkDeviceHandlerTest, GetDeviceProperties) {
diff --git a/chromeos/network/network_metadata_store_unittest.cc b/chromeos/network/network_metadata_store_unittest.cc index 9e932fe..60279499 100644 --- a/chromeos/network/network_metadata_store_unittest.cc +++ b/chromeos/network/network_metadata_store_unittest.cc
@@ -103,6 +103,9 @@ metadata_store_->AddObserver(metadata_observer_.get()); } + NetworkMetadataStoreTest(const NetworkMetadataStoreTest&) = delete; + NetworkMetadataStoreTest& operator=(const NetworkMetadataStoreTest&) = delete; + ~NetworkMetadataStoreTest() override { network_state_handler_ = nullptr; metadata_store_.reset(); @@ -187,8 +190,6 @@ std::unique_ptr<NetworkMetadataStore> metadata_store_; std::unique_ptr<TestNetworkMetadataObserver> metadata_observer_; std::unique_ptr<user_manager::ScopedUserManager> scoped_user_manager_; - - DISALLOW_COPY_AND_ASSIGN(NetworkMetadataStoreTest); }; namespace {
diff --git a/chromeos/network/network_profile_handler.h b/chromeos/network/network_profile_handler.h index c931c0fc..54ca2c79d 100644 --- a/chromeos/network/network_profile_handler.h +++ b/chromeos/network/network_profile_handler.h
@@ -28,6 +28,9 @@ public: typedef std::vector<NetworkProfile> ProfileList; + NetworkProfileHandler(const NetworkProfileHandler&) = delete; + NetworkProfileHandler& operator=(const NetworkProfileHandler&) = delete; + ~NetworkProfileHandler() override; void AddObserver(NetworkProfileObserver* observer); @@ -102,9 +105,6 @@ // For Shill client callbacks base::WeakPtrFactory<NetworkProfileHandler> weak_ptr_factory_{this}; - - private: - DISALLOW_COPY_AND_ASSIGN(NetworkProfileHandler); }; } // namespace chromeos
diff --git a/chromeos/network/network_sms_handler.cc b/chromeos/network/network_sms_handler.cc index 37be1ae..603dd55 100644 --- a/chromeos/network/network_sms_handler.cc +++ b/chromeos/network/network_sms_handler.cc
@@ -50,6 +50,12 @@ ModemManager1NetworkSmsDeviceHandler(NetworkSmsHandler* host, const std::string& service_name, const dbus::ObjectPath& object_path); + + ModemManager1NetworkSmsDeviceHandler( + const ModemManager1NetworkSmsDeviceHandler&) = delete; + ModemManager1NetworkSmsDeviceHandler& operator=( + const ModemManager1NetworkSmsDeviceHandler&) = delete; + ~ModemManager1NetworkSmsDeviceHandler() override; private: @@ -70,8 +76,6 @@ base::circular_deque<dbus::ObjectPath> retrieval_queue_; base::WeakPtrFactory<ModemManager1NetworkSmsDeviceHandler> weak_ptr_factory_{ this}; - - DISALLOW_COPY_AND_ASSIGN(ModemManager1NetworkSmsDeviceHandler); }; NetworkSmsHandler::ModemManager1NetworkSmsDeviceHandler::
diff --git a/chromeos/network/network_sms_handler.h b/chromeos/network/network_sms_handler.h index 824b207e..a5fb03b 100644 --- a/chromeos/network/network_sms_handler.h +++ b/chromeos/network/network_sms_handler.h
@@ -41,6 +41,9 @@ virtual void MessageReceived(const base::Value& message) = 0; }; + NetworkSmsHandler(const NetworkSmsHandler&) = delete; + NetworkSmsHandler& operator=(const NetworkSmsHandler&) = delete; + ~NetworkSmsHandler() override; // Requests an immediate check for new messages. @@ -99,8 +102,6 @@ std::vector<base::Value> received_messages_; std::string cellular_device_path_; base::WeakPtrFactory<NetworkSmsHandler> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(NetworkSmsHandler); }; } // namespace chromeos
diff --git a/chromeos/network/network_state.h b/chromeos/network/network_state.h index 3ec66f6..d4364cd 100644 --- a/chromeos/network/network_state.h +++ b/chromeos/network/network_state.h
@@ -45,6 +45,10 @@ class COMPONENT_EXPORT(CHROMEOS_NETWORK) NetworkState : public ManagedState { public: explicit NetworkState(const std::string& path); + + NetworkState(const NetworkState&) = delete; + NetworkState& operator=(const NetworkState&) = delete; + ~NetworkState() override; struct VpnProviderInfo { @@ -385,8 +389,6 @@ // Set by NetworkStateHandler if Chrome detects a captive portal state. // See IsCaptivePortal() for details. bool is_chrome_captive_portal_ = false; - - DISALLOW_COPY_AND_ASSIGN(NetworkState); }; } // namespace chromeos
diff --git a/chromeos/network/network_state_handler.h b/chromeos/network/network_state_handler.h index 878278c..a257018 100644 --- a/chromeos/network/network_state_handler.h +++ b/chromeos/network/network_state_handler.h
@@ -115,6 +115,9 @@ TECHNOLOGY_PROHIBITED }; + NetworkStateHandler(const NetworkStateHandler&) = delete; + NetworkStateHandler& operator=(const NetworkStateHandler&) = delete; + ~NetworkStateHandler() override; // Called just before destruction to give observers a chance to remove @@ -773,8 +776,6 @@ bool is_user_logged_in_ = false; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(NetworkStateHandler); }; } // namespace chromeos
diff --git a/chromeos/network/network_state_handler_observer.h b/chromeos/network/network_state_handler_observer.h index df3aa07..26a464e 100644 --- a/chromeos/network/network_state_handler_observer.h +++ b/chromeos/network/network_state_handler_observer.h
@@ -22,6 +22,11 @@ class COMPONENT_EXPORT(CHROMEOS_NETWORK) NetworkStateHandlerObserver { public: NetworkStateHandlerObserver(); + + NetworkStateHandlerObserver(const NetworkStateHandlerObserver&) = delete; + NetworkStateHandlerObserver& operator=(const NetworkStateHandlerObserver&) = + delete; + virtual ~NetworkStateHandlerObserver(); // The list of networks changed. @@ -85,9 +90,6 @@ // Called just before NetworkStateHandler is destroyed so that observers // can safely stop observing. virtual void OnShuttingDown(); - - private: - DISALLOW_COPY_AND_ASSIGN(NetworkStateHandlerObserver); }; } // namespace chromeos
diff --git a/chromeos/network/network_state_handler_unittest.cc b/chromeos/network/network_state_handler_unittest.cc index 808d816..c84b584 100644 --- a/chromeos/network/network_state_handler_unittest.cc +++ b/chromeos/network/network_state_handler_unittest.cc
@@ -108,6 +108,10 @@ class TestObserver final : public chromeos::NetworkStateHandlerObserver { public: explicit TestObserver(NetworkStateHandler* handler) : handler_(handler) {} + + TestObserver(const TestObserver&) = delete; + TestObserver& operator=(const TestObserver&) = delete; + ~TestObserver() override = default; void DeviceListChanged() override { @@ -295,13 +299,15 @@ absl::optional<base::RunLoop> run_loop_scan_started_; absl::optional<base::RunLoop> run_loop_scan_completed_; std::vector<std::pair<std::string, std::string>> service_path_transitions_; - - DISALLOW_COPY_AND_ASSIGN(TestObserver); }; class TestTetherSortDelegate : public NetworkStateHandler::TetherSortDelegate { public: TestTetherSortDelegate() = default; + + TestTetherSortDelegate(const TestTetherSortDelegate&) = delete; + TestTetherSortDelegate& operator=(const TestTetherSortDelegate&) = delete; + ~TestTetherSortDelegate() = default; // NetworkStateHandler::TetherSortDelegate: @@ -319,9 +325,6 @@ return first_network->guid() >= second_network->guid(); }); } - - private: - DISALLOW_COPY_AND_ASSIGN(TestTetherSortDelegate); }; } // namespace @@ -335,6 +338,10 @@ manager_test_(nullptr), profile_test_(nullptr), service_test_(nullptr) {} + + NetworkStateHandlerTest(const NetworkStateHandlerTest&) = delete; + NetworkStateHandlerTest& operator=(const NetworkStateHandlerTest&) = delete; + ~NetworkStateHandlerTest() override = default; void SetUp() override { @@ -453,9 +460,6 @@ ShillManagerClient::TestInterface* manager_test_; ShillProfileClient::TestInterface* profile_test_; ShillServiceClient::TestInterface* service_test_; - - private: - DISALLOW_COPY_AND_ASSIGN(NetworkStateHandlerTest); }; TEST_F(NetworkStateHandlerTest, NetworkStateHandlerStub) {
diff --git a/chromeos/network/onc/onc_certificate_importer.h b/chromeos/network/onc/onc_certificate_importer.h index 0e1fd09..7f8e32e 100644 --- a/chromeos/network/onc/onc_certificate_importer.h +++ b/chromeos/network/onc/onc_certificate_importer.h
@@ -24,6 +24,10 @@ typedef base::OnceCallback<void(bool success)> DoneCallback; CertificateImporter() {} + + CertificateImporter(const CertificateImporter&) = delete; + CertificateImporter& operator=(const CertificateImporter&) = delete; + virtual ~CertificateImporter() {} // This is intended for user-initiated ONC imports. @@ -49,9 +53,6 @@ const std::vector<OncParsedCertificates::ClientCertificate>& client_certificates, DoneCallback done_callback) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(CertificateImporter); }; } // namespace onc
diff --git a/chromeos/network/onc/onc_certificate_importer_impl.h b/chromeos/network/onc/onc_certificate_importer_impl.h index 32f3184f..45d2047b 100644 --- a/chromeos/network/onc/onc_certificate_importer_impl.h +++ b/chromeos/network/onc/onc_certificate_importer_impl.h
@@ -42,6 +42,10 @@ CertificateImporterImpl( const scoped_refptr<base::SequencedTaskRunner>& io_task_runner, net::NSSCertDatabase* target_nssdb_); + + CertificateImporterImpl(const CertificateImporterImpl&) = delete; + CertificateImporterImpl& operator=(const CertificateImporterImpl&) = delete; + ~CertificateImporterImpl() override; // CertificateImporter overrides @@ -102,8 +106,6 @@ net::NSSCertDatabase* target_nssdb_; base::WeakPtrFactory<CertificateImporterImpl> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(CertificateImporterImpl); }; } // namespace onc
diff --git a/chromeos/network/onc/onc_certificate_pattern_unittest.cc b/chromeos/network/onc/onc_certificate_pattern_unittest.cc index 637abb5..3f9e0e2 100644 --- a/chromeos/network/onc/onc_certificate_pattern_unittest.cc +++ b/chromeos/network/onc/onc_certificate_pattern_unittest.cc
@@ -23,6 +23,11 @@ class OncCertificatePatternTest : public testing::Test { public: OncCertificatePatternTest() = default; + + OncCertificatePatternTest(const OncCertificatePatternTest&) = delete; + OncCertificatePatternTest& operator=(const OncCertificatePatternTest&) = + delete; + ~OncCertificatePatternTest() override = default; void SetUp() override { @@ -35,8 +40,6 @@ protected: scoped_refptr<net::X509Certificate> cert_; - - DISALLOW_COPY_AND_ASSIGN(OncCertificatePatternTest); }; } // namespace
diff --git a/chromeos/network/onc/onc_mapper.h b/chromeos/network/onc/onc_mapper.h index e2f22024ec..87520852 100644 --- a/chromeos/network/onc/onc_mapper.h +++ b/chromeos/network/onc/onc_mapper.h
@@ -38,6 +38,10 @@ class COMPONENT_EXPORT(CHROMEOS_NETWORK) Mapper { public: Mapper(); + + Mapper(const Mapper&) = delete; + Mapper& operator=(const Mapper&) = delete; + virtual ~Mapper(); protected: @@ -105,9 +109,6 @@ const OncValueSignature& signature, const base::Value& onc_value, bool* error); - - private: - DISALLOW_COPY_AND_ASSIGN(Mapper); }; } // namespace onc
diff --git a/chromeos/network/onc/onc_merger.cc b/chromeos/network/onc/onc_merger.cc index dc455eb..507c8ab0 100644 --- a/chromeos/network/onc/onc_merger.cc +++ b/chromeos/network/onc/onc_merger.cc
@@ -82,6 +82,9 @@ MergeListOfDictionaries() = default; + MergeListOfDictionaries(const MergeListOfDictionaries&) = delete; + MergeListOfDictionaries& operator=(const MergeListOfDictionaries&) = delete; + virtual ~MergeListOfDictionaries() = default; // For each path in any of the dictionaries |dicts|, either MergeListOfValues @@ -135,9 +138,6 @@ const ValuePtrs& dicts) { return MergeDictionaries(dicts); } - - private: - DISALLOW_COPY_AND_ASSIGN(MergeListOfDictionaries); }; // This is the base class for merging policies and user settings.
diff --git a/chromeos/network/onc/onc_normalizer.h b/chromeos/network/onc/onc_normalizer.h index 7a67376..c64343a 100644 --- a/chromeos/network/onc/onc_normalizer.h +++ b/chromeos/network/onc/onc_normalizer.h
@@ -19,6 +19,10 @@ class COMPONENT_EXPORT(CHROMEOS_NETWORK) Normalizer : public Mapper { public: explicit Normalizer(bool remove_recommended_fields); + + Normalizer(const Normalizer&) = delete; + Normalizer& operator=(const Normalizer&) = delete; + ~Normalizer() override; // Removes all fields that are ignored/irrelevant because of the value of @@ -53,8 +57,6 @@ void NormalizeStaticIPConfigForNetwork(base::DictionaryValue* network); const bool remove_recommended_fields_; - - DISALLOW_COPY_AND_ASSIGN(Normalizer); }; } // namespace onc
diff --git a/chromeos/network/onc/onc_validator.h b/chromeos/network/onc/onc_validator.h index ab9501b3..1dfb103e 100644 --- a/chromeos/network/onc/onc_validator.h +++ b/chromeos/network/onc/onc_validator.h
@@ -100,6 +100,9 @@ bool managed_onc, bool log_warnings); + Validator(const Validator&) = delete; + Validator& operator=(const Validator&) = delete; + ~Validator() override; // Sets the ONC source to |source|. If not set, defaults to ONC_SOURCE_NONE. @@ -293,8 +296,6 @@ // List of all validation issues that occured within validation initiated by // function ValidateAndRepairObject. std::vector<ValidationIssue> validation_issues_; - - DISALLOW_COPY_AND_ASSIGN(Validator); }; } // namespace onc
diff --git a/chromeos/network/onc/variable_expander.h b/chromeos/network/onc/variable_expander.h index eea3605..f8f1eebf 100644 --- a/chromeos/network/onc/variable_expander.h +++ b/chromeos/network/onc/variable_expander.h
@@ -36,6 +36,9 @@ // Takes a map of variables to values. explicit VariableExpander(std::map<std::string, std::string> variables); + VariableExpander(const VariableExpander&) = delete; + VariableExpander& operator=(const VariableExpander&) = delete; + ~VariableExpander(); // Expands all variables in |str|. Returns true if no error has occurred. @@ -52,8 +55,6 @@ private: // Maps variable -> value. const std::map<std::string, std::string> variables_; - - DISALLOW_COPY_AND_ASSIGN(VariableExpander); }; } // namespace chromeos
diff --git a/chromeos/network/portal_detector/mock_network_portal_detector.h b/chromeos/network/portal_detector/mock_network_portal_detector.h index e395682..92d3e0d 100644 --- a/chromeos/network/portal_detector/mock_network_portal_detector.h +++ b/chromeos/network/portal_detector/mock_network_portal_detector.h
@@ -13,6 +13,11 @@ class MockNetworkPortalDetector : public NetworkPortalDetector { public: MockNetworkPortalDetector(); + + MockNetworkPortalDetector(const MockNetworkPortalDetector&) = delete; + MockNetworkPortalDetector& operator=(const MockNetworkPortalDetector&) = + delete; + ~MockNetworkPortalDetector() override; MOCK_METHOD1(AddObserver, @@ -28,9 +33,6 @@ MOCK_METHOD0(StartPortalDetection, void()); MOCK_METHOD1(SetStrategy, void(chromeos::PortalDetectorStrategy::StrategyId id)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockNetworkPortalDetector); }; } // namespace chromeos
diff --git a/chromeos/network/portal_detector/network_portal_detector_strategy.cc b/chromeos/network/portal_detector/network_portal_detector_strategy.cc index c7030cb2..9b7a2e1 100644 --- a/chromeos/network/portal_detector/network_portal_detector_strategy.cc +++ b/chromeos/network/portal_detector/network_portal_detector_strategy.cc
@@ -27,6 +27,10 @@ explicit LoginScreenStrategy(PortalDetectorStrategy::Delegate* delegate) : PortalDetectorStrategy(delegate) {} + + LoginScreenStrategy(const LoginScreenStrategy&) = delete; + LoginScreenStrategy& operator=(const LoginScreenStrategy&) = delete; + ~LoginScreenStrategy() override = default; protected: @@ -44,9 +48,6 @@ } return base::TimeDelta::FromSeconds(kBaseAttemptTimeoutSec); } - - private: - DISALLOW_COPY_AND_ASSIGN(LoginScreenStrategy); }; class ErrorScreenStrategy : public PortalDetectorStrategy { @@ -55,6 +56,10 @@ explicit ErrorScreenStrategy(PortalDetectorStrategy::Delegate* delegate) : PortalDetectorStrategy(delegate) {} + + ErrorScreenStrategy(const ErrorScreenStrategy&) = delete; + ErrorScreenStrategy& operator=(const ErrorScreenStrategy&) = delete; + ~ErrorScreenStrategy() override = default; protected: @@ -63,9 +68,6 @@ base::TimeDelta GetNextAttemptTimeoutImpl() override { return base::TimeDelta::FromSeconds(kAttemptTimeoutSec); } - - private: - DISALLOW_COPY_AND_ASSIGN(ErrorScreenStrategy); }; class SessionStrategy : public PortalDetectorStrategy { @@ -76,6 +78,10 @@ explicit SessionStrategy(PortalDetectorStrategy::Delegate* delegate) : PortalDetectorStrategy(delegate) {} + + SessionStrategy(const SessionStrategy&) = delete; + SessionStrategy& operator=(const SessionStrategy&) = delete; + ~SessionStrategy() override = default; protected: @@ -88,9 +94,6 @@ timeout = kSlowAttemptTimeoutSec; return base::TimeDelta::FromSeconds(timeout); } - - private: - DISALLOW_COPY_AND_ASSIGN(SessionStrategy); }; } // namespace
diff --git a/chromeos/network/portal_detector/network_portal_detector_strategy.h b/chromeos/network/portal_detector/network_portal_detector_strategy.h index ce4ed2ac..0dd440f 100644 --- a/chromeos/network/portal_detector/network_portal_detector_strategy.h +++ b/chromeos/network/portal_detector/network_portal_detector_strategy.h
@@ -36,6 +36,9 @@ virtual base::TimeTicks AttemptStartTime() = 0; }; + PortalDetectorStrategy(const PortalDetectorStrategy&) = delete; + PortalDetectorStrategy& operator=(const PortalDetectorStrategy&) = delete; + virtual ~PortalDetectorStrategy(); // Lifetime of delegate must enclose lifetime of PortalDetectorStrategy. @@ -106,8 +109,6 @@ // True when |next_attempt_timeout_for_testing_| is initialized. static bool next_attempt_timeout_for_testing_initialized_; - - DISALLOW_COPY_AND_ASSIGN(PortalDetectorStrategy); }; } // namespace chromeos
diff --git a/chromeos/network/portal_detector/network_portal_detector_stub.h b/chromeos/network/portal_detector/network_portal_detector_stub.h index 825ee73..54ab87f 100644 --- a/chromeos/network/portal_detector/network_portal_detector_stub.h +++ b/chromeos/network/portal_detector/network_portal_detector_stub.h
@@ -14,6 +14,11 @@ : public NetworkPortalDetector { public: NetworkPortalDetectorStub(); + + NetworkPortalDetectorStub(const NetworkPortalDetectorStub&) = delete; + NetworkPortalDetectorStub& operator=(const NetworkPortalDetectorStub&) = + delete; + ~NetworkPortalDetectorStub() override; private: @@ -26,8 +31,6 @@ void Enable(bool start_detection) override; void StartPortalDetection() override; void SetStrategy(PortalDetectorStrategy::StrategyId id) override; - - DISALLOW_COPY_AND_ASSIGN(NetworkPortalDetectorStub); }; } // namespace chromeos
diff --git a/chromeos/network/prohibited_technologies_handler.h b/chromeos/network/prohibited_technologies_handler.h index 7322baa38..395dc96 100644 --- a/chromeos/network/prohibited_technologies_handler.h +++ b/chromeos/network/prohibited_technologies_handler.h
@@ -21,6 +21,10 @@ : public LoginState::Observer, public NetworkPolicyObserver { public: + ProhibitedTechnologiesHandler(const ProhibitedTechnologiesHandler&) = delete; + ProhibitedTechnologiesHandler& operator=( + const ProhibitedTechnologiesHandler&) = delete; + ~ProhibitedTechnologiesHandler() override; // LoginState::Observer @@ -63,8 +67,6 @@ NetworkStateHandler* network_state_handler_ = nullptr; bool user_logged_in_ = false; bool user_policy_applied_ = false; - - DISALLOW_COPY_AND_ASSIGN(ProhibitedTechnologiesHandler); }; } // namespace chromeos
diff --git a/chromeos/network/proxy/proxy_config_service_impl.h b/chromeos/network/proxy/proxy_config_service_impl.h index 132a6f32..b4d6df6 100644 --- a/chromeos/network/proxy/proxy_config_service_impl.h +++ b/chromeos/network/proxy/proxy_config_service_impl.h
@@ -49,6 +49,10 @@ PrefService* profile_prefs, PrefService* local_state_prefs, scoped_refptr<base::SingleThreadTaskRunner> io_task_runner); + + ProxyConfigServiceImpl(const ProxyConfigServiceImpl&) = delete; + ProxyConfigServiceImpl& operator=(const ProxyConfigServiceImpl&) = delete; + ~ProxyConfigServiceImpl() override; // PrefProxyConfigTrackerImpl implementation. @@ -100,8 +104,6 @@ PrefService* local_state_prefs_; base::WeakPtrFactory<ProxyConfigServiceImpl> pointer_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceImpl); }; } // namespace chromeos
diff --git a/chromeos/network/proxy/ui_proxy_config_service.h b/chromeos/network/proxy/ui_proxy_config_service.h index cc8b66ae..180b42a 100644 --- a/chromeos/network/proxy/ui_proxy_config_service.h +++ b/chromeos/network/proxy/ui_proxy_config_service.h
@@ -42,6 +42,10 @@ PrefService* local_state_prefs, NetworkStateHandler* network_state_handler, NetworkProfileHandler* network_profile_handler); + + UIProxyConfigService(const UIProxyConfigService&) = delete; + UIProxyConfigService& operator=(const UIProxyConfigService&) = delete; + ~UIProxyConfigService(); // Generates ONC dictionary for proxy settings enforced for the network, and @@ -85,8 +89,6 @@ NetworkStateHandler* network_state_handler_; // unowned NetworkProfileHandler* network_profile_handler_; // unowned - - DISALLOW_COPY_AND_ASSIGN(UIProxyConfigService); }; } // namespace chromeos
diff --git a/chromeos/network/shill_property_handler.cc b/chromeos/network/shill_property_handler.cc index db673c4..fd327e1 100644 --- a/chromeos/network/shill_property_handler.cc +++ b/chromeos/network/shill_property_handler.cc
@@ -76,6 +76,9 @@ } } + ShillPropertyObserver(const ShillPropertyObserver&) = delete; + ShillPropertyObserver& operator=(const ShillPropertyObserver&) = delete; + ~ShillPropertyObserver() override { switch (type_) { case ManagedState::MANAGED_TYPE_NETWORK: @@ -99,8 +102,6 @@ ManagedState::ManagedType type_; std::string path_; Handler handler_; - - DISALLOW_COPY_AND_ASSIGN(ShillPropertyObserver); }; //------------------------------------------------------------------------------
diff --git a/chromeos/network/shill_property_handler_unittest.cc b/chromeos/network/shill_property_handler_unittest.cc index 985dc50..c3d7903 100644 --- a/chromeos/network/shill_property_handler_unittest.cc +++ b/chromeos/network/shill_property_handler_unittest.cc
@@ -179,6 +179,10 @@ device_test_(NULL), service_test_(NULL), profile_test_(NULL) {} + + ShillPropertyHandlerTest(const ShillPropertyHandlerTest&) = delete; + ShillPropertyHandlerTest& operator=(const ShillPropertyHandlerTest&) = delete; + ~ShillPropertyHandlerTest() override = default; void SetUp() override { @@ -281,9 +285,6 @@ ShillDeviceClient::TestInterface* device_test_; ShillServiceClient::TestInterface* service_test_; ShillProfileClient::TestInterface* profile_test_; - - private: - DISALLOW_COPY_AND_ASSIGN(ShillPropertyHandlerTest); }; TEST_F(ShillPropertyHandlerTest, ShillPropertyHandlerStub) {
diff --git a/chromeos/process_proxy/process_output_watcher.h b/chromeos/process_proxy/process_output_watcher.h index 318d535..48c56229 100644 --- a/chromeos/process_proxy/process_output_watcher.h +++ b/chromeos/process_proxy/process_output_watcher.h
@@ -32,6 +32,10 @@ class COMPONENT_EXPORT(CHROMEOS_PROCESS_PROXY) ProcessOutputWatcher { public: ProcessOutputWatcher(int out_fd, const ProcessOutputCallback& callback); + + ProcessOutputWatcher(const ProcessOutputWatcher&) = delete; + ProcessOutputWatcher& operator=(const ProcessOutputWatcher&) = delete; + ~ProcessOutputWatcher(); void Start(); @@ -70,8 +74,6 @@ ProcessOutputCallback on_read_callback_; base::WeakPtrFactory<ProcessOutputWatcher> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ProcessOutputWatcher); }; } // namespace chromeos
diff --git a/chromeos/services/assistant/assistant_manager_service_impl.h b/chromeos/services/assistant/assistant_manager_service_impl.h index 1f83c9b..da8b3be 100644 --- a/chromeos/services/assistant/assistant_manager_service_impl.h +++ b/chromeos/services/assistant/assistant_manager_service_impl.h
@@ -107,6 +107,10 @@ std::unique_ptr<LibassistantServiceHost> libassistant_service_host = nullptr); + AssistantManagerServiceImpl(const AssistantManagerServiceImpl&) = delete; + AssistantManagerServiceImpl& operator=(const AssistantManagerServiceImpl&) = + delete; + ~AssistantManagerServiceImpl() override; // assistant::AssistantManagerService overrides: @@ -270,8 +274,6 @@ base::ObserverList<AssistantManagerService::StateObserver> state_observers_; base::WeakPtrFactory<AssistantManagerServiceImpl> weak_factory_; - - DISALLOW_COPY_AND_ASSIGN(AssistantManagerServiceImpl); }; } // namespace assistant
diff --git a/chromeos/services/assistant/assistant_manager_service_impl_unittest.cc b/chromeos/services/assistant/assistant_manager_service_impl_unittest.cc index 41f7f790..edebea8 100644 --- a/chromeos/services/assistant/assistant_manager_service_impl_unittest.cc +++ b/chromeos/services/assistant/assistant_manager_service_impl_unittest.cc
@@ -101,17 +101,24 @@ class StateObserverMock : public AssistantManagerService::StateObserver { public: StateObserverMock() = default; + + StateObserverMock(const StateObserverMock&) = delete; + StateObserverMock& operator=(const StateObserverMock&) = delete; + ~StateObserverMock() override = default; MOCK_METHOD(void, OnStateChanged, (AssistantManagerService::State new_state)); - - private: - DISALLOW_COPY_AND_ASSIGN(StateObserverMock); }; class AssistantManagerServiceImplTest : public testing::Test { public: AssistantManagerServiceImplTest() = default; + + AssistantManagerServiceImplTest(const AssistantManagerServiceImplTest&) = + delete; + AssistantManagerServiceImplTest& operator=( + const AssistantManagerServiceImplTest&) = delete; + ~AssistantManagerServiceImplTest() override = default; void SetUp() override { @@ -247,8 +254,6 @@ scoped_refptr<network::SharedURLLoaderFactory> shared_url_loader_factory_; std::unique_ptr<AssistantManagerServiceImpl> assistant_manager_service_; - - DISALLOW_COPY_AND_ASSIGN(AssistantManagerServiceImplTest); }; class SpeakerIdEnrollmentControllerMock
diff --git a/chromeos/services/assistant/assistant_settings_impl.h b/chromeos/services/assistant/assistant_settings_impl.h index 6db5892..93367b3 100644 --- a/chromeos/services/assistant/assistant_settings_impl.h +++ b/chromeos/services/assistant/assistant_settings_impl.h
@@ -29,6 +29,10 @@ class AssistantSettingsImpl : public AssistantSettings { public: explicit AssistantSettingsImpl(ServiceContext* context); + + AssistantSettingsImpl(const AssistantSettingsImpl&) = delete; + AssistantSettingsImpl& operator=(const AssistantSettingsImpl&) = delete; + ~AssistantSettingsImpl() override; void Initialize( @@ -70,8 +74,6 @@ speaker_id_enrollment_remote_; base::WeakPtrFactory<AssistantSettingsImpl> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(AssistantSettingsImpl); }; } // namespace assistant
diff --git a/chromeos/services/assistant/audio_decoder/assistant_audio_decoder.h b/chromeos/services/assistant/audio_decoder/assistant_audio_decoder.h index 8d10b9f..922e042c 100644 --- a/chromeos/services/assistant/audio_decoder/assistant_audio_decoder.h +++ b/chromeos/services/assistant/audio_decoder/assistant_audio_decoder.h
@@ -29,6 +29,10 @@ AssistantAudioDecoder( mojo::PendingRemote<mojom::AssistantAudioDecoderClient> client, mojo::PendingRemote<mojom::AssistantMediaDataSource> data_source); + + AssistantAudioDecoder(const AssistantAudioDecoder&) = delete; + AssistantAudioDecoder& operator=(const AssistantAudioDecoder&) = delete; + ~AssistantAudioDecoder() override; // Called by |client_| on main thread. @@ -74,8 +78,6 @@ std::unique_ptr<base::Thread> media_thread_; base::WeakPtrFactory<AssistantAudioDecoder> weak_factory_; - - DISALLOW_COPY_AND_ASSIGN(AssistantAudioDecoder); }; } // namespace assistant
diff --git a/chromeos/services/assistant/audio_decoder/assistant_audio_decoder_factory.h b/chromeos/services/assistant/audio_decoder/assistant_audio_decoder_factory.h index 7dbe09d2..bb77b796 100644 --- a/chromeos/services/assistant/audio_decoder/assistant_audio_decoder_factory.h +++ b/chromeos/services/assistant/audio_decoder/assistant_audio_decoder_factory.h
@@ -18,6 +18,11 @@ public: explicit AssistantAudioDecoderFactory( mojo::PendingReceiver<mojom::AssistantAudioDecoderFactory> receiver); + + AssistantAudioDecoderFactory(const AssistantAudioDecoderFactory&) = delete; + AssistantAudioDecoderFactory& operator=(const AssistantAudioDecoderFactory&) = + delete; + ~AssistantAudioDecoderFactory() override; private: @@ -29,8 +34,6 @@ override; mojo::Receiver<mojom::AssistantAudioDecoderFactory> receiver_; - - DISALLOW_COPY_AND_ASSIGN(AssistantAudioDecoderFactory); }; } // namespace assistant
diff --git a/chromeos/services/assistant/audio_decoder/ipc_data_source.h b/chromeos/services/assistant/audio_decoder/ipc_data_source.h index 0d00921..d7148d93 100644 --- a/chromeos/services/assistant/audio_decoder/ipc_data_source.h +++ b/chromeos/services/assistant/audio_decoder/ipc_data_source.h
@@ -25,6 +25,10 @@ // May only be called on the utility thread. explicit IPCDataSource( mojo::PendingRemote<mojom::AssistantMediaDataSource> media_data_source); + + IPCDataSource(const IPCDataSource&) = delete; + IPCDataSource& operator=(const IPCDataSource&) = delete; + ~IPCDataSource() override; // media::DataSource implementation. The methods may be called on any single @@ -55,8 +59,6 @@ // Enforces that the DataSource methods are called on one other thread only. THREAD_CHECKER(data_source_thread_checker_); - - DISALLOW_COPY_AND_ASSIGN(IPCDataSource); }; } // namespace assistant
diff --git a/chromeos/services/assistant/media_session/assistant_media_session.h b/chromeos/services/assistant/media_session/assistant_media_session.h index 954f2f37..e9b9826f 100644 --- a/chromeos/services/assistant/media_session/assistant_media_session.h +++ b/chromeos/services/assistant/media_session/assistant_media_session.h
@@ -28,6 +28,10 @@ : public media_session::mojom::MediaSession { public: explicit AssistantMediaSession(MediaHost* host); + + AssistantMediaSession(const AssistantMediaSession&) = delete; + AssistantMediaSession& operator=(const AssistantMediaSession&) = delete; + ~AssistantMediaSession() override; // media_session.mojom.MediaSession overrides: @@ -131,8 +135,6 @@ base::UnguessableToken::Null(); base::WeakPtrFactory<AssistantMediaSession> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(AssistantMediaSession); }; } // namespace assistant
diff --git a/chromeos/services/assistant/service.cc b/chromeos/services/assistant/service.cc index 941e456..6e6c35e9 100644 --- a/chromeos/services/assistant/service.cc +++ b/chromeos/services/assistant/service.cc
@@ -130,6 +130,10 @@ class Service::Context : public ServiceContext { public: explicit Context(Service* parent) : parent_(parent) {} + + Context(const Context&) = delete; + Context& operator=(const Context&) = delete; + ~Context() override = default; // ServiceContext: @@ -176,8 +180,6 @@ private: Service* const parent_; // |this| is owned by |parent_|. - - DISALLOW_COPY_AND_ASSIGN(Context); }; Service::Service(std::unique_ptr<network::PendingSharedURLLoaderFactory>
diff --git a/chromeos/services/assistant/service.h b/chromeos/services/assistant/service.h index e553d11..c5b512e 100644 --- a/chromeos/services/assistant/service.h +++ b/chromeos/services/assistant/service.h
@@ -68,6 +68,10 @@ Service(std::unique_ptr<network::PendingSharedURLLoaderFactory> pending_url_loader_factory, signin::IdentityManager* identity_manager); + + Service(const Service&) = delete; + Service& operator=(const Service&) = delete; + ~Service() override; // Allows tests to override the S3 server URI used by the service. @@ -193,8 +197,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<Service> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(Service); }; } // namespace assistant
diff --git a/chromeos/services/assistant/test_support/fake_assistant_manager_service_impl.h b/chromeos/services/assistant/test_support/fake_assistant_manager_service_impl.h index 913f87f..23cfd17 100644 --- a/chromeos/services/assistant/test_support/fake_assistant_manager_service_impl.h +++ b/chromeos/services/assistant/test_support/fake_assistant_manager_service_impl.h
@@ -30,6 +30,12 @@ : public AssistantManagerService { public: FakeAssistantManagerServiceImpl(); + + FakeAssistantManagerServiceImpl(const FakeAssistantManagerServiceImpl&) = + delete; + FakeAssistantManagerServiceImpl& operator=( + const FakeAssistantManagerServiceImpl&) = delete; + ~FakeAssistantManagerServiceImpl() override; void FinishStart(); @@ -99,8 +105,6 @@ absl::optional<std::string> access_token_; FakeAssistantSettingsImpl assistant_settings_; base::ObserverList<StateObserver> state_observers_; - - DISALLOW_COPY_AND_ASSIGN(FakeAssistantManagerServiceImpl); }; } // namespace assistant
diff --git a/chromeos/services/assistant/test_support/fully_initialized_assistant_state.h b/chromeos/services/assistant/test_support/fully_initialized_assistant_state.h index 51486cdd..928c570 100644 --- a/chromeos/services/assistant/test_support/fully_initialized_assistant_state.h +++ b/chromeos/services/assistant/test_support/fully_initialized_assistant_state.h
@@ -15,14 +15,18 @@ class FullyInitializedAssistantState : public ash::AssistantState { public: FullyInitializedAssistantState(); + + FullyInitializedAssistantState(const FullyInitializedAssistantState&) = + delete; + FullyInitializedAssistantState& operator=( + const FullyInitializedAssistantState&) = delete; + ~FullyInitializedAssistantState() override = default; void SetAssistantEnabled(bool enabled); private: void InitializeAllValues(); - - DISALLOW_COPY_AND_ASSIGN(FullyInitializedAssistantState); }; } // namespace assistant
diff --git a/chromeos/services/assistant/test_support/mock_assistant.h b/chromeos/services/assistant/test_support/mock_assistant.h index a950a864..bafe0cd 100644 --- a/chromeos/services/assistant/test_support/mock_assistant.h +++ b/chromeos/services/assistant/test_support/mock_assistant.h
@@ -19,6 +19,10 @@ class MockAssistant : public Assistant { public: MockAssistant(); + + MockAssistant(const MockAssistant&) = delete; + MockAssistant& operator=(const MockAssistant&) = delete; + ~MockAssistant() override; MOCK_METHOD1(StartEditReminderInteraction, void(const std::string&)); @@ -51,9 +55,6 @@ MOCK_METHOD0(StopAlarmTimerRinging, void()); MOCK_METHOD1(CreateTimer, void(base::TimeDelta)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockAssistant); }; } // namespace assistant
diff --git a/chromeos/services/cellular_setup/cellular_setup_base.h b/chromeos/services/cellular_setup/cellular_setup_base.h index 4262329..21f7c335 100644 --- a/chromeos/services/cellular_setup/cellular_setup_base.h +++ b/chromeos/services/cellular_setup/cellular_setup_base.h
@@ -19,6 +19,9 @@ // derived classes should override them. class CellularSetupBase : public mojom::CellularSetup { public: + CellularSetupBase(const CellularSetupBase&) = delete; + CellularSetupBase& operator=(const CellularSetupBase&) = delete; + ~CellularSetupBase() override; void BindReceiver(mojo::PendingReceiver<mojom::CellularSetup> receiver); @@ -28,8 +31,6 @@ private: mojo::ReceiverSet<mojom::CellularSetup> receivers_; - - DISALLOW_COPY_AND_ASSIGN(CellularSetupBase); }; } // namespace cellular_setup
diff --git a/chromeos/services/cellular_setup/cellular_setup_impl.h b/chromeos/services/cellular_setup/cellular_setup_impl.h index 38a2ed7..2ca11cd 100644 --- a/chromeos/services/cellular_setup/cellular_setup_impl.h +++ b/chromeos/services/cellular_setup/cellular_setup_impl.h
@@ -29,6 +29,9 @@ static void CreateAndBindToReciever( mojo::PendingReceiver<mojom::CellularSetup> receiver); + CellularSetupImpl(const CellularSetupImpl&) = delete; + CellularSetupImpl& operator=(const CellularSetupImpl&) = delete; + ~CellularSetupImpl() override; private: @@ -46,8 +49,6 @@ size_t next_request_id_ = 0u; base::IDMap<std::unique_ptr<OtaActivator>, size_t> ota_activator_map_; base::WeakPtrFactory<CellularSetupImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(CellularSetupImpl); }; } // namespace cellular_setup
diff --git a/chromeos/services/cellular_setup/cellular_setup_impl_unittest.cc b/chromeos/services/cellular_setup/cellular_setup_impl_unittest.cc index d02e3796..de84613b 100644 --- a/chromeos/services/cellular_setup/cellular_setup_impl_unittest.cc +++ b/chromeos/services/cellular_setup/cellular_setup_impl_unittest.cc
@@ -29,6 +29,10 @@ class FakeOtaActivatorFactory : public OtaActivatorImpl::Factory { public: FakeOtaActivatorFactory() = default; + + FakeOtaActivatorFactory(const FakeOtaActivatorFactory&) = delete; + FakeOtaActivatorFactory& operator=(const FakeOtaActivatorFactory&) = delete; + ~FakeOtaActivatorFactory() override = default; std::vector<FakeOtaActivator*>& created_instances() { @@ -58,8 +62,6 @@ } std::vector<FakeOtaActivator*> created_instances_; - - DISALLOW_COPY_AND_ASSIGN(FakeOtaActivatorFactory); }; } // namespace
diff --git a/chromeos/services/cellular_setup/fake_ota_activator.h b/chromeos/services/cellular_setup/fake_ota_activator.h index 29afef8..8fc37795 100644 --- a/chromeos/services/cellular_setup/fake_ota_activator.h +++ b/chromeos/services/cellular_setup/fake_ota_activator.h
@@ -18,6 +18,10 @@ class FakeOtaActivator : public OtaActivator { public: explicit FakeOtaActivator(base::OnceClosure on_finished_callback); + + FakeOtaActivator(const FakeOtaActivator&) = delete; + FakeOtaActivator& operator=(const FakeOtaActivator&) = delete; + ~FakeOtaActivator() override; using OtaActivator::InvokeOnFinishedCallback; @@ -31,8 +35,6 @@ void OnCarrierPortalStatusChange(mojom::CarrierPortalStatus status) override; FakeCarrierPortalHandler fake_carrier_portal_handler_; - - DISALLOW_COPY_AND_ASSIGN(FakeOtaActivator); }; } // namespace cellular_setup
diff --git a/chromeos/services/cellular_setup/ota_activator.h b/chromeos/services/cellular_setup/ota_activator.h index ed188142..47a361e 100644 --- a/chromeos/services/cellular_setup/ota_activator.h +++ b/chromeos/services/cellular_setup/ota_activator.h
@@ -22,6 +22,9 @@ // instance. class OtaActivator : public mojom::CarrierPortalHandler { public: + OtaActivator(const OtaActivator&) = delete; + OtaActivator& operator=(const OtaActivator&) = delete; + ~OtaActivator() override; // Generates a mojo::PendingRemote<> bound to this instance. Only one @@ -36,8 +39,6 @@ base::OnceClosure on_finished_callback_; mojo::Receiver<mojom::CarrierPortalHandler> receiver_{this}; - - DISALLOW_COPY_AND_ASSIGN(OtaActivator); }; } // namespace cellular_setup
diff --git a/chromeos/services/cellular_setup/public/cpp/fake_activation_delegate.h b/chromeos/services/cellular_setup/public/cpp/fake_activation_delegate.h index bbb5997c..fc76d78 100644 --- a/chromeos/services/cellular_setup/public/cpp/fake_activation_delegate.h +++ b/chromeos/services/cellular_setup/public/cpp/fake_activation_delegate.h
@@ -20,6 +20,10 @@ class FakeActivationDelegate : public mojom::ActivationDelegate { public: FakeActivationDelegate(); + + FakeActivationDelegate(const FakeActivationDelegate&) = delete; + FakeActivationDelegate& operator=(const FakeActivationDelegate&) = delete; + ~FakeActivationDelegate() override; mojo::PendingRemote<mojom::ActivationDelegate> GenerateRemote(); @@ -44,8 +48,6 @@ std::vector<mojom::ActivationResult> activation_results_; mojo::ReceiverSet<mojom::ActivationDelegate> receivers_; - - DISALLOW_COPY_AND_ASSIGN(FakeActivationDelegate); }; } // namespace cellular_setup
diff --git a/chromeos/services/cellular_setup/public/cpp/fake_carrier_portal_handler.h b/chromeos/services/cellular_setup/public/cpp/fake_carrier_portal_handler.h index 80877c5..0a96f28e 100644 --- a/chromeos/services/cellular_setup/public/cpp/fake_carrier_portal_handler.h +++ b/chromeos/services/cellular_setup/public/cpp/fake_carrier_portal_handler.h
@@ -20,6 +20,10 @@ class FakeCarrierPortalHandler : public mojom::CarrierPortalHandler { public: FakeCarrierPortalHandler(); + + FakeCarrierPortalHandler(const FakeCarrierPortalHandler&) = delete; + FakeCarrierPortalHandler& operator=(const FakeCarrierPortalHandler&) = delete; + ~FakeCarrierPortalHandler() override; mojo::PendingRemote<mojom::CarrierPortalHandler> GenerateRemote(); @@ -35,8 +39,6 @@ private: std::vector<mojom::CarrierPortalStatus> status_updates_; mojo::ReceiverSet<mojom::CarrierPortalHandler> receivers_; - - DISALLOW_COPY_AND_ASSIGN(FakeCarrierPortalHandler); }; } // namespace cellular_setup
diff --git a/chromeos/services/cellular_setup/public/cpp/fake_cellular_setup.h b/chromeos/services/cellular_setup/public/cpp/fake_cellular_setup.h index ab208e5..9cf01b2 100644 --- a/chromeos/services/cellular_setup/public/cpp/fake_cellular_setup.h +++ b/chromeos/services/cellular_setup/public/cpp/fake_cellular_setup.h
@@ -28,6 +28,11 @@ StartActivationInvocation( mojo::PendingRemote<mojom::ActivationDelegate> activation_delegate, StartActivationCallback callback); + + StartActivationInvocation(const StartActivationInvocation&) = delete; + StartActivationInvocation& operator=(const StartActivationInvocation&) = + delete; + ~StartActivationInvocation(); mojo::Remote<mojom::ActivationDelegate>& activation_delegate() { @@ -45,8 +50,6 @@ // Null until ExecuteCallback() has been invoked. std::unique_ptr<FakeCarrierPortalHandler> fake_carrier_portal_observer_; - - DISALLOW_COPY_AND_ASSIGN(StartActivationInvocation); }; FakeCellularSetup();
diff --git a/chromeos/services/device_sync/cryptauth_api_call_flow.h b/chromeos/services/device_sync/cryptauth_api_call_flow.h index a4fc80d..c5da4d39 100644 --- a/chromeos/services/device_sync/cryptauth_api_call_flow.h +++ b/chromeos/services/device_sync/cryptauth_api_call_flow.h
@@ -35,6 +35,10 @@ typedef base::OnceCallback<void(NetworkRequestError error)> ErrorCallback; CryptAuthApiCallFlow(); + + CryptAuthApiCallFlow(const CryptAuthApiCallFlow&) = delete; + CryptAuthApiCallFlow& operator=(const CryptAuthApiCallFlow&) = delete; + ~CryptAuthApiCallFlow() override; // Starts the API POST request call. @@ -119,8 +123,6 @@ std::unique_ptr<net::PartialNetworkTrafficAnnotationTag> partial_network_annotation_; - - DISALLOW_COPY_AND_ASSIGN(CryptAuthApiCallFlow); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/cryptauth_client_impl.h b/chromeos/services/device_sync/cryptauth_client_impl.h index 4c58693..3efb780 100644 --- a/chromeos/services/device_sync/cryptauth_client_impl.h +++ b/chromeos/services/device_sync/cryptauth_client_impl.h
@@ -48,6 +48,10 @@ signin::IdentityManager* identity_manager, scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory, const cryptauth::DeviceClassifier& device_classifier); + + CryptAuthClientImpl(const CryptAuthClientImpl&) = delete; + CryptAuthClientImpl& operator=(const CryptAuthClientImpl&) = delete; + ~CryptAuthClientImpl() override; // CryptAuthClient: @@ -196,8 +200,6 @@ ErrorCallback error_callback_; base::WeakPtrFactory<CryptAuthClientImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(CryptAuthClientImpl); }; // Implementation of CryptAuthClientFactory. @@ -211,6 +213,11 @@ signin::IdentityManager* identity_manager, scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory, const cryptauth::DeviceClassifier& device_classifier); + + CryptAuthClientFactoryImpl(const CryptAuthClientFactoryImpl&) = delete; + CryptAuthClientFactoryImpl& operator=(const CryptAuthClientFactoryImpl&) = + delete; + ~CryptAuthClientFactoryImpl() override; // CryptAuthClientFactory: @@ -220,8 +227,6 @@ signin::IdentityManager* identity_manager_; const scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory_; const cryptauth::DeviceClassifier device_classifier_; - - DISALLOW_COPY_AND_ASSIGN(CryptAuthClientFactoryImpl); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/cryptauth_client_impl_unittest.cc b/chromeos/services/device_sync/cryptauth_client_impl_unittest.cc index 16975be..443e94f 100644 --- a/chromeos/services/device_sync/cryptauth_client_impl_unittest.cc +++ b/chromeos/services/device_sync/cryptauth_client_impl_unittest.cc
@@ -81,6 +81,10 @@ MockCryptAuthApiCallFlow() : CryptAuthApiCallFlow() { SetPartialNetworkTrafficAnnotation(PARTIAL_TRAFFIC_ANNOTATION_FOR_TESTS); } + + MockCryptAuthApiCallFlow(const MockCryptAuthApiCallFlow&) = delete; + MockCryptAuthApiCallFlow& operator=(const MockCryptAuthApiCallFlow&) = delete; + virtual ~MockCryptAuthApiCallFlow() {} void StartPostRequest( @@ -123,9 +127,6 @@ const std::string& access_token, ResultCallback& result_callback, ErrorCallback& error_callback)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockCryptAuthApiCallFlow); }; // Callback that should never be invoked.
diff --git a/chromeos/services/device_sync/cryptauth_device_activity_getter.h b/chromeos/services/device_sync/cryptauth_device_activity_getter.h index 11c6d59c..da8e08141 100644 --- a/chromeos/services/device_sync/cryptauth_device_activity_getter.h +++ b/chromeos/services/device_sync/cryptauth_device_activity_getter.h
@@ -31,6 +31,10 @@ using GetDeviceActivityStatusAttemptErrorCallback = base::OnceCallback<void(NetworkRequestError)>; + CryptAuthDeviceActivityGetter(const CryptAuthDeviceActivityGetter&) = delete; + CryptAuthDeviceActivityGetter& operator=( + const CryptAuthDeviceActivityGetter&) = delete; + virtual ~CryptAuthDeviceActivityGetter(); // Starts the GetDevicesActivityStatus portion of the CryptAuth v2 DeviceSync @@ -52,8 +56,6 @@ GetDeviceActivityStatusAttemptFinishedCallback success_callback_; GetDeviceActivityStatusAttemptErrorCallback error_callback_; bool was_get_device_activity_getter_called_ = false; - - DISALLOW_COPY_AND_ASSIGN(CryptAuthDeviceActivityGetter); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/cryptauth_device_manager.h b/chromeos/services/device_sync/cryptauth_device_manager.h index c2b04f5..d742446 100644 --- a/chromeos/services/device_sync/cryptauth_device_manager.h +++ b/chromeos/services/device_sync/cryptauth_device_manager.h
@@ -58,6 +58,10 @@ }; CryptAuthDeviceManager(); + + CryptAuthDeviceManager(const CryptAuthDeviceManager&) = delete; + CryptAuthDeviceManager& operator=(const CryptAuthDeviceManager&) = delete; + virtual ~CryptAuthDeviceManager(); void AddObserver(Observer* observer); @@ -114,8 +118,6 @@ private: base::ObserverList<Observer>::Unchecked observers_; - - DISALLOW_COPY_AND_ASSIGN(CryptAuthDeviceManager); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/cryptauth_device_manager_impl_unittest.cc b/chromeos/services/device_sync/cryptauth_device_manager_impl_unittest.cc index 1a613a6..ac06028 100644 --- a/chromeos/services/device_sync/cryptauth_device_manager_impl_unittest.cc +++ b/chromeos/services/device_sync/cryptauth_device_manager_impl_unittest.cc
@@ -400,6 +400,10 @@ SetSyncSchedulerForTest(base::WrapUnique(scoped_sync_scheduler_)); } + TestCryptAuthDeviceManager(const TestCryptAuthDeviceManager&) = delete; + TestCryptAuthDeviceManager& operator=(const TestCryptAuthDeviceManager&) = + delete; + ~TestCryptAuthDeviceManager() override {} base::WeakPtr<MockSyncScheduler> GetSyncScheduler() { @@ -416,8 +420,6 @@ // This should be safe because the life-time this SyncScheduler will always be // within the life of the TestCryptAuthDeviceManager object. base::WeakPtrFactory<MockSyncScheduler> weak_sync_scheduler_factory_; - - DISALLOW_COPY_AND_ASSIGN(TestCryptAuthDeviceManager); }; } // namespace
diff --git a/chromeos/services/device_sync/cryptauth_device_notifier.h b/chromeos/services/device_sync/cryptauth_device_notifier.h index 6a66472..62bfb10 100644 --- a/chromeos/services/device_sync/cryptauth_device_notifier.h +++ b/chromeos/services/device_sync/cryptauth_device_notifier.h
@@ -24,6 +24,10 @@ class CryptAuthDeviceNotifier { public: CryptAuthDeviceNotifier() = default; + + CryptAuthDeviceNotifier(const CryptAuthDeviceNotifier&) = delete; + CryptAuthDeviceNotifier& operator=(const CryptAuthDeviceNotifier&) = delete; + virtual ~CryptAuthDeviceNotifier() = default; // Sends a GCM message to devices with Instance IDs |device_ids|. The message @@ -37,9 +41,6 @@ CryptAuthFeatureType feature_type, base::OnceClosure success_callback, base::OnceCallback<void(NetworkRequestError)> error_callback) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(CryptAuthDeviceNotifier); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/cryptauth_device_registry.h b/chromeos/services/device_sync/cryptauth_device_registry.h index a547c0d1..fbd1c3b 100644 --- a/chromeos/services/device_sync/cryptauth_device_registry.h +++ b/chromeos/services/device_sync/cryptauth_device_registry.h
@@ -22,6 +22,9 @@ public: using InstanceIdToDeviceMap = base::flat_map<std::string, CryptAuthDevice>; + CryptAuthDeviceRegistry(const CryptAuthDeviceRegistry&) = delete; + CryptAuthDeviceRegistry& operator=(const CryptAuthDeviceRegistry&) = delete; + virtual ~CryptAuthDeviceRegistry(); // Returns a map from Instance ID to CryptAuthDevice. @@ -55,8 +58,6 @@ private: InstanceIdToDeviceMap instance_id_to_device_map_; - - DISALLOW_COPY_AND_ASSIGN(CryptAuthDeviceRegistry); }; std::ostream& operator<<(std::ostream& stream,
diff --git a/chromeos/services/device_sync/cryptauth_device_syncer.h b/chromeos/services/device_sync/cryptauth_device_syncer.h index bd876a5..da56a6a 100644 --- a/chromeos/services/device_sync/cryptauth_device_syncer.h +++ b/chromeos/services/device_sync/cryptauth_device_syncer.h
@@ -65,6 +65,9 @@ // call. For a new DeviceSync attempt, a new object should be created. class CryptAuthDeviceSyncer { public: + CryptAuthDeviceSyncer(const CryptAuthDeviceSyncer&) = delete; + CryptAuthDeviceSyncer& operator=(const CryptAuthDeviceSyncer&) = delete; + virtual ~CryptAuthDeviceSyncer(); // The DeviceSync result is passed by value so that the device syner can be @@ -97,8 +100,6 @@ private: DeviceSyncAttemptFinishedCallback callback_; bool was_sync_called_ = false; - - DISALLOW_COPY_AND_ASSIGN(CryptAuthDeviceSyncer); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/cryptauth_ecies_encryptor.h b/chromeos/services/device_sync/cryptauth_ecies_encryptor.h index 9db13e9b7..1dec7b05 100644 --- a/chromeos/services/device_sync/cryptauth_ecies_encryptor.h +++ b/chromeos/services/device_sync/cryptauth_ecies_encryptor.h
@@ -43,6 +43,9 @@ base::OnceCallback<void(const absl::optional<std::string>&)>; using BatchCallback = base::OnceCallback<void(const IdToOutputMap&)>; + CryptAuthEciesEncryptor(const CryptAuthEciesEncryptor&) = delete; + CryptAuthEciesEncryptor& operator=(const CryptAuthEciesEncryptor&) = delete; + virtual ~CryptAuthEciesEncryptor(); // Encrypts/Decrypts the input payload with the provided key, returning the @@ -80,8 +83,6 @@ BatchCallback callback); BatchCallback callback_; - - DISALLOW_COPY_AND_ASSIGN(CryptAuthEciesEncryptor); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/cryptauth_enroller_impl.h b/chromeos/services/device_sync/cryptauth_enroller_impl.h index e5baa7f..410633c 100644 --- a/chromeos/services/device_sync/cryptauth_enroller_impl.h +++ b/chromeos/services/device_sync/cryptauth_enroller_impl.h
@@ -40,6 +40,10 @@ CryptAuthEnrollerImpl(CryptAuthClientFactory* client_factory, std::unique_ptr<multidevice::SecureMessageDelegate> secure_message_delegate); + + CryptAuthEnrollerImpl(const CryptAuthEnrollerImpl&) = delete; + CryptAuthEnrollerImpl& operator=(const CryptAuthEnrollerImpl&) = delete; + ~CryptAuthEnrollerImpl() override; // CryptAuthEnroller: @@ -103,8 +107,6 @@ std::string symmetric_key_; base::WeakPtrFactory<CryptAuthEnrollerImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(CryptAuthEnrollerImpl); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/cryptauth_enrollment_manager.h b/chromeos/services/device_sync/cryptauth_enrollment_manager.h index f95ab38..b78841c 100644 --- a/chromeos/services/device_sync/cryptauth_enrollment_manager.h +++ b/chromeos/services/device_sync/cryptauth_enrollment_manager.h
@@ -37,6 +37,11 @@ }; CryptAuthEnrollmentManager(); + + CryptAuthEnrollmentManager(const CryptAuthEnrollmentManager&) = delete; + CryptAuthEnrollmentManager& operator=(const CryptAuthEnrollmentManager&) = + delete; + virtual ~CryptAuthEnrollmentManager(); void AddObserver(Observer* observer); @@ -91,8 +96,6 @@ private: base::ObserverList<Observer>::Unchecked observers_; - - DISALLOW_COPY_AND_ASSIGN(CryptAuthEnrollmentManager); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/cryptauth_enrollment_manager_impl_unittest.cc b/chromeos/services/device_sync/cryptauth_enrollment_manager_impl_unittest.cc index 831a6ae..60b073c 100644 --- a/chromeos/services/device_sync/cryptauth_enrollment_manager_impl_unittest.cc +++ b/chromeos/services/device_sync/cryptauth_enrollment_manager_impl_unittest.cc
@@ -58,6 +58,10 @@ class MockCryptAuthEnroller : public CryptAuthEnroller { public: MockCryptAuthEnroller() {} + + MockCryptAuthEnroller(const MockCryptAuthEnroller&) = delete; + MockCryptAuthEnroller& operator=(const MockCryptAuthEnroller&) = delete; + ~MockCryptAuthEnroller() override {} MOCK_METHOD5(Enroll, @@ -66,9 +70,6 @@ const cryptauth::GcmDeviceInfo& device_info, cryptauth::InvocationReason invocation_reason, EnrollmentFinishedCallback callback)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockCryptAuthEnroller); }; // Creates MockCryptAuthEnroller instances, and allows expecations to be set @@ -77,6 +78,11 @@ public: MockCryptAuthEnrollerFactory() : next_cryptauth_enroller_(new NiceMock<MockCryptAuthEnroller>()) {} + + MockCryptAuthEnrollerFactory(const MockCryptAuthEnrollerFactory&) = delete; + MockCryptAuthEnrollerFactory& operator=(const MockCryptAuthEnrollerFactory&) = + delete; + ~MockCryptAuthEnrollerFactory() override {} // CryptAuthEnrollerFactory: @@ -95,8 +101,6 @@ // Stores the next CryptAuthEnroller to be created. // Ownership is passed to the caller of |CreateInstance()|. std::unique_ptr<MockCryptAuthEnroller> next_cryptauth_enroller_; - - DISALLOW_COPY_AND_ASSIGN(MockCryptAuthEnrollerFactory); }; // Harness for testing CryptAuthEnrollmentManager. @@ -121,6 +125,11 @@ SetSyncSchedulerForTest(base::WrapUnique(scoped_sync_scheduler_)); } + TestCryptAuthEnrollmentManager(const TestCryptAuthEnrollmentManager&) = + delete; + TestCryptAuthEnrollmentManager& operator=( + const TestCryptAuthEnrollmentManager&) = delete; + ~TestCryptAuthEnrollmentManager() override {} base::WeakPtr<MockSyncScheduler> GetSyncScheduler() { @@ -137,8 +146,6 @@ // This should be safe because the life-time this SyncScheduler will always be // within the life of the TestCryptAuthEnrollmentManager object. base::WeakPtrFactory<MockSyncScheduler> weak_sync_scheduler_factory_; - - DISALLOW_COPY_AND_ASSIGN(TestCryptAuthEnrollmentManager); }; } // namespace
diff --git a/chromeos/services/device_sync/cryptauth_feature_status_getter.h b/chromeos/services/device_sync/cryptauth_feature_status_getter.h index d663d865..6850d83 100644 --- a/chromeos/services/device_sync/cryptauth_feature_status_getter.h +++ b/chromeos/services/device_sync/cryptauth_feature_status_getter.h
@@ -57,6 +57,10 @@ base::OnceCallback<void(const IdToDeviceSoftwareFeatureInfoMap&, CryptAuthDeviceSyncResult::ResultCode)>; + CryptAuthFeatureStatusGetter(const CryptAuthFeatureStatusGetter&) = delete; + CryptAuthFeatureStatusGetter& operator=(const CryptAuthFeatureStatusGetter&) = + delete; + virtual ~CryptAuthFeatureStatusGetter(); // Starts the BatchGetFeatureStatuses portion of the CryptAuth v2 DeviceSync @@ -83,8 +87,6 @@ private: GetFeatureStatusesAttemptFinishedCallback callback_; bool was_get_feature_statuses_called_ = false; - - DISALLOW_COPY_AND_ASSIGN(CryptAuthFeatureStatusGetter); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/cryptauth_feature_status_setter.h b/chromeos/services/device_sync/cryptauth_feature_status_setter.h index 643fcdf..f499d22b 100644 --- a/chromeos/services/device_sync/cryptauth_feature_status_setter.h +++ b/chromeos/services/device_sync/cryptauth_feature_status_setter.h
@@ -25,6 +25,11 @@ class CryptAuthFeatureStatusSetter { public: CryptAuthFeatureStatusSetter() = default; + + CryptAuthFeatureStatusSetter(const CryptAuthFeatureStatusSetter&) = delete; + CryptAuthFeatureStatusSetter& operator=(const CryptAuthFeatureStatusSetter&) = + delete; + virtual ~CryptAuthFeatureStatusSetter() = default; // Enables or disables |feature| for the device with device ID |device_id|. @@ -34,9 +39,6 @@ FeatureStatusChange status_change, base::OnceClosure success_callback, base::OnceCallback<void(NetworkRequestError)> error_callback) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(CryptAuthFeatureStatusSetter); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/cryptauth_gcm_manager_impl_unittest.cc b/chromeos/services/device_sync/cryptauth_gcm_manager_impl_unittest.cc index 1f68257..e9e93a2 100644 --- a/chromeos/services/device_sync/cryptauth_gcm_manager_impl_unittest.cc +++ b/chromeos/services/device_sync/cryptauth_gcm_manager_impl_unittest.cc
@@ -42,6 +42,10 @@ class MockGCMDriver : public gcm::FakeGCMDriver { public: MockGCMDriver() {} + + MockGCMDriver(const MockGCMDriver&) = delete; + MockGCMDriver& operator=(const MockGCMDriver&) = delete; + ~MockGCMDriver() override {} MOCK_METHOD2(AddAppHandler, @@ -52,9 +56,6 @@ const std::vector<std::string>& sender_ids)); using gcm::GCMDriver::RegisterFinished; - - private: - DISALLOW_COPY_AND_ASSIGN(MockGCMDriver); }; } // namespace
diff --git a/chromeos/services/device_sync/cryptauth_group_private_key_sharer.h b/chromeos/services/device_sync/cryptauth_group_private_key_sharer.h index 41d86d7..0190a7a6 100644 --- a/chromeos/services/device_sync/cryptauth_group_private_key_sharer.h +++ b/chromeos/services/device_sync/cryptauth_group_private_key_sharer.h
@@ -36,6 +36,11 @@ using ShareGroupPrivateKeyAttemptFinishedCallback = base::OnceCallback<void(CryptAuthDeviceSyncResult::ResultCode)>; + CryptAuthGroupPrivateKeySharer(const CryptAuthGroupPrivateKeySharer&) = + delete; + CryptAuthGroupPrivateKeySharer& operator=( + const CryptAuthGroupPrivateKeySharer&) = delete; + virtual ~CryptAuthGroupPrivateKeySharer(); // Starts the ShareGroupPrivateKey portion of the CryptAuth v2 DeviceSync @@ -63,8 +68,6 @@ private: ShareGroupPrivateKeyAttemptFinishedCallback callback_; bool was_share_group_private_key_called_ = false; - - DISALLOW_COPY_AND_ASSIGN(CryptAuthGroupPrivateKeySharer); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/cryptauth_key_creator.h b/chromeos/services/device_sync/cryptauth_key_creator.h index 93cbea2..e4b3181 100644 --- a/chromeos/services/device_sync/cryptauth_key_creator.h +++ b/chromeos/services/device_sync/cryptauth_key_creator.h
@@ -73,6 +73,10 @@ }; CryptAuthKeyCreator(); + + CryptAuthKeyCreator(const CryptAuthKeyCreator&) = delete; + CryptAuthKeyCreator& operator=(const CryptAuthKeyCreator&) = delete; + virtual ~CryptAuthKeyCreator(); // A new key is null if key creation fails. @@ -85,8 +89,6 @@ keys_to_create, const absl::optional<CryptAuthKey>& server_ephemeral_dh, CreateKeysCallback create_keys_callback) = 0; - - DISALLOW_COPY_AND_ASSIGN(CryptAuthKeyCreator); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/cryptauth_key_proof_computer.h b/chromeos/services/device_sync/cryptauth_key_proof_computer.h index cb86e3f..64290ea 100644 --- a/chromeos/services/device_sync/cryptauth_key_proof_computer.h +++ b/chromeos/services/device_sync/cryptauth_key_proof_computer.h
@@ -46,6 +46,11 @@ class CryptAuthKeyProofComputer { public: CryptAuthKeyProofComputer() = default; + + CryptAuthKeyProofComputer(const CryptAuthKeyProofComputer&) = delete; + CryptAuthKeyProofComputer& operator=(const CryptAuthKeyProofComputer&) = + delete; + virtual ~CryptAuthKeyProofComputer() = default; // Returns null if key proof computation failed. @@ -56,8 +61,6 @@ const std::string& payload, const std::string& salt, const absl::optional<std::string>& info) = 0; - - DISALLOW_COPY_AND_ASSIGN(CryptAuthKeyProofComputer); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/cryptauth_key_registry.h b/chromeos/services/device_sync/cryptauth_key_registry.h index 7f06b72..c27898d 100644 --- a/chromeos/services/device_sync/cryptauth_key_registry.h +++ b/chromeos/services/device_sync/cryptauth_key_registry.h
@@ -22,6 +22,9 @@ using KeyBundleMap = base::flat_map<CryptAuthKeyBundle::Name, CryptAuthKeyBundle>; + CryptAuthKeyRegistry(const CryptAuthKeyRegistry&) = delete; + CryptAuthKeyRegistry& operator=(const CryptAuthKeyRegistry&) = delete; + virtual ~CryptAuthKeyRegistry(); // Returns the underlying map from the key-bundle name to the key bundle. @@ -66,8 +69,6 @@ virtual void OnKeyRegistryUpdated() = 0; KeyBundleMap key_bundles_; - - DISALLOW_COPY_AND_ASSIGN(CryptAuthKeyRegistry); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/cryptauth_metadata_syncer.h b/chromeos/services/device_sync/cryptauth_metadata_syncer.h index 7907ea1f..c6216d92 100644 --- a/chromeos/services/device_sync/cryptauth_metadata_syncer.h +++ b/chromeos/services/device_sync/cryptauth_metadata_syncer.h
@@ -79,6 +79,9 @@ const absl::optional<cryptauthv2::ClientDirective>&, CryptAuthDeviceSyncResult::ResultCode)>; + CryptAuthMetadataSyncer(const CryptAuthMetadataSyncer&) = delete; + CryptAuthMetadataSyncer& operator=(const CryptAuthMetadataSyncer&) = delete; + virtual ~CryptAuthMetadataSyncer(); // Starts the SyncMetadata portion of the CryptAuth v2 DeviceSync flow. @@ -107,8 +110,6 @@ private: SyncMetadataAttemptFinishedCallback callback_; bool was_sync_metadata_called_ = false; - - DISALLOW_COPY_AND_ASSIGN(CryptAuthMetadataSyncer); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/cryptauth_scheduler.h b/chromeos/services/device_sync/cryptauth_scheduler.h index a7f2c46..92eccd7d 100644 --- a/chromeos/services/device_sync/cryptauth_scheduler.h +++ b/chromeos/services/device_sync/cryptauth_scheduler.h
@@ -66,6 +66,9 @@ const cryptauthv2::ClientMetadata& client_metadata) = 0; }; + CryptAuthScheduler(const CryptAuthScheduler&) = delete; + CryptAuthScheduler& operator=(const CryptAuthScheduler&) = delete; + virtual ~CryptAuthScheduler(); // Note: These should only be called once. @@ -144,8 +147,6 @@ private: base::WeakPtr<EnrollmentDelegate> enrollment_delegate_; base::WeakPtr<DeviceSyncDelegate> device_sync_delegate_; - - DISALLOW_COPY_AND_ASSIGN(CryptAuthScheduler); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/cryptauth_v2_device_manager.h b/chromeos/services/device_sync/cryptauth_v2_device_manager.h index b26fa0c3..bafc5b4 100644 --- a/chromeos/services/device_sync/cryptauth_v2_device_manager.h +++ b/chromeos/services/device_sync/cryptauth_v2_device_manager.h
@@ -34,6 +34,9 @@ const CryptAuthDeviceSyncResult& device_sync_result) {} }; + CryptAuthV2DeviceManager(const CryptAuthV2DeviceManager&) = delete; + CryptAuthV2DeviceManager& operator=(const CryptAuthV2DeviceManager&) = delete; + virtual ~CryptAuthV2DeviceManager(); void AddObserver(Observer* observer); @@ -83,8 +86,6 @@ private: base::ObserverList<Observer> observers_; - - DISALLOW_COPY_AND_ASSIGN(CryptAuthV2DeviceManager); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/cryptauth_v2_enroller.h b/chromeos/services/device_sync/cryptauth_v2_enroller.h index 59ba1dda..ea0e94e 100644 --- a/chromeos/services/device_sync/cryptauth_v2_enroller.h +++ b/chromeos/services/device_sync/cryptauth_v2_enroller.h
@@ -52,6 +52,9 @@ // call. For a new Enrollment attempt, a new object should be created. class CryptAuthV2Enroller { public: + CryptAuthV2Enroller(const CryptAuthV2Enroller&) = delete; + CryptAuthV2Enroller& operator=(const CryptAuthV2Enroller&) = delete; + virtual ~CryptAuthV2Enroller(); using EnrollmentAttemptFinishedCallback = @@ -90,8 +93,6 @@ EnrollmentAttemptFinishedCallback callback_; bool was_enroll_called_ = false; - - DISALLOW_COPY_AND_ASSIGN(CryptAuthV2Enroller); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/cryptauth_v2_enroller_impl_unittest.cc b/chromeos/services/device_sync/cryptauth_v2_enroller_impl_unittest.cc index 6f0a9b2..13fb20d 100644 --- a/chromeos/services/device_sync/cryptauth_v2_enroller_impl_unittest.cc +++ b/chromeos/services/device_sync/cryptauth_v2_enroller_impl_unittest.cc
@@ -119,6 +119,11 @@ public: FakeCryptAuthKeyProofComputerFactory() = default; + FakeCryptAuthKeyProofComputerFactory( + const FakeCryptAuthKeyProofComputerFactory&) = delete; + FakeCryptAuthKeyProofComputerFactory& operator=( + const FakeCryptAuthKeyProofComputerFactory&) = delete; + ~FakeCryptAuthKeyProofComputerFactory() override = default; void set_should_return_null_key_proof(bool should_return_null_key_proof) { @@ -134,8 +139,6 @@ } bool should_return_null_key_proof_ = false; - - DISALLOW_COPY_AND_ASSIGN(FakeCryptAuthKeyProofComputerFactory); }; class SyncSingleKeyResponseData {
diff --git a/chromeos/services/device_sync/cryptauth_v2_enrollment_manager_impl_unittest.cc b/chromeos/services/device_sync/cryptauth_v2_enrollment_manager_impl_unittest.cc index 97f534b1..e5f80fdb 100644 --- a/chromeos/services/device_sync/cryptauth_v2_enrollment_manager_impl_unittest.cc +++ b/chromeos/services/device_sync/cryptauth_v2_enrollment_manager_impl_unittest.cc
@@ -73,6 +73,11 @@ : expected_key_registry_(expected_key_registry), expected_client_factory_(expected_client_factory) {} + FakeCryptAuthV2EnrollerFactory(const FakeCryptAuthV2EnrollerFactory&) = + delete; + FakeCryptAuthV2EnrollerFactory& operator=( + const FakeCryptAuthV2EnrollerFactory&) = delete; + ~FakeCryptAuthV2EnrollerFactory() override = default; const std::vector<FakeCryptAuthV2Enroller*>& created_instances() { @@ -99,8 +104,6 @@ const CryptAuthClientFactory* expected_client_factory_; std::vector<FakeCryptAuthV2Enroller*> created_instances_; - - DISALLOW_COPY_AND_ASSIGN(FakeCryptAuthV2EnrollerFactory); }; } // namespace
diff --git a/chromeos/services/device_sync/device_sync_base.h b/chromeos/services/device_sync/device_sync_base.h index 0087746..3d58f02 100644 --- a/chromeos/services/device_sync/device_sync_base.h +++ b/chromeos/services/device_sync/device_sync_base.h
@@ -19,6 +19,9 @@ // Base DeviceSync implementation. class DeviceSyncBase : public mojom::DeviceSync { public: + DeviceSyncBase(const DeviceSyncBase&) = delete; + DeviceSyncBase& operator=(const DeviceSyncBase&) = delete; + ~DeviceSyncBase() override; // mojom::DeviceSync: @@ -46,8 +49,6 @@ mojo::RemoteSet<mojom::DeviceSyncObserver> observers_; mojo::ReceiverSet<mojom::DeviceSync> receivers_; - - DISALLOW_COPY_AND_ASSIGN(DeviceSyncBase); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/fake_cryptauth_device_manager.h b/chromeos/services/device_sync/fake_cryptauth_device_manager.h index 1a16719..b1156c1 100644 --- a/chromeos/services/device_sync/fake_cryptauth_device_manager.h +++ b/chromeos/services/device_sync/fake_cryptauth_device_manager.h
@@ -20,6 +20,11 @@ class FakeCryptAuthDeviceManager : public CryptAuthDeviceManager { public: FakeCryptAuthDeviceManager(); + + FakeCryptAuthDeviceManager(const FakeCryptAuthDeviceManager&) = delete; + FakeCryptAuthDeviceManager& operator=(const FakeCryptAuthDeviceManager&) = + delete; + ~FakeCryptAuthDeviceManager() override; bool has_started() { return has_started_; } @@ -123,8 +128,6 @@ std::vector<cryptauth::ExternalDeviceInfo> pixel_unlock_keys_; std::vector<cryptauth::ExternalDeviceInfo> tether_hosts_; std::vector<cryptauth::ExternalDeviceInfo> pixel_tether_hosts_; - - DISALLOW_COPY_AND_ASSIGN(FakeCryptAuthDeviceManager); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/fake_cryptauth_device_notifier.h b/chromeos/services/device_sync/fake_cryptauth_device_notifier.h index 874b20f7..59656cb 100644 --- a/chromeos/services/device_sync/fake_cryptauth_device_notifier.h +++ b/chromeos/services/device_sync/fake_cryptauth_device_notifier.h
@@ -51,6 +51,11 @@ }; FakeCryptAuthDeviceNotifier(); + + FakeCryptAuthDeviceNotifier(const FakeCryptAuthDeviceNotifier&) = delete; + FakeCryptAuthDeviceNotifier& operator=(const FakeCryptAuthDeviceNotifier&) = + delete; + ~FakeCryptAuthDeviceNotifier() override; void set_delegate(Delegate* delegate) { delegate_ = delegate; } @@ -68,14 +73,18 @@ Delegate* delegate_ = nullptr; std::vector<Request> requests_; - - DISALLOW_COPY_AND_ASSIGN(FakeCryptAuthDeviceNotifier); }; class FakeCryptAuthDeviceNotifierFactory : public CryptAuthDeviceNotifierImpl::Factory { public: FakeCryptAuthDeviceNotifierFactory(); + + FakeCryptAuthDeviceNotifierFactory( + const FakeCryptAuthDeviceNotifierFactory&) = delete; + FakeCryptAuthDeviceNotifierFactory& operator=( + const FakeCryptAuthDeviceNotifierFactory&) = delete; + ~FakeCryptAuthDeviceNotifierFactory() override; const std::vector<FakeCryptAuthDeviceNotifier*>& instances() const { @@ -104,8 +113,6 @@ std::string last_instance_id_; std::string last_instance_id_token_; CryptAuthClientFactory* last_client_factory_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakeCryptAuthDeviceNotifierFactory); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/fake_cryptauth_device_syncer.h b/chromeos/services/device_sync/fake_cryptauth_device_syncer.h index 4b0b59bd..4341c35a 100644 --- a/chromeos/services/device_sync/fake_cryptauth_device_syncer.h +++ b/chromeos/services/device_sync/fake_cryptauth_device_syncer.h
@@ -26,6 +26,11 @@ class FakeCryptAuthDeviceSyncer : public CryptAuthDeviceSyncer { public: FakeCryptAuthDeviceSyncer(); + + FakeCryptAuthDeviceSyncer(const FakeCryptAuthDeviceSyncer&) = delete; + FakeCryptAuthDeviceSyncer& operator=(const FakeCryptAuthDeviceSyncer&) = + delete; + ~FakeCryptAuthDeviceSyncer() override; const absl::optional<cryptauthv2::ClientMetadata>& client_metadata() const { @@ -47,14 +52,18 @@ absl::optional<cryptauthv2::ClientMetadata> client_metadata_; absl::optional<cryptauthv2::ClientAppMetadata> client_app_metadata_; - - DISALLOW_COPY_AND_ASSIGN(FakeCryptAuthDeviceSyncer); }; class FakeCryptAuthDeviceSyncerFactory : public CryptAuthDeviceSyncerImpl::Factory { public: FakeCryptAuthDeviceSyncerFactory(); + + FakeCryptAuthDeviceSyncerFactory(const FakeCryptAuthDeviceSyncerFactory&) = + delete; + FakeCryptAuthDeviceSyncerFactory& operator=( + const FakeCryptAuthDeviceSyncerFactory&) = delete; + ~FakeCryptAuthDeviceSyncerFactory() override; const std::vector<FakeCryptAuthDeviceSyncer*>& instances() const { @@ -92,8 +101,6 @@ SyncedBluetoothAddressTracker* last_synced_bluetooth_address_tracker_ = nullptr; PrefService* last_pref_service_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakeCryptAuthDeviceSyncerFactory); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/fake_cryptauth_ecies_encryptor.h b/chromeos/services/device_sync/fake_cryptauth_ecies_encryptor.h index 87c24e7..5a95cc1 100644 --- a/chromeos/services/device_sync/fake_cryptauth_ecies_encryptor.h +++ b/chromeos/services/device_sync/fake_cryptauth_ecies_encryptor.h
@@ -20,6 +20,11 @@ enum class Action { kUndefined, kEncryption, kDecryption }; FakeCryptAuthEciesEncryptor(); + + FakeCryptAuthEciesEncryptor(const FakeCryptAuthEciesEncryptor&) = delete; + FakeCryptAuthEciesEncryptor& operator=(const FakeCryptAuthEciesEncryptor&) = + delete; + ~FakeCryptAuthEciesEncryptor() override; void FinishAttempt(Action expected_action, @@ -33,14 +38,18 @@ void OnBatchDecryptionStarted() override; Action action_ = Action::kUndefined; - - DISALLOW_COPY_AND_ASSIGN(FakeCryptAuthEciesEncryptor); }; class FakeCryptAuthEciesEncryptorFactory : public CryptAuthEciesEncryptorImpl::Factory { public: FakeCryptAuthEciesEncryptorFactory(); + + FakeCryptAuthEciesEncryptorFactory( + const FakeCryptAuthEciesEncryptorFactory&) = delete; + FakeCryptAuthEciesEncryptorFactory& operator=( + const FakeCryptAuthEciesEncryptorFactory&) = delete; + ~FakeCryptAuthEciesEncryptorFactory() override; FakeCryptAuthEciesEncryptor* instance() { return instance_; } @@ -50,8 +59,6 @@ std::unique_ptr<CryptAuthEciesEncryptor> CreateInstance() override; FakeCryptAuthEciesEncryptor* instance_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakeCryptAuthEciesEncryptorFactory); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/fake_cryptauth_enrollment_manager.h b/chromeos/services/device_sync/fake_cryptauth_enrollment_manager.h index a2844f6..e5e77bdf 100644 --- a/chromeos/services/device_sync/fake_cryptauth_enrollment_manager.h +++ b/chromeos/services/device_sync/fake_cryptauth_enrollment_manager.h
@@ -22,6 +22,12 @@ class FakeCryptAuthEnrollmentManager : public CryptAuthEnrollmentManager { public: FakeCryptAuthEnrollmentManager(); + + FakeCryptAuthEnrollmentManager(const FakeCryptAuthEnrollmentManager&) = + delete; + FakeCryptAuthEnrollmentManager& operator=( + const FakeCryptAuthEnrollmentManager&) = delete; + ~FakeCryptAuthEnrollmentManager() override; void set_last_enrollment_time(base::Time last_enrollment_time) { @@ -92,8 +98,6 @@ base::TimeDelta time_to_next_attempt_; std::string user_public_key_; std::string user_private_key_; - - DISALLOW_COPY_AND_ASSIGN(FakeCryptAuthEnrollmentManager); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/fake_cryptauth_feature_status_getter.h b/chromeos/services/device_sync/fake_cryptauth_feature_status_getter.h index e0ad85a..d6cccca 100644 --- a/chromeos/services/device_sync/fake_cryptauth_feature_status_getter.h +++ b/chromeos/services/device_sync/fake_cryptauth_feature_status_getter.h
@@ -27,6 +27,12 @@ class FakeCryptAuthFeatureStatusGetter : public CryptAuthFeatureStatusGetter { public: FakeCryptAuthFeatureStatusGetter(); + + FakeCryptAuthFeatureStatusGetter(const FakeCryptAuthFeatureStatusGetter&) = + delete; + FakeCryptAuthFeatureStatusGetter& operator=( + const FakeCryptAuthFeatureStatusGetter&) = delete; + ~FakeCryptAuthFeatureStatusGetter() override; // The RequestContext passed to GetFeatureStatuses(). Returns null if @@ -54,14 +60,18 @@ absl::optional<cryptauthv2::RequestContext> request_context_; absl::optional<base::flat_set<std::string>> device_ids_; - - DISALLOW_COPY_AND_ASSIGN(FakeCryptAuthFeatureStatusGetter); }; class FakeCryptAuthFeatureStatusGetterFactory : public CryptAuthFeatureStatusGetterImpl::Factory { public: FakeCryptAuthFeatureStatusGetterFactory(); + + FakeCryptAuthFeatureStatusGetterFactory( + const FakeCryptAuthFeatureStatusGetterFactory&) = delete; + FakeCryptAuthFeatureStatusGetterFactory& operator=( + const FakeCryptAuthFeatureStatusGetterFactory&) = delete; + ~FakeCryptAuthFeatureStatusGetterFactory() override; // Returns a vector of all FakeCryptAuthFeatureStatusGetter instances created @@ -83,8 +93,6 @@ std::vector<FakeCryptAuthFeatureStatusGetter*> instances_; CryptAuthClientFactory* last_client_factory_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakeCryptAuthFeatureStatusGetterFactory); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/fake_cryptauth_feature_status_setter.h b/chromeos/services/device_sync/fake_cryptauth_feature_status_setter.h index 9d233f89..edeedd05 100644 --- a/chromeos/services/device_sync/fake_cryptauth_feature_status_setter.h +++ b/chromeos/services/device_sync/fake_cryptauth_feature_status_setter.h
@@ -50,6 +50,12 @@ }; FakeCryptAuthFeatureStatusSetter(); + + FakeCryptAuthFeatureStatusSetter(const FakeCryptAuthFeatureStatusSetter&) = + delete; + FakeCryptAuthFeatureStatusSetter& operator=( + const FakeCryptAuthFeatureStatusSetter&) = delete; + ~FakeCryptAuthFeatureStatusSetter() override; void set_delegate(Delegate* delegate) { delegate_ = delegate; } @@ -67,14 +73,18 @@ Delegate* delegate_ = nullptr; std::vector<Request> requests_; - - DISALLOW_COPY_AND_ASSIGN(FakeCryptAuthFeatureStatusSetter); }; class FakeCryptAuthFeatureStatusSetterFactory : public CryptAuthFeatureStatusSetterImpl::Factory { public: FakeCryptAuthFeatureStatusSetterFactory(); + + FakeCryptAuthFeatureStatusSetterFactory( + const FakeCryptAuthFeatureStatusSetterFactory&) = delete; + FakeCryptAuthFeatureStatusSetterFactory& operator=( + const FakeCryptAuthFeatureStatusSetterFactory&) = delete; + ~FakeCryptAuthFeatureStatusSetterFactory() override; const std::vector<FakeCryptAuthFeatureStatusSetter*>& instances() const { @@ -103,8 +113,6 @@ std::string last_instance_id_; std::string last_instance_id_token_; CryptAuthClientFactory* last_client_factory_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakeCryptAuthFeatureStatusSetterFactory); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/fake_cryptauth_gcm_manager.h b/chromeos/services/device_sync/fake_cryptauth_gcm_manager.h index 2a13dbe..a6b4fc5 100644 --- a/chromeos/services/device_sync/fake_cryptauth_gcm_manager.h +++ b/chromeos/services/device_sync/fake_cryptauth_gcm_manager.h
@@ -25,6 +25,10 @@ // enrollment. Pass in an empty |registration_id| to simulate never having // registered successfully. explicit FakeCryptAuthGCMManager(const std::string& registration_id); + + FakeCryptAuthGCMManager(const FakeCryptAuthGCMManager&) = delete; + FakeCryptAuthGCMManager& operator=(const FakeCryptAuthGCMManager&) = delete; + ~FakeCryptAuthGCMManager() override; bool registration_in_progress() { return registration_in_progress_; } @@ -65,8 +69,6 @@ std::string registration_id_; base::ObserverList<Observer>::Unchecked observers_; - - DISALLOW_COPY_AND_ASSIGN(FakeCryptAuthGCMManager); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/fake_cryptauth_group_private_key_sharer.h b/chromeos/services/device_sync/fake_cryptauth_group_private_key_sharer.h index c44216d..6f41500a 100644 --- a/chromeos/services/device_sync/fake_cryptauth_group_private_key_sharer.h +++ b/chromeos/services/device_sync/fake_cryptauth_group_private_key_sharer.h
@@ -26,6 +26,12 @@ : public CryptAuthGroupPrivateKeySharer { public: FakeCryptAuthGroupPrivateKeySharer(); + + FakeCryptAuthGroupPrivateKeySharer( + const FakeCryptAuthGroupPrivateKeySharer&) = delete; + FakeCryptAuthGroupPrivateKeySharer& operator=( + const FakeCryptAuthGroupPrivateKeySharer&) = delete; + ~FakeCryptAuthGroupPrivateKeySharer() override; // The RequestContext passed to ShareGroupPrivateKey(). Returns null if @@ -57,14 +63,18 @@ absl::optional<cryptauthv2::RequestContext> request_context_; std::unique_ptr<CryptAuthKey> group_key_; absl::optional<IdToEncryptingKeyMap> id_to_encrypting_key_map_; - - DISALLOW_COPY_AND_ASSIGN(FakeCryptAuthGroupPrivateKeySharer); }; class FakeCryptAuthGroupPrivateKeySharerFactory : public CryptAuthGroupPrivateKeySharerImpl::Factory { public: FakeCryptAuthGroupPrivateKeySharerFactory(); + + FakeCryptAuthGroupPrivateKeySharerFactory( + const FakeCryptAuthGroupPrivateKeySharerFactory&) = delete; + FakeCryptAuthGroupPrivateKeySharerFactory& operator=( + const FakeCryptAuthGroupPrivateKeySharerFactory&) = delete; + ~FakeCryptAuthGroupPrivateKeySharerFactory() override; // Returns a vector of all FakeCryptAuthGroupPrivateKeySharer instances @@ -86,8 +96,6 @@ std::vector<FakeCryptAuthGroupPrivateKeySharer*> instances_; CryptAuthClientFactory* last_client_factory_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakeCryptAuthGroupPrivateKeySharerFactory); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/fake_cryptauth_key_creator.h b/chromeos/services/device_sync/fake_cryptauth_key_creator.h index 8c26066..8a99440 100644 --- a/chromeos/services/device_sync/fake_cryptauth_key_creator.h +++ b/chromeos/services/device_sync/fake_cryptauth_key_creator.h
@@ -20,6 +20,10 @@ class FakeCryptAuthKeyCreator : public CryptAuthKeyCreator { public: FakeCryptAuthKeyCreator(); + + FakeCryptAuthKeyCreator(const FakeCryptAuthKeyCreator&) = delete; + FakeCryptAuthKeyCreator& operator=(const FakeCryptAuthKeyCreator&) = delete; + ~FakeCryptAuthKeyCreator() override; // CryptAuthKeyCreator: @@ -43,13 +47,17 @@ base::flat_map<CryptAuthKeyBundle::Name, CreateKeyData> keys_to_create_; absl::optional<CryptAuthKey> server_ephemeral_dh_; CreateKeysCallback create_keys_callback_; - - DISALLOW_COPY_AND_ASSIGN(FakeCryptAuthKeyCreator); }; class FakeCryptAuthKeyCreatorFactory : public CryptAuthKeyCreatorImpl::Factory { public: FakeCryptAuthKeyCreatorFactory(); + + FakeCryptAuthKeyCreatorFactory(const FakeCryptAuthKeyCreatorFactory&) = + delete; + FakeCryptAuthKeyCreatorFactory& operator=( + const FakeCryptAuthKeyCreatorFactory&) = delete; + ~FakeCryptAuthKeyCreatorFactory() override; FakeCryptAuthKeyCreator* instance() { return instance_; } @@ -59,8 +67,6 @@ std::unique_ptr<CryptAuthKeyCreator> CreateInstance() override; FakeCryptAuthKeyCreator* instance_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakeCryptAuthKeyCreatorFactory); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/fake_cryptauth_key_proof_computer.h b/chromeos/services/device_sync/fake_cryptauth_key_proof_computer.h index 2799fdf..dcd0191 100644 --- a/chromeos/services/device_sync/fake_cryptauth_key_proof_computer.h +++ b/chromeos/services/device_sync/fake_cryptauth_key_proof_computer.h
@@ -21,6 +21,11 @@ class FakeCryptAuthKeyProofComputer : public CryptAuthKeyProofComputer { public: FakeCryptAuthKeyProofComputer(); + + FakeCryptAuthKeyProofComputer(const FakeCryptAuthKeyProofComputer&) = delete; + FakeCryptAuthKeyProofComputer& operator=( + const FakeCryptAuthKeyProofComputer&) = delete; + ~FakeCryptAuthKeyProofComputer() override; // CryptAuthKeyProofComputer: @@ -38,8 +43,6 @@ private: // If true, ComputeKeyProof() returns absl::nullopt. bool should_return_null_ = false; - - DISALLOW_COPY_AND_ASSIGN(FakeCryptAuthKeyProofComputer); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/fake_cryptauth_metadata_syncer.h b/chromeos/services/device_sync/fake_cryptauth_metadata_syncer.h index a8b3d283..06e5582 100644 --- a/chromeos/services/device_sync/fake_cryptauth_metadata_syncer.h +++ b/chromeos/services/device_sync/fake_cryptauth_metadata_syncer.h
@@ -30,6 +30,11 @@ class FakeCryptAuthMetadataSyncer : public CryptAuthMetadataSyncer { public: FakeCryptAuthMetadataSyncer(); + + FakeCryptAuthMetadataSyncer(const FakeCryptAuthMetadataSyncer&) = delete; + FakeCryptAuthMetadataSyncer& operator=(const FakeCryptAuthMetadataSyncer&) = + delete; + ~FakeCryptAuthMetadataSyncer() override; // The RequestContext passed to SyncMetadata(). Returns null if @@ -70,14 +75,18 @@ absl::optional<cryptauthv2::BetterTogetherDeviceMetadata> local_device_metadata_; absl::optional<const CryptAuthKey*> initial_group_key_; - - DISALLOW_COPY_AND_ASSIGN(FakeCryptAuthMetadataSyncer); }; class FakeCryptAuthMetadataSyncerFactory : public CryptAuthMetadataSyncerImpl::Factory { public: FakeCryptAuthMetadataSyncerFactory(); + + FakeCryptAuthMetadataSyncerFactory( + const FakeCryptAuthMetadataSyncerFactory&) = delete; + FakeCryptAuthMetadataSyncerFactory& operator=( + const FakeCryptAuthMetadataSyncerFactory&) = delete; + ~FakeCryptAuthMetadataSyncerFactory() override; // Returns a vector of all FakeCryptAuthMetadataSyncer instances created @@ -104,8 +113,6 @@ std::vector<FakeCryptAuthMetadataSyncer*> instances_; CryptAuthClientFactory* last_client_factory_ = nullptr; PrefService* last_pref_service_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakeCryptAuthMetadataSyncerFactory); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/fake_cryptauth_scheduler.h b/chromeos/services/device_sync/fake_cryptauth_scheduler.h index cbb4df3..2459e154 100644 --- a/chromeos/services/device_sync/fake_cryptauth_scheduler.h +++ b/chromeos/services/device_sync/fake_cryptauth_scheduler.h
@@ -29,6 +29,10 @@ base::TimeDelta::FromHours(12); FakeCryptAuthScheduler(); + + FakeCryptAuthScheduler(const FakeCryptAuthScheduler&) = delete; + FakeCryptAuthScheduler& operator=(const FakeCryptAuthScheduler&) = delete; + ~FakeCryptAuthScheduler() override; size_t num_enrollment_requests() const { return num_enrollment_requests_; } @@ -125,8 +129,6 @@ size_t num_consecutive_device_sync_failures_ = 0u; bool is_waiting_for_enrollment_result_ = false; bool is_waiting_for_device_sync_result_ = false; - - DISALLOW_COPY_AND_ASSIGN(FakeCryptAuthScheduler); }; // Fake CryptAuthScheduler::EnrollmentDelegate implementation. @@ -134,6 +136,12 @@ : public CryptAuthScheduler::EnrollmentDelegate { public: FakeCryptAuthSchedulerEnrollmentDelegate(); + + FakeCryptAuthSchedulerEnrollmentDelegate( + const FakeCryptAuthSchedulerEnrollmentDelegate&) = delete; + FakeCryptAuthSchedulerEnrollmentDelegate& operator=( + const FakeCryptAuthSchedulerEnrollmentDelegate&) = delete; + ~FakeCryptAuthSchedulerEnrollmentDelegate() override; base::WeakPtr<FakeCryptAuthSchedulerEnrollmentDelegate> GetWeakPtr(); @@ -160,8 +168,6 @@ policy_references_from_enrollment_requests_; base::WeakPtrFactory<FakeCryptAuthSchedulerEnrollmentDelegate> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeCryptAuthSchedulerEnrollmentDelegate); }; // Fake CryptAuthScheduler::DeviceSyncDelegate implementation. @@ -169,6 +175,12 @@ : public CryptAuthScheduler::DeviceSyncDelegate { public: FakeCryptAuthSchedulerDeviceSyncDelegate(); + + FakeCryptAuthSchedulerDeviceSyncDelegate( + const FakeCryptAuthSchedulerDeviceSyncDelegate&) = delete; + FakeCryptAuthSchedulerDeviceSyncDelegate& operator=( + const FakeCryptAuthSchedulerDeviceSyncDelegate&) = delete; + ~FakeCryptAuthSchedulerDeviceSyncDelegate() override; base::WeakPtr<FakeCryptAuthSchedulerDeviceSyncDelegate> GetWeakPtr(); @@ -187,8 +199,6 @@ client_metadata_from_device_sync_requests_; base::WeakPtrFactory<FakeCryptAuthSchedulerDeviceSyncDelegate> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeCryptAuthSchedulerDeviceSyncDelegate); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/fake_cryptauth_v2_device_manager.h b/chromeos/services/device_sync/fake_cryptauth_v2_device_manager.h index 0b51797..14fc1f1 100644 --- a/chromeos/services/device_sync/fake_cryptauth_v2_device_manager.h +++ b/chromeos/services/device_sync/fake_cryptauth_v2_device_manager.h
@@ -29,6 +29,11 @@ class FakeCryptAuthV2DeviceManager : public CryptAuthV2DeviceManager { public: FakeCryptAuthV2DeviceManager(); + + FakeCryptAuthV2DeviceManager(const FakeCryptAuthV2DeviceManager&) = delete; + FakeCryptAuthV2DeviceManager& operator=(const FakeCryptAuthV2DeviceManager&) = + delete; + ~FakeCryptAuthV2DeviceManager() override; // CryptAuthV2DeviceManager: @@ -79,8 +84,6 @@ absl::optional<base::TimeDelta> time_to_next_attempt_; CryptAuthDeviceRegistry::InstanceIdToDeviceMap synced_devices_; base::queue<cryptauthv2::ClientMetadata> force_device_sync_now_requests_; - - DISALLOW_COPY_AND_ASSIGN(FakeCryptAuthV2DeviceManager); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/fake_device_sync.h b/chromeos/services/device_sync/fake_device_sync.h index c40b4c4..f73a961 100644 --- a/chromeos/services/device_sync/fake_device_sync.h +++ b/chromeos/services/device_sync/fake_device_sync.h
@@ -18,6 +18,10 @@ class FakeDeviceSync : public DeviceSyncBase { public: FakeDeviceSync(); + + FakeDeviceSync(const FakeDeviceSync&) = delete; + FakeDeviceSync& operator=(const FakeDeviceSync&) = delete; + ~FakeDeviceSync() override; using DeviceSyncBase::NotifyOnEnrollmentFinished; @@ -95,8 +99,6 @@ std::queue<GetDevicesActivityStatusCallback> get_devices_activity_status_callback_queue_; std::queue<GetDebugInfoCallback> get_debug_info_callback_queue_; - - DISALLOW_COPY_AND_ASSIGN(FakeDeviceSync); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/fake_device_sync_observer.h b/chromeos/services/device_sync/fake_device_sync_observer.h index c65c4a5..4614914 100644 --- a/chromeos/services/device_sync/fake_device_sync_observer.h +++ b/chromeos/services/device_sync/fake_device_sync_observer.h
@@ -18,6 +18,10 @@ class FakeDeviceSyncObserver : public mojom::DeviceSyncObserver { public: FakeDeviceSyncObserver(); + + FakeDeviceSyncObserver(const FakeDeviceSyncObserver&) = delete; + FakeDeviceSyncObserver& operator=(const FakeDeviceSyncObserver&) = delete; + ~FakeDeviceSyncObserver() override; mojo::PendingRemote<mojom::DeviceSyncObserver> GenerateRemote(); @@ -34,8 +38,6 @@ size_t num_sync_events_ = 0u; mojo::ReceiverSet<mojom::DeviceSyncObserver> receivers_; - - DISALLOW_COPY_AND_ASSIGN(FakeDeviceSyncObserver); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/fake_remote_device_provider.h b/chromeos/services/device_sync/fake_remote_device_provider.h index ae35de0c..dcd0456 100644 --- a/chromeos/services/device_sync/fake_remote_device_provider.h +++ b/chromeos/services/device_sync/fake_remote_device_provider.h
@@ -15,6 +15,10 @@ class FakeRemoteDeviceProvider : public RemoteDeviceProvider { public: FakeRemoteDeviceProvider(); + + FakeRemoteDeviceProvider(const FakeRemoteDeviceProvider&) = delete; + FakeRemoteDeviceProvider& operator=(const FakeRemoteDeviceProvider&) = delete; + ~FakeRemoteDeviceProvider() override; void set_synced_remote_devices( @@ -29,8 +33,6 @@ private: multidevice::RemoteDeviceList synced_remote_devices_; - - DISALLOW_COPY_AND_ASSIGN(FakeRemoteDeviceProvider); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/fake_software_feature_manager.h b/chromeos/services/device_sync/fake_software_feature_manager.h index 9542d620..638017d 100644 --- a/chromeos/services/device_sync/fake_software_feature_manager.h +++ b/chromeos/services/device_sync/fake_software_feature_manager.h
@@ -38,6 +38,11 @@ base::OnceClosure success_callback, base::OnceCallback<void(NetworkRequestError)> error_callback, bool is_exclusive); + + SetSoftwareFeatureStateArgs(const SetSoftwareFeatureStateArgs&) = delete; + SetSoftwareFeatureStateArgs& operator=(const SetSoftwareFeatureStateArgs&) = + delete; + ~SetSoftwareFeatureStateArgs(); std::string public_key; @@ -46,9 +51,6 @@ base::OnceClosure success_callback; base::OnceCallback<void(NetworkRequestError)> error_callback; bool is_exclusive; - - private: - DISALLOW_COPY_AND_ASSIGN(SetSoftwareFeatureStateArgs); }; struct SetFeatureStatusArgs { @@ -58,6 +60,10 @@ FeatureStatusChange status_change, base::OnceClosure success_callback, base::OnceCallback<void(NetworkRequestError)> error_callback); + + SetFeatureStatusArgs(const SetFeatureStatusArgs&) = delete; + SetFeatureStatusArgs& operator=(const SetFeatureStatusArgs&) = delete; + ~SetFeatureStatusArgs(); std::string device_id; @@ -65,9 +71,6 @@ FeatureStatusChange status_change; base::OnceClosure success_callback; base::OnceCallback<void(NetworkRequestError)> error_callback; - - private: - DISALLOW_COPY_AND_ASSIGN(SetFeatureStatusArgs); }; struct FindEligibleDevicesArgs { @@ -77,6 +80,10 @@ const std::vector<cryptauth::ExternalDeviceInfo>&, const std::vector<cryptauth::IneligibleDevice>&)> success_callback, base::OnceCallback<void(NetworkRequestError)> error_callback); + + FindEligibleDevicesArgs(const FindEligibleDevicesArgs&) = delete; + FindEligibleDevicesArgs& operator=(const FindEligibleDevicesArgs&) = delete; + ~FindEligibleDevicesArgs(); multidevice::SoftwareFeature software_feature; @@ -84,12 +91,14 @@ const std::vector<cryptauth::IneligibleDevice>&)> success_callback; base::OnceCallback<void(NetworkRequestError)> error_callback; - - private: - DISALLOW_COPY_AND_ASSIGN(FindEligibleDevicesArgs); }; FakeSoftwareFeatureManager(); + + FakeSoftwareFeatureManager(const FakeSoftwareFeatureManager&) = delete; + FakeSoftwareFeatureManager& operator=(const FakeSoftwareFeatureManager&) = + delete; + ~FakeSoftwareFeatureManager() override; void set_delegate(Delegate* delegate) { delegate_ = delegate; } @@ -138,8 +147,6 @@ std::vector<std::unique_ptr<SetFeatureStatusArgs>> set_feature_status_calls_; std::vector<std::unique_ptr<FindEligibleDevicesArgs>> find_eligible_multidevice_host_calls_; - - DISALLOW_COPY_AND_ASSIGN(FakeSoftwareFeatureManager); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/mock_cryptauth_client.h b/chromeos/services/device_sync/mock_cryptauth_client.h index 5996009..5c1c400 100644 --- a/chromeos/services/device_sync/mock_cryptauth_client.h +++ b/chromeos/services/device_sync/mock_cryptauth_client.h
@@ -21,6 +21,10 @@ class MockCryptAuthClient : public CryptAuthClient { public: MockCryptAuthClient(); + + MockCryptAuthClient(const MockCryptAuthClient&) = delete; + MockCryptAuthClient& operator=(const MockCryptAuthClient&) = delete; + ~MockCryptAuthClient() override; // TODO(https://crbug.com/997268): Update these to use MOCK_METHOD. @@ -98,9 +102,6 @@ GetDevicesActivityStatusCallback callback, ErrorCallback error_callback)); MOCK_METHOD0(GetAccessTokenUsed, std::string()); - - private: - DISALLOW_COPY_AND_ASSIGN(MockCryptAuthClient); }; class MockCryptAuthClientFactory : public CryptAuthClientFactory { @@ -119,6 +120,11 @@ // If |mock_type| is STRICT, then StrictMocks will be created. Otherwise, // NiceMocks will be created. explicit MockCryptAuthClientFactory(MockType mock_type); + + MockCryptAuthClientFactory(const MockCryptAuthClientFactory&) = delete; + MockCryptAuthClientFactory& operator=(const MockCryptAuthClientFactory&) = + delete; + ~MockCryptAuthClientFactory() override; // CryptAuthClientFactory: @@ -133,8 +139,6 @@ // Observers of the factory. base::ObserverList<Observer>::Unchecked observer_list_; - - DISALLOW_COPY_AND_ASSIGN(MockCryptAuthClientFactory); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/mock_sync_scheduler.h b/chromeos/services/device_sync/mock_sync_scheduler.h index 67f022df..d259af3 100644 --- a/chromeos/services/device_sync/mock_sync_scheduler.h +++ b/chromeos/services/device_sync/mock_sync_scheduler.h
@@ -17,6 +17,10 @@ class MockSyncScheduler : public SyncScheduler { public: MockSyncScheduler(); + + MockSyncScheduler(const MockSyncScheduler&) = delete; + MockSyncScheduler& operator=(const MockSyncScheduler&) = delete; + ~MockSyncScheduler() override; // SyncScheduler: @@ -28,9 +32,6 @@ MOCK_CONST_METHOD0(GetStrategy, Strategy(void)); MOCK_CONST_METHOD0(GetSyncState, SyncState(void)); MOCK_METHOD1(OnSyncCompleted, void(bool success)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockSyncScheduler); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/public/cpp/client_app_metadata_provider.h b/chromeos/services/device_sync/public/cpp/client_app_metadata_provider.h index e3ec30a..2def71c1 100644 --- a/chromeos/services/device_sync/public/cpp/client_app_metadata_provider.h +++ b/chromeos/services/device_sync/public/cpp/client_app_metadata_provider.h
@@ -24,6 +24,11 @@ class ClientAppMetadataProvider { public: ClientAppMetadataProvider() = default; + + ClientAppMetadataProvider(const ClientAppMetadataProvider&) = delete; + ClientAppMetadataProvider& operator=(const ClientAppMetadataProvider&) = + delete; + virtual ~ClientAppMetadataProvider() = default; using GetMetadataCallback = base::OnceCallback<void( @@ -33,9 +38,6 @@ // fails, null is passed to the callback. virtual void GetClientAppMetadata(const std::string& gcm_registration_id, GetMetadataCallback callback) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(ClientAppMetadataProvider); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/public/cpp/cryptauth_device_id_provider.h b/chromeos/services/device_sync/public/cpp/cryptauth_device_id_provider.h index 396c1b47..966c37b1 100644 --- a/chromeos/services/device_sync/public/cpp/cryptauth_device_id_provider.h +++ b/chromeos/services/device_sync/public/cpp/cryptauth_device_id_provider.h
@@ -19,12 +19,14 @@ class CryptAuthDeviceIdProvider { public: CryptAuthDeviceIdProvider() = default; + + CryptAuthDeviceIdProvider(const CryptAuthDeviceIdProvider&) = delete; + CryptAuthDeviceIdProvider& operator=(const CryptAuthDeviceIdProvider&) = + delete; + virtual ~CryptAuthDeviceIdProvider() = default; virtual std::string GetDeviceId() const = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(CryptAuthDeviceIdProvider); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/public/cpp/fake_client_app_metadata_provider.h b/chromeos/services/device_sync/public/cpp/fake_client_app_metadata_provider.h index f710422..cc3b964 100644 --- a/chromeos/services/device_sync/public/cpp/fake_client_app_metadata_provider.h +++ b/chromeos/services/device_sync/public/cpp/fake_client_app_metadata_provider.h
@@ -31,6 +31,11 @@ }; FakeClientAppMetadataProvider(); + + FakeClientAppMetadataProvider(const FakeClientAppMetadataProvider&) = delete; + FakeClientAppMetadataProvider& operator=( + const FakeClientAppMetadataProvider&) = delete; + ~FakeClientAppMetadataProvider() override; // ClientAppMetadataProvider: @@ -50,8 +55,6 @@ private: std::vector<GetMetadataRequest> metadata_requests_; - - DISALLOW_COPY_AND_ASSIGN(FakeClientAppMetadataProvider); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/public/cpp/fake_device_sync_client.h b/chromeos/services/device_sync/public/cpp/fake_device_sync_client.h index 4d7b929..381c5d1f 100644 --- a/chromeos/services/device_sync/public/cpp/fake_device_sync_client.h +++ b/chromeos/services/device_sync/public/cpp/fake_device_sync_client.h
@@ -84,6 +84,10 @@ }; FakeDeviceSyncClient(); + + FakeDeviceSyncClient(const FakeDeviceSyncClient&) = delete; + FakeDeviceSyncClient& operator=(const FakeDeviceSyncClient&) = delete; + ~FakeDeviceSyncClient() override; const base::circular_deque<SetSoftwareFeatureStateInputs>& @@ -192,8 +196,6 @@ get_devices_activity_status_callback_queue_; base::circular_deque<mojom::DeviceSync::GetDebugInfoCallback> get_debug_info_callback_queue_; - - DISALLOW_COPY_AND_ASSIGN(FakeDeviceSyncClient); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/public/cpp/fake_gcm_device_info_provider.h b/chromeos/services/device_sync/public/cpp/fake_gcm_device_info_provider.h index f5d9d58..ba910d721 100644 --- a/chromeos/services/device_sync/public/cpp/fake_gcm_device_info_provider.h +++ b/chromeos/services/device_sync/public/cpp/fake_gcm_device_info_provider.h
@@ -18,6 +18,11 @@ public: explicit FakeGcmDeviceInfoProvider( const cryptauth::GcmDeviceInfo& gcm_device_info); + + FakeGcmDeviceInfoProvider(const FakeGcmDeviceInfoProvider&) = delete; + FakeGcmDeviceInfoProvider& operator=(const FakeGcmDeviceInfoProvider&) = + delete; + ~FakeGcmDeviceInfoProvider() override; // GcmDeviceInfoProvider: @@ -25,8 +30,6 @@ private: const cryptauth::GcmDeviceInfo gcm_device_info_; - - DISALLOW_COPY_AND_ASSIGN(FakeGcmDeviceInfoProvider); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/public/cpp/gcm_device_info_provider.h b/chromeos/services/device_sync/public/cpp/gcm_device_info_provider.h index 89884c9..ab863aa 100644 --- a/chromeos/services/device_sync/public/cpp/gcm_device_info_provider.h +++ b/chromeos/services/device_sync/public/cpp/gcm_device_info_provider.h
@@ -18,12 +18,13 @@ class GcmDeviceInfoProvider { public: GcmDeviceInfoProvider() = default; + + GcmDeviceInfoProvider(const GcmDeviceInfoProvider&) = delete; + GcmDeviceInfoProvider& operator=(const GcmDeviceInfoProvider&) = delete; + virtual ~GcmDeviceInfoProvider() = default; virtual const cryptauth::GcmDeviceInfo& GetGcmDeviceInfo() const = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(GcmDeviceInfoProvider); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/remote_device_loader_unittest.cc b/chromeos/services/device_sync/remote_device_loader_unittest.cc index 61d6efa2..94ce2be 100644 --- a/chromeos/services/device_sync/remote_device_loader_unittest.cc +++ b/chromeos/services/device_sync/remote_device_loader_unittest.cc
@@ -63,6 +63,11 @@ user_private_key_(secure_message_delegate_->GetPrivateKeyForPublicKey( kUserPublicKey)) {} + DeviceSyncRemoteDeviceLoaderTest(const DeviceSyncRemoteDeviceLoaderTest&) = + delete; + DeviceSyncRemoteDeviceLoaderTest& operator=( + const DeviceSyncRemoteDeviceLoaderTest&) = delete; + ~DeviceSyncRemoteDeviceLoaderTest() {} void OnRemoteDevicesLoaded( @@ -84,8 +89,6 @@ // Stores the result of the RemoteDeviceLoader. multidevice::RemoteDeviceList remote_devices_; - - DISALLOW_COPY_AND_ASSIGN(DeviceSyncRemoteDeviceLoaderTest); }; TEST_F(DeviceSyncRemoteDeviceLoaderTest, LoadZeroDevices) {
diff --git a/chromeos/services/device_sync/sync_scheduler.h b/chromeos/services/device_sync/sync_scheduler.h index 69b8aa94..d7caaaa 100644 --- a/chromeos/services/device_sync/sync_scheduler.h +++ b/chromeos/services/device_sync/sync_scheduler.h
@@ -38,6 +38,10 @@ class SyncRequest { public: explicit SyncRequest(base::WeakPtr<SyncScheduler> sync_scheduler); + + SyncRequest(const SyncRequest&) = delete; + SyncRequest& operator=(const SyncRequest&) = delete; + ~SyncRequest(); void OnDidComplete(bool success); @@ -49,8 +53,6 @@ // True if |OnDidComplete()| has been called. bool completed_; - - DISALLOW_COPY_AND_ASSIGN(SyncRequest); }; // Handles the actual sync operation.
diff --git a/chromeos/services/device_sync/sync_scheduler_impl.h b/chromeos/services/device_sync/sync_scheduler_impl.h index e409337..70fa647 100644 --- a/chromeos/services/device_sync/sync_scheduler_impl.h +++ b/chromeos/services/device_sync/sync_scheduler_impl.h
@@ -33,6 +33,9 @@ double max_jitter_ratio, const std::string& scheduler_name); + SyncSchedulerImpl(const SyncSchedulerImpl&) = delete; + SyncSchedulerImpl& operator=(const SyncSchedulerImpl&) = delete; + ~SyncSchedulerImpl() override; // SyncScheduler: @@ -97,8 +100,6 @@ std::unique_ptr<base::OneShotTimer> timer_; base::WeakPtrFactory<SyncSchedulerImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SyncSchedulerImpl); }; } // namespace device_sync
diff --git a/chromeos/services/device_sync/sync_scheduler_impl_unittest.cc b/chromeos/services/device_sync/sync_scheduler_impl_unittest.cc index 2b442732..b94ecec 100644 --- a/chromeos/services/device_sync/sync_scheduler_impl_unittest.cc +++ b/chromeos/services/device_sync/sync_scheduler_impl_unittest.cc
@@ -54,6 +54,9 @@ max_jitter_ratio, kTestSchedulerName) {} + TestSyncSchedulerImpl(const TestSyncSchedulerImpl&) = delete; + TestSyncSchedulerImpl& operator=(const TestSyncSchedulerImpl&) = delete; + ~TestSyncSchedulerImpl() override {} base::MockOneShotTimer* timer() { return mock_timer_; } @@ -66,8 +69,6 @@ // A timer instance for testing. Owned by the parent scheduler. base::MockOneShotTimer* mock_timer_; - - DISALLOW_COPY_AND_ASSIGN(TestSyncSchedulerImpl); }; } // namespace
diff --git a/chromeos/services/ime/decoder/decoder_engine.h b/chromeos/services/ime/decoder/decoder_engine.h index 6502268..3397be54 100644 --- a/chromeos/services/ime/decoder/decoder_engine.h +++ b/chromeos/services/ime/decoder/decoder_engine.h
@@ -26,6 +26,10 @@ class DecoderEngine : public mojom::InputChannel { public: explicit DecoderEngine(ImeCrosPlatform* platform); + + DecoderEngine(const DecoderEngine&) = delete; + DecoderEngine& operator=(const DecoderEngine&) = delete; + ~DecoderEngine() override; // Binds the mojom::InputChannel interface to this object and returns true if @@ -52,8 +56,6 @@ absl::optional<ImeDecoder::EntryPoints> decoder_entry_points_; mojo::ReceiverSet<mojom::InputChannel> decoder_channel_receivers_; - - DISALLOW_COPY_AND_ASSIGN(DecoderEngine); }; } // namespace ime
diff --git a/chromeos/services/ime/ime_service.h b/chromeos/services/ime/ime_service.h index 8035f5a2..28a8edc 100644 --- a/chromeos/services/ime/ime_service.h +++ b/chromeos/services/ime/ime_service.h
@@ -28,6 +28,10 @@ public ImeCrosPlatform { public: explicit ImeService(mojo::PendingReceiver<mojom::ImeService> receiver); + + ImeService(const ImeService&) = delete; + ImeService& operator=(const ImeService&) = delete; + ~ImeService() override; private: @@ -90,8 +94,6 @@ // Platform delegate for access to privilege resources. mojo::Remote<mojom::PlatformAccessProvider> platform_access_; mojo::ReceiverSet<mojom::InputEngineManager> manager_receivers_; - - DISALLOW_COPY_AND_ASSIGN(ImeService); }; } // namespace ime
diff --git a/chromeos/services/ime/ime_service_unittest.cc b/chromeos/services/ime/ime_service_unittest.cc index b35d1f68..120564e 100644 --- a/chromeos/services/ime/ime_service_unittest.cc +++ b/chromeos/services/ime/ime_service_unittest.cc
@@ -144,6 +144,10 @@ class ImeServiceTest : public testing::Test, public mojom::InputMethodHost { public: ImeServiceTest() : service_(remote_service_.BindNewPipeAndPassReceiver()) {} + + ImeServiceTest(const ImeServiceTest&) = delete; + ImeServiceTest& operator=(const ImeServiceTest&) = delete; + ~ImeServiceTest() override = default; void CommitText(const std::u16string& text, @@ -182,8 +186,6 @@ base::test::ScopedFeatureList feature_list_; ImeService service_; TestDecoderState state_; - - DISALLOW_COPY_AND_ASSIGN(ImeServiceTest); }; } // namespace
diff --git a/chromeos/services/ime/public/cpp/rulebased/engine.h b/chromeos/services/ime/public/cpp/rulebased/engine.h index 9d4b3d28..a5f8fc2 100644 --- a/chromeos/services/ime/public/cpp/rulebased/engine.h +++ b/chromeos/services/ime/public/cpp/rulebased/engine.h
@@ -33,6 +33,10 @@ class Engine { public: Engine(); + + Engine(const Engine&) = delete; + Engine& operator=(const Engine&) = delete; + ~Engine(); static bool IsImeSupported(const std::string& id); @@ -62,8 +66,6 @@ int history_transat_ = -1; // The history ambiguous string which matches the history prune regexp. std::string history_ambi_; - - DISALLOW_COPY_AND_ASSIGN(Engine); }; } // namespace rulebased
diff --git a/chromeos/services/ime/public/cpp/rulebased/rules_data.h b/chromeos/services/ime/public/cpp/rulebased/rules_data.h index 8ebafbbb..4e1245a8 100644 --- a/chromeos/services/ime/public/cpp/rulebased/rules_data.h +++ b/chromeos/services/ime/public/cpp/rulebased/rules_data.h
@@ -28,6 +28,10 @@ class RulesData { public: RulesData(); + + RulesData(const RulesData&) = delete; + RulesData& operator=(const RulesData&) = delete; + ~RulesData(); // Creates the RulesData by the given raw data. @@ -84,8 +88,6 @@ // The history prune regexp which is only used by client code of RulesData. std::unique_ptr<re2::RE2> history_prune_re_; - - DISALLOW_COPY_AND_ASSIGN(RulesData); }; } // namespace rulebased
diff --git a/chromeos/services/libassistant/audio/audio_device_owner.h b/chromeos/services/libassistant/audio/audio_device_owner.h index 63b3178..6ac958e 100644 --- a/chromeos/services/libassistant/audio/audio_device_owner.h +++ b/chromeos/services/libassistant/audio/audio_device_owner.h
@@ -29,6 +29,10 @@ media_session::mojom::MediaSessionObserver { public: explicit AudioDeviceOwner(const std::string& device_id); + + AudioDeviceOwner(const AudioDeviceOwner&) = delete; + AudioDeviceOwner& operator=(const AudioDeviceOwner&) = delete; + ~AudioDeviceOwner() override; void Start( @@ -102,8 +106,6 @@ // so this sequence checker prevents the other methods from being called on // the render sequence. SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(AudioDeviceOwner); }; } // namespace libassistant
diff --git a/chromeos/services/libassistant/audio/audio_media_data_source.h b/chromeos/services/libassistant/audio/audio_media_data_source.h index 587f036..85416b53 100644 --- a/chromeos/services/libassistant/audio/audio_media_data_source.h +++ b/chromeos/services/libassistant/audio/audio_media_data_source.h
@@ -26,6 +26,10 @@ explicit AudioMediaDataSource( mojo::PendingReceiver< chromeos::assistant::mojom::AssistantMediaDataSource> receiver); + + AudioMediaDataSource(const AudioMediaDataSource&) = delete; + AudioMediaDataSource& operator=(const AudioMediaDataSource&) = delete; + ~AudioMediaDataSource() override; // chromeos::assistant::mojom::MediaDataSource implementation. @@ -55,8 +59,6 @@ ReadCallback read_callback_; base::WeakPtrFactory<AudioMediaDataSource> weak_factory_; - - DISALLOW_COPY_AND_ASSIGN(AudioMediaDataSource); }; } // namespace libassistant
diff --git a/chromeos/services/libassistant/audio/audio_output_provider_impl.cc b/chromeos/services/libassistant/audio/audio_output_provider_impl.cc index 6addbe32..2bd3ee8 100644 --- a/chromeos/services/libassistant/audio/audio_output_provider_impl.cc +++ b/chromeos/services/libassistant/audio/audio_output_provider_impl.cc
@@ -56,6 +56,9 @@ weak_ptr_factory_.GetWeakPtr(), device_id)); } + AudioOutputImpl(const AudioOutputImpl&) = delete; + AudioOutputImpl& operator=(const AudioOutputImpl&) = delete; + ~AudioOutputImpl() override { main_task_runner_->DeleteSoon(FROM_HERE, device_owner_.release()); main_task_runner_->DeleteSoon(FROM_HERE, audio_stream_handler_.release()); @@ -149,8 +152,6 @@ SEQUENCE_CHECKER(main_sequence_checker_); base::WeakPtrFactory<AudioOutputImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(AudioOutputImpl); }; } // namespace
diff --git a/chromeos/services/libassistant/audio/audio_output_provider_impl.h b/chromeos/services/libassistant/audio/audio_output_provider_impl.h index e0f4c81..e7ea109 100644 --- a/chromeos/services/libassistant/audio/audio_output_provider_impl.h +++ b/chromeos/services/libassistant/audio/audio_output_provider_impl.h
@@ -34,6 +34,10 @@ class AudioOutputProviderImpl : public assistant_client::AudioOutputProvider { public: explicit AudioOutputProviderImpl(const std::string& device_id); + + AudioOutputProviderImpl(const AudioOutputProviderImpl&) = delete; + AudioOutputProviderImpl& operator=(const AudioOutputProviderImpl&) = delete; + ~AudioOutputProviderImpl() override; void Bind( @@ -83,8 +87,6 @@ audio_decoder_factory_; std::string device_id_; base::WeakPtrFactory<AudioOutputProviderImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(AudioOutputProviderImpl); }; } // namespace libassistant
diff --git a/chromeos/services/libassistant/audio/audio_output_provider_impl_unittest.cc b/chromeos/services/libassistant/audio/audio_output_provider_impl_unittest.cc index 1eafa58..5ac1c57 100644 --- a/chromeos/services/libassistant/audio/audio_output_provider_impl_unittest.cc +++ b/chromeos/services/libassistant/audio/audio_output_provider_impl_unittest.cc
@@ -25,6 +25,9 @@ public: FakeAudioOutputDelegate() : thread_("assistant") { thread_.Start(); } + FakeAudioOutputDelegate(const FakeAudioOutputDelegate&) = delete; + FakeAudioOutputDelegate& operator=(const FakeAudioOutputDelegate&) = delete; + ~FakeAudioOutputDelegate() override = default; // assistant_client::AudioOutput::Delegate overrides: @@ -81,8 +84,6 @@ std::unique_ptr<base::RunLoop> run_loop_; int num_bytes_to_fill_ = 0; bool end_of_stream_ = false; - - DISALLOW_COPY_AND_ASSIGN(FakeAudioOutputDelegate); }; class FakeAudioOutputDelegateMojom @@ -110,12 +111,14 @@ base::test::TaskEnvironment::MainThreadType::DEFAULT, base::test::TaskEnvironment::ThreadPoolExecutionMode::QUEUED) {} + AssistantAudioDeviceOwnerTest(const AssistantAudioDeviceOwnerTest&) = delete; + AssistantAudioDeviceOwnerTest& operator=( + const AssistantAudioDeviceOwnerTest&) = delete; + ~AssistantAudioDeviceOwnerTest() override { task_env_.RunUntilIdle(); } private: base::test::TaskEnvironment task_env_; - - DISALLOW_COPY_AND_ASSIGN(AssistantAudioDeviceOwnerTest); }; TEST_F(AssistantAudioDeviceOwnerTest, BufferFilling) {
diff --git a/chromeos/services/libassistant/audio/audio_stream_handler.h b/chromeos/services/libassistant/audio/audio_stream_handler.h index 709d604..e42c5a0 100644 --- a/chromeos/services/libassistant/audio/audio_stream_handler.h +++ b/chromeos/services/libassistant/audio/audio_stream_handler.h
@@ -26,6 +26,10 @@ base::OnceCallback<void(const assistant_client::OutputStreamFormat&)>; AudioStreamHandler(); + + AudioStreamHandler(const AudioStreamHandler&) = delete; + AudioStreamHandler& operator=(const AudioStreamHandler&) = delete; + ~AudioStreamHandler() override; void StartAudioDecoder( @@ -98,8 +102,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<AudioStreamHandler> weak_factory_; - - DISALLOW_COPY_AND_ASSIGN(AudioStreamHandler); }; } // namespace libassistant
diff --git a/chromeos/services/libassistant/audio/volume_control_impl.h b/chromeos/services/libassistant/audio/volume_control_impl.h index 574afa2..241db85d 100644 --- a/chromeos/services/libassistant/audio/volume_control_impl.h +++ b/chromeos/services/libassistant/audio/volume_control_impl.h
@@ -20,6 +20,10 @@ public ash::mojom::VolumeObserver { public: VolumeControlImpl(); + + VolumeControlImpl(const VolumeControlImpl&) = delete; + VolumeControlImpl& operator=(const VolumeControlImpl&) = delete; + ~VolumeControlImpl() override; void Initialize(mojom::AudioOutputDelegate* audio_output_delegate, @@ -55,8 +59,6 @@ bool mute_ = false; base::WeakPtrFactory<VolumeControlImpl> weak_factory_; - - DISALLOW_COPY_AND_ASSIGN(VolumeControlImpl); }; } // namespace libassistant
diff --git a/chromeos/services/libassistant/chromium_api_delegate.h b/chromeos/services/libassistant/chromium_api_delegate.h index 2990b59..420f10a 100644 --- a/chromeos/services/libassistant/chromium_api_delegate.h +++ b/chromeos/services/libassistant/chromium_api_delegate.h
@@ -28,6 +28,10 @@ explicit ChromiumApiDelegate( std::unique_ptr<network::PendingSharedURLLoaderFactory> pending_url_loader_factory); + + ChromiumApiDelegate(const ChromiumApiDelegate&) = delete; + ChromiumApiDelegate& operator=(const ChromiumApiDelegate&) = delete; + ~ChromiumApiDelegate() override; // assistant_client::FuchsiaApiDelegate overrides: assistant_client::HttpConnectionFactory* GetHttpConnectionFactory() override; @@ -38,7 +42,6 @@ private: ChromiumHttpConnectionFactory http_connection_factory_; - DISALLOW_COPY_AND_ASSIGN(ChromiumApiDelegate); }; } // namespace libassistant
diff --git a/chromeos/services/libassistant/chromium_http_connection.h b/chromeos/services/libassistant/chromium_http_connection.h index f6e2f815..622b55c 100644 --- a/chromeos/services/libassistant/chromium_http_connection.h +++ b/chromeos/services/libassistant/chromium_http_connection.h
@@ -136,6 +136,11 @@ explicit ChromiumHttpConnectionFactory( std::unique_ptr<network::PendingSharedURLLoaderFactory> pending_url_loader_factory); + + ChromiumHttpConnectionFactory(const ChromiumHttpConnectionFactory&) = delete; + ChromiumHttpConnectionFactory& operator=( + const ChromiumHttpConnectionFactory&) = delete; + ~ChromiumHttpConnectionFactory() override; // assistant_client::HttpConnectionFactory implementation: @@ -144,8 +149,6 @@ private: scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory_; - - DISALLOW_COPY_AND_ASSIGN(ChromiumHttpConnectionFactory); }; } // namespace libassistant
diff --git a/chromeos/services/libassistant/file_provider_impl.h b/chromeos/services/libassistant/file_provider_impl.h index 1f7c9a61..78ec467 100644 --- a/chromeos/services/libassistant/file_provider_impl.h +++ b/chromeos/services/libassistant/file_provider_impl.h
@@ -17,6 +17,10 @@ class FileProviderImpl : public assistant_client::FileProvider { public: FileProviderImpl(); + + FileProviderImpl(const FileProviderImpl&) = delete; + FileProviderImpl& operator=(const FileProviderImpl&) = delete; + ~FileProviderImpl() override; // assistant_client::FileProvider overrides: @@ -31,8 +35,6 @@ private: // Root path which other paths are relative to. const base::FilePath root_path_; - - DISALLOW_COPY_AND_ASSIGN(FileProviderImpl); }; } // namespace libassistant
diff --git a/chromeos/services/libassistant/grpc/assistant_client_v1.cc b/chromeos/services/libassistant/grpc/assistant_client_v1.cc index 7aca745..121300b 100644 --- a/chromeos/services/libassistant/grpc/assistant_client_v1.cc +++ b/chromeos/services/libassistant/grpc/assistant_client_v1.cc
@@ -316,12 +316,11 @@ void AssistantClientV1::GetSpeakerIdEnrollmentInfo( const ::assistant::api::GetSpeakerIdEnrollmentInfoRequest& request, base::OnceCallback<void(bool user_model_exists)> on_done) { - auto callback = base::BindOnce( - [](base::OnceCallback<void(bool user_model_exists)> cb, - const assistant_client::SpeakerIdEnrollmentStatus& status) { - std::move(cb).Run(status.user_model_exists); - }, - std::move(on_done)); + auto callback = + AdaptCallback<const assistant_client::SpeakerIdEnrollmentStatus&>( + /*once_callback=*/std::move(on_done), + /*transformer=*/[](const assistant_client::SpeakerIdEnrollmentStatus& + status) { return status.user_model_exists; }); assistant_manager_internal()->GetSpeakerIdEnrollmentStatus( request.cloud_enrollment_status_request().user_id(),
diff --git a/chromeos/services/libassistant/network_provider_impl.h b/chromeos/services/libassistant/network_provider_impl.h index 863c31a..10e27894 100644 --- a/chromeos/services/libassistant/network_provider_impl.h +++ b/chromeos/services/libassistant/network_provider_impl.h
@@ -22,6 +22,10 @@ public network_config::mojom::CrosNetworkConfigObserver { public: NetworkProviderImpl(); + + NetworkProviderImpl(const NetworkProviderImpl&) = delete; + NetworkProviderImpl& operator=(const NetworkProviderImpl&) = delete; + ~NetworkProviderImpl() override; void Initialize(mojom::PlatformDelegate* platform_delegate); @@ -48,8 +52,6 @@ this}; mojo::Remote<network_config::mojom::CrosNetworkConfig> cros_network_config_remote_; - - DISALLOW_COPY_AND_ASSIGN(NetworkProviderImpl); }; } // namespace libassistant
diff --git a/chromeos/services/libassistant/network_provider_impl_unittest.cc b/chromeos/services/libassistant/network_provider_impl_unittest.cc index 29b1379..ae7740b 100644 --- a/chromeos/services/libassistant/network_provider_impl_unittest.cc +++ b/chromeos/services/libassistant/network_provider_impl_unittest.cc
@@ -26,6 +26,12 @@ AssistantNetworkProviderImplTest() { network_provider_.Initialize(&platform_delegate_); } + + AssistantNetworkProviderImplTest(const AssistantNetworkProviderImplTest&) = + delete; + AssistantNetworkProviderImplTest& operator=( + const AssistantNetworkProviderImplTest&) = delete; + ~AssistantNetworkProviderImplTest() override = default; void PublishConnectionStateType(ConnectionStateType connection_type) { @@ -65,8 +71,6 @@ base::test::TaskEnvironment task_environment; assistant::FakePlatformDelegate platform_delegate_; NetworkProviderImpl network_provider_; - - DISALLOW_COPY_AND_ASSIGN(AssistantNetworkProviderImplTest); }; TEST_F(AssistantNetworkProviderImplTest, StartWithStatusUnknown) {
diff --git a/chromeos/services/libassistant/power_manager_provider_impl.h b/chromeos/services/libassistant/power_manager_provider_impl.h index 0957abe..5d266ea 100644 --- a/chromeos/services/libassistant/power_manager_provider_impl.h +++ b/chromeos/services/libassistant/power_manager_provider_impl.h
@@ -39,6 +39,10 @@ : public assistant_client::PowerManagerProvider { public: PowerManagerProviderImpl(); + + PowerManagerProviderImpl(const PowerManagerProviderImpl&) = delete; + PowerManagerProviderImpl& operator=(const PowerManagerProviderImpl&) = delete; + ~PowerManagerProviderImpl() override; void Initialize(chromeos::libassistant::mojom::PlatformDelegate* delegate); @@ -112,8 +116,6 @@ const base::TickClock* tick_clock_ = nullptr; base::WeakPtrFactory<PowerManagerProviderImpl> weak_factory_; - - DISALLOW_COPY_AND_ASSIGN(PowerManagerProviderImpl); }; } // namespace libassistant
diff --git a/chromeos/services/libassistant/power_manager_provider_impl_unittest.cc b/chromeos/services/libassistant/power_manager_provider_impl_unittest.cc index 6c3fb4a..f04a139 100644 --- a/chromeos/services/libassistant/power_manager_provider_impl_unittest.cc +++ b/chromeos/services/libassistant/power_manager_provider_impl_unittest.cc
@@ -44,6 +44,12 @@ AssistantPowerManagerProviderImplTest() : task_environment_(base::test::TaskEnvironment::MainThreadType::IO, base::test::TaskEnvironment::TimeSource::MOCK_TIME) {} + + AssistantPowerManagerProviderImplTest( + const AssistantPowerManagerProviderImplTest&) = delete; + AssistantPowerManagerProviderImplTest& operator=( + const AssistantPowerManagerProviderImplTest&) = delete; + ~AssistantPowerManagerProviderImplTest() override = default; void SetUp() override { @@ -128,8 +134,6 @@ FakePlatformDelegateImpl platform_delegate_{&wake_lock_provider_}; std::unique_ptr<PowerManagerProviderImpl> power_manager_provider_impl_; - - DISALLOW_COPY_AND_ASSIGN(AssistantPowerManagerProviderImplTest); }; TEST_F(AssistantPowerManagerProviderImplTest, CheckAcquireAndReleaseWakeLock) {
diff --git a/chromeos/services/libassistant/system_provider_impl.h b/chromeos/services/libassistant/system_provider_impl.h index b5bb821..04750aaa 100644 --- a/chromeos/services/libassistant/system_provider_impl.h +++ b/chromeos/services/libassistant/system_provider_impl.h
@@ -28,6 +28,10 @@ // platform power manager provider is available. explicit SystemProviderImpl( std::unique_ptr<PowerManagerProviderImpl> power_manager_provider); + + SystemProviderImpl(const SystemProviderImpl&) = delete; + SystemProviderImpl& operator=(const SystemProviderImpl&) = delete; + ~SystemProviderImpl() override; void Initialize( @@ -51,8 +55,6 @@ mojo::Remote<device::mojom::BatteryMonitor> battery_monitor_; device::mojom::BatteryStatusPtr current_battery_status_; - - DISALLOW_COPY_AND_ASSIGN(SystemProviderImpl); }; } // namespace libassistant
diff --git a/chromeos/services/machine_learning/public/cpp/fake_service_connection.h b/chromeos/services/machine_learning/public/cpp/fake_service_connection.h index ba395c6..277079c2 100644 --- a/chromeos/services/machine_learning/public/cpp/fake_service_connection.h +++ b/chromeos/services/machine_learning/public/cpp/fake_service_connection.h
@@ -53,6 +53,11 @@ public web_platform::mojom::HandwritingRecognizer { public: FakeServiceConnectionImpl(); + + FakeServiceConnectionImpl(const FakeServiceConnectionImpl&) = delete; + FakeServiceConnectionImpl& operator=(const FakeServiceConnectionImpl&) = + delete; + ~FakeServiceConnectionImpl() override; // ServiceConnection: @@ -379,8 +384,6 @@ bool async_mode_; std::vector<base::OnceClosure> pending_calls_; - - DISALLOW_COPY_AND_ASSIGN(FakeServiceConnectionImpl); }; } // namespace machine_learning
diff --git a/chromeos/services/multidevice_setup/account_status_change_delegate_notifier.h b/chromeos/services/multidevice_setup/account_status_change_delegate_notifier.h index f081280..5cc825891 100644 --- a/chromeos/services/multidevice_setup/account_status_change_delegate_notifier.h +++ b/chromeos/services/multidevice_setup/account_status_change_delegate_notifier.h
@@ -21,6 +21,11 @@ // (3) a new Chromebook has been added to an account for someone who has. class AccountStatusChangeDelegateNotifier { public: + AccountStatusChangeDelegateNotifier( + const AccountStatusChangeDelegateNotifier&) = delete; + AccountStatusChangeDelegateNotifier& operator=( + const AccountStatusChangeDelegateNotifier&) = delete; + virtual ~AccountStatusChangeDelegateNotifier(); void SetAccountStatusChangeDelegateRemote( @@ -47,8 +52,6 @@ void FlushForTesting(); mojo::Remote<mojom::AccountStatusChangeDelegate> delegate_remote_; - - DISALLOW_COPY_AND_ASSIGN(AccountStatusChangeDelegateNotifier); }; } // namespace multidevice_setup
diff --git a/chromeos/services/multidevice_setup/eligible_host_devices_provider.h b/chromeos/services/multidevice_setup/eligible_host_devices_provider.h index be093ce..a11e518 100644 --- a/chromeos/services/multidevice_setup/eligible_host_devices_provider.h +++ b/chromeos/services/multidevice_setup/eligible_host_devices_provider.h
@@ -16,6 +16,10 @@ // Provides all remote devices which are eligible to be MultiDevice hosts. class EligibleHostDevicesProvider { public: + EligibleHostDevicesProvider(const EligibleHostDevicesProvider&) = delete; + EligibleHostDevicesProvider& operator=(const EligibleHostDevicesProvider&) = + delete; + virtual ~EligibleHostDevicesProvider() = default; // Returns all eligible host devices sorted by the last time they were updated @@ -34,9 +38,6 @@ protected: EligibleHostDevicesProvider() = default; - - private: - DISALLOW_COPY_AND_ASSIGN(EligibleHostDevicesProvider); }; } // namespace multidevice_setup
diff --git a/chromeos/services/multidevice_setup/fake_account_status_change_delegate.h b/chromeos/services/multidevice_setup/fake_account_status_change_delegate.h index 8cacd8d..0b8ea59 100644 --- a/chromeos/services/multidevice_setup/fake_account_status_change_delegate.h +++ b/chromeos/services/multidevice_setup/fake_account_status_change_delegate.h
@@ -19,6 +19,12 @@ : public mojom::AccountStatusChangeDelegate { public: FakeAccountStatusChangeDelegate(); + + FakeAccountStatusChangeDelegate(const FakeAccountStatusChangeDelegate&) = + delete; + FakeAccountStatusChangeDelegate& operator=( + const FakeAccountStatusChangeDelegate&) = delete; + ~FakeAccountStatusChangeDelegate() override; mojo::PendingRemote<mojom::AccountStatusChangeDelegate> GenerateRemote(); @@ -60,8 +66,6 @@ size_t num_eligible_for_wifi_sync_events_handled_ = 0u; mojo::ReceiverSet<mojom::AccountStatusChangeDelegate> receivers_; - - DISALLOW_COPY_AND_ASSIGN(FakeAccountStatusChangeDelegate); }; } // namespace multidevice_setup
diff --git a/chromeos/services/multidevice_setup/fake_account_status_change_delegate_notifier.h b/chromeos/services/multidevice_setup/fake_account_status_change_delegate_notifier.h index 0aaf1cf..d50039e 100644 --- a/chromeos/services/multidevice_setup/fake_account_status_change_delegate_notifier.h +++ b/chromeos/services/multidevice_setup/fake_account_status_change_delegate_notifier.h
@@ -17,12 +17,15 @@ : public AccountStatusChangeDelegateNotifier { public: FakeAccountStatusChangeDelegateNotifier() = default; + + FakeAccountStatusChangeDelegateNotifier( + const FakeAccountStatusChangeDelegateNotifier&) = delete; + FakeAccountStatusChangeDelegateNotifier& operator=( + const FakeAccountStatusChangeDelegateNotifier&) = delete; + ~FakeAccountStatusChangeDelegateNotifier() override = default; using AccountStatusChangeDelegateNotifier::delegate; - - private: - DISALLOW_COPY_AND_ASSIGN(FakeAccountStatusChangeDelegateNotifier); }; } // namespace multidevice_setup
diff --git a/chromeos/services/multidevice_setup/fake_eligible_host_devices_provider.h b/chromeos/services/multidevice_setup/fake_eligible_host_devices_provider.h index 9c37b7c..f242261 100644 --- a/chromeos/services/multidevice_setup/fake_eligible_host_devices_provider.h +++ b/chromeos/services/multidevice_setup/fake_eligible_host_devices_provider.h
@@ -17,6 +17,12 @@ class FakeEligibleHostDevicesProvider : public EligibleHostDevicesProvider { public: FakeEligibleHostDevicesProvider(); + + FakeEligibleHostDevicesProvider(const FakeEligibleHostDevicesProvider&) = + delete; + FakeEligibleHostDevicesProvider& operator=( + const FakeEligibleHostDevicesProvider&) = delete; + ~FakeEligibleHostDevicesProvider() override; void set_eligible_host_devices( @@ -38,8 +44,6 @@ multidevice::RemoteDeviceRefList eligible_host_devices_; multidevice::DeviceWithConnectivityStatusList eligible_active_host_devices_; - - DISALLOW_COPY_AND_ASSIGN(FakeEligibleHostDevicesProvider); }; } // namespace multidevice_setup
diff --git a/chromeos/services/multidevice_setup/fake_feature_state_manager.h b/chromeos/services/multidevice_setup/fake_feature_state_manager.h index caa32261f..53381a8d 100644 --- a/chromeos/services/multidevice_setup/fake_feature_state_manager.h +++ b/chromeos/services/multidevice_setup/fake_feature_state_manager.h
@@ -18,6 +18,10 @@ class FakeFeatureStateManager : public FeatureStateManager { public: FakeFeatureStateManager(); + + FakeFeatureStateManager(const FakeFeatureStateManager&) = delete; + FakeFeatureStateManager& operator=(const FakeFeatureStateManager&) = delete; + ~FakeFeatureStateManager() override; mojom::FeatureState GetFeatureState(mojom::Feature feature); @@ -33,14 +37,18 @@ bool enabled) override; FeatureStatesMap feature_states_map_; - - DISALLOW_COPY_AND_ASSIGN(FakeFeatureStateManager); }; // Test FeatureStateManager::Observer implementation. class FakeFeatureStateManagerObserver : public FeatureStateManager::Observer { public: FakeFeatureStateManagerObserver(); + + FakeFeatureStateManagerObserver(const FakeFeatureStateManagerObserver&) = + delete; + FakeFeatureStateManagerObserver& operator=( + const FakeFeatureStateManagerObserver&) = delete; + ~FakeFeatureStateManagerObserver() override; const std::vector<FeatureStateManager::FeatureStatesMap>& @@ -54,8 +62,6 @@ const FeatureStateManager::FeatureStatesMap& feature_states_map) override; std::vector<FeatureStateManager::FeatureStatesMap> feature_state_updates_; - - DISALLOW_COPY_AND_ASSIGN(FakeFeatureStateManagerObserver); }; } // namespace multidevice_setup
diff --git a/chromeos/services/multidevice_setup/fake_feature_state_observer.h b/chromeos/services/multidevice_setup/fake_feature_state_observer.h index 61d2926..e870e1a1 100644 --- a/chromeos/services/multidevice_setup/fake_feature_state_observer.h +++ b/chromeos/services/multidevice_setup/fake_feature_state_observer.h
@@ -19,6 +19,10 @@ class FakeFeatureStateObserver : public mojom::FeatureStateObserver { public: FakeFeatureStateObserver(); + + FakeFeatureStateObserver(const FakeFeatureStateObserver&) = delete; + FakeFeatureStateObserver& operator=(const FakeFeatureStateObserver&) = delete; + ~FakeFeatureStateObserver() override; mojo::PendingRemote<mojom::FeatureStateObserver> GenerateRemote(); @@ -38,8 +42,6 @@ feature_state_updates_; mojo::ReceiverSet<mojom::FeatureStateObserver> receivers_; - - DISALLOW_COPY_AND_ASSIGN(FakeFeatureStateObserver); }; } // namespace multidevice_setup
diff --git a/chromeos/services/multidevice_setup/fake_host_backend_delegate.h b/chromeos/services/multidevice_setup/fake_host_backend_delegate.h index 690071f2..39caba2f 100644 --- a/chromeos/services/multidevice_setup/fake_host_backend_delegate.h +++ b/chromeos/services/multidevice_setup/fake_host_backend_delegate.h
@@ -18,6 +18,10 @@ class FakeHostBackendDelegate : public HostBackendDelegate { public: FakeHostBackendDelegate(); + + FakeHostBackendDelegate(const FakeHostBackendDelegate&) = delete; + FakeHostBackendDelegate& operator=(const FakeHostBackendDelegate&) = delete; + ~FakeHostBackendDelegate() override; // Changes the backend host to |host_device_on_backend| and notifies @@ -44,14 +48,18 @@ absl::optional<absl::optional<multidevice::RemoteDeviceRef>> pending_host_request_; absl::optional<multidevice::RemoteDeviceRef> host_device_on_backend_; - - DISALLOW_COPY_AND_ASSIGN(FakeHostBackendDelegate); }; // Test HostBackendDelegate::Observer implementation. class FakeHostBackendDelegateObserver : public HostBackendDelegate::Observer { public: FakeHostBackendDelegateObserver(); + + FakeHostBackendDelegateObserver(const FakeHostBackendDelegateObserver&) = + delete; + FakeHostBackendDelegateObserver& operator=( + const FakeHostBackendDelegateObserver&) = delete; + ~FakeHostBackendDelegateObserver() override; size_t num_changes_on_backend() const { return num_changes_on_backend_; } @@ -71,8 +79,6 @@ size_t num_changes_on_backend_ = 0u; size_t num_failed_backend_requests_ = 0u; size_t num_pending_host_request_changes_ = 0u; - - DISALLOW_COPY_AND_ASSIGN(FakeHostBackendDelegateObserver); }; } // namespace multidevice_setup
diff --git a/chromeos/services/multidevice_setup/fake_host_status_observer.h b/chromeos/services/multidevice_setup/fake_host_status_observer.h index 174a4571..97aea553 100644 --- a/chromeos/services/multidevice_setup/fake_host_status_observer.h +++ b/chromeos/services/multidevice_setup/fake_host_status_observer.h
@@ -19,6 +19,10 @@ class FakeHostStatusObserver : public mojom::HostStatusObserver { public: FakeHostStatusObserver(); + + FakeHostStatusObserver(const FakeHostStatusObserver&) = delete; + FakeHostStatusObserver& operator=(const FakeHostStatusObserver&) = delete; + ~FakeHostStatusObserver() override; mojo::PendingRemote<mojom::HostStatusObserver> GenerateRemote(); @@ -40,8 +44,6 @@ host_status_updates_; mojo::ReceiverSet<mojom::HostStatusObserver> receivers_; - - DISALLOW_COPY_AND_ASSIGN(FakeHostStatusObserver); }; } // namespace multidevice_setup
diff --git a/chromeos/services/multidevice_setup/fake_host_status_provider.h b/chromeos/services/multidevice_setup/fake_host_status_provider.h index d377e31..06fb4b1 100644 --- a/chromeos/services/multidevice_setup/fake_host_status_provider.h +++ b/chromeos/services/multidevice_setup/fake_host_status_provider.h
@@ -18,6 +18,10 @@ class FakeHostStatusProvider : public HostStatusProvider { public: FakeHostStatusProvider(); + + FakeHostStatusProvider(const FakeHostStatusProvider&) = delete; + FakeHostStatusProvider& operator=(const FakeHostStatusProvider&) = delete; + ~FakeHostStatusProvider() override; void SetHostWithStatus( @@ -30,14 +34,18 @@ private: mojom::HostStatus host_status_ = mojom::HostStatus::kNoEligibleHosts; absl::optional<multidevice::RemoteDeviceRef> host_device_; - - DISALLOW_COPY_AND_ASSIGN(FakeHostStatusProvider); }; // Test HostStatusProvider::Observer implementation. class FakeHostStatusProviderObserver : public HostStatusProvider::Observer { public: FakeHostStatusProviderObserver(); + + FakeHostStatusProviderObserver(const FakeHostStatusProviderObserver&) = + delete; + FakeHostStatusProviderObserver& operator=( + const FakeHostStatusProviderObserver&) = delete; + ~FakeHostStatusProviderObserver() override; const std::vector<HostStatusProvider::HostStatusWithDevice>& @@ -51,8 +59,6 @@ host_status_with_device) override; std::vector<HostStatusProvider::HostStatusWithDevice> host_status_updates_; - - DISALLOW_COPY_AND_ASSIGN(FakeHostStatusProviderObserver); }; } // namespace multidevice_setup
diff --git a/chromeos/services/multidevice_setup/fake_host_verifier.h b/chromeos/services/multidevice_setup/fake_host_verifier.h index ce7ed5e..31ee281 100644 --- a/chromeos/services/multidevice_setup/fake_host_verifier.h +++ b/chromeos/services/multidevice_setup/fake_host_verifier.h
@@ -16,6 +16,10 @@ class FakeHostVerifier : public HostVerifier { public: FakeHostVerifier(); + + FakeHostVerifier(const FakeHostVerifier&) = delete; + FakeHostVerifier& operator=(const FakeHostVerifier&) = delete; + ~FakeHostVerifier() override; void set_is_host_verified(bool is_host_verified) { @@ -33,14 +37,16 @@ bool is_host_verified_ = false; size_t num_verify_now_attempts_ = 0u; - - DISALLOW_COPY_AND_ASSIGN(FakeHostVerifier); }; // Test HostVerifier::Observer implementation. class FakeHostVerifierObserver : public HostVerifier::Observer { public: FakeHostVerifierObserver(); + + FakeHostVerifierObserver(const FakeHostVerifierObserver&) = delete; + FakeHostVerifierObserver& operator=(const FakeHostVerifierObserver&) = delete; + ~FakeHostVerifierObserver() override; size_t num_host_verifications() { return num_host_verifications_; } @@ -50,8 +56,6 @@ void OnHostVerified() override; size_t num_host_verifications_ = 0u; - - DISALLOW_COPY_AND_ASSIGN(FakeHostVerifierObserver); }; } // namespace multidevice_setup
diff --git a/chromeos/services/multidevice_setup/feature_state_manager.h b/chromeos/services/multidevice_setup/feature_state_manager.h index 08447c752..a8225996 100644 --- a/chromeos/services/multidevice_setup/feature_state_manager.h +++ b/chromeos/services/multidevice_setup/feature_state_manager.h
@@ -31,6 +31,9 @@ const FeatureStatesMap& feature_states_map) = 0; }; + FeatureStateManager(const FeatureStateManager&) = delete; + FeatureStateManager& operator=(const FeatureStateManager&) = delete; + virtual ~FeatureStateManager(); virtual FeatureStatesMap GetFeatureStates() = 0; @@ -57,8 +60,6 @@ private: base::ObserverList<Observer>::Unchecked observer_list_; - - DISALLOW_COPY_AND_ASSIGN(FeatureStateManager); }; std::ostream& operator<<(std::ostream& stream,
diff --git a/chromeos/services/multidevice_setup/host_backend_delegate.h b/chromeos/services/multidevice_setup/host_backend_delegate.h index 23a0d119..4a2aa14 100644 --- a/chromeos/services/multidevice_setup/host_backend_delegate.h +++ b/chromeos/services/multidevice_setup/host_backend_delegate.h
@@ -43,6 +43,9 @@ virtual void OnPendingHostRequestChange() {} }; + HostBackendDelegate(const HostBackendDelegate&) = delete; + HostBackendDelegate& operator=(const HostBackendDelegate&) = delete; + virtual ~HostBackendDelegate(); // Attempts to set |host_device| as the host on the back-end. If |host_device| @@ -90,8 +93,6 @@ private: base::ObserverList<Observer>::Unchecked observer_list_; - - DISALLOW_COPY_AND_ASSIGN(HostBackendDelegate); }; } // namespace multidevice_setup
diff --git a/chromeos/services/multidevice_setup/host_device_timestamp_manager.h b/chromeos/services/multidevice_setup/host_device_timestamp_manager.h index f6c90a8..bdb4560 100644 --- a/chromeos/services/multidevice_setup/host_device_timestamp_manager.h +++ b/chromeos/services/multidevice_setup/host_device_timestamp_manager.h
@@ -17,6 +17,10 @@ // on this device. class HostDeviceTimestampManager { public: + HostDeviceTimestampManager(const HostDeviceTimestampManager&) = delete; + HostDeviceTimestampManager& operator=(const HostDeviceTimestampManager&) = + delete; + virtual ~HostDeviceTimestampManager() = default; // Returns true when there is a host set (not necessarily verified) for the @@ -37,9 +41,6 @@ protected: HostDeviceTimestampManager() = default; - - private: - DISALLOW_COPY_AND_ASSIGN(HostDeviceTimestampManager); }; } // namespace multidevice_setup
diff --git a/chromeos/services/multidevice_setup/host_status_provider.h b/chromeos/services/multidevice_setup/host_status_provider.h index b8c77715..a7a7047 100644 --- a/chromeos/services/multidevice_setup/host_status_provider.h +++ b/chromeos/services/multidevice_setup/host_status_provider.h
@@ -51,6 +51,9 @@ const HostStatusWithDevice& host_status_with_device) = 0; }; + HostStatusProvider(const HostStatusProvider&) = delete; + HostStatusProvider& operator=(const HostStatusProvider&) = delete; + virtual ~HostStatusProvider(); virtual HostStatusWithDevice GetHostWithStatus() const = 0; @@ -67,8 +70,6 @@ private: base::ObserverList<Observer>::Unchecked observer_list_; - - DISALLOW_COPY_AND_ASSIGN(HostStatusProvider); }; } // namespace multidevice_setup
diff --git a/chromeos/services/multidevice_setup/host_verifier.h b/chromeos/services/multidevice_setup/host_verifier.h index fedd5f2..26859ef 100644 --- a/chromeos/services/multidevice_setup/host_verifier.h +++ b/chromeos/services/multidevice_setup/host_verifier.h
@@ -32,6 +32,9 @@ virtual void OnHostVerified() = 0; }; + HostVerifier(const HostVerifier&) = delete; + HostVerifier& operator=(const HostVerifier&) = delete; + virtual ~HostVerifier(); // Returns whether verification for the current MultiDevice host device has @@ -55,8 +58,6 @@ private: base::ObserverList<Observer>::Unchecked observer_list_; - - DISALLOW_COPY_AND_ASSIGN(HostVerifier); }; } // namespace multidevice_setup
diff --git a/chromeos/services/multidevice_setup/multidevice_setup_base.h b/chromeos/services/multidevice_setup/multidevice_setup_base.h index 8903fa0..dbbe065 100644 --- a/chromeos/services/multidevice_setup/multidevice_setup_base.h +++ b/chromeos/services/multidevice_setup/multidevice_setup_base.h
@@ -16,6 +16,9 @@ // MultiDeviceSetup implementation which accepts receivers to bind to it. class MultiDeviceSetupBase : public mojom::MultiDeviceSetup { public: + MultiDeviceSetupBase(const MultiDeviceSetupBase&) = delete; + MultiDeviceSetupBase& operator=(const MultiDeviceSetupBase&) = delete; + ~MultiDeviceSetupBase() override; void BindReceiver(mojo::PendingReceiver<mojom::MultiDeviceSetup> receiver); @@ -34,8 +37,6 @@ private: mojo::ReceiverSet<mojom::MultiDeviceSetup> receivers_; - - DISALLOW_COPY_AND_ASSIGN(MultiDeviceSetupBase); }; } // namespace multidevice_setup
diff --git a/chromeos/services/multidevice_setup/multidevice_setup_impl_unittest.cc b/chromeos/services/multidevice_setup/multidevice_setup_impl_unittest.cc index d9aec2e..5220084 100644 --- a/chromeos/services/multidevice_setup/multidevice_setup_impl_unittest.cc +++ b/chromeos/services/multidevice_setup/multidevice_setup_impl_unittest.cc
@@ -79,6 +79,11 @@ device_sync::FakeDeviceSyncClient* expected_device_sync_client) : expected_device_sync_client_(expected_device_sync_client) {} + FakeEligibleHostDevicesProviderFactory( + const FakeEligibleHostDevicesProviderFactory&) = delete; + FakeEligibleHostDevicesProviderFactory& operator=( + const FakeEligibleHostDevicesProviderFactory&) = delete; + ~FakeEligibleHostDevicesProviderFactory() override = default; FakeEligibleHostDevicesProvider* instance() { return instance_; } @@ -98,8 +103,6 @@ device_sync::FakeDeviceSyncClient* expected_device_sync_client_; FakeEligibleHostDevicesProvider* instance_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakeEligibleHostDevicesProviderFactory); }; class FakeHostBackendDelegateFactory : public HostBackendDelegateImpl::Factory { @@ -115,6 +118,11 @@ expected_testing_pref_service_(expected_testing_pref_service), expected_device_sync_client_(expected_device_sync_client) {} + FakeHostBackendDelegateFactory(const FakeHostBackendDelegateFactory&) = + delete; + FakeHostBackendDelegateFactory& operator=( + const FakeHostBackendDelegateFactory&) = delete; + ~FakeHostBackendDelegateFactory() override = default; FakeHostBackendDelegate* instance() { return instance_; } @@ -143,8 +151,6 @@ device_sync::FakeDeviceSyncClient* expected_device_sync_client_; FakeHostBackendDelegate* instance_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakeHostBackendDelegateFactory); }; class FakeHostVerifierFactory : public HostVerifierImpl::Factory { @@ -158,6 +164,9 @@ expected_device_sync_client_(expected_device_sync_client), expected_testing_pref_service_(expected_testing_pref_service) {} + FakeHostVerifierFactory(const FakeHostVerifierFactory&) = delete; + FakeHostVerifierFactory& operator=(const FakeHostVerifierFactory&) = delete; + ~FakeHostVerifierFactory() override = default; FakeHostVerifier* instance() { return instance_; } @@ -187,8 +196,6 @@ sync_preferences::TestingPrefServiceSyncable* expected_testing_pref_service_; FakeHostVerifier* instance_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakeHostVerifierFactory); }; class FakeHostStatusProviderFactory : public HostStatusProviderImpl::Factory { @@ -205,6 +212,10 @@ fake_host_verifier_factory_(fake_host_verifier_factory), expected_device_sync_client_(expected_device_sync_client) {} + FakeHostStatusProviderFactory(const FakeHostStatusProviderFactory&) = delete; + FakeHostStatusProviderFactory& operator=( + const FakeHostStatusProviderFactory&) = delete; + ~FakeHostStatusProviderFactory() override = default; FakeHostStatusProvider* instance() { return instance_; } @@ -236,8 +247,6 @@ device_sync::FakeDeviceSyncClient* expected_device_sync_client_; FakeHostStatusProvider* instance_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakeHostStatusProviderFactory); }; class FakeWifiSyncFeatureManagerFactory @@ -252,6 +261,11 @@ expected_testing_pref_service_(expected_testing_pref_service), expected_device_sync_client_(expected_device_sync_client) {} + FakeWifiSyncFeatureManagerFactory(const FakeWifiSyncFeatureManagerFactory&) = + delete; + FakeWifiSyncFeatureManagerFactory& operator=( + const FakeWifiSyncFeatureManagerFactory&) = delete; + ~FakeWifiSyncFeatureManagerFactory() override = default; FakeWifiSyncFeatureManager* instance() { return instance_; } @@ -280,8 +294,6 @@ device_sync::FakeDeviceSyncClient* expected_device_sync_client_; FakeWifiSyncFeatureManager* instance_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakeWifiSyncFeatureManagerFactory); }; class FakeGrandfatheredEasyUnlockHostDisablerFactory @@ -296,6 +308,11 @@ expected_device_sync_client_(expected_device_sync_client), expected_testing_pref_service_(expected_testing_pref_service) {} + FakeGrandfatheredEasyUnlockHostDisablerFactory( + const FakeGrandfatheredEasyUnlockHostDisablerFactory&) = delete; + FakeGrandfatheredEasyUnlockHostDisablerFactory& operator=( + const FakeGrandfatheredEasyUnlockHostDisablerFactory&) = delete; + ~FakeGrandfatheredEasyUnlockHostDisablerFactory() override = default; private: @@ -317,8 +334,6 @@ FakeHostBackendDelegateFactory* fake_host_backend_delegate_factory_; device_sync::FakeDeviceSyncClient* expected_device_sync_client_; sync_preferences::TestingPrefServiceSyncable* expected_testing_pref_service_; - - DISALLOW_COPY_AND_ASSIGN(FakeGrandfatheredEasyUnlockHostDisablerFactory); }; class FakeFeatureStateManagerFactory : public FeatureStateManagerImpl::Factory { @@ -338,6 +353,11 @@ expected_android_sms_pairing_state_tracker), expected_is_secondary_user_(expected_is_secondary_user) {} + FakeFeatureStateManagerFactory(const FakeFeatureStateManagerFactory&) = + delete; + FakeFeatureStateManagerFactory& operator=( + const FakeFeatureStateManagerFactory&) = delete; + ~FakeFeatureStateManagerFactory() override = default; FakeFeatureStateManager* instance() { return instance_; } @@ -373,8 +393,6 @@ bool expected_is_secondary_user_; FakeFeatureStateManager* instance_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakeFeatureStateManagerFactory); }; class FakeHostDeviceTimestampManagerFactory @@ -387,6 +405,11 @@ : fake_host_status_provider_factory_(fake_host_status_provider_factory), expected_testing_pref_service_(expected_testing_pref_service) {} + FakeHostDeviceTimestampManagerFactory( + const FakeHostDeviceTimestampManagerFactory&) = delete; + FakeHostDeviceTimestampManagerFactory& operator=( + const FakeHostDeviceTimestampManagerFactory&) = delete; + ~FakeHostDeviceTimestampManagerFactory() override = default; FakeHostDeviceTimestampManager* instance() { return instance_; } @@ -411,8 +434,6 @@ sync_preferences::TestingPrefServiceSyncable* expected_testing_pref_service_; FakeHostDeviceTimestampManager* instance_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakeHostDeviceTimestampManagerFactory); }; class FakeAccountStatusChangeDelegateNotifierFactory @@ -431,6 +452,11 @@ fake_host_device_timestamp_manager_factory), expected_oobe_completion_tracker_(expected_oobe_completion_tracker) {} + FakeAccountStatusChangeDelegateNotifierFactory( + const FakeAccountStatusChangeDelegateNotifierFactory&) = delete; + FakeAccountStatusChangeDelegateNotifierFactory& operator=( + const FakeAccountStatusChangeDelegateNotifierFactory&) = delete; + ~FakeAccountStatusChangeDelegateNotifierFactory() override = default; FakeAccountStatusChangeDelegateNotifier* instance() { return instance_; } @@ -463,8 +489,6 @@ OobeCompletionTracker* expected_oobe_completion_tracker_; FakeAccountStatusChangeDelegateNotifier* instance_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakeAccountStatusChangeDelegateNotifierFactory); }; class FakeAndroidSmsAppInstallingStatusObserverFactory @@ -479,6 +503,11 @@ expected_android_sms_app_helper_delegate_( expected_android_sms_app_helper_delegate) {} + FakeAndroidSmsAppInstallingStatusObserverFactory( + const FakeAndroidSmsAppInstallingStatusObserverFactory&) = delete; + FakeAndroidSmsAppInstallingStatusObserverFactory& operator=( + const FakeAndroidSmsAppInstallingStatusObserverFactory&) = delete; + ~FakeAndroidSmsAppInstallingStatusObserverFactory() override = default; private: @@ -501,8 +530,6 @@ FakeHostStatusProviderFactory* fake_host_status_provider_factory_; FakeFeatureStateManagerFactory* fake_feature_state_manager_factory_; AndroidSmsAppHelperDelegate* expected_android_sms_app_helper_delegate_; - - DISALLOW_COPY_AND_ASSIGN(FakeAndroidSmsAppInstallingStatusObserverFactory); }; } // namespace
diff --git a/chromeos/services/multidevice_setup/multidevice_setup_service.h b/chromeos/services/multidevice_setup/multidevice_setup_service.h index a464fc7..334b880f 100644 --- a/chromeos/services/multidevice_setup/multidevice_setup_service.h +++ b/chromeos/services/multidevice_setup/multidevice_setup_service.h
@@ -42,6 +42,10 @@ AndroidSmsPairingStateTracker* android_sms_pairing_state_tracker, const device_sync::GcmDeviceInfoProvider* gcm_device_info_provider, bool is_secondary_user); + + MultiDeviceSetupService(const MultiDeviceSetupService&) = delete; + MultiDeviceSetupService& operator=(const MultiDeviceSetupService&) = delete; + ~MultiDeviceSetupService(); static void RegisterProfilePrefs(PrefRegistrySimple* registry); @@ -55,8 +59,6 @@ std::unique_ptr<MultiDeviceSetupBase> multidevice_setup_; std::unique_ptr<PrivilegedHostDeviceSetterBase> privileged_host_device_setter_; - - DISALLOW_COPY_AND_ASSIGN(MultiDeviceSetupService); }; } // namespace multidevice_setup
diff --git a/chromeos/services/multidevice_setup/multidevice_setup_service_unittest.cc b/chromeos/services/multidevice_setup/multidevice_setup_service_unittest.cc index 58ef352c..84c7d4d 100644 --- a/chromeos/services/multidevice_setup/multidevice_setup_service_unittest.cc +++ b/chromeos/services/multidevice_setup/multidevice_setup_service_unittest.cc
@@ -59,6 +59,10 @@ expected_gcm_device_info_provider_(expected_gcm_device_info_provider), expected_is_secondary_user_(expected_is_secondary_user) {} + FakeMultiDeviceSetupFactory(const FakeMultiDeviceSetupFactory&) = delete; + FakeMultiDeviceSetupFactory& operator=(const FakeMultiDeviceSetupFactory&) = + delete; + ~FakeMultiDeviceSetupFactory() override = default; FakeMultiDeviceSetup* instance() { return instance_; } @@ -102,8 +106,6 @@ bool expected_is_secondary_user_; FakeMultiDeviceSetup* instance_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakeMultiDeviceSetupFactory); }; } // namespace
diff --git a/chromeos/services/multidevice_setup/privileged_host_device_setter_base.h b/chromeos/services/multidevice_setup/privileged_host_device_setter_base.h index 1febfb0..689319ef 100644 --- a/chromeos/services/multidevice_setup/privileged_host_device_setter_base.h +++ b/chromeos/services/multidevice_setup/privileged_host_device_setter_base.h
@@ -18,6 +18,11 @@ class PrivilegedHostDeviceSetterBase : public mojom::PrivilegedHostDeviceSetter { public: + PrivilegedHostDeviceSetterBase(const PrivilegedHostDeviceSetterBase&) = + delete; + PrivilegedHostDeviceSetterBase& operator=( + const PrivilegedHostDeviceSetterBase&) = delete; + ~PrivilegedHostDeviceSetterBase() override; void BindReceiver( @@ -28,8 +33,6 @@ private: mojo::ReceiverSet<mojom::PrivilegedHostDeviceSetter> receivers_; - - DISALLOW_COPY_AND_ASSIGN(PrivilegedHostDeviceSetterBase); }; } // namespace multidevice_setup
diff --git a/chromeos/services/multidevice_setup/public/cpp/android_sms_app_helper_delegate.h b/chromeos/services/multidevice_setup/public/cpp/android_sms_app_helper_delegate.h index 8240f6b7..4198a79 100644 --- a/chromeos/services/multidevice_setup/public/cpp/android_sms_app_helper_delegate.h +++ b/chromeos/services/multidevice_setup/public/cpp/android_sms_app_helper_delegate.h
@@ -14,6 +14,10 @@ // A delegate class used to install the Messages for Web PWA. class AndroidSmsAppHelperDelegate { public: + AndroidSmsAppHelperDelegate(const AndroidSmsAppHelperDelegate&) = delete; + AndroidSmsAppHelperDelegate& operator=(const AndroidSmsAppHelperDelegate&) = + delete; + virtual ~AndroidSmsAppHelperDelegate() = default; // Sets up the Messages for Web PWA. Handles retries and errors internally. @@ -38,9 +42,6 @@ protected: AndroidSmsAppHelperDelegate() = default; - - private: - DISALLOW_COPY_AND_ASSIGN(AndroidSmsAppHelperDelegate); }; } // namespace multidevice_setup
diff --git a/chromeos/services/multidevice_setup/public/cpp/auth_token_validator.h b/chromeos/services/multidevice_setup/public/cpp/auth_token_validator.h index 2618c49..e654422 100644 --- a/chromeos/services/multidevice_setup/public/cpp/auth_token_validator.h +++ b/chromeos/services/multidevice_setup/public/cpp/auth_token_validator.h
@@ -17,12 +17,13 @@ class AuthTokenValidator { public: AuthTokenValidator() = default; + + AuthTokenValidator(const AuthTokenValidator&) = delete; + AuthTokenValidator& operator=(const AuthTokenValidator&) = delete; + virtual ~AuthTokenValidator() = default; virtual bool IsAuthTokenValid(const std::string& auth_token) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(AuthTokenValidator); }; } // namespace multidevice_setup
diff --git a/chromeos/services/multidevice_setup/public/cpp/fake_android_sms_app_helper_delegate.h b/chromeos/services/multidevice_setup/public/cpp/fake_android_sms_app_helper_delegate.h index 42a06be6..4975d244 100644 --- a/chromeos/services/multidevice_setup/public/cpp/fake_android_sms_app_helper_delegate.h +++ b/chromeos/services/multidevice_setup/public/cpp/fake_android_sms_app_helper_delegate.h
@@ -16,6 +16,12 @@ : virtual public AndroidSmsAppHelperDelegate { public: FakeAndroidSmsAppHelperDelegate(); + + FakeAndroidSmsAppHelperDelegate(const FakeAndroidSmsAppHelperDelegate&) = + delete; + FakeAndroidSmsAppHelperDelegate& operator=( + const FakeAndroidSmsAppHelperDelegate&) = delete; + ~FakeAndroidSmsAppHelperDelegate() override; bool has_installed_app() const { return has_installed_app_; } @@ -55,8 +61,6 @@ bool is_default_to_persist_cookie_set_ = false; bool has_app_been_manually_uninstalled_ = false; bool is_app_registry_ready_ = false; - - DISALLOW_COPY_AND_ASSIGN(FakeAndroidSmsAppHelperDelegate); }; } // namespace multidevice_setup
diff --git a/chromeos/services/multidevice_setup/public/cpp/fake_android_sms_pairing_state_tracker.h b/chromeos/services/multidevice_setup/public/cpp/fake_android_sms_pairing_state_tracker.h index db4bcd1..5db760a 100644 --- a/chromeos/services/multidevice_setup/public/cpp/fake_android_sms_pairing_state_tracker.h +++ b/chromeos/services/multidevice_setup/public/cpp/fake_android_sms_pairing_state_tracker.h
@@ -14,6 +14,12 @@ class FakeAndroidSmsPairingStateTracker : public AndroidSmsPairingStateTracker { public: FakeAndroidSmsPairingStateTracker(); + + FakeAndroidSmsPairingStateTracker(const FakeAndroidSmsPairingStateTracker&) = + delete; + FakeAndroidSmsPairingStateTracker& operator=( + const FakeAndroidSmsPairingStateTracker&) = delete; + ~FakeAndroidSmsPairingStateTracker() override; void SetPairingComplete(bool is_pairing_complete); @@ -22,8 +28,6 @@ private: bool is_pairing_complete_ = false; - - DISALLOW_COPY_AND_ASSIGN(FakeAndroidSmsPairingStateTracker); }; } // namespace multidevice_setup
diff --git a/chromeos/services/multidevice_setup/public/cpp/fake_auth_token_validator.h b/chromeos/services/multidevice_setup/public/cpp/fake_auth_token_validator.h index 2d0de0d6..fe92c93 100644 --- a/chromeos/services/multidevice_setup/public/cpp/fake_auth_token_validator.h +++ b/chromeos/services/multidevice_setup/public/cpp/fake_auth_token_validator.h
@@ -19,6 +19,10 @@ class FakeAuthTokenValidator : public AuthTokenValidator { public: FakeAuthTokenValidator(); + + FakeAuthTokenValidator(const FakeAuthTokenValidator&) = delete; + FakeAuthTokenValidator& operator=(const FakeAuthTokenValidator&) = delete; + ~FakeAuthTokenValidator() override; // AuthTokenValidator: @@ -30,8 +34,6 @@ private: absl::optional<std::string> expected_auth_token_; - - DISALLOW_COPY_AND_ASSIGN(FakeAuthTokenValidator); }; } // namespace multidevice_setup
diff --git a/chromeos/services/multidevice_setup/public/cpp/fake_multidevice_setup.h b/chromeos/services/multidevice_setup/public/cpp/fake_multidevice_setup.h index 40c5213..fc22332 100644 --- a/chromeos/services/multidevice_setup/public/cpp/fake_multidevice_setup.h +++ b/chromeos/services/multidevice_setup/public/cpp/fake_multidevice_setup.h
@@ -23,6 +23,10 @@ class FakeMultiDeviceSetup : public MultiDeviceSetupBase { public: FakeMultiDeviceSetup(); + + FakeMultiDeviceSetup(const FakeMultiDeviceSetup&) = delete; + FakeMultiDeviceSetup& operator=(const FakeMultiDeviceSetup&) = delete; + ~FakeMultiDeviceSetup() override; void FlushForTesting(); @@ -141,8 +145,6 @@ std::pair<std::string, mojom::PrivilegedHostDeviceSetter::SetHostDeviceCallback>> set_host_without_auth_args_; - - DISALLOW_COPY_AND_ASSIGN(FakeMultiDeviceSetup); }; } // namespace multidevice_setup
diff --git a/chromeos/services/multidevice_setup/public/cpp/fake_multidevice_setup_client.h b/chromeos/services/multidevice_setup/public/cpp/fake_multidevice_setup_client.h index 0879577..c75be77 100644 --- a/chromeos/services/multidevice_setup/public/cpp/fake_multidevice_setup_client.h +++ b/chromeos/services/multidevice_setup/public/cpp/fake_multidevice_setup_client.h
@@ -25,6 +25,11 @@ class FakeMultiDeviceSetupClient : public MultiDeviceSetupClient { public: FakeMultiDeviceSetupClient(); + + FakeMultiDeviceSetupClient(const FakeMultiDeviceSetupClient&) = delete; + FakeMultiDeviceSetupClient& operator=(const FakeMultiDeviceSetupClient&) = + delete; + ~FakeMultiDeviceSetupClient() override; void SetHostStatusWithDevice( @@ -103,8 +108,6 @@ HostStatusWithDevice host_status_with_device_; FeatureStatesMap feature_states_map_; - - DISALLOW_COPY_AND_ASSIGN(FakeMultiDeviceSetupClient); }; } // namespace multidevice_setup
diff --git a/chromeos/services/multidevice_setup/public/cpp/fake_privileged_host_device_setter.h b/chromeos/services/multidevice_setup/public/cpp/fake_privileged_host_device_setter.h index 63bc5be..8e847fc 100644 --- a/chromeos/services/multidevice_setup/public/cpp/fake_privileged_host_device_setter.h +++ b/chromeos/services/multidevice_setup/public/cpp/fake_privileged_host_device_setter.h
@@ -19,6 +19,12 @@ class FakePrivilegedHostDeviceSetter : public PrivilegedHostDeviceSetterBase { public: FakePrivilegedHostDeviceSetter(); + + FakePrivilegedHostDeviceSetter(const FakePrivilegedHostDeviceSetter&) = + delete; + FakePrivilegedHostDeviceSetter& operator=( + const FakePrivilegedHostDeviceSetter&) = delete; + ~FakePrivilegedHostDeviceSetter() override; std::vector<std::pair<std::string, SetHostDeviceCallback>>& set_host_args() { @@ -31,8 +37,6 @@ SetHostDeviceCallback callback) override; std::vector<std::pair<std::string, SetHostDeviceCallback>> set_host_args_; - - DISALLOW_COPY_AND_ASSIGN(FakePrivilegedHostDeviceSetter); }; } // namespace multidevice_setup
diff --git a/chromeos/services/multidevice_setup/public/cpp/multidevice_setup_client_impl_unittest.cc b/chromeos/services/multidevice_setup/public/cpp/multidevice_setup_client_impl_unittest.cc index c9dc193..de1d8ab6 100644 --- a/chromeos/services/multidevice_setup/public/cpp/multidevice_setup_client_impl_unittest.cc +++ b/chromeos/services/multidevice_setup/public/cpp/multidevice_setup_client_impl_unittest.cc
@@ -62,6 +62,12 @@ : public MultiDeviceSetupClient::Observer { public: TestMultiDeviceSetupClientObserver() = default; + + TestMultiDeviceSetupClientObserver( + const TestMultiDeviceSetupClientObserver&) = delete; + TestMultiDeviceSetupClientObserver& operator=( + const TestMultiDeviceSetupClientObserver&) = delete; + ~TestMultiDeviceSetupClientObserver() override = default; const std::vector<MultiDeviceSetupClient::HostStatusWithDevice>& @@ -89,8 +95,6 @@ std::vector<MultiDeviceSetupClient::HostStatusWithDevice> host_status_updates_; std::vector<MultiDeviceSetupClient::FeatureStatesMap> feature_state_updates_; - - DISALLOW_COPY_AND_ASSIGN(TestMultiDeviceSetupClientObserver); }; absl::optional<multidevice::RemoteDevice> GetRemoteDeviceFromRef(
diff --git a/chromeos/services/network_config/cros_network_config.h b/chromeos/services/network_config/cros_network_config.h index a73a094..5222e04 100644 --- a/chromeos/services/network_config/cros_network_config.h +++ b/chromeos/services/network_config/cros_network_config.h
@@ -51,6 +51,10 @@ NetworkConnectionHandler* network_connection_handler, NetworkCertificateHandler* network_certificate_handler, NetworkProfileHandler* network_profile_handler); + + CrosNetworkConfig(const CrosNetworkConfig&) = delete; + CrosNetworkConfig& operator=(const CrosNetworkConfig&) = delete; + ~CrosNetworkConfig() override; void BindReceiver(mojo::PendingReceiver<mojom::CrosNetworkConfig> receiver); @@ -213,8 +217,6 @@ std::vector<mojom::VpnProviderPtr> vpn_providers_; base::WeakPtrFactory<CrosNetworkConfig> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(CrosNetworkConfig); }; } // namespace network_config
diff --git a/chromeos/services/network_config/cros_network_config_unittest.cc b/chromeos/services/network_config/cros_network_config_unittest.cc index fc4bba0..47dafae 100644 --- a/chromeos/services/network_config/cros_network_config_unittest.cc +++ b/chromeos/services/network_config/cros_network_config_unittest.cc
@@ -141,6 +141,9 @@ SetupNetworks(); } + CrosNetworkConfigTest(const CrosNetworkConfigTest&) = delete; + CrosNetworkConfigTest& operator=(const CrosNetworkConfigTest&) = delete; + ~CrosNetworkConfigTest() override { cros_network_config_.reset(); helper_.reset(); @@ -678,8 +681,6 @@ std::unique_ptr<CrosNetworkConfigTestObserver> observer_; std::string wifi1_path_; std::string vpn_path_; - - DISALLOW_COPY_AND_ASSIGN(CrosNetworkConfigTest); }; TEST_F(CrosNetworkConfigTest, GetNetworkState) {
diff --git a/chromeos/services/network_config/public/cpp/cros_network_config_test_helper.h b/chromeos/services/network_config/public/cpp/cros_network_config_test_helper.h index e627469..b52233a 100644 --- a/chromeos/services/network_config/public/cpp/cros_network_config_test_helper.h +++ b/chromeos/services/network_config/public/cpp/cros_network_config_test_helper.h
@@ -32,6 +32,10 @@ // separately initialized via Initialize(ManagedNetworkConfigurationHandler*). explicit CrosNetworkConfigTestHelper(bool initialize); + CrosNetworkConfigTestHelper(const CrosNetworkConfigTestHelper&) = delete; + CrosNetworkConfigTestHelper& operator=(const CrosNetworkConfigTestHelper&) = + delete; + ~CrosNetworkConfigTestHelper(); mojom::NetworkStatePropertiesPtr CreateStandaloneNetworkProperties( @@ -55,9 +59,6 @@ NetworkStateTestHelper network_state_helper_{ /*use_default_devices_and_services=*/false}; std::unique_ptr<CrosNetworkConfig> cros_network_config_impl_; - - private: - DISALLOW_COPY_AND_ASSIGN(CrosNetworkConfigTestHelper); }; } // namespace network_config
diff --git a/chromeos/services/network_config/public/cpp/cros_network_config_test_observer.h b/chromeos/services/network_config/public/cpp/cros_network_config_test_observer.h index d182941..902c68c5 100644 --- a/chromeos/services/network_config/public/cpp/cros_network_config_test_observer.h +++ b/chromeos/services/network_config/public/cpp/cros_network_config_test_observer.h
@@ -19,6 +19,11 @@ class CrosNetworkConfigTestObserver : public mojom::CrosNetworkConfigObserver { public: CrosNetworkConfigTestObserver(); + + CrosNetworkConfigTestObserver(const CrosNetworkConfigTestObserver&) = delete; + CrosNetworkConfigTestObserver& operator=( + const CrosNetworkConfigTestObserver&) = delete; + ~CrosNetworkConfigTestObserver() override; mojo::PendingRemote<mojom::CrosNetworkConfigObserver> GenerateRemote(); @@ -59,8 +64,6 @@ int device_state_list_changed_ = 0; int vpn_providers_changed_ = 0; int network_certificates_changed_ = 0; - - DISALLOW_COPY_AND_ASSIGN(CrosNetworkConfigTestObserver); }; } // namespace network_config
diff --git a/chromeos/services/secure_channel/active_connection_manager.h b/chromeos/services/secure_channel/active_connection_manager.h index 34c20108..dd93085 100644 --- a/chromeos/services/secure_channel/active_connection_manager.h +++ b/chromeos/services/secure_channel/active_connection_manager.h
@@ -37,6 +37,9 @@ kDisconnectingConnectionExists }; + ActiveConnectionManager(const ActiveConnectionManager&) = delete; + ActiveConnectionManager& operator=(const ActiveConnectionManager&) = delete; + virtual ~ActiveConnectionManager(); virtual ConnectionState GetConnectionState( @@ -76,8 +79,6 @@ private: Delegate* delegate_; - - DISALLOW_COPY_AND_ASSIGN(ActiveConnectionManager); }; std::ostream& operator<<(
diff --git a/chromeos/services/secure_channel/active_connection_manager_impl_unittest.cc b/chromeos/services/secure_channel/active_connection_manager_impl_unittest.cc index 66e49b4b..bdb9a11c 100644 --- a/chromeos/services/secure_channel/active_connection_manager_impl_unittest.cc +++ b/chromeos/services/secure_channel/active_connection_manager_impl_unittest.cc
@@ -32,6 +32,11 @@ explicit FakeMultiplexedChannelFactory( MultiplexedChannel::Delegate* expected_delegate) : expected_delegate_(expected_delegate) {} + + FakeMultiplexedChannelFactory(const FakeMultiplexedChannelFactory&) = delete; + FakeMultiplexedChannelFactory& operator=( + const FakeMultiplexedChannelFactory&) = delete; + ~FakeMultiplexedChannelFactory() override = default; base::flat_map<ConnectionDetails, FakeMultiplexedChannel*>& @@ -83,8 +88,6 @@ base::flat_map<ConnectionDetails, FakeMultiplexedChannel*> connection_details_to_active_channel_map_; - - DISALLOW_COPY_AND_ASSIGN(FakeMultiplexedChannelFactory); }; std::vector<base::UnguessableToken> ClientListToIdList(
diff --git a/chromeos/services/secure_channel/authenticated_channel.h b/chromeos/services/secure_channel/authenticated_channel.h index d51f52c..7fea651 100644 --- a/chromeos/services/secure_channel/authenticated_channel.h +++ b/chromeos/services/secure_channel/authenticated_channel.h
@@ -29,6 +29,9 @@ const std::string& payload) = 0; }; + AuthenticatedChannel(const AuthenticatedChannel&) = delete; + AuthenticatedChannel& operator=(const AuthenticatedChannel&) = delete; + virtual ~AuthenticatedChannel(); virtual void GetConnectionMetadata( @@ -74,8 +77,6 @@ private: base::ObserverList<Observer>::Unchecked observer_list_; bool is_disconnected_ = false; - - DISALLOW_COPY_AND_ASSIGN(AuthenticatedChannel); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/background_eid_generator.h b/chromeos/services/secure_channel/background_eid_generator.h index 559a3276..bbfdc8a 100644 --- a/chromeos/services/secure_channel/background_eid_generator.h +++ b/chromeos/services/secure_channel/background_eid_generator.h
@@ -41,6 +41,10 @@ class BackgroundEidGenerator { public: BackgroundEidGenerator(); + + BackgroundEidGenerator(const BackgroundEidGenerator&) = delete; + BackgroundEidGenerator& operator=(const BackgroundEidGenerator&) = delete; + virtual ~BackgroundEidGenerator(); // Returns a list of the nearest EIDs from the current time. Note that the @@ -70,8 +74,6 @@ std::unique_ptr<RawEidGenerator> raw_eid_generator_; base::Clock* clock_; - - DISALLOW_COPY_AND_ASSIGN(BackgroundEidGenerator); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/background_eid_generator_unittest.cc b/chromeos/services/secure_channel/background_eid_generator_unittest.cc index 8bb21ed..c3e27165 100644 --- a/chromeos/services/secure_channel/background_eid_generator_unittest.cc +++ b/chromeos/services/secure_channel/background_eid_generator_unittest.cc
@@ -67,6 +67,10 @@ class TestRawEidGenerator : public RawEidGeneratorImpl { public: TestRawEidGenerator() {} + + TestRawEidGenerator(const TestRawEidGenerator&) = delete; + TestRawEidGenerator& operator=(const TestRawEidGenerator&) = delete; + ~TestRawEidGenerator() override {} // RawEidGenerator: @@ -77,9 +81,6 @@ return RawEidGeneratorImpl::GenerateEid( eid_seed, start_of_period_timestamp_ms, extra_entropy); } - - private: - DISALLOW_COPY_AND_ASSIGN(TestRawEidGenerator); }; } // namespace
diff --git a/chromeos/services/secure_channel/ble_advertisement_generator.h b/chromeos/services/secure_channel/ble_advertisement_generator.h index e8cbe8f..549ef397 100644 --- a/chromeos/services/secure_channel/ble_advertisement_generator.h +++ b/chromeos/services/secure_channel/ble_advertisement_generator.h
@@ -28,6 +28,10 @@ multidevice::RemoteDeviceRef remote_device, const std::string& local_device_public_key); + BleAdvertisementGenerator(const BleAdvertisementGenerator&) = delete; + BleAdvertisementGenerator& operator=(const BleAdvertisementGenerator&) = + delete; + virtual ~BleAdvertisementGenerator(); protected: @@ -50,8 +54,6 @@ std::unique_ptr<ForegroundEidGenerator> test_eid_generator); std::unique_ptr<ForegroundEidGenerator> eid_generator_; - - DISALLOW_COPY_AND_ASSIGN(BleAdvertisementGenerator); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/ble_advertiser.h b/chromeos/services/secure_channel/ble_advertiser.h index 4a63af7..ba3f52a 100644 --- a/chromeos/services/secure_channel/ble_advertiser.h +++ b/chromeos/services/secure_channel/ble_advertiser.h
@@ -33,6 +33,9 @@ const DeviceIdPair& device_id_pair) = 0; }; + BleAdvertiser(const BleAdvertiser&) = delete; + BleAdvertiser& operator=(const BleAdvertiser&) = delete; + virtual ~BleAdvertiser(); // Adds a request for the given DeviceIdPair to advertise at the given @@ -66,8 +69,6 @@ private: Delegate* delegate_; - - DISALLOW_COPY_AND_ASSIGN(BleAdvertiser); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/ble_advertiser_impl_unittest.cc b/chromeos/services/secure_channel/ble_advertiser_impl_unittest.cc index b5e66b61..abe1aeb 100644 --- a/chromeos/services/secure_channel/ble_advertiser_impl_unittest.cc +++ b/chromeos/services/secure_channel/ble_advertiser_impl_unittest.cc
@@ -35,6 +35,12 @@ BleSynchronizerBase* ble_synchronizer_base) : bluetooth_helper_(bluetooth_helper), ble_synchronizer_base_(ble_synchronizer_base) {} + + FakeErrorTolerantBleAdvertisementFactory( + const FakeErrorTolerantBleAdvertisementFactory&) = delete; + FakeErrorTolerantBleAdvertisementFactory& operator=( + const FakeErrorTolerantBleAdvertisementFactory&) = delete; + ~FakeErrorTolerantBleAdvertisementFactory() override = default; const absl::optional<DeviceIdPair>& last_created_device_id_pair() const { @@ -89,8 +95,6 @@ base::flat_map<DeviceIdPair, FakeErrorTolerantBleAdvertisement*> device_id_pair_to_active_advertisement_map_; size_t num_instances_created_ = 0u; - - DISALLOW_COPY_AND_ASSIGN(FakeErrorTolerantBleAdvertisementFactory); }; const int64_t kDefaultStartTimestamp = 1337;
diff --git a/chromeos/services/secure_channel/ble_characteristics_finder.h b/chromeos/services/secure_channel/ble_characteristics_finder.h index 02369c3..b345481 100644 --- a/chromeos/services/secure_channel/ble_characteristics_finder.h +++ b/chromeos/services/secure_channel/ble_characteristics_finder.h
@@ -64,6 +64,11 @@ scoped_refptr<base::TaskRunner> task_runner = base::ThreadTaskRunnerHandle::Get()); + BluetoothLowEnergyCharacteristicsFinder( + const BluetoothLowEnergyCharacteristicsFinder&) = delete; + BluetoothLowEnergyCharacteristicsFinder& operator=( + const BluetoothLowEnergyCharacteristicsFinder&) = delete; + ~BluetoothLowEnergyCharacteristicsFinder() override; protected: @@ -140,8 +145,6 @@ base::WeakPtrFactory<BluetoothLowEnergyCharacteristicsFinder> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyCharacteristicsFinder); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/ble_connection_manager.h b/chromeos/services/secure_channel/ble_connection_manager.h index 9ded5ee..548a18b 100644 --- a/chromeos/services/secure_channel/ble_connection_manager.h +++ b/chromeos/services/secure_channel/ble_connection_manager.h
@@ -38,6 +38,9 @@ // scanning/advertising. class BleConnectionManager { public: + BleConnectionManager(const BleConnectionManager&) = delete; + BleConnectionManager& operator=(const BleConnectionManager&) = delete; + virtual ~BleConnectionManager(); using ConnectionSuccessCallback = @@ -147,8 +150,6 @@ base::flat_map<DeviceIdPair, std::unique_ptr<ListenerConnectionAttemptMetadata>> id_pair_to_listener_metadata_map_; - - DISALLOW_COPY_AND_ASSIGN(BleConnectionManager); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/ble_connection_manager_impl_unittest.cc b/chromeos/services/secure_channel/ble_connection_manager_impl_unittest.cc index 3dcd0b3..204a66db 100644 --- a/chromeos/services/secure_channel/ble_connection_manager_impl_unittest.cc +++ b/chromeos/services/secure_channel/ble_connection_manager_impl_unittest.cc
@@ -62,6 +62,9 @@ expected_fake_ble_synchronizer_(expected_fake_ble_synchronizer), expected_fake_timer_factory_(expected_fake_timer_factory) {} + FakeBleAdvertiserFactory(const FakeBleAdvertiserFactory&) = delete; + FakeBleAdvertiserFactory& operator=(const FakeBleAdvertiserFactory&) = delete; + ~FakeBleAdvertiserFactory() override = default; FakeBleAdvertiser* instance() { return instance_; } @@ -89,8 +92,6 @@ FakeBluetoothHelper* expected_fake_bluetooth_helper_; FakeBleSynchronizer* expected_fake_ble_synchronizer_; FakeTimerFactory* expected_fake_timer_factory_; - - DISALLOW_COPY_AND_ASSIGN(FakeBleAdvertiserFactory); }; class FakeWeaveClientConnectionFactory @@ -101,6 +102,11 @@ expected_mock_adapter) : expected_mock_adapter_(expected_mock_adapter) {} + FakeWeaveClientConnectionFactory(const FakeWeaveClientConnectionFactory&) = + delete; + FakeWeaveClientConnectionFactory& operator=( + const FakeWeaveClientConnectionFactory&) = delete; + virtual ~FakeWeaveClientConnectionFactory() = default; void set_expected_bluetooth_device( @@ -132,8 +138,6 @@ device::MockBluetoothDevice* expected_bluetooth_device_; FakeConnection* last_created_instance_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakeWeaveClientConnectionFactory); }; class FakeSecureChannelFactory : public SecureChannel::Factory { @@ -143,6 +147,9 @@ : fake_weave_client_connection_factory_( fake_weave_client_connection_factory) {} + FakeSecureChannelFactory(const FakeSecureChannelFactory&) = delete; + FakeSecureChannelFactory& operator=(const FakeSecureChannelFactory&) = delete; + virtual ~FakeSecureChannelFactory() = default; FakeSecureChannelConnection* last_created_instance() { @@ -165,14 +172,18 @@ FakeWeaveClientConnectionFactory* fake_weave_client_connection_factory_; FakeSecureChannelConnection* last_created_instance_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakeSecureChannelFactory); }; class FakeAuthenticatedChannelFactory : public AuthenticatedChannelImpl::Factory { public: FakeAuthenticatedChannelFactory() = default; + + FakeAuthenticatedChannelFactory(const FakeAuthenticatedChannelFactory&) = + delete; + FakeAuthenticatedChannelFactory& operator=( + const FakeAuthenticatedChannelFactory&) = delete; + ~FakeAuthenticatedChannelFactory() override = default; void SetExpectationsForNextCall( @@ -214,8 +225,6 @@ bool expected_to_be_background_advertisement_ = false; FakeAuthenticatedChannel* last_created_instance_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakeAuthenticatedChannelFactory); }; } // namespace
diff --git a/chromeos/services/secure_channel/ble_scanner.h b/chromeos/services/secure_channel/ble_scanner.h index 5384146..f207903 100644 --- a/chromeos/services/secure_channel/ble_scanner.h +++ b/chromeos/services/secure_channel/ble_scanner.h
@@ -41,6 +41,9 @@ const std::vector<uint8_t>& eid) = 0; }; + BleScanner(const BleScanner&) = delete; + BleScanner& operator=(const BleScanner&) = delete; + virtual ~BleScanner(); // Adds a scan request for the provided ConnectionAttemptDetails. If no scan @@ -80,8 +83,6 @@ base::ObserverList<Observer> observer_list_; base::flat_set<ConnectionAttemptDetails> scan_requests_; - - DISALLOW_COPY_AND_ASSIGN(BleScanner); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/ble_scanner_impl_unittest.cc b/chromeos/services/secure_channel/ble_scanner_impl_unittest.cc index 8803815..6411699 100644 --- a/chromeos/services/secure_channel/ble_scanner_impl_unittest.cc +++ b/chromeos/services/secure_channel/ble_scanner_impl_unittest.cc
@@ -83,6 +83,12 @@ SecureChannelBleScannerImplTest() : test_devices_(multidevice::CreateRemoteDeviceRefListForTest(3)) {} + + SecureChannelBleScannerImplTest(const SecureChannelBleScannerImplTest&) = + delete; + SecureChannelBleScannerImplTest& operator=( + const SecureChannelBleScannerImplTest&) = delete; + ~SecureChannelBleScannerImplTest() override = default; // testing::Test: @@ -277,9 +283,6 @@ base::WeakPtr<device::BluetoothDiscoverySession> discovery_session_weak_ptr_; std::unique_ptr<BleScanner> ble_scanner_; - - private: - DISALLOW_COPY_AND_ASSIGN(SecureChannelBleScannerImplTest); }; TEST_F(SecureChannelBleScannerImplTest, UnrelatedScanResults) {
diff --git a/chromeos/services/secure_channel/ble_synchronizer_base.h b/chromeos/services/secure_channel/ble_synchronizer_base.h index 05deed1..49a2e77 100644 --- a/chromeos/services/secure_channel/ble_synchronizer_base.h +++ b/chromeos/services/secure_channel/ble_synchronizer_base.h
@@ -25,6 +25,10 @@ class BleSynchronizerBase { public: BleSynchronizerBase(); + + BleSynchronizerBase(const BleSynchronizerBase&) = delete; + BleSynchronizerBase& operator=(const BleSynchronizerBase&) = delete; + virtual ~BleSynchronizerBase(); // Advertisement wrappers. @@ -124,8 +128,6 @@ private: std::deque<std::unique_ptr<Command>> command_queue_; - - DISALLOW_COPY_AND_ASSIGN(BleSynchronizerBase); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/ble_weave_client_connection_unittest.cc b/chromeos/services/secure_channel/ble_weave_client_connection_unittest.cc index 2ad662d..d7b0d8e 100644 --- a/chromeos/services/secure_channel/ble_weave_client_connection_unittest.cc +++ b/chromeos/services/secure_channel/ble_weave_client_connection_unittest.cc
@@ -225,6 +225,11 @@ device_address, should_set_low_connection_latency) {} + TestBluetoothLowEnergyWeaveClientConnection( + const TestBluetoothLowEnergyWeaveClientConnection&) = delete; + TestBluetoothLowEnergyWeaveClientConnection& operator=( + const TestBluetoothLowEnergyWeaveClientConnection&) = delete; + ~TestBluetoothLowEnergyWeaveClientConnection() override {} bool should_set_low_connection_latency() { @@ -253,9 +258,6 @@ // Exposing inherited protected fields for testing. using BluetoothLowEnergyWeaveClientConnection::status; using BluetoothLowEnergyWeaveClientConnection::sub_status; - - private: - DISALLOW_COPY_AND_ASSIGN(TestBluetoothLowEnergyWeaveClientConnection); }; class MockBluetoothLowEnergyCharacteristicsFinder @@ -264,10 +266,13 @@ MockBluetoothLowEnergyCharacteristicsFinder( multidevice::RemoteDeviceRef remote_device) : BluetoothLowEnergyCharacteristicsFinder(remote_device) {} - ~MockBluetoothLowEnergyCharacteristicsFinder() override {} - private: - DISALLOW_COPY_AND_ASSIGN(MockBluetoothLowEnergyCharacteristicsFinder); + MockBluetoothLowEnergyCharacteristicsFinder( + const MockBluetoothLowEnergyCharacteristicsFinder&) = delete; + MockBluetoothLowEnergyCharacteristicsFinder& operator=( + const MockBluetoothLowEnergyCharacteristicsFinder&) = delete; + + ~MockBluetoothLowEnergyCharacteristicsFinder() override {} }; class MockConnectionObserver : public ConnectionObserver {
diff --git a/chromeos/services/secure_channel/bluetooth_helper.h b/chromeos/services/secure_channel/bluetooth_helper.h index 37123c6..3cc449a 100644 --- a/chromeos/services/secure_channel/bluetooth_helper.h +++ b/chromeos/services/secure_channel/bluetooth_helper.h
@@ -27,6 +27,9 @@ // device for use in Bluetooth Classic connections. class BluetoothHelper { public: + BluetoothHelper(const BluetoothHelper&) = delete; + BluetoothHelper& operator=(const BluetoothHelper&) = delete; + virtual ~BluetoothHelper(); // Generates service data to be used in a foreground BLE advertisement from @@ -61,8 +64,6 @@ virtual absl::optional<DeviceWithBackgroundBool> PerformIdentifyRemoteDevice( const std::string& service_data, const DeviceIdPairSet& device_id_pair_set) = 0; - - DISALLOW_COPY_AND_ASSIGN(BluetoothHelper); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/channel_impl.h b/chromeos/services/secure_channel/channel_impl.h index 0850de9..097f214 100644 --- a/chromeos/services/secure_channel/channel_impl.h +++ b/chromeos/services/secure_channel/channel_impl.h
@@ -36,6 +36,10 @@ }; explicit ChannelImpl(Delegate* delegate); + + ChannelImpl(const ChannelImpl&) = delete; + ChannelImpl& operator=(const ChannelImpl&) = delete; + ~ChannelImpl() override; // Generates a mojo::PendingRemote<Channel> for this instance; can only be @@ -63,8 +67,6 @@ mojo::Receiver<mojom::Channel> receiver_{this}; base::WeakPtrFactory<ChannelImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ChannelImpl); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/client_connection_parameters.h b/chromeos/services/secure_channel/client_connection_parameters.h index 1824e17d..b73578bc 100644 --- a/chromeos/services/secure_channel/client_connection_parameters.h +++ b/chromeos/services/secure_channel/client_connection_parameters.h
@@ -30,6 +30,11 @@ }; explicit ClientConnectionParameters(const std::string& feature); + + ClientConnectionParameters(const ClientConnectionParameters&) = delete; + ClientConnectionParameters& operator=(const ClientConnectionParameters&) = + delete; + virtual ~ClientConnectionParameters(); const base::UnguessableToken& id() const { return id_; } @@ -80,8 +85,6 @@ base::ObserverList<Observer>::Unchecked observer_list_; bool has_invoked_delegate_function_ = false; - - DISALLOW_COPY_AND_ASSIGN(ClientConnectionParameters); }; std::ostream& operator<<(std::ostream& stream,
diff --git a/chromeos/services/secure_channel/connect_to_device_operation.h b/chromeos/services/secure_channel/connect_to_device_operation.h index a5193dd5..645aa90 100644 --- a/chromeos/services/secure_channel/connect_to_device_operation.h +++ b/chromeos/services/secure_channel/connect_to_device_operation.h
@@ -29,6 +29,9 @@ using ConnectionFailedCallback = base::RepeatingCallback<void(FailureDetailType)>; + ConnectToDeviceOperation(const ConnectToDeviceOperation&) = delete; + ConnectToDeviceOperation& operator=(const ConnectToDeviceOperation&) = delete; + virtual ~ConnectToDeviceOperation() { if (has_finished_) return; @@ -107,8 +110,6 @@ ConnectionSuccessCallback success_callback_; ConnectionFailedCallback failure_callback_; ConnectionPriority connection_priority_; - - DISALLOW_COPY_AND_ASSIGN(ConnectToDeviceOperation); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/connection.h b/chromeos/services/secure_channel/connection.h index ed77b83..9cd7fc0 100644 --- a/chromeos/services/secure_channel/connection.h +++ b/chromeos/services/secure_channel/connection.h
@@ -34,6 +34,10 @@ // Constructs a connection to the given |remote_device|. explicit Connection(multidevice::RemoteDeviceRef remote_device); + + Connection(const Connection&) = delete; + Connection& operator=(const Connection&) = delete; + virtual ~Connection(); // Returns true iff the connection's status is CONNECTED. @@ -119,8 +123,6 @@ // Whether a message is currently in the process of being sent. bool is_sending_message_; - - DISALLOW_COPY_AND_ASSIGN(Connection); }; std::ostream& operator<<(std::ostream& stream,
diff --git a/chromeos/services/secure_channel/connection_attempt.h b/chromeos/services/secure_channel/connection_attempt.h index b8fd2fab..15b26798 100644 --- a/chromeos/services/secure_channel/connection_attempt.h +++ b/chromeos/services/secure_channel/connection_attempt.h
@@ -42,6 +42,9 @@ return attempt->ExtractClientConnectionParameters(); } + ConnectionAttempt(const ConnectionAttempt&) = delete; + ConnectionAttempt& operator=(const ConnectionAttempt&) = delete; + virtual ~ConnectionAttempt() = default; const ConnectionAttemptDetails& connection_attempt_details() const { @@ -133,8 +136,6 @@ const base::Time start_attempt_timestamp_; bool has_notified_delegate_of_success_ = false; - - DISALLOW_COPY_AND_ASSIGN(ConnectionAttempt); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/connection_attempt_base_unittest.cc b/chromeos/services/secure_channel/connection_attempt_base_unittest.cc index 4133702..9b90927 100644 --- a/chromeos/services/secure_channel/connection_attempt_base_unittest.cc +++ b/chromeos/services/secure_channel/connection_attempt_base_unittest.cc
@@ -48,6 +48,9 @@ ConnectionMedium::kBluetoothLowEnergy, ConnectionRole::kListenerRole)) {} + TestConnectionAttempt(const TestConnectionAttempt&) = delete; + TestConnectionAttempt& operator=(const TestConnectionAttempt&) = delete; + ~TestConnectionAttempt() override = default; FakeConnectToDeviceOperation<BleInitiatorFailureType>* fake_operation() { @@ -76,8 +79,6 @@ FakeConnectToDeviceOperation<BleInitiatorFailureType>* fake_operation_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(TestConnectionAttempt); }; } // namespace
diff --git a/chromeos/services/secure_channel/connection_attempt_delegate.h b/chromeos/services/secure_channel/connection_attempt_delegate.h index a8f30c4..694ee44 100644 --- a/chromeos/services/secure_channel/connection_attempt_delegate.h +++ b/chromeos/services/secure_channel/connection_attempt_delegate.h
@@ -22,6 +22,11 @@ class ConnectionAttemptDelegate { public: ConnectionAttemptDelegate() = default; + + ConnectionAttemptDelegate(const ConnectionAttemptDelegate&) = delete; + ConnectionAttemptDelegate& operator=(const ConnectionAttemptDelegate&) = + delete; + virtual ~ConnectionAttemptDelegate() = default; // Invoked when a ConnectionAttempt has successfully resulted in a connection. @@ -37,9 +42,6 @@ // ConnectionAttempt::attempt_id(). virtual void OnConnectionAttemptFinishedWithoutConnection( const ConnectionAttemptDetails& connection_attempt_details) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(ConnectionAttemptDelegate); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/connection_unittest.cc b/chromeos/services/secure_channel/connection_unittest.cc index 3dd9e74..d1bc4fcb 100644 --- a/chromeos/services/secure_channel/connection_unittest.cc +++ b/chromeos/services/secure_channel/connection_unittest.cc
@@ -32,6 +32,10 @@ class MockConnection : public Connection { public: MockConnection() : Connection(multidevice::CreateRemoteDeviceRefForTest()) {} + + MockConnection(const MockConnection&) = delete; + MockConnection& operator=(const MockConnection&) = delete; + ~MockConnection() {} MOCK_METHOD1(SetPaused, void(bool paused)); @@ -58,14 +62,15 @@ using Connection::OnDidSendMessage; using Connection::SetStatus; using Connection::status; - - private: - DISALLOW_COPY_AND_ASSIGN(MockConnection); }; class MockConnectionObserver : public ConnectionObserver { public: MockConnectionObserver() {} + + MockConnectionObserver(const MockConnectionObserver&) = delete; + MockConnectionObserver& operator=(const MockConnectionObserver&) = delete; + virtual ~MockConnectionObserver() {} MOCK_METHOD3(OnConnectionStatusChanged, @@ -78,19 +83,17 @@ void(const Connection& connection, const WireMessage& message, bool success)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockConnectionObserver); }; // Unlike WireMessage, offers a public constructor. class TestWireMessage : public WireMessage { public: TestWireMessage() : WireMessage("payload", "feature") {} - ~TestWireMessage() override = default; - private: - DISALLOW_COPY_AND_ASSIGN(TestWireMessage); + TestWireMessage(const TestWireMessage&) = delete; + TestWireMessage& operator=(const TestWireMessage&) = delete; + + ~TestWireMessage() override = default; }; } // namespace
diff --git a/chromeos/services/secure_channel/device_to_device_authenticator_unittest.cc b/chromeos/services/secure_channel/device_to_device_authenticator_unittest.cc index f3a757114..0f9cf1c 100644 --- a/chromeos/services/secure_channel/device_to_device_authenticator_unittest.cc +++ b/chromeos/services/secure_channel/device_to_device_authenticator_unittest.cc
@@ -67,6 +67,10 @@ public: explicit FakeConnection(multidevice::RemoteDeviceRef remote_device) : Connection(remote_device), connection_blocked_(false) {} + + FakeConnection(const FakeConnection&) = delete; + FakeConnection& operator=(const FakeConnection&) = delete; + ~FakeConnection() override {} // Connection: @@ -100,8 +104,6 @@ std::vector<std::unique_ptr<WireMessage>> message_buffer_; bool connection_blocked_; - - DISALLOW_COPY_AND_ASSIGN(FakeConnection); }; // Harness for testing DeviceToDeviceAuthenticator. @@ -114,6 +116,12 @@ : DeviceToDeviceAuthenticator(connection, std::move(secure_message_delegate)), timer_(nullptr) {} + + DeviceToDeviceAuthenticatorForTest( + const DeviceToDeviceAuthenticatorForTest&) = delete; + DeviceToDeviceAuthenticatorForTest& operator=( + const DeviceToDeviceAuthenticatorForTest&) = delete; + ~DeviceToDeviceAuthenticatorForTest() override {} base::MockOneShotTimer* timer() { return timer_; } @@ -128,8 +136,6 @@ // This instance is owned by the super class. base::MockOneShotTimer* timer_; - - DISALLOW_COPY_AND_ASSIGN(DeviceToDeviceAuthenticatorForTest); }; } // namespace @@ -142,6 +148,12 @@ secure_message_delegate_(new multidevice::FakeSecureMessageDelegate), authenticator_(&connection_, base::WrapUnique(secure_message_delegate_)) {} + + SecureChannelDeviceToDeviceAuthenticatorTest( + const SecureChannelDeviceToDeviceAuthenticatorTest&) = delete; + SecureChannelDeviceToDeviceAuthenticatorTest& operator=( + const SecureChannelDeviceToDeviceAuthenticatorTest&) = delete; + ~SecureChannelDeviceToDeviceAuthenticatorTest() override {} void SetUp() override { @@ -241,8 +253,6 @@ // Stores the SecureContext returned after authentication succeeds. std::unique_ptr<SecureContext> secure_context_; - - DISALLOW_COPY_AND_ASSIGN(SecureChannelDeviceToDeviceAuthenticatorTest); }; TEST_F(SecureChannelDeviceToDeviceAuthenticatorTest, AuthenticateSucceeds) {
diff --git a/chromeos/services/secure_channel/device_to_device_initiator_helper.h b/chromeos/services/secure_channel/device_to_device_initiator_helper.h index dedbf010..2074ef08 100644 --- a/chromeos/services/secure_channel/device_to_device_initiator_helper.h +++ b/chromeos/services/secure_channel/device_to_device_initiator_helper.h
@@ -56,6 +56,11 @@ ValidateResponderAuthCallback; DeviceToDeviceInitiatorHelper(); + + DeviceToDeviceInitiatorHelper(const DeviceToDeviceInitiatorHelper&) = delete; + DeviceToDeviceInitiatorHelper& operator=( + const DeviceToDeviceInitiatorHelper&) = delete; + virtual ~DeviceToDeviceInitiatorHelper(); // Creates the [Hello] message, which is the first message that is sent: @@ -185,8 +190,6 @@ const securemessage::Header& header); base::WeakPtrFactory<DeviceToDeviceInitiatorHelper> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DeviceToDeviceInitiatorHelper); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/device_to_device_secure_context.h b/chromeos/services/secure_channel/device_to_device_secure_context.h index 648946a..6df154b 100644 --- a/chromeos/services/secure_channel/device_to_device_secure_context.h +++ b/chromeos/services/secure_channel/device_to_device_secure_context.h
@@ -34,6 +34,10 @@ const std::string& responder_auth_message_, ProtocolVersion protocol_version); + DeviceToDeviceSecureContext(const DeviceToDeviceSecureContext&) = delete; + DeviceToDeviceSecureContext& operator=(const DeviceToDeviceSecureContext&) = + delete; + ~DeviceToDeviceSecureContext() override; // SecureContext: @@ -75,8 +79,6 @@ int last_decode_sequence_number_; base::WeakPtrFactory<DeviceToDeviceSecureContext> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DeviceToDeviceSecureContext); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/error_tolerant_ble_advertisement.h b/chromeos/services/secure_channel/error_tolerant_ble_advertisement.h index 2f4a070..51ae5a4 100644 --- a/chromeos/services/secure_channel/error_tolerant_ble_advertisement.h +++ b/chromeos/services/secure_channel/error_tolerant_ble_advertisement.h
@@ -21,6 +21,10 @@ // until the stop callback is invoked. class ErrorTolerantBleAdvertisement { public: + ErrorTolerantBleAdvertisement(const ErrorTolerantBleAdvertisement&) = delete; + ErrorTolerantBleAdvertisement& operator=( + const ErrorTolerantBleAdvertisement&) = delete; + virtual ~ErrorTolerantBleAdvertisement(); // Stops advertising. Because BLE advertisements start and stop @@ -40,8 +44,6 @@ private: const DeviceIdPair device_id_pair_; - - DISALLOW_COPY_AND_ASSIGN(ErrorTolerantBleAdvertisement); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/fake_active_connection_manager.h b/chromeos/services/secure_channel/fake_active_connection_manager.h index dcbcedd..6c6ecab4 100644 --- a/chromeos/services/secure_channel/fake_active_connection_manager.h +++ b/chromeos/services/secure_channel/fake_active_connection_manager.h
@@ -27,6 +27,11 @@ public: explicit FakeActiveConnectionManager( ActiveConnectionManager::Delegate* delegate); + + FakeActiveConnectionManager(const FakeActiveConnectionManager&) = delete; + FakeActiveConnectionManager& operator=(const FakeActiveConnectionManager&) = + delete; + ~FakeActiveConnectionManager() override; using DetailsToMetadataMap = base::flat_map< @@ -55,8 +60,6 @@ const ConnectionDetails& connection_details) override; DetailsToMetadataMap connection_details_to_active_metadata_map_; - - DISALLOW_COPY_AND_ASSIGN(FakeActiveConnectionManager); }; // Test ActiveConnectionManager::Delegate implementation. @@ -64,6 +67,12 @@ : public ActiveConnectionManager::Delegate { public: FakeActiveConnectionManagerDelegate(); + + FakeActiveConnectionManagerDelegate( + const FakeActiveConnectionManagerDelegate&) = delete; + FakeActiveConnectionManagerDelegate& operator=( + const FakeActiveConnectionManagerDelegate&) = delete; + ~FakeActiveConnectionManagerDelegate() override; const base::flat_map<ConnectionDetails, size_t>& @@ -76,8 +85,6 @@ base::flat_map<ConnectionDetails, size_t> connection_details_to_num_disconnections_map_; - - DISALLOW_COPY_AND_ASSIGN(FakeActiveConnectionManagerDelegate); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/fake_authenticated_channel.h b/chromeos/services/secure_channel/fake_authenticated_channel.h index 3ce0d94..a9d0b7a 100644 --- a/chromeos/services/secure_channel/fake_authenticated_channel.h +++ b/chromeos/services/secure_channel/fake_authenticated_channel.h
@@ -22,6 +22,10 @@ class FakeAuthenticatedChannel : public AuthenticatedChannel { public: FakeAuthenticatedChannel(); + + FakeAuthenticatedChannel(const FakeAuthenticatedChannel&) = delete; + FakeAuthenticatedChannel& operator=(const FakeAuthenticatedChannel&) = delete; + ~FakeAuthenticatedChannel() override; std::vector<std::tuple<std::string, std::string, base::OnceClosure>>& @@ -56,8 +60,6 @@ bool has_disconnection_been_requested_ = false; std::vector<std::tuple<std::string, std::string, base::OnceClosure>> sent_messages_; - - DISALLOW_COPY_AND_ASSIGN(FakeAuthenticatedChannel); }; // Test AuthenticatedChannel::Observer implementation.
diff --git a/chromeos/services/secure_channel/fake_authenticator.h b/chromeos/services/secure_channel/fake_authenticator.h index 9a7c4e0..f21c592a 100644 --- a/chromeos/services/secure_channel/fake_authenticator.h +++ b/chromeos/services/secure_channel/fake_authenticator.h
@@ -17,6 +17,10 @@ class FakeAuthenticator : public Authenticator { public: FakeAuthenticator(); + + FakeAuthenticator(const FakeAuthenticator&) = delete; + FakeAuthenticator& operator=(const FakeAuthenticator&) = delete; + ~FakeAuthenticator() override; // Authenticator: @@ -26,8 +30,6 @@ private: AuthenticationCallback last_callback_; - - DISALLOW_COPY_AND_ASSIGN(FakeAuthenticator); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/fake_ble_advertisement_generator.h b/chromeos/services/secure_channel/fake_ble_advertisement_generator.h index 9e9e834..3e29d1c 100644 --- a/chromeos/services/secure_channel/fake_ble_advertisement_generator.h +++ b/chromeos/services/secure_channel/fake_ble_advertisement_generator.h
@@ -17,6 +17,11 @@ class FakeBleAdvertisementGenerator : public BleAdvertisementGenerator { public: FakeBleAdvertisementGenerator(); + + FakeBleAdvertisementGenerator(const FakeBleAdvertisementGenerator&) = delete; + FakeBleAdvertisementGenerator& operator=( + const FakeBleAdvertisementGenerator&) = delete; + ~FakeBleAdvertisementGenerator() override; // Sets the advertisement to be returned by the next call to @@ -34,8 +39,6 @@ private: std::unique_ptr<DataWithTimestamp> advertisement_; - - DISALLOW_COPY_AND_ASSIGN(FakeBleAdvertisementGenerator); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/fake_ble_advertiser.h b/chromeos/services/secure_channel/fake_ble_advertiser.h index 3974c28e..223433f 100644 --- a/chromeos/services/secure_channel/fake_ble_advertiser.h +++ b/chromeos/services/secure_channel/fake_ble_advertiser.h
@@ -27,6 +27,10 @@ class FakeBleAdvertiser : public BleAdvertiser { public: explicit FakeBleAdvertiser(Delegate* delegate); + + FakeBleAdvertiser(const FakeBleAdvertiser&) = delete; + FakeBleAdvertiser& operator=(const FakeBleAdvertiser&) = delete; + ~FakeBleAdvertiser() override; const std::list<DeviceIdPair>& GetRequestsForPriority( @@ -64,14 +68,17 @@ } std::unique_ptr<SharedResourceScheduler> scheduler_; - - DISALLOW_COPY_AND_ASSIGN(FakeBleAdvertiser); }; // Test BleAdvertiser::Delegate implementation. class FakeBleAdvertiserDelegate : public BleAdvertiser::Delegate { public: FakeBleAdvertiserDelegate(); + + FakeBleAdvertiserDelegate(const FakeBleAdvertiserDelegate&) = delete; + FakeBleAdvertiserDelegate& operator=(const FakeBleAdvertiserDelegate&) = + delete; + ~FakeBleAdvertiserDelegate() override; using SlotEndedEvent = std::pair<DeviceIdPair, bool>; @@ -94,8 +101,6 @@ std::vector<SlotEndedEvent> slot_ended_events_; std::vector<DeviceIdPair> advertisement_generation_failures_; - - DISALLOW_COPY_AND_ASSIGN(FakeBleAdvertiserDelegate); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/fake_ble_connection_manager.h b/chromeos/services/secure_channel/fake_ble_connection_manager.h index d15a673f..3876081 100644 --- a/chromeos/services/secure_channel/fake_ble_connection_manager.h +++ b/chromeos/services/secure_channel/fake_ble_connection_manager.h
@@ -20,6 +20,10 @@ class FakeBleConnectionManager : public BleConnectionManager { public: FakeBleConnectionManager(); + + FakeBleConnectionManager(const FakeBleConnectionManager&) = delete; + FakeBleConnectionManager& operator=(const FakeBleConnectionManager&) = delete; + ~FakeBleConnectionManager() override; // Make public for testing. @@ -48,8 +52,6 @@ ConnectionPriority connection_priority) override; void PerformCancelBleListenerConnectionAttempt( const DeviceIdPair& device_id_pair) override; - - DISALLOW_COPY_AND_ASSIGN(FakeBleConnectionManager); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/fake_ble_scanner.h b/chromeos/services/secure_channel/fake_ble_scanner.h index ec3dc9d..a628041 100644 --- a/chromeos/services/secure_channel/fake_ble_scanner.h +++ b/chromeos/services/secure_channel/fake_ble_scanner.h
@@ -19,6 +19,10 @@ class FakeBleScanner : public BleScanner { public: FakeBleScanner(); + + FakeBleScanner(const FakeBleScanner&) = delete; + FakeBleScanner& operator=(const FakeBleScanner&) = delete; + ~FakeBleScanner() override; size_t num_scan_request_changes_handled() const { @@ -36,8 +40,6 @@ void HandleScanRequestChange() override; size_t num_scan_request_changes_handled_ = 0u; - - DISALLOW_COPY_AND_ASSIGN(FakeBleScanner); }; // Test BleScanner::Observer implementation. @@ -57,6 +59,10 @@ }; FakeBleScannerObserver(); + + FakeBleScannerObserver(const FakeBleScannerObserver&) = delete; + FakeBleScannerObserver& operator=(const FakeBleScannerObserver&) = delete; + ~FakeBleScannerObserver() override; const std::vector<Result>& handled_scan_results() const { @@ -71,8 +77,6 @@ const std::vector<uint8_t>& eid) override; std::vector<Result> handled_scan_results_; - - DISALLOW_COPY_AND_ASSIGN(FakeBleScannerObserver); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/fake_ble_synchronizer.h b/chromeos/services/secure_channel/fake_ble_synchronizer.h index 0d0683859..da6aba1a 100644 --- a/chromeos/services/secure_channel/fake_ble_synchronizer.h +++ b/chromeos/services/secure_channel/fake_ble_synchronizer.h
@@ -19,6 +19,10 @@ class FakeBleSynchronizer : public BleSynchronizerBase { public: FakeBleSynchronizer(); + + FakeBleSynchronizer(const FakeBleSynchronizer&) = delete; + FakeBleSynchronizer& operator=(const FakeBleSynchronizer&) = delete; + ~FakeBleSynchronizer() override; size_t GetNumCommands(); @@ -45,9 +49,6 @@ protected: void ProcessQueue() override; - - private: - DISALLOW_COPY_AND_ASSIGN(FakeBleSynchronizer); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/fake_bluetooth_helper.h b/chromeos/services/secure_channel/fake_bluetooth_helper.h index 30dc8925..ee3290515 100644 --- a/chromeos/services/secure_channel/fake_bluetooth_helper.h +++ b/chromeos/services/secure_channel/fake_bluetooth_helper.h
@@ -24,6 +24,10 @@ class FakeBluetoothHelper : public BluetoothHelper { public: FakeBluetoothHelper(); + + FakeBluetoothHelper(const FakeBluetoothHelper&) = delete; + FakeBluetoothHelper& operator=(const FakeBluetoothHelper&) = delete; + ~FakeBluetoothHelper() override; // Sets the data to be returned by a GenerateForegroundAdvertisement() call. @@ -60,8 +64,6 @@ std::unordered_map<std::string, std::string> device_id_to_bluetooth_public_address_map_; - - DISALLOW_COPY_AND_ASSIGN(FakeBluetoothHelper); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/fake_channel.h b/chromeos/services/secure_channel/fake_channel.h index 429dd46..3b132b4 100644 --- a/chromeos/services/secure_channel/fake_channel.h +++ b/chromeos/services/secure_channel/fake_channel.h
@@ -22,6 +22,10 @@ class FakeChannel : public mojom::Channel { public: FakeChannel(); + + FakeChannel(const FakeChannel&) = delete; + FakeChannel& operator=(const FakeChannel&) = delete; + ~FakeChannel() override; mojo::PendingRemote<mojom::Channel> GenerateRemote(); @@ -47,8 +51,6 @@ std::vector<std::pair<std::string, SendMessageCallback>> sent_messages_; mojom::ConnectionMetadataPtr connection_metadata_for_next_call_; - - DISALLOW_COPY_AND_ASSIGN(FakeChannel); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/fake_client_connection_parameters.h b/chromeos/services/secure_channel/fake_client_connection_parameters.h index 768357b..43d18ba 100644 --- a/chromeos/services/secure_channel/fake_client_connection_parameters.h +++ b/chromeos/services/secure_channel/fake_client_connection_parameters.h
@@ -28,6 +28,11 @@ destructor_callback = base::OnceCallback<void(const base::UnguessableToken&)>()); + FakeClientConnectionParameters(const FakeClientConnectionParameters&) = + delete; + FakeClientConnectionParameters& operator=( + const FakeClientConnectionParameters&) = delete; + ~FakeClientConnectionParameters() override; const absl::optional<mojom::ConnectionAttemptFailureReason>& @@ -74,8 +79,6 @@ base::OnceCallback<void(const base::UnguessableToken&)> destructor_callback_; base::WeakPtrFactory<FakeClientConnectionParameters> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeClientConnectionParameters); }; // Test ClientConnectionParameters::Observer implementation. @@ -83,6 +86,12 @@ : public ClientConnectionParameters::Observer { public: FakeClientConnectionParametersObserver(); + + FakeClientConnectionParametersObserver( + const FakeClientConnectionParametersObserver&) = delete; + FakeClientConnectionParametersObserver& operator=( + const FakeClientConnectionParametersObserver&) = delete; + ~FakeClientConnectionParametersObserver() override; void set_closure_for_next_callback( @@ -101,8 +110,6 @@ bool has_connection_request_been_canceled_ = false; base::OnceClosure closure_for_next_callback_; - - DISALLOW_COPY_AND_ASSIGN(FakeClientConnectionParametersObserver); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/fake_connect_to_device_operation.h b/chromeos/services/secure_channel/fake_connect_to_device_operation.h index 071b2c9..39a0345 100644 --- a/chromeos/services/secure_channel/fake_connect_to_device_operation.h +++ b/chromeos/services/secure_channel/fake_connect_to_device_operation.h
@@ -30,6 +30,10 @@ std::move(failure_callback), connection_priority) {} + FakeConnectToDeviceOperation(const FakeConnectToDeviceOperation&) = delete; + FakeConnectToDeviceOperation& operator=(const FakeConnectToDeviceOperation&) = + delete; + ~FakeConnectToDeviceOperation() override = default; bool canceled() const { return canceled_; } @@ -69,8 +73,6 @@ absl::optional<ConnectionPriority> updated_priority_; base::OnceClosure destructor_callback_; base::OnceClosure cancel_callback_; - - DISALLOW_COPY_AND_ASSIGN(FakeConnectToDeviceOperation); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/fake_connection.h b/chromeos/services/secure_channel/fake_connection.h index b6cb4ff..17e61f6 100644 --- a/chromeos/services/secure_channel/fake_connection.h +++ b/chromeos/services/secure_channel/fake_connection.h
@@ -21,6 +21,10 @@ FakeConnection(multidevice::RemoteDeviceRef remote_device); FakeConnection(multidevice::RemoteDeviceRef remote_device, bool should_auto_connect); + + FakeConnection(const FakeConnection&) = delete; + FakeConnection& operator=(const FakeConnection&) = delete; + ~FakeConnection() override; void set_rssi_to_return(const absl::optional<int32_t>& rssi_to_return) { @@ -75,8 +79,6 @@ absl::optional<int32_t> rssi_to_return_; const bool should_auto_connect_; - - DISALLOW_COPY_AND_ASSIGN(FakeConnection); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/fake_connection_attempt.h b/chromeos/services/secure_channel/fake_connection_attempt.h index 110440f..37f8a2f 100644 --- a/chromeos/services/secure_channel/fake_connection_attempt.h +++ b/chromeos/services/secure_channel/fake_connection_attempt.h
@@ -36,6 +36,9 @@ connection_attempt_details), destructor_callback_(std::move(destructor_callback)) {} + FakeConnectionAttempt(const FakeConnectionAttempt&) = delete; + FakeConnectionAttempt& operator=(const FakeConnectionAttempt&) = delete; + ~FakeConnectionAttempt() override { if (destructor_callback_) std::move(destructor_callback_).Run(); @@ -86,8 +89,6 @@ std::vector<std::unique_ptr<ClientConnectionParameters>> client_data_for_extraction_; - - DISALLOW_COPY_AND_ASSIGN(FakeConnectionAttempt); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/fake_connection_attempt_delegate.h b/chromeos/services/secure_channel/fake_connection_attempt_delegate.h index cfd6981..f6c9051c 100644 --- a/chromeos/services/secure_channel/fake_connection_attempt_delegate.h +++ b/chromeos/services/secure_channel/fake_connection_attempt_delegate.h
@@ -21,6 +21,11 @@ class FakeConnectionAttemptDelegate : public ConnectionAttemptDelegate { public: FakeConnectionAttemptDelegate(); + + FakeConnectionAttemptDelegate(const FakeConnectionAttemptDelegate&) = delete; + FakeConnectionAttemptDelegate& operator=( + const FakeConnectionAttemptDelegate&) = delete; + ~FakeConnectionAttemptDelegate() override; const AuthenticatedChannel* authenticated_channel() const { @@ -47,8 +52,6 @@ absl::optional<ConnectionAttemptDetails> connection_attempt_details_; absl::optional<ConnectionDetails> connection_details_; std::unique_ptr<AuthenticatedChannel> authenticated_channel_; - - DISALLOW_COPY_AND_ASSIGN(FakeConnectionAttemptDelegate); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/fake_connection_delegate.h b/chromeos/services/secure_channel/fake_connection_delegate.h index 7f163b9..00438814 100644 --- a/chromeos/services/secure_channel/fake_connection_delegate.h +++ b/chromeos/services/secure_channel/fake_connection_delegate.h
@@ -20,6 +20,10 @@ class FakeConnectionDelegate : public mojom::ConnectionDelegate { public: FakeConnectionDelegate(); + + FakeConnectionDelegate(const FakeConnectionDelegate&) = delete; + FakeConnectionDelegate& operator=(const FakeConnectionDelegate&) = delete; + ~FakeConnectionDelegate() override; mojo::PendingRemote<mojom::ConnectionDelegate> GenerateRemote(); @@ -59,8 +63,6 @@ connection_attempt_failure_reason_; mojo::Remote<mojom::Channel> channel_; mojo::PendingReceiver<mojom::MessageReceiver> message_receiver_receiver_; - - DISALLOW_COPY_AND_ASSIGN(FakeConnectionDelegate); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/fake_error_tolerant_ble_advertisement.h b/chromeos/services/secure_channel/fake_error_tolerant_ble_advertisement.h index cc8af60..2f27c4d 100644 --- a/chromeos/services/secure_channel/fake_error_tolerant_ble_advertisement.h +++ b/chromeos/services/secure_channel/fake_error_tolerant_ble_advertisement.h
@@ -21,6 +21,12 @@ FakeErrorTolerantBleAdvertisement( const DeviceIdPair& device_id_pair, base::OnceCallback<void(const DeviceIdPair&)> destructor_callback); + + FakeErrorTolerantBleAdvertisement(const FakeErrorTolerantBleAdvertisement&) = + delete; + FakeErrorTolerantBleAdvertisement& operator=( + const FakeErrorTolerantBleAdvertisement&) = delete; + ~FakeErrorTolerantBleAdvertisement() override; const base::UnguessableToken& id() const { return id_; } @@ -36,8 +42,6 @@ base::OnceCallback<void(const DeviceIdPair&)> destructor_callback_; base::OnceClosure stop_callback_; bool stopped_ = false; - - DISALLOW_COPY_AND_ASSIGN(FakeErrorTolerantBleAdvertisement); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/fake_message_receiver.h b/chromeos/services/secure_channel/fake_message_receiver.h index f91dc63..8ac1d13 100644 --- a/chromeos/services/secure_channel/fake_message_receiver.h +++ b/chromeos/services/secure_channel/fake_message_receiver.h
@@ -19,6 +19,10 @@ class FakeMessageReceiver : public mojom::MessageReceiver { public: FakeMessageReceiver(); + + FakeMessageReceiver(const FakeMessageReceiver&) = delete; + FakeMessageReceiver& operator=(const FakeMessageReceiver&) = delete; + ~FakeMessageReceiver() override; const std::vector<std::string>& received_messages() { @@ -30,8 +34,6 @@ void OnMessageReceived(const std::string& message) override; std::vector<std::string> received_messages_; - - DISALLOW_COPY_AND_ASSIGN(FakeMessageReceiver); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/fake_multiplexed_channel.h b/chromeos/services/secure_channel/fake_multiplexed_channel.h index 4a86b1f7..1e19b8fb 100644 --- a/chromeos/services/secure_channel/fake_multiplexed_channel.h +++ b/chromeos/services/secure_channel/fake_multiplexed_channel.h
@@ -26,6 +26,10 @@ ConnectionDetails connection_details, base::OnceCallback<void(const ConnectionDetails&)> destructor_callback = base::OnceCallback<void(const ConnectionDetails&)>()); + + FakeMultiplexedChannel(const FakeMultiplexedChannel&) = delete; + FakeMultiplexedChannel& operator=(const FakeMultiplexedChannel&) = delete; + ~FakeMultiplexedChannel() override; std::vector<std::unique_ptr<ClientConnectionParameters>>& added_clients() { @@ -51,14 +55,18 @@ std::vector<std::unique_ptr<ClientConnectionParameters>> added_clients_; base::OnceCallback<void(const ConnectionDetails&)> destructor_callback_; - - DISALLOW_COPY_AND_ASSIGN(FakeMultiplexedChannel); }; // Test MultiplexedChannel::Delegate implementation. class FakeMultiplexedChannelDelegate : public MultiplexedChannel::Delegate { public: FakeMultiplexedChannelDelegate(); + + FakeMultiplexedChannelDelegate(const FakeMultiplexedChannelDelegate&) = + delete; + FakeMultiplexedChannelDelegate& operator=( + const FakeMultiplexedChannelDelegate&) = delete; + ~FakeMultiplexedChannelDelegate() override; const absl::optional<ConnectionDetails>& disconnected_connection_details() { @@ -69,8 +77,6 @@ void OnDisconnected(const ConnectionDetails& connection_details) override; absl::optional<ConnectionDetails> disconnected_connection_details_; - - DISALLOW_COPY_AND_ASSIGN(FakeMultiplexedChannelDelegate); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/fake_one_shot_timer.h b/chromeos/services/secure_channel/fake_one_shot_timer.h index e717d3e..9d6b336f 100644 --- a/chromeos/services/secure_channel/fake_one_shot_timer.h +++ b/chromeos/services/secure_channel/fake_one_shot_timer.h
@@ -20,6 +20,10 @@ public: FakeOneShotTimer(base::OnceCallback<void(const base::UnguessableToken&)> destructor_callback); + + FakeOneShotTimer(const FakeOneShotTimer&) = delete; + FakeOneShotTimer& operator=(const FakeOneShotTimer&) = delete; + ~FakeOneShotTimer() override; const base::UnguessableToken& id() const { return id_; } @@ -27,8 +31,6 @@ private: base::OnceCallback<void(const base::UnguessableToken&)> destructor_callback_; base::UnguessableToken id_; - - DISALLOW_COPY_AND_ASSIGN(FakeOneShotTimer); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/fake_pending_connection_manager.h b/chromeos/services/secure_channel/fake_pending_connection_manager.h index 5a3c399..4dd3b1aa 100644 --- a/chromeos/services/secure_channel/fake_pending_connection_manager.h +++ b/chromeos/services/secure_channel/fake_pending_connection_manager.h
@@ -24,6 +24,11 @@ class FakePendingConnectionManager : public PendingConnectionManager { public: FakePendingConnectionManager(Delegate* delegate); + + FakePendingConnectionManager(const FakePendingConnectionManager&) = delete; + FakePendingConnectionManager& operator=(const FakePendingConnectionManager&) = + delete; + ~FakePendingConnectionManager() override; using HandledRequestsList = @@ -50,8 +55,6 @@ ConnectionPriority connection_priority) override; HandledRequestsList handled_requests_; - - DISALLOW_COPY_AND_ASSIGN(FakePendingConnectionManager); }; // Test PendingConnectionManager::Delegate implementation. @@ -59,6 +62,12 @@ : public PendingConnectionManager::Delegate { public: FakePendingConnectionManagerDelegate(); + + FakePendingConnectionManagerDelegate( + const FakePendingConnectionManagerDelegate&) = delete; + FakePendingConnectionManagerDelegate& operator=( + const FakePendingConnectionManagerDelegate&) = delete; + ~FakePendingConnectionManagerDelegate() override; using ReceivedConnectionsList = std::vector< @@ -76,8 +85,6 @@ const ConnectionDetails& connection_details) override; ReceivedConnectionsList received_connections_list_; - - DISALLOW_COPY_AND_ASSIGN(FakePendingConnectionManagerDelegate); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/fake_pending_connection_request.h b/chromeos/services/secure_channel/fake_pending_connection_request.h index 7ef89ed..7a797f64 100644 --- a/chromeos/services/secure_channel/fake_pending_connection_request.h +++ b/chromeos/services/secure_channel/fake_pending_connection_request.h
@@ -30,6 +30,10 @@ connection_priority), id_(base::UnguessableToken::Create()) {} + FakePendingConnectionRequest(const FakePendingConnectionRequest&) = delete; + FakePendingConnectionRequest& operator=(const FakePendingConnectionRequest&) = + delete; + ~FakePendingConnectionRequest() override = default; const std::vector<FailureDetailType>& handled_failure_details() const { @@ -65,8 +69,6 @@ std::vector<FailureDetailType> handled_failure_details_; std::unique_ptr<ClientConnectionParameters> client_data_for_extraction_; - - DISALLOW_COPY_AND_ASSIGN(FakePendingConnectionRequest); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/fake_pending_connection_request_delegate.h b/chromeos/services/secure_channel/fake_pending_connection_request_delegate.h index 6a6312b..bfd80b55 100644 --- a/chromeos/services/secure_channel/fake_pending_connection_request_delegate.h +++ b/chromeos/services/secure_channel/fake_pending_connection_request_delegate.h
@@ -21,6 +21,12 @@ : public PendingConnectionRequestDelegate { public: FakePendingConnectionRequestDelegate(); + + FakePendingConnectionRequestDelegate( + const FakePendingConnectionRequestDelegate&) = delete; + FakePendingConnectionRequestDelegate& operator=( + const FakePendingConnectionRequestDelegate&) = delete; + ~FakePendingConnectionRequestDelegate() override; const absl::optional<FailedConnectionReason>& GetFailedConnectionReasonForId( @@ -42,8 +48,6 @@ request_id_to_failed_connection_reason_map_; base::OnceClosure closure_for_next_delegate_callback_; - - DISALLOW_COPY_AND_ASSIGN(FakePendingConnectionRequestDelegate); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/fake_secure_channel.h b/chromeos/services/secure_channel/fake_secure_channel.h index 7145561..8ae560e 100644 --- a/chromeos/services/secure_channel/fake_secure_channel.h +++ b/chromeos/services/secure_channel/fake_secure_channel.h
@@ -25,6 +25,10 @@ class FakeSecureChannel : public SecureChannelBase { public: FakeSecureChannel(); + + FakeSecureChannel(const FakeSecureChannel&) = delete; + FakeSecureChannel& operator=(const FakeSecureChannel&) = delete; + ~FakeSecureChannel() override; mojo::Remote<mojom::ConnectionDelegate> delegate_from_last_listen_call() { @@ -56,8 +60,6 @@ mojo::Remote<mojom::ConnectionDelegate> delegate_from_last_listen_call_; mojo::Remote<mojom::ConnectionDelegate> delegate_from_last_initiate_call_; - - DISALLOW_COPY_AND_ASSIGN(FakeSecureChannel); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/fake_secure_channel_connection.h b/chromeos/services/secure_channel/fake_secure_channel_connection.h index d1110078..f005236 100644 --- a/chromeos/services/secure_channel/fake_secure_channel_connection.h +++ b/chromeos/services/secure_channel/fake_secure_channel_connection.h
@@ -19,6 +19,11 @@ class FakeSecureChannelConnection : public SecureChannel { public: FakeSecureChannelConnection(std::unique_ptr<Connection> connection); + + FakeSecureChannelConnection(const FakeSecureChannelConnection&) = delete; + FakeSecureChannelConnection& operator=(const FakeSecureChannelConnection&) = + delete; + ~FakeSecureChannelConnection() override; void set_destructor_callback(base::OnceClosure destructor_callback) { @@ -71,8 +76,6 @@ absl::optional<std::string> channel_binding_data_; base::OnceClosure destructor_callback_; - - DISALLOW_COPY_AND_ASSIGN(FakeSecureChannelConnection); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/fake_secure_channel_disconnector.h b/chromeos/services/secure_channel/fake_secure_channel_disconnector.h index 4d531f1..36f7d523d 100644 --- a/chromeos/services/secure_channel/fake_secure_channel_disconnector.h +++ b/chromeos/services/secure_channel/fake_secure_channel_disconnector.h
@@ -20,6 +20,11 @@ class FakeSecureChannelDisconnector : public SecureChannelDisconnector { public: FakeSecureChannelDisconnector(); + + FakeSecureChannelDisconnector(const FakeSecureChannelDisconnector&) = delete; + FakeSecureChannelDisconnector& operator=( + const FakeSecureChannelDisconnector&) = delete; + ~FakeSecureChannelDisconnector() override; const base::flat_set<std::unique_ptr<SecureChannel>>& handled_channels() { @@ -34,8 +39,6 @@ std::unique_ptr<SecureChannel> channel_to_disconnect) override; base::flat_set<std::unique_ptr<SecureChannel>> handled_channels_; - - DISALLOW_COPY_AND_ASSIGN(FakeSecureChannelDisconnector); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/fake_secure_context.h b/chromeos/services/secure_channel/fake_secure_context.h index d1c0f25..4d22e72 100644 --- a/chromeos/services/secure_channel/fake_secure_context.h +++ b/chromeos/services/secure_channel/fake_secure_context.h
@@ -20,6 +20,10 @@ class FakeSecureContext : public SecureContext { public: FakeSecureContext(); + + FakeSecureContext(const FakeSecureContext&) = delete; + FakeSecureContext& operator=(const FakeSecureContext&) = delete; + ~FakeSecureContext() override; // SecureContext: @@ -40,8 +44,6 @@ private: ProtocolVersion protocol_version_; absl::optional<std::string> channel_binding_data_; - - DISALLOW_COPY_AND_ASSIGN(FakeSecureContext); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/fake_single_client_message_proxy.h b/chromeos/services/secure_channel/fake_single_client_message_proxy.h index 63508ea..9dfd7e6 100644 --- a/chromeos/services/secure_channel/fake_single_client_message_proxy.h +++ b/chromeos/services/secure_channel/fake_single_client_message_proxy.h
@@ -25,6 +25,11 @@ base::OnceCallback<void(const base::UnguessableToken&)> destructor_callback = base::OnceCallback<void(const base::UnguessableToken&)>()); + + FakeSingleClientMessageProxy(const FakeSingleClientMessageProxy&) = delete; + FakeSingleClientMessageProxy& operator=(const FakeSingleClientMessageProxy&) = + delete; + ~FakeSingleClientMessageProxy() override; bool was_remote_device_disconnection_handled() { @@ -54,8 +59,6 @@ std::vector<std::pair<std::string, std::string>> processed_messages_; bool was_remote_device_disconnection_handled_ = false; - - DISALLOW_COPY_AND_ASSIGN(FakeSingleClientMessageProxy); }; // Test SingleClientMessageProxy::Delegate implementation. @@ -63,6 +66,12 @@ : public SingleClientMessageProxy::Delegate { public: FakeSingleClientMessageProxyDelegate(); + + FakeSingleClientMessageProxyDelegate( + const FakeSingleClientMessageProxyDelegate&) = delete; + FakeSingleClientMessageProxyDelegate& operator=( + const FakeSingleClientMessageProxyDelegate&) = delete; + ~FakeSingleClientMessageProxyDelegate() override; std::vector<std::tuple<std::string, std::string, base::OnceClosure>>& @@ -99,8 +108,6 @@ mojom::ConnectionMetadataPtr connection_metadata_for_next_call_; base::OnceClosure on_client_disconnected_closure_; base::UnguessableToken disconnected_proxy_id_; - - DISALLOW_COPY_AND_ASSIGN(FakeSingleClientMessageProxyDelegate); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/fake_timer_factory.h b/chromeos/services/secure_channel/fake_timer_factory.h index d6d47ae9..d625941 100644 --- a/chromeos/services/secure_channel/fake_timer_factory.h +++ b/chromeos/services/secure_channel/fake_timer_factory.h
@@ -23,6 +23,10 @@ class FakeTimerFactory : public TimerFactory { public: FakeTimerFactory(); + + FakeTimerFactory(const FakeTimerFactory&) = delete; + FakeTimerFactory& operator=(const FakeTimerFactory&) = delete; + ~FakeTimerFactory() override; const base::UnguessableToken& id_for_last_created_one_shot_timer() { @@ -48,8 +52,6 @@ size_t num_instances_created_ = 0u; base::WeakPtrFactory<FakeTimerFactory> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeTimerFactory); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/foreground_eid_generator.h b/chromeos/services/secure_channel/foreground_eid_generator.h index 2bbf73a..ec407296 100644 --- a/chromeos/services/secure_channel/foreground_eid_generator.h +++ b/chromeos/services/secure_channel/foreground_eid_generator.h
@@ -70,6 +70,10 @@ static const int8_t kBluetooth4Flag; ForegroundEidGenerator(); + + ForegroundEidGenerator(const ForegroundEidGenerator&) = delete; + ForegroundEidGenerator& operator=(const ForegroundEidGenerator&) = delete; + virtual ~ForegroundEidGenerator(); // Generates EID data for the given EID seeds to be used as a background scan @@ -163,8 +167,6 @@ std::unique_ptr<RawEidGenerator> raw_eid_generator_; - DISALLOW_COPY_AND_ASSIGN(ForegroundEidGenerator); - friend class SecureChannelForegroundEidGeneratorTest; FRIEND_TEST_ALL_PREFIXES(SecureChannelForegroundEidGeneratorTest, GenerateBackgroundScanFilter_UsingRealEids);
diff --git a/chromeos/services/secure_channel/multiplexed_channel.h b/chromeos/services/secure_channel/multiplexed_channel.h index 2582551..68fd711 100644 --- a/chromeos/services/secure_channel/multiplexed_channel.h +++ b/chromeos/services/secure_channel/multiplexed_channel.h
@@ -29,6 +29,9 @@ const ConnectionDetails& connection_details) = 0; }; + MultiplexedChannel(const MultiplexedChannel&) = delete; + MultiplexedChannel& operator=(const MultiplexedChannel&) = delete; + virtual ~MultiplexedChannel(); virtual bool IsDisconnecting() const = 0; @@ -54,8 +57,6 @@ private: Delegate* delegate_; const ConnectionDetails connection_details_; - - DISALLOW_COPY_AND_ASSIGN(MultiplexedChannel); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/multiplexed_channel_impl_unittest.cc b/chromeos/services/secure_channel/multiplexed_channel_impl_unittest.cc index 2080387..f724bb7 100644 --- a/chromeos/services/secure_channel/multiplexed_channel_impl_unittest.cc +++ b/chromeos/services/secure_channel/multiplexed_channel_impl_unittest.cc
@@ -36,6 +36,12 @@ : public SingleClientMessageProxyImpl::Factory { public: FakeSingleClientMessageProxyImplFactory() = default; + + FakeSingleClientMessageProxyImplFactory( + const FakeSingleClientMessageProxyImplFactory&) = delete; + FakeSingleClientMessageProxyImplFactory& operator=( + const FakeSingleClientMessageProxyImplFactory&) = delete; + ~FakeSingleClientMessageProxyImplFactory() override = default; const SingleClientMessageProxy::Delegate* expected_delegate() { @@ -88,8 +94,6 @@ FakeSingleClientMessageProxy*, base::UnguessableTokenHash> id_to_active_proxy_map_; - - DISALLOW_COPY_AND_ASSIGN(FakeSingleClientMessageProxyImplFactory); }; } // namespace
diff --git a/chromeos/services/secure_channel/pending_ble_connection_request_base.h b/chromeos/services/secure_channel/pending_ble_connection_request_base.h index 10ebbb3..4bb1fed 100644 --- a/chromeos/services/secure_channel/pending_ble_connection_request_base.h +++ b/chromeos/services/secure_channel/pending_ble_connection_request_base.h
@@ -22,6 +22,11 @@ : public PendingConnectionRequestBase<BleFailureDetailType>, public device::BluetoothAdapter::Observer { public: + PendingBleConnectionRequestBase(const PendingBleConnectionRequestBase&) = + delete; + PendingBleConnectionRequestBase& operator=( + const PendingBleConnectionRequestBase&) = delete; + ~PendingBleConnectionRequestBase() override { bluetooth_adapter_->RemoveObserver(this); } @@ -67,8 +72,6 @@ } scoped_refptr<device::BluetoothAdapter> bluetooth_adapter_; - - DISALLOW_COPY_AND_ASSIGN(PendingBleConnectionRequestBase); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/pending_connection_manager.h b/chromeos/services/secure_channel/pending_connection_manager.h index 4aca1fb..1493e01 100644 --- a/chromeos/services/secure_channel/pending_connection_manager.h +++ b/chromeos/services/secure_channel/pending_connection_manager.h
@@ -37,6 +37,9 @@ const ConnectionDetails& connection_details) = 0; }; + PendingConnectionManager(const PendingConnectionManager&) = delete; + PendingConnectionManager& operator=(const PendingConnectionManager&) = delete; + virtual ~PendingConnectionManager(); // Attempts a connection according to the provided parameters. If other @@ -58,8 +61,6 @@ private: Delegate* delegate_; - - DISALLOW_COPY_AND_ASSIGN(PendingConnectionManager); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/pending_connection_manager_impl_unittest.cc b/chromeos/services/secure_channel/pending_connection_manager_impl_unittest.cc index 4942b1b..028808d7 100644 --- a/chromeos/services/secure_channel/pending_connection_manager_impl_unittest.cc +++ b/chromeos/services/secure_channel/pending_connection_manager_impl_unittest.cc
@@ -44,6 +44,11 @@ FakeBleConnectionManager* expected_ble_connection_manager) : expected_ble_connection_manager_(expected_ble_connection_manager) {} + FakeBleInitiatorConnectionAttemptFactory( + const FakeBleInitiatorConnectionAttemptFactory&) = delete; + FakeBleInitiatorConnectionAttemptFactory& operator=( + const FakeBleInitiatorConnectionAttemptFactory&) = delete; + ~FakeBleInitiatorConnectionAttemptFactory() override = default; void set_expected_connection_attempt_details( @@ -110,8 +115,6 @@ size_t num_instances_deleted_ = 0u; FakeConnectionAttempt<BleInitiatorFailureType>* last_created_instance_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakeBleInitiatorConnectionAttemptFactory); }; class FakeBleListenerConnectionAttemptFactory @@ -121,6 +124,11 @@ FakeBleConnectionManager* expected_ble_connection_manager) : expected_ble_connection_manager_(expected_ble_connection_manager) {} + FakeBleListenerConnectionAttemptFactory( + const FakeBleListenerConnectionAttemptFactory&) = delete; + FakeBleListenerConnectionAttemptFactory& operator=( + const FakeBleListenerConnectionAttemptFactory&) = delete; + ~FakeBleListenerConnectionAttemptFactory() override = default; void set_expected_connection_attempt_details( @@ -187,8 +195,6 @@ size_t num_instances_deleted_ = 0u; FakeConnectionAttempt<BleListenerFailureType>* last_created_instance_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakeBleListenerConnectionAttemptFactory); }; class FakeNearbyInitiatorConnectionAttemptFactory @@ -199,6 +205,11 @@ : expected_nearby_connection_manager_( expected_nearby_connection_manager) {} + FakeNearbyInitiatorConnectionAttemptFactory( + const FakeNearbyInitiatorConnectionAttemptFactory&) = delete; + FakeNearbyInitiatorConnectionAttemptFactory& operator=( + const FakeNearbyInitiatorConnectionAttemptFactory&) = delete; + ~FakeNearbyInitiatorConnectionAttemptFactory() override = default; void set_expected_connection_attempt_details( @@ -265,14 +276,18 @@ size_t num_instances_deleted_ = 0u; FakeConnectionAttempt<NearbyInitiatorFailureType>* last_created_instance_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakeNearbyInitiatorConnectionAttemptFactory); }; class FakePendingBleInitiatorConnectionRequestFactory : public PendingBleInitiatorConnectionRequest::Factory { public: FakePendingBleInitiatorConnectionRequestFactory() = default; + + FakePendingBleInitiatorConnectionRequestFactory( + const FakePendingBleInitiatorConnectionRequestFactory&) = delete; + FakePendingBleInitiatorConnectionRequestFactory& operator=( + const FakePendingBleInitiatorConnectionRequestFactory&) = delete; + ~FakePendingBleInitiatorConnectionRequestFactory() override = default; void SetExpectationsForNextCall( @@ -312,14 +327,18 @@ FakePendingConnectionRequest<BleInitiatorFailureType>* last_created_instance_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakePendingBleInitiatorConnectionRequestFactory); }; class FakePendingBleListenerConnectionRequestFactory : public PendingBleListenerConnectionRequest::Factory { public: FakePendingBleListenerConnectionRequestFactory() = default; + + FakePendingBleListenerConnectionRequestFactory( + const FakePendingBleListenerConnectionRequestFactory&) = delete; + FakePendingBleListenerConnectionRequestFactory& operator=( + const FakePendingBleListenerConnectionRequestFactory&) = delete; + ~FakePendingBleListenerConnectionRequestFactory() override = default; void SetExpectationsForNextCall( @@ -359,14 +378,18 @@ FakePendingConnectionRequest<BleListenerFailureType>* last_created_instance_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakePendingBleListenerConnectionRequestFactory); }; class FakePendingNearbyInitiatorConnectionRequestFactory : public PendingNearbyInitiatorConnectionRequest::Factory { public: FakePendingNearbyInitiatorConnectionRequestFactory() = default; + + FakePendingNearbyInitiatorConnectionRequestFactory( + const FakePendingNearbyInitiatorConnectionRequestFactory&) = delete; + FakePendingNearbyInitiatorConnectionRequestFactory& operator=( + const FakePendingNearbyInitiatorConnectionRequestFactory&) = delete; + ~FakePendingNearbyInitiatorConnectionRequestFactory() override = default; void SetExpectationsForNextCall( @@ -406,8 +429,6 @@ FakePendingConnectionRequest<NearbyInitiatorFailureType>* last_created_instance_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakePendingNearbyInitiatorConnectionRequestFactory); }; std::vector<std::unique_ptr<ClientConnectionParameters>>
diff --git a/chromeos/services/secure_channel/pending_connection_request.h b/chromeos/services/secure_channel/pending_connection_request.h index 674b250..cb8bb32 100644 --- a/chromeos/services/secure_channel/pending_connection_request.h +++ b/chromeos/services/secure_channel/pending_connection_request.h
@@ -35,6 +35,9 @@ return request->ExtractClientConnectionParameters(); } + PendingConnectionRequest(const PendingConnectionRequest&) = delete; + PendingConnectionRequest& operator=(const PendingConnectionRequest&) = delete; + virtual ~PendingConnectionRequest() = default; ConnectionPriority connection_priority() const { @@ -66,8 +69,6 @@ private: PendingConnectionRequestDelegate* delegate_; ConnectionPriority connection_priority_; - - DISALLOW_COPY_AND_ASSIGN(PendingConnectionRequest); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/pending_connection_request_base.h b/chromeos/services/secure_channel/pending_connection_request_base.h index 4bc36ec..290b20d 100644 --- a/chromeos/services/secure_channel/pending_connection_request_base.h +++ b/chromeos/services/secure_channel/pending_connection_request_base.h
@@ -35,6 +35,10 @@ : public PendingConnectionRequest<FailureDetailType>, public ClientConnectionParameters::Observer { public: + PendingConnectionRequestBase(const PendingConnectionRequestBase&) = delete; + PendingConnectionRequestBase& operator=(const PendingConnectionRequestBase&) = + delete; + ~PendingConnectionRequestBase() override { if (client_connection_parameters_) client_connection_parameters_->RemoveObserver(this); @@ -114,8 +118,6 @@ bool has_finished_without_connection_ = false; base::WeakPtrFactory<PendingConnectionRequestBase> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PendingConnectionRequestBase); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/pending_connection_request_delegate.h b/chromeos/services/secure_channel/pending_connection_request_delegate.h index e69a7acbc..74c19dc 100644 --- a/chromeos/services/secure_channel/pending_connection_request_delegate.h +++ b/chromeos/services/secure_channel/pending_connection_request_delegate.h
@@ -27,6 +27,12 @@ }; PendingConnectionRequestDelegate(); + + PendingConnectionRequestDelegate(const PendingConnectionRequestDelegate&) = + delete; + PendingConnectionRequestDelegate& operator=( + const PendingConnectionRequestDelegate&) = delete; + virtual ~PendingConnectionRequestDelegate(); // Invoked when a PendingConnectionRequest fails to establish a connection. @@ -35,9 +41,6 @@ virtual void OnRequestFinishedWithoutConnection( const base::UnguessableToken& request_id, FailedConnectionReason reason) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(PendingConnectionRequestDelegate); }; std::ostream& operator<<(
diff --git a/chromeos/services/secure_channel/public/cpp/client/client_channel.h b/chromeos/services/secure_channel/public/cpp/client/client_channel.h index fe8d4d7..a38caad 100644 --- a/chromeos/services/secure_channel/public/cpp/client/client_channel.h +++ b/chromeos/services/secure_channel/public/cpp/client/client_channel.h
@@ -31,6 +31,9 @@ virtual void OnMessageReceived(const std::string& payload) = 0; }; + ClientChannel(const ClientChannel&) = delete; + ClientChannel& operator=(const ClientChannel&) = delete; + virtual ~ClientChannel(); bool GetConnectionMetadata( @@ -66,8 +69,6 @@ private: base::ObserverList<Observer>::Unchecked observer_list_; bool is_disconnected_ = false; - - DISALLOW_COPY_AND_ASSIGN(ClientChannel); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/public/cpp/client/connection_attempt.h b/chromeos/services/secure_channel/public/cpp/client/connection_attempt.h index 27fdfba..103ac39 100644 --- a/chromeos/services/secure_channel/public/cpp/client/connection_attempt.h +++ b/chromeos/services/secure_channel/public/cpp/client/connection_attempt.h
@@ -33,6 +33,10 @@ }; ConnectionAttempt(); + + ConnectionAttempt(const ConnectionAttempt&) = delete; + ConnectionAttempt& operator=(const ConnectionAttempt&) = delete; + virtual ~ConnectionAttempt(); void SetDelegate(Delegate* delegate); @@ -44,8 +48,6 @@ private: Delegate* delegate_; - - DISALLOW_COPY_AND_ASSIGN(ConnectionAttempt); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/public/cpp/client/fake_client_channel.h b/chromeos/services/secure_channel/public/cpp/client/fake_client_channel.h index 5abf4d0..b03480b 100644 --- a/chromeos/services/secure_channel/public/cpp/client/fake_client_channel.h +++ b/chromeos/services/secure_channel/public/cpp/client/fake_client_channel.h
@@ -20,6 +20,10 @@ class FakeClientChannel : public ClientChannel { public: FakeClientChannel(); + + FakeClientChannel(const FakeClientChannel&) = delete; + FakeClientChannel& operator=(const FakeClientChannel&) = delete; + ~FakeClientChannel() override; using ClientChannel::NotifyDisconnected; @@ -51,8 +55,6 @@ get_connection_metadata_callback_queue_; std::vector<std::pair<std::string, base::OnceClosure>> sent_messages_; base::OnceClosure destructor_callback_; - - DISALLOW_COPY_AND_ASSIGN(FakeClientChannel); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/public/cpp/client/fake_client_channel_observer.h b/chromeos/services/secure_channel/public/cpp/client/fake_client_channel_observer.h index fe3c690..8ddbd5ec 100644 --- a/chromeos/services/secure_channel/public/cpp/client/fake_client_channel_observer.h +++ b/chromeos/services/secure_channel/public/cpp/client/fake_client_channel_observer.h
@@ -16,6 +16,11 @@ class FakeClientChannelObserver : public ClientChannel::Observer { public: FakeClientChannelObserver(); + + FakeClientChannelObserver(const FakeClientChannelObserver&) = delete; + FakeClientChannelObserver& operator=(const FakeClientChannelObserver&) = + delete; + ~FakeClientChannelObserver() override; // ClientChannel::Observer: @@ -32,8 +37,6 @@ private: bool is_disconnected_ = false; std::vector<std::string> received_messages_; - - DISALLOW_COPY_AND_ASSIGN(FakeClientChannelObserver); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/public/cpp/client/fake_connection_attempt.h b/chromeos/services/secure_channel/public/cpp/client/fake_connection_attempt.h index 0423cbab..f2a8374 100644 --- a/chromeos/services/secure_channel/public/cpp/client/fake_connection_attempt.h +++ b/chromeos/services/secure_channel/public/cpp/client/fake_connection_attempt.h
@@ -19,6 +19,10 @@ class FakeConnectionAttempt : public ConnectionAttemptImpl { public: FakeConnectionAttempt(); + + FakeConnectionAttempt(const FakeConnectionAttempt&) = delete; + FakeConnectionAttempt& operator=(const FakeConnectionAttempt&) = delete; + ~FakeConnectionAttempt() override; using ConnectionAttempt::NotifyConnectionAttemptFailure; @@ -42,8 +46,6 @@ private: base::OnceClosure on_connection_attempt_failure_callback_; base::OnceClosure on_connection_callback_; - - DISALLOW_COPY_AND_ASSIGN(FakeConnectionAttempt); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/public/cpp/client/fake_secure_channel_client.h b/chromeos/services/secure_channel/public/cpp/client/fake_secure_channel_client.h index 530fc25..3b366933 100644 --- a/chromeos/services/secure_channel/public/cpp/client/fake_secure_channel_client.h +++ b/chromeos/services/secure_channel/public/cpp/client/fake_secure_channel_client.h
@@ -29,6 +29,11 @@ const std::string& feature, ConnectionMedium connection_medium, ConnectionPriority connection_priority); + + ConnectionRequestArguments(const ConnectionRequestArguments&) = delete; + ConnectionRequestArguments& operator=(const ConnectionRequestArguments&) = + delete; + ~ConnectionRequestArguments(); multidevice::RemoteDeviceRef device_to_connect; @@ -36,12 +41,13 @@ std::string feature; ConnectionMedium connection_medium; ConnectionPriority connection_priority; - - private: - DISALLOW_COPY_AND_ASSIGN(ConnectionRequestArguments); }; FakeSecureChannelClient(); + + FakeSecureChannelClient(const FakeSecureChannelClient&) = delete; + FakeSecureChannelClient& operator=(const FakeSecureChannelClient&) = delete; + ~FakeSecureChannelClient() override; void set_next_initiate_connection_attempt( @@ -149,8 +155,6 @@ last_initiate_connection_request_arguments_list_; std::vector<std::unique_ptr<ConnectionRequestArguments>> last_listen_for_connection_request_arguments_list_; - - DISALLOW_COPY_AND_ASSIGN(FakeSecureChannelClient); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/public/cpp/client/secure_channel_client.h b/chromeos/services/secure_channel/public/cpp/client/secure_channel_client.h index 8d9da907..e92faf0 100644 --- a/chromeos/services/secure_channel/public/cpp/client/secure_channel_client.h +++ b/chromeos/services/secure_channel/public/cpp/client/secure_channel_client.h
@@ -53,6 +53,9 @@ // devices over BLE. In the future, more connection mediums will be offered. class SecureChannelClient { public: + SecureChannelClient(const SecureChannelClient&) = delete; + SecureChannelClient& operator=(const SecureChannelClient&) = delete; + virtual ~SecureChannelClient() = default; virtual std::unique_ptr<ConnectionAttempt> InitiateConnectionToDevice( @@ -71,9 +74,6 @@ protected: SecureChannelClient() = default; - - private: - DISALLOW_COPY_AND_ASSIGN(SecureChannelClient); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/raw_eid_generator_impl.h b/chromeos/services/secure_channel/raw_eid_generator_impl.h index a6b0605..618a4ca 100644 --- a/chromeos/services/secure_channel/raw_eid_generator_impl.h +++ b/chromeos/services/secure_channel/raw_eid_generator_impl.h
@@ -19,15 +19,16 @@ class RawEidGeneratorImpl : public RawEidGenerator { public: RawEidGeneratorImpl(); + + RawEidGeneratorImpl(const RawEidGeneratorImpl&) = delete; + RawEidGeneratorImpl& operator=(const RawEidGeneratorImpl&) = delete; + ~RawEidGeneratorImpl() override; // RawEidGenerator: std::string GenerateEid(const std::string& eid_seed, int64_t start_of_period_timestamp_ms, std::string const* extra_entropy) override; - - private: - DISALLOW_COPY_AND_ASSIGN(RawEidGeneratorImpl); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/secure_channel_base.h b/chromeos/services/secure_channel/secure_channel_base.h index e9c7d36..dd92429b 100644 --- a/chromeos/services/secure_channel/secure_channel_base.h +++ b/chromeos/services/secure_channel/secure_channel_base.h
@@ -17,6 +17,9 @@ // Base SecureChannel implementation. class SecureChannelBase : public mojom::SecureChannel { public: + SecureChannelBase(const SecureChannelBase&) = delete; + SecureChannelBase& operator=(const SecureChannelBase&) = delete; + ~SecureChannelBase() override; // Binds a receiver to this implementation. Should be called each time that @@ -28,8 +31,6 @@ private: mojo::ReceiverSet<mojom::SecureChannel> receivers_; - - DISALLOW_COPY_AND_ASSIGN(SecureChannelBase); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/secure_channel_disconnector.h b/chromeos/services/secure_channel/secure_channel_disconnector.h index c188875b..86cc0d1 100644 --- a/chromeos/services/secure_channel/secure_channel_disconnector.h +++ b/chromeos/services/secure_channel/secure_channel_disconnector.h
@@ -22,6 +22,10 @@ // https://crbug.com/763604. class SecureChannelDisconnector { public: + SecureChannelDisconnector(const SecureChannelDisconnector&) = delete; + SecureChannelDisconnector& operator=(const SecureChannelDisconnector&) = + delete; + virtual ~SecureChannelDisconnector() = default; virtual void DisconnectSecureChannel( @@ -29,9 +33,6 @@ protected: SecureChannelDisconnector() = default; - - private: - DISALLOW_COPY_AND_ASSIGN(SecureChannelDisconnector); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/secure_channel_service_unittest.cc b/chromeos/services/secure_channel/secure_channel_service_unittest.cc index 7b818da..74f1c5c4 100644 --- a/chromeos/services/secure_channel/secure_channel_service_unittest.cc +++ b/chromeos/services/secure_channel/secure_channel_service_unittest.cc
@@ -58,6 +58,10 @@ class FakeTimerFactoryFactory : public TimerFactoryImpl::Factory { public: FakeTimerFactoryFactory() = default; + + FakeTimerFactoryFactory(const FakeTimerFactoryFactory&) = delete; + FakeTimerFactoryFactory& operator=(const FakeTimerFactoryFactory&) = delete; + ~FakeTimerFactoryFactory() override = default; FakeTimerFactory* instance() { return instance_; } @@ -72,14 +76,17 @@ } FakeTimerFactory* instance_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakeTimerFactoryFactory); }; class TestRemoteDeviceCacheFactory : public multidevice::RemoteDeviceCache::Factory { public: TestRemoteDeviceCacheFactory() = default; + + TestRemoteDeviceCacheFactory(const TestRemoteDeviceCacheFactory&) = delete; + TestRemoteDeviceCacheFactory& operator=(const TestRemoteDeviceCacheFactory&) = + delete; + ~TestRemoteDeviceCacheFactory() override = default; multidevice::RemoteDeviceCache* instance() { return instance_; } @@ -98,8 +105,6 @@ } multidevice::RemoteDeviceCache* instance_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(TestRemoteDeviceCacheFactory); }; class FakeBluetoothHelperFactory : public BluetoothHelperImpl::Factory { @@ -108,6 +113,10 @@ TestRemoteDeviceCacheFactory* test_remote_device_cache_factory) : test_remote_device_cache_factory_(test_remote_device_cache_factory) {} + FakeBluetoothHelperFactory(const FakeBluetoothHelperFactory&) = delete; + FakeBluetoothHelperFactory& operator=(const FakeBluetoothHelperFactory&) = + delete; + ~FakeBluetoothHelperFactory() override = default; FakeBluetoothHelper* instance() { return instance_; } @@ -128,13 +137,16 @@ TestRemoteDeviceCacheFactory* test_remote_device_cache_factory_; FakeBluetoothHelper* instance_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakeBluetoothHelperFactory); }; class FakeBleSynchronizerFactory : public BleSynchronizer::Factory { public: FakeBleSynchronizerFactory() = default; + + FakeBleSynchronizerFactory(const FakeBleSynchronizerFactory&) = delete; + FakeBleSynchronizerFactory& operator=(const FakeBleSynchronizerFactory&) = + delete; + ~FakeBleSynchronizerFactory() override = default; FakeBleSynchronizer* instance() { return instance_; } @@ -151,8 +163,6 @@ } FakeBleSynchronizer* instance_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakeBleSynchronizerFactory); }; class FakeBleScannerFactory : public BleScannerImpl::Factory { @@ -163,6 +173,9 @@ : fake_bluetooth_helper_factory_(fake_bluetooth_helper_factory), fake_ble_synchronizer_factory_(fake_ble_synchronizer_factory) {} + FakeBleScannerFactory(const FakeBleScannerFactory&) = delete; + FakeBleScannerFactory& operator=(const FakeBleScannerFactory&) = delete; + ~FakeBleScannerFactory() override = default; FakeBleScanner* instance() { return instance_; } @@ -187,14 +200,18 @@ FakeBluetoothHelperFactory* fake_bluetooth_helper_factory_; FakeBleSynchronizerFactory* fake_ble_synchronizer_factory_; - - DISALLOW_COPY_AND_ASSIGN(FakeBleScannerFactory); }; class FakeSecureChannelDisconnectorFactory : public SecureChannelDisconnectorImpl::Factory { public: FakeSecureChannelDisconnectorFactory() = default; + + FakeSecureChannelDisconnectorFactory( + const FakeSecureChannelDisconnectorFactory&) = delete; + FakeSecureChannelDisconnectorFactory& operator=( + const FakeSecureChannelDisconnectorFactory&) = delete; + ~FakeSecureChannelDisconnectorFactory() override = default; FakeSecureChannelDisconnector* instance() { return instance_; } @@ -208,8 +225,6 @@ } FakeSecureChannelDisconnector* instance_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakeSecureChannelDisconnectorFactory); }; class FakeBleConnectionManagerFactory @@ -231,6 +246,11 @@ fake_secure_channel_disconnector_factory), fake_timer_factory_factory_(fake_timer_factory_factory) {} + FakeBleConnectionManagerFactory(const FakeBleConnectionManagerFactory&) = + delete; + FakeBleConnectionManagerFactory& operator=( + const FakeBleConnectionManagerFactory&) = delete; + ~FakeBleConnectionManagerFactory() override = default; FakeBleConnectionManager* instance() { return instance_; } @@ -268,8 +288,6 @@ FakeTimerFactoryFactory* fake_timer_factory_factory_; FakeBleConnectionManager* instance_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakeBleConnectionManagerFactory); }; class FakeNearbyConnectionManagerFactory @@ -283,6 +301,11 @@ fake_secure_channel_disconnector_factory_( fake_secure_channel_disconnector_factory) {} + FakeNearbyConnectionManagerFactory( + const FakeNearbyConnectionManagerFactory&) = delete; + FakeNearbyConnectionManagerFactory& operator=( + const FakeNearbyConnectionManagerFactory&) = delete; + ~FakeNearbyConnectionManagerFactory() override = default; FakeNearbyConnectionManager* instance() { return instance_; } @@ -307,8 +330,6 @@ fake_secure_channel_disconnector_factory_; FakeNearbyConnectionManager* instance_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakeNearbyConnectionManagerFactory); }; class FakePendingConnectionManagerFactory @@ -323,6 +344,11 @@ fake_nearby_connection_manager_factory_( fake_nearby_connection_manager_factory) {} + FakePendingConnectionManagerFactory( + const FakePendingConnectionManagerFactory&) = delete; + FakePendingConnectionManagerFactory& operator=( + const FakePendingConnectionManagerFactory&) = delete; + ~FakePendingConnectionManagerFactory() override = default; FakePendingConnectionManager* instance() { return instance_; } @@ -349,14 +375,18 @@ FakeNearbyConnectionManagerFactory* fake_nearby_connection_manager_factory_; FakePendingConnectionManager* instance_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakePendingConnectionManagerFactory); }; class FakeActiveConnectionManagerFactory : public ActiveConnectionManagerImpl::Factory { public: FakeActiveConnectionManagerFactory() = default; + + FakeActiveConnectionManagerFactory( + const FakeActiveConnectionManagerFactory&) = delete; + FakeActiveConnectionManagerFactory& operator=( + const FakeActiveConnectionManagerFactory&) = delete; + ~FakeActiveConnectionManagerFactory() override = default; FakeActiveConnectionManager* instance() { return instance_; } @@ -372,8 +402,6 @@ } FakeActiveConnectionManager* instance_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakeActiveConnectionManagerFactory); }; class TestSecureChannelInitializerFactory @@ -383,6 +411,11 @@ scoped_refptr<base::TestSimpleTaskRunner> test_task_runner) : test_task_runner_(test_task_runner) {} + TestSecureChannelInitializerFactory( + const TestSecureChannelInitializerFactory&) = delete; + TestSecureChannelInitializerFactory& operator=( + const TestSecureChannelInitializerFactory&) = delete; + ~TestSecureChannelInitializerFactory() override = default; private: @@ -403,14 +436,18 @@ scoped_refptr<base::TestSimpleTaskRunner> test_task_runner_; SecureChannelBase* instance_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(TestSecureChannelInitializerFactory); }; class FakeClientConnectionParametersFactory : public ClientConnectionParametersImpl::Factory { public: FakeClientConnectionParametersFactory() = default; + + FakeClientConnectionParametersFactory( + const FakeClientConnectionParametersFactory&) = delete; + FakeClientConnectionParametersFactory& operator=( + const FakeClientConnectionParametersFactory&) = delete; + ~FakeClientConnectionParametersFactory() override = default; const base::UnguessableToken& last_created_instance_id() { @@ -467,8 +504,6 @@ absl::optional<mojom::ConnectionAttemptFailureReason>, base::UnguessableTokenHash> id_to_failure_reason_when_deleted_map_; - - DISALLOW_COPY_AND_ASSIGN(FakeClientConnectionParametersFactory); }; } // namespace
diff --git a/chromeos/services/secure_channel/shared_resource_scheduler.h b/chromeos/services/secure_channel/shared_resource_scheduler.h index b9bea84..7b870913 100644 --- a/chromeos/services/secure_channel/shared_resource_scheduler.h +++ b/chromeos/services/secure_channel/shared_resource_scheduler.h
@@ -27,6 +27,10 @@ class SharedResourceScheduler { public: SharedResourceScheduler(); + + SharedResourceScheduler(const SharedResourceScheduler&) = delete; + SharedResourceScheduler& operator=(const SharedResourceScheduler&) = delete; + virtual ~SharedResourceScheduler(); // Schedules a request to use a shared resource. @@ -65,8 +69,6 @@ // Map from request to its priority. base::flat_map<DeviceIdPair, ConnectionPriority> request_to_priority_map_; - - DISALLOW_COPY_AND_ASSIGN(SharedResourceScheduler); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/single_client_message_proxy.h b/chromeos/services/secure_channel/single_client_message_proxy.h index 92f3790..aba59c6 100644 --- a/chromeos/services/secure_channel/single_client_message_proxy.h +++ b/chromeos/services/secure_channel/single_client_message_proxy.h
@@ -33,6 +33,9 @@ const base::UnguessableToken& proxy_id) = 0; }; + SingleClientMessageProxy(const SingleClientMessageProxy&) = delete; + SingleClientMessageProxy& operator=(const SingleClientMessageProxy&) = delete; + virtual ~SingleClientMessageProxy(); // Should be called when any message is received over the connection. @@ -58,8 +61,6 @@ private: Delegate* delegate_; - - DISALLOW_COPY_AND_ASSIGN(SingleClientMessageProxy); }; } // namespace secure_channel
diff --git a/chromeos/services/secure_channel/timer_factory.h b/chromeos/services/secure_channel/timer_factory.h index fc53a23..1142f5f 100644 --- a/chromeos/services/secure_channel/timer_factory.h +++ b/chromeos/services/secure_channel/timer_factory.h
@@ -21,13 +21,14 @@ // for timers. class TimerFactory { public: + TimerFactory(const TimerFactory&) = delete; + TimerFactory& operator=(const TimerFactory&) = delete; + virtual ~TimerFactory() = default; virtual std::unique_ptr<base::OneShotTimer> CreateOneShotTimer() = 0; protected: TimerFactory() = default; - - DISALLOW_COPY_AND_ASSIGN(TimerFactory); }; } // namespace secure_channel
diff --git a/chromeos/settings/system_settings_provider.h b/chromeos/settings/system_settings_provider.h index 977f9d8..d456f5c9 100644 --- a/chromeos/settings/system_settings_provider.h +++ b/chromeos/settings/system_settings_provider.h
@@ -27,6 +27,10 @@ public: SystemSettingsProvider(); explicit SystemSettingsProvider(const NotifyObserversCallback& notify_cb); + + SystemSettingsProvider(const SystemSettingsProvider&) = delete; + SystemSettingsProvider& operator=(const SystemSettingsProvider&) = delete; + ~SystemSettingsProvider() override; // CrosSettingsProvider implementation. @@ -44,8 +48,6 @@ std::unique_ptr<base::Value> timezone_value_; std::unique_ptr<base::Value> per_user_timezone_enabled_value_; std::unique_ptr<base::Value> fine_grained_time_zone_enabled_value_; - - DISALLOW_COPY_AND_ASSIGN(SystemSettingsProvider); }; } // namespace chromeos
diff --git a/chromeos/settings/timezone_settings.cc b/chromeos/settings/timezone_settings.cc index 5cba063..f8fb4b8 100644 --- a/chromeos/settings/timezone_settings.cc +++ b/chromeos/settings/timezone_settings.cc
@@ -277,6 +277,9 @@ // Common code of the TimezoneSettings implementations. class TimezoneSettingsBaseImpl : public chromeos::system::TimezoneSettings { public: + TimezoneSettingsBaseImpl(const TimezoneSettingsBaseImpl&) = delete; + TimezoneSettingsBaseImpl& operator=(const TimezoneSettingsBaseImpl&) = delete; + ~TimezoneSettingsBaseImpl() override; // TimezoneSettings implementation: @@ -304,9 +307,6 @@ base::ObserverList<Observer>::Unchecked observers_; std::vector<std::unique_ptr<icu::TimeZone>> timezones_; std::unique_ptr<icu::TimeZone> timezone_; - - private: - DISALLOW_COPY_AND_ASSIGN(TimezoneSettingsBaseImpl); }; // The TimezoneSettings implementation used in production.
diff --git a/chromeos/system/cpu_temperature_reader.h b/chromeos/system/cpu_temperature_reader.h index 9b06a79..876637f 100644 --- a/chromeos/system/cpu_temperature_reader.h +++ b/chromeos/system/cpu_temperature_reader.h
@@ -39,6 +39,10 @@ }; CPUTemperatureReader(); + + CPUTemperatureReader(const CPUTemperatureReader&) = delete; + CPUTemperatureReader& operator=(const CPUTemperatureReader&) = delete; + ~CPUTemperatureReader(); void set_hwmon_dir_for_test(const base::FilePath& dir) { hwmon_dir_ = dir; } @@ -51,8 +55,6 @@ private: // Sysfs hwmon directory path. base::FilePath hwmon_dir_; - - DISALLOW_COPY_AND_ASSIGN(CPUTemperatureReader); }; } // namespace system
diff --git a/chromeos/system/fake_statistics_provider.h b/chromeos/system/fake_statistics_provider.h index 9df4881a..99703a4e 100644 --- a/chromeos/system/fake_statistics_provider.h +++ b/chromeos/system/fake_statistics_provider.h
@@ -21,6 +21,10 @@ : public StatisticsProvider { public: FakeStatisticsProvider(); + + FakeStatisticsProvider(const FakeStatisticsProvider&) = delete; + FakeStatisticsProvider& operator=(const FakeStatisticsProvider&) = delete; + ~FakeStatisticsProvider() override; // StatisticsProvider implementation: @@ -40,8 +44,6 @@ private: std::map<std::string, std::string> machine_statistics_; std::map<std::string, bool> machine_flags_; - - DISALLOW_COPY_AND_ASSIGN(FakeStatisticsProvider); }; // A convenience subclass that automatically registers itself as the test @@ -50,10 +52,12 @@ : public FakeStatisticsProvider { public: ScopedFakeStatisticsProvider(); - ~ScopedFakeStatisticsProvider() override; - private: - DISALLOW_COPY_AND_ASSIGN(ScopedFakeStatisticsProvider); + ScopedFakeStatisticsProvider(const ScopedFakeStatisticsProvider&) = delete; + ScopedFakeStatisticsProvider& operator=(const ScopedFakeStatisticsProvider&) = + delete; + + ~ScopedFakeStatisticsProvider() override; }; } // namespace system
diff --git a/chromeos/system/scheduler_configuration_manager_base.h b/chromeos/system/scheduler_configuration_manager_base.h index b89c499..c4b64d3 100644 --- a/chromeos/system/scheduler_configuration_manager_base.h +++ b/chromeos/system/scheduler_configuration_manager_base.h
@@ -27,6 +27,12 @@ }; SchedulerConfigurationManagerBase(); + + SchedulerConfigurationManagerBase(const SchedulerConfigurationManagerBase&) = + delete; + SchedulerConfigurationManagerBase& operator=( + const SchedulerConfigurationManagerBase&) = delete; + virtual ~SchedulerConfigurationManagerBase(); // Gets the most recent reply from debugd for SetSchedulerConfiguration D-Bus @@ -39,9 +45,6 @@ protected: base::ObserverList<Observer> observer_list_; - - private: - DISALLOW_COPY_AND_ASSIGN(SchedulerConfigurationManagerBase); }; } // namespace chromeos
diff --git a/chromeos/timezone/timezone_provider.h b/chromeos/timezone/timezone_provider.h index edc559e1..657ecb2 100644 --- a/chromeos/timezone/timezone_provider.h +++ b/chromeos/timezone/timezone_provider.h
@@ -33,6 +33,10 @@ public: TimeZoneProvider(scoped_refptr<network::SharedURLLoaderFactory> factory, const GURL& url); + + TimeZoneProvider(const TimeZoneProvider&) = delete; + TimeZoneProvider& operator=(const TimeZoneProvider&) = delete; + virtual ~TimeZoneProvider(); // Initiates new request (See TimeZoneRequest for parameters description.) @@ -58,8 +62,6 @@ // Creation and destruction should happen on the same thread. base::ThreadChecker thread_checker_; - - DISALLOW_COPY_AND_ASSIGN(TimeZoneProvider); }; } // namespace chromeos
diff --git a/chromeos/timezone/timezone_request.h b/chromeos/timezone/timezone_request.h index 7972f178..8ea77b2 100644 --- a/chromeos/timezone/timezone_request.h +++ b/chromeos/timezone/timezone_request.h
@@ -75,6 +75,9 @@ const Geoposition& geoposition, base::TimeDelta retry_timeout); + TimeZoneRequest(const TimeZoneRequest&) = delete; + TimeZoneRequest& operator=(const TimeZoneRequest&) = delete; + ~TimeZoneRequest(); // Initiates request. @@ -128,8 +131,6 @@ // Creation and destruction should happen on the same thread. base::ThreadChecker thread_checker_; - - DISALLOW_COPY_AND_ASSIGN(TimeZoneRequest); }; } // namespace chromeos
diff --git a/chromeos/timezone/timezone_resolver.cc b/chromeos/timezone/timezone_resolver.cc index 3ce3ddf..5cf0a07 100644 --- a/chromeos/timezone/timezone_resolver.cc +++ b/chromeos/timezone/timezone_resolver.cc
@@ -88,6 +88,9 @@ public: explicit TimeZoneResolverImpl(const TimeZoneResolver* resolver); + TimeZoneResolverImpl(const TimeZoneResolverImpl&) = delete; + TimeZoneResolverImpl& operator=(const TimeZoneResolverImpl&) = delete; + ~TimeZoneResolverImpl() override; // This is called once after the object is created. @@ -147,8 +150,6 @@ base::WeakPtrFactory<TimeZoneResolver::TimeZoneResolverImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(TimeZoneResolverImpl); }; namespace { @@ -159,6 +160,9 @@ explicit TZRequest(TimeZoneResolver::TimeZoneResolverImpl* resolver) : resolver_(resolver) {} + TZRequest(const TZRequest&) = delete; + TZRequest& operator=(const TZRequest&) = delete; + ~TZRequest(); // Starts request after specified delay. @@ -182,8 +186,6 @@ TimeZoneResolver::TimeZoneResolverImpl* const resolver_; base::WeakPtrFactory<TZRequest> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(TZRequest); }; TZRequest::~TZRequest() = default;
diff --git a/chromeos/timezone/timezone_resolver.h b/chromeos/timezone/timezone_resolver.h index abf4fc0..fae7693f 100644 --- a/chromeos/timezone/timezone_resolver.h +++ b/chromeos/timezone/timezone_resolver.h
@@ -41,6 +41,10 @@ class Delegate { public: Delegate(); + + Delegate(const Delegate&) = delete; + Delegate& operator=(const Delegate&) = delete; + virtual ~Delegate(); // Returns true if TimeZoneResolver should include WiFi data in request. @@ -48,9 +52,6 @@ // Returns true if TimeZoneResolver should include Cellular data in request. virtual bool ShouldSendCellularGeolocationData() = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(Delegate); }; // This is a LocalState preference to store base::Time value of the last @@ -63,6 +64,10 @@ const ApplyTimeZoneCallback& apply_timezone, const DelayNetworkCallClosure& delay_network_call, PrefService* local_state); + + TimeZoneResolver(const TimeZoneResolver&) = delete; + TimeZoneResolver& operator=(const TimeZoneResolver&) = delete; + ~TimeZoneResolver(); // Starts periodic timezone refresh. @@ -109,8 +114,6 @@ std::unique_ptr<TimeZoneResolverImpl> implementation_; base::ThreadChecker thread_checker_; - - DISALLOW_COPY_AND_ASSIGN(TimeZoneResolver); }; } // namespace chromeos
diff --git a/chromeos/tpm/install_attributes.h b/chromeos/tpm/install_attributes.h index 3c710b59..559030b0 100644 --- a/chromeos/tpm/install_attributes.h +++ b/chromeos/tpm/install_attributes.h
@@ -61,6 +61,10 @@ explicit InstallAttributes( InstallAttributesClient* install_attributes_client); + + InstallAttributes(const InstallAttributes&) = delete; + InstallAttributes& operator=(const InstallAttributes&) = delete; + ~InstallAttributes(); // Tries to read install attributes from |cache_file| to work around slow @@ -231,8 +235,6 @@ InstallAttributesClient* install_attributes_client_; base::WeakPtrFactory<InstallAttributes> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(InstallAttributes); }; } // namespace chromeos
diff --git a/chromeos/tpm/stub_install_attributes.h b/chromeos/tpm/stub_install_attributes.h index f3047a9d..c49dfe44 100644 --- a/chromeos/tpm/stub_install_attributes.h +++ b/chromeos/tpm/stub_install_attributes.h
@@ -67,6 +67,10 @@ explicit ScopedStubInstallAttributes( std::unique_ptr<StubInstallAttributes> install_attributes); + ScopedStubInstallAttributes(const ScopedStubInstallAttributes&) = delete; + ScopedStubInstallAttributes& operator=(const ScopedStubInstallAttributes&) = + delete; + ~ScopedStubInstallAttributes(); // Get the StubInstallAttributes that have been installed for modification. @@ -76,8 +80,6 @@ // The InstallAttributes that are currently installed and that this // ScopedStubInstallAttributes is responsible for shutting down. std::unique_ptr<StubInstallAttributes> install_attributes_; - - DISALLOW_COPY_AND_ASSIGN(ScopedStubInstallAttributes); }; } // namespace chromeos
diff --git a/chromeos/tpm/tpm_token_info_getter.h b/chromeos/tpm/tpm_token_info_getter.h index 8a8b3e9..34502f6 100644 --- a/chromeos/tpm/tpm_token_info_getter.h +++ b/chromeos/tpm/tpm_token_info_getter.h
@@ -44,6 +44,9 @@ CryptohomePkcs11Client* cryptohome_pkcs11_client, const scoped_refptr<base::TaskRunner>& delayed_task_runner); + TPMTokenInfoGetter(const TPMTokenInfoGetter&) = delete; + TPMTokenInfoGetter& operator=(const TPMTokenInfoGetter&) = delete; + ~TPMTokenInfoGetter(); // Starts getting TPM token info. Should be called at most once. @@ -117,8 +120,6 @@ CryptohomePkcs11Client* cryptohome_pkcs11_client_; base::WeakPtrFactory<TPMTokenInfoGetter> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(TPMTokenInfoGetter); }; } // namespace chromeos
diff --git a/chromeos/tpm/tpm_token_info_getter_unittest.cc b/chromeos/tpm/tpm_token_info_getter_unittest.cc index 305399a..77def6f 100644 --- a/chromeos/tpm/tpm_token_info_getter_unittest.cc +++ b/chromeos/tpm/tpm_token_info_getter_unittest.cc
@@ -83,6 +83,10 @@ get_tpm_token_info_not_set_count_(0), get_tpm_token_info_succeeded_(false) {} + TestCryptohomePkcs11Client(const TestCryptohomePkcs11Client&) = delete; + TestCryptohomePkcs11Client& operator=(const TestCryptohomePkcs11Client&) = + delete; + ~TestCryptohomePkcs11Client() override = default; void set_get_tpm_token_info_failure_count(int value) { @@ -170,8 +174,6 @@ chromeos::DBusMethodCallback<::user_data_auth::Pkcs11GetTpmTokenInfoReply> pending_get_tpm_token_info_callback_; absl::optional<TpmTokenInfo> tpm_token_info_; - - DISALLOW_COPY_AND_ASSIGN(TestCryptohomePkcs11Client); }; class SystemTPMTokenInfoGetterTest : public testing::Test { @@ -179,6 +181,11 @@ SystemTPMTokenInfoGetterTest() { chromeos::TpmManagerClient::Get()->InitializeFake(); } + + SystemTPMTokenInfoGetterTest(const SystemTPMTokenInfoGetterTest&) = delete; + SystemTPMTokenInfoGetterTest& operator=(const SystemTPMTokenInfoGetterTest&) = + delete; + ~SystemTPMTokenInfoGetterTest() override { chromeos::TpmManagerClient::Get()->Shutdown(); } @@ -199,8 +206,6 @@ private: base::test::SingleThreadTaskEnvironment task_environment_; - - DISALLOW_COPY_AND_ASSIGN(SystemTPMTokenInfoGetterTest); }; class UserTPMTokenInfoGetterTest : public testing::Test { @@ -209,6 +214,11 @@ : account_id_(AccountId::FromUserEmail("user@gmail.com")) { chromeos::TpmManagerClient::Get()->InitializeFake(); } + + UserTPMTokenInfoGetterTest(const UserTPMTokenInfoGetterTest&) = delete; + UserTPMTokenInfoGetterTest& operator=(const UserTPMTokenInfoGetterTest&) = + delete; + ~UserTPMTokenInfoGetterTest() override { chromeos::TpmManagerClient::Get()->Shutdown(); } @@ -230,8 +240,6 @@ private: base::test::SingleThreadTaskEnvironment task_environment_; - - DISALLOW_COPY_AND_ASSIGN(UserTPMTokenInfoGetterTest); }; TEST_F(SystemTPMTokenInfoGetterTest, BasicFlow) {
diff --git a/chromeos/ui/frame/caption_buttons/frame_back_button.h b/chromeos/ui/frame/caption_buttons/frame_back_button.h index 97c279f..8758fb5 100644 --- a/chromeos/ui/frame/caption_buttons/frame_back_button.h +++ b/chromeos/ui/frame/caption_buttons/frame_back_button.h
@@ -16,12 +16,14 @@ : public views::FrameCaptionButton { public: FrameBackButton(); + + FrameBackButton(const FrameBackButton&) = delete; + FrameBackButton& operator=(const FrameBackButton&) = delete; + ~FrameBackButton() override; private: void ButtonPressed(); - - DISALLOW_COPY_AND_ASSIGN(FrameBackButton); }; } // namespace chromeos
diff --git a/chromeos/ui/frame/caption_buttons/frame_size_button.cc b/chromeos/ui/frame/caption_buttons/frame_size_button.cc index d640686..c14b2dc 100644 --- a/chromeos/ui/frame/caption_buttons/frame_size_button.cc +++ b/chromeos/ui/frame/caption_buttons/frame_size_button.cc
@@ -78,6 +78,10 @@ : window_(window), size_button_(size_button) { window_->AddObserver(this); } + + SnappingWindowObserver(const SnappingWindowObserver&) = delete; + SnappingWindowObserver& operator=(const SnappingWindowObserver&) = delete; + ~SnappingWindowObserver() override { if (window_) { window_->RemoveObserver(this); @@ -109,8 +113,6 @@ private: aura::Window* window_; FrameSizeButton* size_button_; - - DISALLOW_COPY_AND_ASSIGN(SnappingWindowObserver); }; FrameSizeButton::FrameSizeButton(PressedCallback callback,
diff --git a/chromeos/ui/frame/caption_buttons/frame_size_button.h b/chromeos/ui/frame/caption_buttons/frame_size_button.h index 6b76277..d0b9803 100644 --- a/chromeos/ui/frame/caption_buttons/frame_size_button.h +++ b/chromeos/ui/frame/caption_buttons/frame_size_button.h
@@ -29,6 +29,9 @@ public: FrameSizeButton(PressedCallback callback, FrameSizeButtonDelegate* delegate); + FrameSizeButton(const FrameSizeButton&) = delete; + FrameSizeButton& operator=(const FrameSizeButton&) = delete; + ~FrameSizeButton() override; // views::Button overrides: @@ -99,8 +102,6 @@ // Whether the buttons adjacent to the size button snap the window left and // right. bool in_snap_mode_; - - DISALLOW_COPY_AND_ASSIGN(FrameSizeButton); }; } // namespace chromeos
diff --git a/chromeos/ui/frame/default_frame_header.h b/chromeos/ui/frame/default_frame_header.h index 5dddff55..e9f2479 100644 --- a/chromeos/ui/frame/default_frame_header.h +++ b/chromeos/ui/frame/default_frame_header.h
@@ -28,6 +28,10 @@ views::Widget* target_widget, views::View* header_view, chromeos::FrameCaptionButtonContainerView* caption_button_container); + + DefaultFrameHeader(const DefaultFrameHeader&) = delete; + DefaultFrameHeader& operator=(const DefaultFrameHeader&) = delete; + ~DefaultFrameHeader() override; SkColor active_frame_color_for_testing() { return active_frame_color_; } @@ -57,8 +61,6 @@ SkColor inactive_frame_color_ = chromeos::kDefaultFrameColor; int width_in_pixels_ = -1; - - DISALLOW_COPY_AND_ASSIGN(DefaultFrameHeader); }; } // namespace chromeos
diff --git a/chromeos/ui/frame/immersive/immersive_focus_watcher.cc b/chromeos/ui/frame/immersive/immersive_focus_watcher.cc index 21a7494..a3bf384 100644 --- a/chromeos/ui/frame/immersive/immersive_focus_watcher.cc +++ b/chromeos/ui/frame/immersive/immersive_focus_watcher.cc
@@ -67,6 +67,10 @@ class ImmersiveFocusWatcher::BubbleObserver : public aura::WindowObserver { public: explicit BubbleObserver(ImmersiveFullscreenController* controller); + + BubbleObserver(const BubbleObserver&) = delete; + BubbleObserver& operator=(const BubbleObserver&) = delete; + ~BubbleObserver() override; // Start / stop observing changes to |bubble|'s visibility. @@ -88,8 +92,6 @@ // Lock which keeps the top-of-window views revealed based on whether any of // |bubbles_| is visible. std::unique_ptr<ImmersiveRevealedLock> revealed_lock_; - - DISALLOW_COPY_AND_ASSIGN(BubbleObserver); }; ImmersiveFocusWatcher::BubbleObserver::BubbleObserver(
diff --git a/chromeos/ui/frame/immersive/immersive_focus_watcher.h b/chromeos/ui/frame/immersive/immersive_focus_watcher.h index c4b0f11..9330b94 100644 --- a/chromeos/ui/frame/immersive/immersive_focus_watcher.h +++ b/chromeos/ui/frame/immersive/immersive_focus_watcher.h
@@ -24,6 +24,10 @@ public ::wm::ActivationChangeObserver { public: explicit ImmersiveFocusWatcher(ImmersiveFullscreenController* controller); + + ImmersiveFocusWatcher(const ImmersiveFocusWatcher&) = delete; + ImmersiveFocusWatcher& operator=(const ImmersiveFocusWatcher&) = delete; + ~ImmersiveFocusWatcher() override; // Forces updating the status of the lock. That is, this determines whether @@ -72,8 +76,6 @@ // Manages bubbles which are anchored to a child of // |ImmersiveFullscreenController::top_container_|. std::unique_ptr<BubbleObserver> bubble_observer_; - - DISALLOW_COPY_AND_ASSIGN(ImmersiveFocusWatcher); }; } // namespace chromeos
diff --git a/chromeos/ui/frame/immersive/immersive_fullscreen_controller.cc b/chromeos/ui/frame/immersive/immersive_fullscreen_controller.cc index f99732c..8bbcc2d6 100644 --- a/chromeos/ui/frame/immersive/immersive_fullscreen_controller.cc +++ b/chromeos/ui/frame/immersive/immersive_fullscreen_controller.cc
@@ -45,14 +45,15 @@ class ImmersiveWindowTargeter : public aura::WindowTargeter { public: ImmersiveWindowTargeter() = default; + + ImmersiveWindowTargeter(const ImmersiveWindowTargeter&) = delete; + ImmersiveWindowTargeter& operator=(const ImmersiveWindowTargeter&) = delete; + ~ImmersiveWindowTargeter() override = default; bool ShouldUseExtendedBounds(const aura::Window* target) const override { return target->parent() == window(); } - - private: - DISALLOW_COPY_AND_ASSIGN(ImmersiveWindowTargeter); }; // The delay in milliseconds between the mouse stopping at the top edge of the
diff --git a/chromeos/ui/frame/immersive/immersive_fullscreen_controller.h b/chromeos/ui/frame/immersive/immersive_fullscreen_controller.h index 10ff172..671d9c3 100644 --- a/chromeos/ui/frame/immersive/immersive_fullscreen_controller.h +++ b/chromeos/ui/frame/immersive/immersive_fullscreen_controller.h
@@ -72,6 +72,11 @@ static const int kMouseRevealBoundsHeight; ImmersiveFullscreenController(); + + ImmersiveFullscreenController(const ImmersiveFullscreenController&) = delete; + ImmersiveFullscreenController& operator=( + const ImmersiveFullscreenController&) = delete; + ~ImmersiveFullscreenController() override; // Initializes the controller. Must be called prior to enabling immersive @@ -301,8 +306,6 @@ static bool value_for_animations_disabled_for_test_; base::WeakPtrFactory<ImmersiveFullscreenController> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ImmersiveFullscreenController); }; } // namespace chromeos
diff --git a/chromeos/ui/frame/immersive/immersive_fullscreen_controller_test_api.h b/chromeos/ui/frame/immersive/immersive_fullscreen_controller_test_api.h index 18fa4ba..3735628d 100644 --- a/chromeos/ui/frame/immersive/immersive_fullscreen_controller_test_api.h +++ b/chromeos/ui/frame/immersive/immersive_fullscreen_controller_test_api.h
@@ -17,6 +17,12 @@ public: explicit ImmersiveFullscreenControllerTestApi( ImmersiveFullscreenController* controller); + + ImmersiveFullscreenControllerTestApi( + const ImmersiveFullscreenControllerTestApi&) = delete; + ImmersiveFullscreenControllerTestApi& operator=( + const ImmersiveFullscreenControllerTestApi&) = delete; + ~ImmersiveFullscreenControllerTestApi(); // Disables animations for any ImmersiveFullscreenControllers created while @@ -24,10 +30,11 @@ class COMPONENT_EXPORT(CHROMEOS_UI_FRAME) GlobalAnimationDisabler { public: GlobalAnimationDisabler(); - ~GlobalAnimationDisabler(); - private: - DISALLOW_COPY_AND_ASSIGN(GlobalAnimationDisabler); + GlobalAnimationDisabler(const GlobalAnimationDisabler&) = delete; + GlobalAnimationDisabler& operator=(const GlobalAnimationDisabler&) = delete; + + ~GlobalAnimationDisabler(); }; // Disables animations and moves the mouse so that it is not over the @@ -38,8 +45,6 @@ private: ImmersiveFullscreenController* immersive_fullscreen_controller_; - - DISALLOW_COPY_AND_ASSIGN(ImmersiveFullscreenControllerTestApi); }; } // namespace chromeos
diff --git a/components/arc/BUILD.gn b/components/arc/BUILD.gn index 0fda593..74b5ebe6 100644 --- a/components/arc/BUILD.gn +++ b/components/arc/BUILD.gn
@@ -440,6 +440,8 @@ "test/fake_storage_manager_instance.h", "test/fake_timer_instance.cc", "test/fake_timer_instance.h", + "test/fake_tracing_instance.cc", + "test/fake_tracing_instance.h", "test/fake_wake_lock_instance.cc", "test/fake_wake_lock_instance.h", "test/fake_wallpaper_instance.cc",
diff --git a/components/arc/ime/arc_ime_service.cc b/components/arc/ime/arc_ime_service.cc index e838ffc..fada6b1 100644 --- a/components/arc/ime/arc_ime_service.cc +++ b/components/arc/ime/arc_ime_service.cc
@@ -649,10 +649,9 @@ base::UmaHistogramEnumeration("InputMethod.Assistive.Autocorrect.Count", TextInputClient::SubClass::kArcImeService); - auto* input_method_manager = - chromeos::input_method::InputMethodManager::Get(); + auto* input_method_manager = ash::input_method::InputMethodManager::Get(); if (input_method_manager && - chromeos::extension_ime_util::IsExperimentalMultilingual( + ash::extension_ime_util::IsExperimentalMultilingual( input_method_manager->GetActiveIMEState() ->GetCurrentInputMethod() .id())) {
diff --git a/components/arc/test/fake_tracing_instance.cc b/components/arc/test/fake_tracing_instance.cc new file mode 100644 index 0000000..0b214ba --- /dev/null +++ b/components/arc/test/fake_tracing_instance.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 "components/arc/test/fake_tracing_instance.h" + +namespace arc { + +FakeTracingInstance::FakeTracingInstance() = default; + +FakeTracingInstance::~FakeTracingInstance() = default; + +void FakeTracingInstance::QueryAvailableCategories( + QueryAvailableCategoriesCallback callback) { + std::move(callback).Run( + {"gfx", "input", "view", "webview", "wm", "am", "sm", + "audio", "video", "camera", "hal", "app", "res", "dalvik", + "rs", "bionic", "power", "pm", "ss", "database", "network", + "adb", "vibrator", "aidl", "nnapi", "rro"}); +} + +void FakeTracingInstance::StartTracing( + const std::vector<std::string>& categories, + mojo::ScopedHandle socket, + StartTracingCallback callback) { + ++start_count_; + start_categories_ = categories; + socket_ = std::move(socket); + std::move(callback).Run(true /* success */); +} + +void FakeTracingInstance::StopTracing(StopTracingCallback callback) { + ++stop_count_; + std::move(callback).Run(true /* success */); +} + +} // namespace arc
diff --git a/components/arc/test/fake_tracing_instance.h b/components/arc/test/fake_tracing_instance.h new file mode 100644 index 0000000..d3daa00 --- /dev/null +++ b/components/arc/test/fake_tracing_instance.h
@@ -0,0 +1,48 @@ +// 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_ARC_TEST_FAKE_TRACING_INSTANCE_H_ +#define COMPONENTS_ARC_TEST_FAKE_TRACING_INSTANCE_H_ + +#include <string> +#include <vector> + +#include "components/arc/mojom/tracing.mojom.h" +#include "mojo/public/cpp/system/handle.h" + +namespace arc { + +class FakeTracingInstance : public mojom::TracingInstance { + public: + FakeTracingInstance(); + ~FakeTracingInstance() override; + + FakeTracingInstance(const FakeTracingInstance&) = delete; + FakeTracingInstance& operator=(const FakeTracingInstance&) = delete; + + // mojom::TracingInstance: + void QueryAvailableCategories( + QueryAvailableCategoriesCallback callback) override; + void StartTracing(const std::vector<std::string>& categories, + mojo::ScopedHandle socket, + StartTracingCallback callback) override; + void StopTracing(StopTracingCallback callback) override; + + int start_count() const { return start_count_; } + int stop_count() const { return stop_count_; } + mojo::Handle socket() const { return socket_.get(); } + const std::vector<std::string>& start_categories() { + return start_categories_; + } + + private: + int start_count_ = 0; + std::vector<std::string> start_categories_; + mojo::ScopedHandle socket_; + int stop_count_ = 0; +}; + +} // namespace arc + +#endif // COMPONENTS_ARC_TEST_FAKE_TRACING_INSTANCE_H_
diff --git a/components/certificate_transparency/data/log_list.json b/components/certificate_transparency/data/log_list.json index 9d74a46..1e946aa 100644 --- a/components/certificate_transparency/data/log_list.json +++ b/components/certificate_transparency/data/log_list.json
@@ -1,6 +1,6 @@ { - "version": "3.36", - "log_list_timestamp": "2021-09-21T01:35:48Z", + "version": "3.37", + "log_list_timestamp": "2021-09-22T01:34:14Z", "operators": [ { "name": "Google",
diff --git a/components/content_settings/core/browser/content_settings_default_provider.cc b/components/content_settings/core/browser/content_settings_default_provider.cc index 2af9a96..a37c703 100644 --- a/components/content_settings/core/browser/content_settings_default_provider.cc +++ b/components/content_settings/core/browser/content_settings_default_provider.cc
@@ -210,6 +210,14 @@ ContentSettingsType::IDLE_DETECTION))), CONTENT_SETTING_NUM_SETTINGS); #endif + +#if defined(OS_ANDROID) + UMA_HISTOGRAM_ENUMERATION("ContentSettings.DefaultAutoDarkWebContentSetting", + IntToContentSetting(prefs_->GetInteger(GetPrefName( + ContentSettingsType::AUTO_DARK_WEB_CONTENT))), + CONTENT_SETTING_NUM_SETTINGS); +#endif + pref_change_registrar_.Init(prefs_); PrefChangeRegistrar::NamedChangeCallback callback = base::BindRepeating( &DefaultProvider::OnPreferenceChanged, base::Unretained(this));
diff --git a/components/cronet/ios/cronet_consumer/cronet_consumer_app_delegate.mm b/components/cronet/ios/cronet_consumer/cronet_consumer_app_delegate.mm index 8d886be..94002fce 100644 --- a/components/cronet/ios/cronet_consumer/cronet_consumer_app_delegate.mm +++ b/components/cronet/ios/cronet_consumer/cronet_consumer_app_delegate.mm
@@ -31,22 +31,7 @@ [Cronet start]; [Cronet startNetLogToFile:[self currentNetLogFileName] logBytes:NO]; - NSURLSessionConfiguration* config = - [NSURLSessionConfiguration ephemeralSessionConfiguration]; - [Cronet installIntoSessionConfiguration:config]; - - // Just for fun, don't route chromium.org requests through Cronet. - // - // |chromiumPrefix| is declared outside the scope of the request block so that - // the block references something outside of its own scope, and cannot be - // declared as a global block. This makes sure the block is - // an __NSStackBlock__, and verifies the fix for http://crbug.com/436175 . - NSString* chromiumPrefix = @"www.chromium.org"; - [Cronet setRequestFilterBlock:^BOOL(NSURLRequest* request) { - BOOL isChromiumSite = [[[request URL] host] hasPrefix:chromiumPrefix]; - return !isChromiumSite; - }]; - + [Cronet registerHttpProtocolHandler]; self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; self.viewController = [[CronetConsumerViewController alloc] initWithNibName:nil bundle:nil];
diff --git a/components/guest_view/renderer/DEPS b/components/guest_view/renderer/DEPS index cd21814..79bb930 100644 --- a/components/guest_view/renderer/DEPS +++ b/components/guest_view/renderer/DEPS
@@ -4,5 +4,5 @@ "+ipc", "+third_party/blink/public", "+ui/gfx/geometry", - "+v8/include/v8.h", + "+v8/include", ]
diff --git a/components/guest_view/renderer/guest_view_container.cc b/components/guest_view/renderer/guest_view_container.cc index 6553b7c..f39a6435 100644 --- a/components/guest_view/renderer/guest_view_container.cc +++ b/components/guest_view/renderer/guest_view_container.cc
@@ -16,6 +16,10 @@ #include "content/public/renderer/render_frame_observer.h" #include "content/public/renderer/render_view.h" #include "ui/gfx/geometry/size.h" +#include "v8/include/v8-context.h" +#include "v8/include/v8-function.h" +#include "v8/include/v8-microtask-queue.h" +#include "v8/include/v8-primitive.h" namespace {
diff --git a/components/guest_view/renderer/guest_view_container.h b/components/guest_view/renderer/guest_view_container.h index d934bb8..14932f2f 100644 --- a/components/guest_view/renderer/guest_view_container.h +++ b/components/guest_view/renderer/guest_view_container.h
@@ -11,7 +11,8 @@ #include "base/macros.h" #include "base/memory/weak_ptr.h" #include "ipc/ipc_message.h" -#include "v8/include/v8.h" +#include "v8/include/v8-forward.h" +#include "v8/include/v8-persistent-handle.h" namespace gfx { class Size;
diff --git a/components/guest_view/renderer/guest_view_request.cc b/components/guest_view/renderer/guest_view_request.cc index 2d7030e..118e070 100644 --- a/components/guest_view/renderer/guest_view_request.cc +++ b/components/guest_view/renderer/guest_view_request.cc
@@ -14,6 +14,9 @@ #include "third_party/blink/public/web/web_local_frame.h" #include "third_party/blink/public/web/web_remote_frame.h" #include "third_party/blink/public/web/web_view.h" +#include "v8/include/v8-context.h" +#include "v8/include/v8-function.h" +#include "v8/include/v8-microtask-queue.h" namespace guest_view {
diff --git a/components/guest_view/renderer/guest_view_request.h b/components/guest_view/renderer/guest_view_request.h index cbdf59ce..125bbea4 100644 --- a/components/guest_view/renderer/guest_view_request.h +++ b/components/guest_view/renderer/guest_view_request.h
@@ -9,7 +9,8 @@ #include "base/macros.h" #include "ipc/ipc_message.h" -#include "v8/include/v8.h" +#include "v8/include/v8-forward.h" +#include "v8/include/v8-persistent-handle.h" 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 794cc4d..7a719a3 100644 --- a/components/guest_view/renderer/iframe_guest_view_request.h +++ b/components/guest_view/renderer/iframe_guest_view_request.h
@@ -11,7 +11,7 @@ #include "base/values.h" #include "components/guest_view/renderer/guest_view_request.h" #include "ipc/ipc_message.h" -#include "v8/include/v8.h" +#include "v8/include/v8-forward.h" namespace guest_view { class GuestViewContainer;
diff --git a/components/metrics/file_metrics_provider.cc b/components/metrics/file_metrics_provider.cc index 26727fe..a96a6d4 100644 --- a/components/metrics/file_metrics_provider.cc +++ b/components/metrics/file_metrics_provider.cc
@@ -578,13 +578,6 @@ if (!histogram) break; - // Keep track of which histograms are getting merged from other sources. - // TODO(crbug.com/1176977): Consider removing this after bug is fixed. - base::UmaHistogramSparse( - read_only ? "UMA.FileMetricsProvider.MergeHistogram.ReadOnly" - : "UMA.FileMetricsProvider.MergeHistogram.NotReadOnly", - static_cast<base::HistogramBase::Sample>(histogram->name_hash())); - if (read_only) { source->allocator->MergeHistogramFinalDeltaToStatisticsRecorder( histogram.get());
diff --git a/components/metrics/metrics_service.cc b/components/metrics/metrics_service.cc index 14abc48..d4f6714 100644 --- a/components/metrics/metrics_service.cc +++ b/components/metrics/metrics_service.cc
@@ -228,8 +228,7 @@ } void MetricsService::InitializeMetricsRecordingState() { - // TODO(crbug.com/1176977): Downgrade to a DCHECK once bug is fixed. - CHECK_EQ(CONSTRUCTED, state_); + DCHECK_EQ(CONSTRUCTED, state_); // The FieldTrialsProvider should be registered last. This ensures that // studies whose features are checked when providers add their information to @@ -568,22 +567,8 @@ // Update session ID. ++session_id_; local_state_->SetInteger(prefs::kMetricsSessionID, session_id_); - // Log the session id to diagnose crbug.com/1176977. - // Mod the value with 1000 to limit the number of unique values reported. - base::UmaHistogramSparse("Stability.Experimental.SessionId", - session_id_ % 1000); - - // Log a random number to diagnose crbug.com/1176977. - base::UmaHistogramSparse("Stability.Experimental.RandInt", - base::RandInt(0, 999)); - - // Log the process id to diagnose crbug.com/1176977. - // Mod the value with 1000 to limit the number of unique values reported. - base::UmaHistogramSparse("Stability.Experimental.ProcessId", - base::GetCurrentProcId() % 1000); // Notify stability metrics providers about the launch. - UMA_HISTOGRAM_BOOLEAN("UMA.MetricsService.Initialize", true); provider.LogLaunch(); provider.CheckLastSessionEndCompleted(); @@ -642,8 +627,7 @@ log_manager_.BeginLoggingWithLog(CreateLog(MetricsLog::ONGOING_LOG)); delegating_provider_.OnDidCreateMetricsLog(); - // TODO(crbug.com/1176977): Downgrade to a DCHECK once bug is fixed. - CHECK_NE(CONSTRUCTED, state_); + DCHECK_NE(CONSTRUCTED, state_); if (state_ == INITIALIZED) { // We only need to schedule that run once. state_ = INIT_TASK_SCHEDULED;
diff --git a/components/metrics/persistent_histograms.cc b/components/metrics/persistent_histograms.cc index eb4d61d..2cafa80 100644 --- a/components/metrics/persistent_histograms.cc +++ b/components/metrics/persistent_histograms.cc
@@ -21,10 +21,6 @@ #include "components/metrics/persistent_system_profile.h" #include "components/variations/variations_associated_data.h" -#if defined(OS_WIN) -#include <windows.h> -#endif - namespace { // Creating a "spare" file for persistent metrics involves a lot of I/O and @@ -126,18 +122,12 @@ // "active" filename is supposed to be unique so this shouldn't happen. result = kMappedFileExists; } else { -#if defined(OS_WIN) - // Disallow multiple writers on Windows. Needed to ensure multiple instances - // of Chrome aren't writing to the same file, which could happen in some - // rare circumstances observed in the wild (e.g. on FAT FS where the file - // name ends up not being unique due to truncation and two processes racing - // on base::PathExists(active_file) above). - // TODO(crbug.com/1176977): If this resolves the bug, consider making - // consistent on all platforms. - bool exclusive_write = true; -#else - bool exclusive_write = false; -#endif + // Disallow multiple writers (Windows only). Needed to ensure multiple + // instances of Chrome aren't writing to the same file, which could happen + // in some rare circumstances observed in the wild (e.g. on FAT FS where the + // file name ends up not being unique due to truncation and two processes + // racing on base::PathExists(active_file) above). + const bool exclusive_write = true; // Move any spare file into the active position. base::ReplaceFile(spare_file, active_file, nullptr); // Create global allocator using the |active_file|. @@ -146,28 +136,6 @@ } else if (base::GlobalHistogramAllocator::CreateWithFile( active_file, kAllocSize, kAllocId, kBrowserMetricsName, exclusive_write)) { - // TODO(crbug.com/1176977): Remove this instrumentation when bug is fixed. - // Log the drive type on Windows. -#if defined(OS_WIN) - std::vector<std::wstring> path_components; - base::MakeAbsoluteFilePath(active_file).GetComponents(&path_components); - // Get the drive path with a backslash at the end as required by the API. - // https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getdrivetypew - path_components[0] += L"\\"; - auto drive_type = GetDriveTypeW(path_components[0].c_str()); - // Note: 6 is the max enum per the docs. - base::UmaHistogramExactLinear("UMA.PersistentHistograms.DriveType", - drive_type, 7); -#endif // defined(OS_WIN) - // We don't expect there to be any histograms in the file just opened. But - // if there are, log their hashes here to diagnose crbug.com/1176977. - base::PersistentHistogramAllocator::Iterator it( - base::GlobalHistogramAllocator::Get()); - while (std::unique_ptr<base::HistogramBase> histogram = it.GetNext()) { - base::UmaHistogramSparse( - "UMA.PersistentHistograms.HistogramsInStartupFile", - static_cast<base::HistogramBase::Sample>(histogram->name_hash())); - } result = kMappedFileSuccess; } else { result = kMappedFileFailed;
diff --git a/components/metrics/stability_metrics_helper.cc b/components/metrics/stability_metrics_helper.cc index c19e0c6..7e96920b 100644 --- a/components/metrics/stability_metrics_helper.cc +++ b/components/metrics/stability_metrics_helper.cc
@@ -339,16 +339,6 @@ StabilityEventType stability_event_type) { UMA_STABILITY_HISTOGRAM_ENUMERATION("Stability.Counts2", stability_event_type); - // TODO(crbug.com/1176977): Remove temporary debugging histograms below. - // Like UmaHistogramSparse(), but with kUmaStabilityHistogramFlag. - base::SparseHistogram::FactoryGet( - "Stability.Experimental.Counts2", - base::HistogramBase::kUmaStabilityHistogramFlag) - ->Add(static_cast<int>(stability_event_type)); - if (stability_event_type == StabilityEventType::kBrowserCrash) { - UMA_STABILITY_HISTOGRAM_BOOLEAN("Stability.Experimental.BrowserCrash", - true); - } } } // namespace metrics
diff --git a/components/net_log/resources/net_export.html b/components/net_log/resources/net_export.html index f2f0b98c1b..364f3801 100644 --- a/components/net_log/resources/net_export.html +++ b/components/net_log/resources/net_export.html
@@ -1,7 +1,8 @@ -<!doctype html> +<!doctype html> <html> <head> <meta charset="utf-8"> +<meta name="color-scheme" content="light dark"> <if expr="is_android"> <meta name="viewport" content="width=device-width"> </if>
diff --git a/components/performance_manager/performance_manager_tab_helper.cc b/components/performance_manager/performance_manager_tab_helper.cc index c9983d79..fb1c847e 100644 --- a/components/performance_manager/performance_manager_tab_helper.cc +++ b/components/performance_manager/performance_manager_tab_helper.cc
@@ -82,9 +82,13 @@ // only a single frame, and it is not yet created. We sanity check that here. #if DCHECK_IS_ON() DCHECK(!web_contents->GetMainFrame()->IsRenderFrameCreated()); - std::vector<content::RenderFrameHost*> frames = web_contents->GetAllFrames(); - DCHECK_EQ(1u, frames.size()); - DCHECK_EQ(web_contents->GetMainFrame(), frames[0]); + size_t frame_count = 0; + web_contents->ForEachRenderFrameHost(base::BindRepeating( + [](size_t* frame_count, content::RenderFrameHost* render_frame_host) { + (*frame_count)++; + }, + &frame_count)); + DCHECK_EQ(1u, frame_count); #endif // Create the page node.
diff --git a/components/permissions/android/java/src/org/chromium/components/permissions/DeviceItemRow.java b/components/permissions/android/java/src/org/chromium/components/permissions/DeviceItemRow.java index f2cf0ab..cba6a28 100644 --- a/components/permissions/android/java/src/org/chromium/components/permissions/DeviceItemRow.java +++ b/components/permissions/android/java/src/org/chromium/components/permissions/DeviceItemRow.java
@@ -50,19 +50,22 @@ if (!TextUtils.equals(mIconDescription, iconDescription)) return false; if (icon != null && mIcon != null) { - Bitmap myBitmap = Bitmap.createBitmap( - icon.getIntrinsicWidth(), icon.getIntrinsicHeight(), Bitmap.Config.ARGB_8888); + Drawable myIcon = mIcon.getConstantState().newDrawable(); + Drawable theirIcon = icon.getConstantState().newDrawable(); + + Bitmap myBitmap = Bitmap.createBitmap(myIcon.getIntrinsicWidth(), + myIcon.getIntrinsicHeight(), Bitmap.Config.ARGB_8888); Canvas myCanvas = new Canvas(); myCanvas.setBitmap(myBitmap); - mIcon.setBounds(0, 0, myCanvas.getWidth(), myCanvas.getHeight()); - mIcon.draw(myCanvas); + myIcon.setBounds(0, 0, myCanvas.getWidth(), myCanvas.getHeight()); + myIcon.draw(myCanvas); - Bitmap theirBitmap = Bitmap.createBitmap( - icon.getIntrinsicWidth(), icon.getIntrinsicHeight(), Bitmap.Config.ARGB_8888); + Bitmap theirBitmap = Bitmap.createBitmap(theirIcon.getIntrinsicWidth(), + theirIcon.getIntrinsicHeight(), Bitmap.Config.ARGB_8888); Canvas theirCanvas = new Canvas(); theirCanvas.setBitmap(theirBitmap); - icon.setBounds(0, 0, theirCanvas.getWidth(), theirCanvas.getHeight()); - icon.draw(theirCanvas); + theirIcon.setBounds(0, 0, theirCanvas.getWidth(), theirCanvas.getHeight()); + theirIcon.draw(theirCanvas); return myBitmap.sameAs(theirBitmap); }
diff --git a/components/policy/resources/policy_templates.json b/components/policy/resources/policy_templates.json index 62b8817..93057c0 100644 --- a/components/policy/resources/policy_templates.json +++ b/components/policy/resources/policy_templates.json
@@ -27764,6 +27764,64 @@ If this policy is disabled or unset, Chrome Apps may not be allowed to run, depending on the status of the deprecation rollout. In either case, Chrome Apps that are force installed by policy will continue to be allowed.''', }, + { + 'name': 'FullRestoreEnabled', + 'owners': ['nancylingwang@chromium.org', 'sammiequon@chromium.org'], + 'type': 'main', + 'schema': { 'type': 'boolean' }, + 'supported_on': ['chrome_os:96-'], + 'features': { + 'dynamic_refresh': False, + 'per_profile': True, + }, + 'items': [ + { + 'value': True, + 'caption': 'Enable the full restore feature.', + }, + { + 'value': False, + 'caption': 'Disable the full restore feature.', + }, + ], + 'default': True, + 'example_value': True, + 'id': 897, + 'caption': '''Enable the full restore feature''', + 'tags': [], + 'desc': '''Setting the policy to enable the full restore feature. + If this policy is true, apps and app windows will be restored or not restored after a crash or reboot based on the restore app setting. + If this policy is false, only browser windows are automatcially launched.''' + }, + { + 'name': 'GhostWindowEnabled', + 'owners': ['nancylingwang@chromium.org', 'sstan@chromium.org'], + 'type': 'main', + 'schema': { 'type': 'boolean' }, + 'supported_on': ['chrome_os:96-'], + 'features': { + 'dynamic_refresh': False, + 'per_profile': True, + }, + 'items': [ + { + 'value': True, + 'caption': 'Enable the ghost window feature.', + }, + { + 'value': False, + 'caption': 'Disable the ghost window feature.', + }, + ], + 'default': True, + 'example_value': True, + 'id': 898, + 'caption': '''Enable the ghost window feature''', + 'tags': [], + 'desc': '''Setting the policy to enable the ghost window feature. + If this policy is true, ARC ghost windows will be created before ARC boots after a crash or reboot based on the restore app setting. + If this policy is false, there is no ghost window created before ARC boots. Arc apps are restored after ARC boots''' + }, ], 'messages': { # Messages that are not associated to any policies. @@ -28723,6 +28781,6 @@ 'placeholders': [], 'deleted_policy_ids': [114, 115, 204, 205, 206, 412, 476, 544, 546, 562, 569, 578, 583, 585, 586, 587, 588, 589, 590, 591, 600, 668, 669, 872], 'deleted_atomic_policy_group_ids': [19], - 'highest_id_currently_used': 896, + 'highest_id_currently_used': 898, 'highest_atomic_group_id_currently_used': 41 }
diff --git a/components/ukm/test_ukm_recorder.cc b/components/ukm/test_ukm_recorder.cc index cbacd48..5fcbcf6 100644 --- a/components/ukm/test_ukm_recorder.cc +++ b/components/ukm/test_ukm_recorder.cc
@@ -163,8 +163,9 @@ } std::vector<TestUkmRecorder::HumanReadableUkmMetrics> -TestUkmRecorder::GetMetrics(std::string entry_name, - const std::vector<std::string>& metric_names) { +TestUkmRecorder::GetMetrics( + std::string entry_name, + const std::vector<std::string>& metric_names) const { std::vector<TestUkmRecorder::HumanReadableUkmMetrics> result; for (const auto& entry : GetEntries(entry_name, metric_names)) { result.push_back(entry.metrics); @@ -174,7 +175,7 @@ std::vector<TestUkmRecorder::HumanReadableUkmEntry> TestUkmRecorder::GetEntries( std::string entry_name, - const std::vector<std::string>& metric_names) { + const std::vector<std::string>& metric_names) const { std::vector<TestUkmRecorder::HumanReadableUkmEntry> results; for (const ukm::mojom::UkmEntry* entry : GetEntriesByName(entry_name)) { HumanReadableUkmEntry result;
diff --git a/components/ukm/test_ukm_recorder.h b/components/ukm/test_ukm_recorder.h index 32da49e..b04054b 100644 --- a/components/ukm/test_ukm_recorder.h +++ b/components/ukm/test_ukm_recorder.h
@@ -108,13 +108,13 @@ // human-readable form, allowing to write clearer test expectations. std::vector<HumanReadableUkmMetrics> GetMetrics( std::string entry_name, - const std::vector<std::string>& metric_names); + const std::vector<std::string>& metric_names) const; // A test helper returning all entries for a given name in a human-readable // form, allowing to write clearer test expectations. std::vector<HumanReadableUkmEntry> GetEntries( std::string entry_name, - const std::vector<std::string>& metric_names); + const std::vector<std::string>& metric_names) const; private: uint64_t entry_hash_to_wait_for_ = 0;
diff --git a/content/browser/accessibility/browser_accessibility_mac.h b/content/browser/accessibility/browser_accessibility_mac.h index 6e04d64c..c8add388 100644 --- a/content/browser/accessibility/browser_accessibility_mac.h +++ b/content/browser/accessibility/browser_accessibility_mac.h
@@ -10,14 +10,6 @@ #include "content/common/content_export.h" @class BrowserAccessibilityCocoa; -@class AXPlatformNodeCocoa; - -namespace base { - -template <typename NST> -class scoped_nsobject; - -} // namespace base namespace ui { @@ -51,9 +43,7 @@ BrowserAccessibility* PlatformGetPreviousSibling() const override; // The BrowserAccessibilityCocoa associated with us. - BrowserAccessibilityCocoa* native_view() const { - return browser_accessibility_cocoa_; - } + BrowserAccessibilityCocoa* GetNativeWrapper() const; // Refresh the native object associated with this. // Useful for re-announcing the current focus when properties have changed. @@ -69,14 +59,7 @@ void CreatePlatformNodes(); // Creates a new cocoa node. Returns an old node in the swap_node. - void CreatePlatformCocoaNode( - base::scoped_nsobject<AXPlatformNodeCocoa>& swap_node); - - // Allows access to the BrowserAccessibilityCocoa which wraps this. - // BrowserAccessibility. - // We own this object until our manager calls ReleaseReference; - // thereafter, the cocoa object owns us. - BrowserAccessibilityCocoa* browser_accessibility_cocoa_; + BrowserAccessibilityCocoa* CreateNativeWrapper(); // Manager of the native cocoa node. We own this object. ui::AXPlatformNodeMac* platform_node_;
diff --git a/content/browser/accessibility/browser_accessibility_mac.mm b/content/browser/accessibility/browser_accessibility_mac.mm index 06eafea7..107589ac 100644 --- a/content/browser/accessibility/browser_accessibility_mac.mm +++ b/content/browser/accessibility/browser_accessibility_mac.mm
@@ -18,8 +18,7 @@ return new BrowserAccessibilityMac(); } -BrowserAccessibilityMac::BrowserAccessibilityMac() - : browser_accessibility_cocoa_(nullptr), platform_node_(nullptr) {} +BrowserAccessibilityMac::BrowserAccessibilityMac() : platform_node_(nullptr) {} BrowserAccessibilityMac::~BrowserAccessibilityMac() { if (platform_node_) { @@ -27,11 +26,17 @@ } } +BrowserAccessibilityCocoa* BrowserAccessibilityMac::GetNativeWrapper() const { + return platform_node_ ? static_cast<BrowserAccessibilityCocoa*>( + platform_node_->GetNativeWrapper()) + : nullptr; +} + void BrowserAccessibilityMac::OnDataChanged() { BrowserAccessibility::OnDataChanged(); - if (browser_accessibility_cocoa_) { - [browser_accessibility_cocoa_ childrenChanged]; + if (GetNativeWrapper()) { + [GetNativeWrapper() childrenChanged]; return; } @@ -41,17 +46,21 @@ // Replace a native object and refocus if it had focus. // This will force VoiceOver to re-announce it, and refresh Braille output. void BrowserAccessibilityMac::ReplaceNativeObject() { + // We need to keep the old native wrapper alive until we set up the new one + // because we need to retrieve some information from the old wrapper in order + // to add it to the new one, e.g. its list of children. + base::scoped_nsobject<BrowserAccessibilityCocoa> old_native_obj( + GetNativeWrapper()); + // We should never enter here when no native object is created, but // keep a null check just in case. - DCHECK(browser_accessibility_cocoa_); - if (!browser_accessibility_cocoa_) { + if (!old_native_obj) { + NOTREACHED() << "No object to replace."; return; } - // The old native wrapper kungu death grip: keep the object alive until we - // set up everything for the new native wrapper. - base::scoped_nsobject<AXPlatformNodeCocoa> old_native_obj; - CreatePlatformCocoaNode(old_native_obj); + // Recreate native object. + BrowserAccessibilityCocoa* new_native_obj = CreateNativeWrapper(); // Replace child in parent. BrowserAccessibility* parent = PlatformGetParent(); @@ -62,8 +71,8 @@ NSArray* old_children = [ToBrowserAccessibilityCocoa(parent) children]; for (uint i = 0; i < [old_children count]; ++i) { BrowserAccessibilityCocoa* child = [old_children objectAtIndex:i]; - if (child == old_native_obj.get()) - [new_children addObject:browser_accessibility_cocoa_]; + if (child == old_native_obj) + [new_children addObject:new_native_obj]; else [new_children addObject:child]; } @@ -72,8 +81,7 @@ // If focused, fire a focus notification on the new native object. if (manager_->GetFocus() == this) { NSAccessibilityPostNotification( - browser_accessibility_cocoa_, - NSAccessibilityFocusedUIElementChangedNotification); + new_native_obj, NSAccessibilityFocusedUIElementChangedNotification); } // Postprone the old native wrapper destruction. It will be destroyed after @@ -85,7 +93,7 @@ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( FROM_HERE, base::BindOnce( - [](base::scoped_nsobject<AXPlatformNodeCocoa> destroyed) { + [](base::scoped_nsobject<BrowserAccessibilityCocoa> destroyed) { if (destroyed && [destroyed instanceActive]) { // Follow destruction pattern from NativeReleaseReference(). [destroyed detach]; @@ -174,38 +182,35 @@ void BrowserAccessibilityMac::CreatePlatformNodes() { DCHECK(!platform_node_); - DCHECK(!browser_accessibility_cocoa_); platform_node_ = static_cast<ui::AXPlatformNodeMac*>(ui::AXPlatformNode::Create(this)); - base::scoped_nsobject<AXPlatformNodeCocoa> unused; - CreatePlatformCocoaNode(unused); + CreateNativeWrapper(); } -void BrowserAccessibilityMac::CreatePlatformCocoaNode( - base::scoped_nsobject<AXPlatformNodeCocoa>& swap_node) { +BrowserAccessibilityCocoa* BrowserAccessibilityMac::CreateNativeWrapper() { DCHECK(platform_node_); - browser_accessibility_cocoa_ = + BrowserAccessibilityCocoa* node_cocoa = [[BrowserAccessibilityCocoa alloc] initWithObject:this withPlatformNode:platform_node_]; - // platform_node_ take ownership of the Cocoa object here. - swap_node.reset(browser_accessibility_cocoa_); - platform_node_->SwapNodeCocoa(swap_node); + // `AXPlatformNodeMac` takes ownership of the Cocoa object here. + platform_node_->SetNativeWrapper(node_cocoa); + return node_cocoa; } const BrowserAccessibilityCocoa* ToBrowserAccessibilityCocoa( const BrowserAccessibility* obj) { DCHECK(obj); - return static_cast<const BrowserAccessibilityMac*>(obj)->native_view(); + return static_cast<const BrowserAccessibilityMac*>(obj)->GetNativeWrapper(); } BrowserAccessibilityCocoa* ToBrowserAccessibilityCocoa( BrowserAccessibility* obj) { DCHECK(obj); - return static_cast<BrowserAccessibilityMac*>(obj)->native_view(); + return static_cast<BrowserAccessibilityMac*>(obj)->GetNativeWrapper(); } } // namespace content
diff --git a/content/browser/accessibility/cross_platform_accessibility_browsertest.cc b/content/browser/accessibility/cross_platform_accessibility_browsertest.cc index 924fff0..974ef71 100644 --- a/content/browser/accessibility/cross_platform_accessibility_browsertest.cc +++ b/content/browser/accessibility/cross_platform_accessibility_browsertest.cc
@@ -807,6 +807,52 @@ } #endif // !defined(OS_ANDROID) && !defined(OS_MAC) +// Select controls behave differently on Mac/Android, this test doesn't apply. +#if !defined(OS_ANDROID) && !defined(OS_MAC) +IN_PROC_BROWSER_TEST_F(CrossPlatformAccessibilityBrowserTest, + SelectListWithOptgroupActiveDescendant) { + LoadInitialAccessibilityTreeFromHtml(R"HTML( + <!DOCTYPE html> + <html> + <body> + <select autofocus size="8" aria-label="Select"> + <optgroup label="A"> + <option>Option 1</option> + </optgroup> + <optgroup label="B"> + <option selected>Option 2</option> + <option>Option 3</option> + </optgroup> + </select> + </body> + </html>)HTML"); + + WaitForAccessibilityTreeToContainNodeWithName(shell()->web_contents(), + "Select"); + + const BrowserAccessibility* root = GetManager()->GetRoot(); + ASSERT_NE(root, nullptr); + const BrowserAccessibility* body = root->PlatformGetChild(0); + ASSERT_NE(body, nullptr); + BrowserAccessibility* select = body->PlatformGetChild(0); + ASSERT_NE(select, nullptr); + EXPECT_EQ(ax::mojom::Role::kListBox, select->GetRole()); + + // Get "Option 2". + const BrowserAccessibility* option_2 = select->PlatformGetChild(3); + ASSERT_NE(option_2, nullptr); + EXPECT_EQ(ax::mojom::Role::kListBoxOption, option_2->GetRole()); + EXPECT_EQ("Option 2", + option_2->GetStringAttribute(ax::mojom::StringAttribute::kName)); + + // Ensure active descendant is "Option 2" + int active_descendant_id = -1; + EXPECT_TRUE(select->GetIntAttribute( + ax::mojom::IntAttribute::kActivedescendantId, &active_descendant_id)); + EXPECT_EQ(active_descendant_id, option_2->GetId()); +} +#endif // !defined(OS_ANDROID) && !defined(OS_MAC) + IN_PROC_BROWSER_TEST_F(CrossPlatformAccessibilityBrowserTest, PlatformIterator) { LoadInitialAccessibilityTreeFromHtml(R"HTML(
diff --git a/content/browser/browser_child_process_host_impl.cc b/content/browser/browser_child_process_host_impl.cc index ed1d10a..522d7cec 100644 --- a/content/browser/browser_child_process_host_impl.cc +++ b/content/browser/browser_child_process_host_impl.cc
@@ -121,8 +121,7 @@ return memory_instrumentation::mojom::ProcessType::OTHER; } } - -void BindTracedProcessOnProcessThread( +void BindTracedProcessFromUIThread( base::WeakPtr<BrowserChildProcessHostImpl> weak_host, mojo::PendingReceiver<tracing::mojom::TracedProcess> receiver) { if (!weak_host) @@ -131,19 +130,6 @@ weak_host->GetHost()->BindReceiver(std::move(receiver)); } -void BindTracedProcessFromUIThread( - base::WeakPtr<BrowserChildProcessHostImpl> weak_host, - mojo::PendingReceiver<tracing::mojom::TracedProcess> receiver) { - if (base::FeatureList::IsEnabled(features::kProcessHostOnUI)) { - BindTracedProcessOnProcessThread(std::move(weak_host), std::move(receiver)); - return; - } - - GetIOThreadTaskRunner({})->PostTask( - FROM_HERE, base::BindOnce(&BindTracedProcessOnProcessThread, - std::move(weak_host), std::move(receiver))); -} - } // namespace // static @@ -156,9 +142,7 @@ } BrowserChildProcessHost* BrowserChildProcessHost::FromID(int child_process_id) { - DCHECK_CURRENTLY_ON(base::FeatureList::IsEnabled(features::kProcessHostOnUI) - ? BrowserThread::UI - : BrowserThread::IO); + DCHECK_CURRENTLY_ON(BrowserThread::UI); BrowserChildProcessHostImpl::BrowserChildProcessList* process_list = g_child_process_list.Pointer(); for (BrowserChildProcessHostImpl* host : *process_list) { @@ -199,9 +183,7 @@ BrowserChildProcessHostDelegate* delegate, ChildProcessHost::IpcMode ipc_mode) : data_(process_type), delegate_(delegate) { - DCHECK_CURRENTLY_ON(base::FeatureList::IsEnabled(features::kProcessHostOnUI) - ? BrowserThread::UI - : BrowserThread::IO); + DCHECK_CURRENTLY_ON(BrowserThread::UI); data_.id = ChildProcessHostImpl::GenerateChildProcessUniqueId(); @@ -226,9 +208,7 @@ // static void BrowserChildProcessHostImpl::TerminateAll() { - DCHECK_CURRENTLY_ON(base::FeatureList::IsEnabled(features::kProcessHostOnUI) - ? BrowserThread::UI - : BrowserThread::IO); + DCHECK_CURRENTLY_ON(BrowserThread::UI); // Make a copy since the BrowserChildProcessHost dtor mutates the original // list. BrowserChildProcessList copy = g_child_process_list.Get(); @@ -274,23 +254,17 @@ } const ChildProcessData& BrowserChildProcessHostImpl::GetData() { - DCHECK_CURRENTLY_ON(base::FeatureList::IsEnabled(features::kProcessHostOnUI) - ? BrowserThread::UI - : BrowserThread::IO); + DCHECK_CURRENTLY_ON(BrowserThread::UI); return data_; } ChildProcessHost* BrowserChildProcessHostImpl::GetHost() { - DCHECK_CURRENTLY_ON(base::FeatureList::IsEnabled(features::kProcessHostOnUI) - ? BrowserThread::UI - : BrowserThread::IO); + DCHECK_CURRENTLY_ON(BrowserThread::UI); return child_process_host_.get(); } const base::Process& BrowserChildProcessHostImpl::GetProcess() { - DCHECK_CURRENTLY_ON(base::FeatureList::IsEnabled(features::kProcessHostOnUI) - ? BrowserThread::UI - : BrowserThread::IO); + DCHECK_CURRENTLY_ON(BrowserThread::UI); return data_.GetProcess(); } @@ -300,31 +274,23 @@ } void BrowserChildProcessHostImpl::SetName(const std::u16string& name) { - DCHECK_CURRENTLY_ON(base::FeatureList::IsEnabled(features::kProcessHostOnUI) - ? BrowserThread::UI - : BrowserThread::IO); + DCHECK_CURRENTLY_ON(BrowserThread::UI); data_.name = name; } void BrowserChildProcessHostImpl::SetMetricsName( const std::string& metrics_name) { - DCHECK_CURRENTLY_ON(base::FeatureList::IsEnabled(features::kProcessHostOnUI) - ? BrowserThread::UI - : BrowserThread::IO); + DCHECK_CURRENTLY_ON(BrowserThread::UI); data_.metrics_name = metrics_name; } void BrowserChildProcessHostImpl::SetProcess(base::Process process) { - DCHECK_CURRENTLY_ON(base::FeatureList::IsEnabled(features::kProcessHostOnUI) - ? BrowserThread::UI - : BrowserThread::IO); + DCHECK_CURRENTLY_ON(BrowserThread::UI); data_.SetProcess(std::move(process)); } void BrowserChildProcessHostImpl::ForceShutdown() { - DCHECK_CURRENTLY_ON(base::FeatureList::IsEnabled(features::kProcessHostOnUI) - ? BrowserThread::UI - : BrowserThread::IO); + DCHECK_CURRENTLY_ON(BrowserThread::UI); g_child_process_list.Get().remove(this); child_process_host_->ForceShutdown(); } @@ -338,9 +304,7 @@ std::unique_ptr<base::CommandLine> cmd_line, std::map<std::string, base::FilePath> files_to_preload, bool terminate_on_shutdown) { - DCHECK_CURRENTLY_ON(base::FeatureList::IsEnabled(features::kProcessHostOnUI) - ? BrowserThread::UI - : BrowserThread::IO); + DCHECK_CURRENTLY_ON(BrowserThread::UI); const base::CommandLine& browser_command_line = *base::CommandLine::ForCurrentProcess(); static const char* const kForwardSwitches[] = { @@ -405,9 +369,7 @@ ChildProcessTerminationInfo BrowserChildProcessHostImpl::GetTerminationInfo( bool known_dead) { - DCHECK_CURRENTLY_ON(base::FeatureList::IsEnabled(features::kProcessHostOnUI) - ? BrowserThread::UI - : BrowserThread::IO); + DCHECK_CURRENTLY_ON(BrowserThread::UI); if (!child_process_) { // If the delegate doesn't use Launch() helper. ChildProcessTerminationInfo info; @@ -424,9 +386,7 @@ } void BrowserChildProcessHostImpl::OnChannelConnected(int32_t peer_pid) { - DCHECK_CURRENTLY_ON(base::FeatureList::IsEnabled(features::kProcessHostOnUI) - ? BrowserThread::UI - : BrowserThread::IO); + DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK(has_legacy_ipc_channel_); notify_child_connection_status_ = true; @@ -485,9 +445,7 @@ } void BrowserChildProcessHostImpl::OnChildDisconnected() { - DCHECK_CURRENTLY_ON(base::FeatureList::IsEnabled(features::kProcessHostOnUI) - ? BrowserThread::UI - : BrowserThread::IO); + DCHECK_CURRENTLY_ON(BrowserThread::UI); tracing_registration_.reset(); @@ -650,9 +608,7 @@ #endif void BrowserChildProcessHostImpl::OnProcessLaunched() { - DCHECK_CURRENTLY_ON(base::FeatureList::IsEnabled(features::kProcessHostOnUI) - ? BrowserThread::UI - : BrowserThread::IO); + DCHECK_CURRENTLY_ON(BrowserThread::UI); const base::Process& process = child_process_->GetProcess(); DCHECK(process.IsValid()); @@ -740,9 +696,7 @@ } bool BrowserChildProcessHostImpl::IsProcessLaunched() const { - DCHECK_CURRENTLY_ON(base::FeatureList::IsEnabled(features::kProcessHostOnUI) - ? BrowserThread::UI - : BrowserThread::IO); + DCHECK_CURRENTLY_ON(BrowserThread::UI); return child_process_.get() && child_process_->GetProcess().IsValid(); }
diff --git a/content/browser/browser_child_process_host_impl_receiver_bindings.cc b/content/browser/browser_child_process_host_impl_receiver_bindings.cc index c1a7cf3..604f56a 100644 --- a/content/browser/browser_child_process_host_impl_receiver_bindings.cc +++ b/content/browser/browser_child_process_host_impl_receiver_bindings.cc
@@ -89,40 +89,26 @@ #endif if (auto r = receiver.As<mojom::FieldTrialRecorder>()) { - GetUIThreadTaskRunner({})->PostTask( - FROM_HERE, base::BindOnce(&FieldTrialRecorder::Create, std::move(r))); + FieldTrialRecorder::Create(std::move(r)); return; } if (auto r = receiver.As< discardable_memory::mojom::DiscardableSharedMemoryManager>()) { - if (base::FeatureList::IsEnabled(features::kProcessHostOnUI)) { - GetIOThreadTaskRunner({})->PostTask( - FROM_HERE, - base::BindOnce( - [](mojo::PendingReceiver< - discardable_memory::mojom::DiscardableSharedMemoryManager> - r) { - discardable_memory::DiscardableSharedMemoryManager::Get()->Bind( - std::move(r)); - }, - std::move(r))); - } else { - discardable_memory::DiscardableSharedMemoryManager::Get()->Bind( - std::move(r)); - } + GetIOThreadTaskRunner({})->PostTask( + FROM_HERE, + base::BindOnce( + [](mojo::PendingReceiver< + discardable_memory::mojom::DiscardableSharedMemoryManager> r) { + discardable_memory::DiscardableSharedMemoryManager::Get()->Bind( + std::move(r)); + }, + std::move(r))); return; } if (auto r = receiver.As<device::mojom::PowerMonitor>()) { - // TODO(jam): When ProcessHostOnUI is the default just remove this PostTask. - GetUIThreadTaskRunner({})->PostTask( - FROM_HERE, - base::BindOnce( - [](mojo::PendingReceiver<device::mojom::PowerMonitor> r) { - GetDeviceService().BindPowerMonitor(std::move(r)); - }, - std::move(r))); + GetDeviceService().BindPowerMonitor(std::move(r)); return; }
diff --git a/content/browser/conversions/conversion_internals.mojom b/content/browser/conversions/conversion_internals.mojom index 7a68ff6..db554876 100644 --- a/content/browser/conversions/conversion_internals.mojom +++ b/content/browser/conversions/conversion_internals.mojom
@@ -18,6 +18,7 @@ struct WebUIConversionReport { url.mojom.Origin conversion_origin; url.mojom.Url report_url; + double trigger_time; double report_time; int64 priority; string report_body;
diff --git a/content/browser/conversions/conversion_internals_browsertest.cc b/content/browser/conversions/conversion_internals_browsertest.cc index ae9dc787..d3a09ef4 100644 --- a/content/browser/conversions/conversion_internals_browsertest.cc +++ b/content/browser/conversions/conversion_internals_browsertest.cc
@@ -324,14 +324,14 @@ table.children[0].children[1].innerText === "https://sub.conversion.test" && table.children[0].children[2].innerText === "https://report.test/.well-known/attribution-reporting/report-attribution" && - table.children[0].children[4].innerText === "13" && - table.children[0].children[5].innerText === "yes" && - table.children[0].children[6].innerText === "Pending" && - table.children[1].children[4].innerText === "11" && - table.children[1].children[6].innerText === "Dropped due to low priority" && - table.children[2].children[4].innerText === "0" && - table.children[2].children[5].innerText === "no" && - table.children[2].children[6].innerText === "Sent: HTTP 200") { + table.children[0].children[5].innerText === "13" && + table.children[0].children[6].innerText === "yes" && + table.children[0].children[7].innerText === "Pending" && + table.children[1].children[5].innerText === "11" && + table.children[1].children[7].innerText === "Dropped due to low priority" && + table.children[2].children[5].innerText === "0" && + table.children[2].children[6].innerText === "no" && + table.children[2].children[7].innerText === "Sent: HTTP 200") { document.title = $1; } }); @@ -351,14 +351,14 @@ table.children[2].children[1].innerText === "https://sub.conversion.test" && table.children[2].children[2].innerText === "https://report.test/.well-known/attribution-reporting/report-attribution" && - table.children[2].children[4].innerText === "13" && - table.children[2].children[5].innerText === "yes" && - table.children[2].children[6].innerText === "Pending" && - table.children[1].children[4].innerText === "11" && - table.children[1].children[6].innerText === "Dropped due to low priority" && - table.children[0].children[4].innerText === "0" && - table.children[0].children[5].innerText === "no" && - table.children[0].children[6].innerText === "Sent: HTTP 200") { + table.children[2].children[5].innerText === "13" && + table.children[2].children[6].innerText === "yes" && + table.children[2].children[7].innerText === "Pending" && + table.children[1].children[5].innerText === "11" && + table.children[1].children[7].innerText === "Dropped due to low priority" && + table.children[0].children[5].innerText === "0" && + table.children[0].children[6].innerText === "no" && + table.children[0].children[7].innerText === "Sent: HTTP 200") { document.title = $1; } }); @@ -368,7 +368,7 @@ TitleWatcher title_watcher(shell()->web_contents(), kCompleteTitle2); // Sort by priority ascending. EXPECT_TRUE(ExecJsInWebUI( - "document.querySelectorAll('#report-table-wrapper th')[4].click();")); + "document.querySelectorAll('#report-table-wrapper th')[5].click();")); EXPECT_EQ(kCompleteTitle2, title_watcher.WaitAndGetTitle()); } @@ -380,14 +380,14 @@ table.children[0].children[1].innerText === "https://sub.conversion.test" && table.children[0].children[2].innerText === "https://report.test/.well-known/attribution-reporting/report-attribution" && - table.children[0].children[4].innerText === "13" && - table.children[0].children[5].innerText === "yes" && - table.children[0].children[6].innerText === "Pending" && - table.children[1].children[4].innerText === "11" && - table.children[1].children[6].innerText === "Dropped due to low priority" && - table.children[2].children[4].innerText === "0" && - table.children[2].children[5].innerText === "no" && - table.children[2].children[6].innerText === "Sent: HTTP 200") { + table.children[0].children[5].innerText === "13" && + table.children[0].children[6].innerText === "yes" && + table.children[0].children[7].innerText === "Pending" && + table.children[1].children[5].innerText === "11" && + table.children[1].children[7].innerText === "Dropped due to low priority" && + table.children[2].children[5].innerText === "0" && + table.children[2].children[6].innerText === "no" && + table.children[2].children[7].innerText === "Sent: HTTP 200") { document.title = $1; } }); @@ -397,7 +397,7 @@ TitleWatcher title_watcher(shell()->web_contents(), kCompleteTitle3); // Sort by priority descending. EXPECT_TRUE(ExecJsInWebUI( - "document.querySelectorAll('#report-table-wrapper th')[4].click();")); + "document.querySelectorAll('#report-table-wrapper th')[5].click();")); EXPECT_EQ(kCompleteTitle3, title_watcher.WaitAndGetTitle()); } @@ -426,8 +426,8 @@ let table = document.querySelector("#report-table-wrapper tbody"); let obs = new MutationObserver(() => { if (table.children.length === 2 && - table.children[0].children[4].innerText === "7" && - table.children[1].children[6].innerText === "Sent: HTTP 200") { + table.children[0].children[5].innerText === "7" && + table.children[1].children[7].innerText === "Sent: HTTP 200") { document.title = $1; } }); @@ -468,7 +468,7 @@ let table = document.querySelector("#report-table-wrapper tbody"); let obs = new MutationObserver(() => { if (table.children.length === 1 && - table.children[0].children[4].innerText === "7") { + table.children[0].children[5].innerText === "7") { document.title = $1; } });
diff --git a/content/browser/conversions/conversion_internals_handler_impl.cc b/content/browser/conversions/conversion_internals_handler_impl.cc index d3ab943..6d3081c 100644 --- a/content/browser/conversions/conversion_internals_handler_impl.cc +++ b/content/browser/conversions/conversion_internals_handler_impl.cc
@@ -67,7 +67,8 @@ mojom::WebUIConversionReport::Status status) { return mojom::WebUIConversionReport::New( report.impression.conversion_origin(), report.ReportURL(), - report.report_time.ToJsTime(), report.priority, + /*trigger_time=*/report.conversion_time.ToJsTime(), + /*report_time=*/report.report_time.ToJsTime(), report.priority, report.ReportBody(/*pretty_print=*/true), /*attributed_truthfully=*/report.impression.attribution_logic() == StorableImpression::AttributionLogic::kTruthfully,
diff --git a/content/browser/power_monitor_browsertest.cc b/content/browser/power_monitor_browsertest.cc index 6c1a850..400eb70 100644 --- a/content/browser/power_monitor_browsertest.cc +++ b/content/browser/power_monitor_browsertest.cc
@@ -50,21 +50,6 @@ run_loop.Run(); } -void StartUtilityProcessOnProcessThread( - mojo::PendingReceiver<mojom::PowerMonitorTest> receiver) { - UtilityProcessHost* host = new UtilityProcessHost(); - host->SetMetricsName("test_process"); - host->SetName(u"TestProcess"); - EXPECT_TRUE(host->Start()); - - host->GetChildProcess()->BindReceiver(std::move(receiver)); -} - -void BindInterfaceForGpuOnProcessThread( - mojo::PendingReceiver<mojom::PowerMonitorTest> receiver) { - BindInterfaceInGpuProcess(std::move(receiver)); -} - class MockPowerMonitorMessageBroadcaster : public device::mojom::PowerMonitor { public: MockPowerMonitorMessageBroadcaster() = default; @@ -154,15 +139,14 @@ mojo::Remote<mojom::PowerMonitorTest>* power_monitor_test, base::OnceClosure utility_bound_closure) { utility_bound_closure_ = std::move(utility_bound_closure); - if (base::FeatureList::IsEnabled(features::kProcessHostOnUI)) { - StartUtilityProcessOnProcessThread( - power_monitor_test->BindNewPipeAndPassReceiver()); - } else { - GetIOThreadTaskRunner({})->PostTask( - FROM_HERE, - base::BindOnce(&StartUtilityProcessOnProcessThread, - power_monitor_test->BindNewPipeAndPassReceiver())); - } + + UtilityProcessHost* host = new UtilityProcessHost(); + host->SetMetricsName("test_process"); + host->SetName(u"TestProcess"); + EXPECT_TRUE(host->Start()); + + host->GetChildProcess()->BindReceiver( + power_monitor_test->BindNewPipeAndPassReceiver()); } void set_renderer_bound_closure(base::OnceClosure closure) { @@ -297,15 +281,7 @@ EXPECT_EQ(1, request_count_from_gpu()); mojo::Remote<mojom::PowerMonitorTest> power_monitor_gpu; - if (base::FeatureList::IsEnabled(features::kProcessHostOnUI)) { - BindInterfaceForGpuOnProcessThread( - power_monitor_gpu.BindNewPipeAndPassReceiver()); - } else { - GetIOThreadTaskRunner({})->PostTask( - FROM_HERE, - base::BindOnce(&BindInterfaceForGpuOnProcessThread, - power_monitor_gpu.BindNewPipeAndPassReceiver())); - } + BindInterfaceInGpuProcess(power_monitor_gpu.BindNewPipeAndPassReceiver()); // Ensure that the PowerMonitorTestImpl instance has been created and is // observing power state changes in the child process before simulating a
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc index ac3e3cf..bb52ccd 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -1557,10 +1557,9 @@ TextInputClient::SubClass::kRenderWidgetHostViewAura); #if BUILDFLAG(IS_CHROMEOS_ASH) - auto* input_method_manager = - chromeos::input_method::InputMethodManager::Get(); + auto* input_method_manager = ash::input_method::InputMethodManager::Get(); if (input_method_manager && - chromeos::extension_ime_util::IsExperimentalMultilingual( + ash::extension_ime_util::IsExperimentalMultilingual( input_method_manager->GetActiveIMEState() ->GetCurrentInputMethod() .id())) {
diff --git a/content/browser/resources/conversions/conversion_internals.js b/content/browser/resources/conversions/conversion_internals.js index 9da9b72..0764e1c1e 100644 --- a/content/browser/resources/conversions/conversion_internals.js +++ b/content/browser/resources/conversions/conversion_internals.js
@@ -344,6 +344,7 @@ this.reportBody = mojo.reportBody; this.conversionOrigin = UrlToText(mojo.conversionOrigin); this.reportUrl = mojo.reportUrl.url; + this.triggerTime = new Date(mojo.triggerTime); this.reportTime = new Date(mojo.reportTime); this.reportPriority = mojo.priority; this.attributedTruthfully = mojo.attributedTruthfully; @@ -372,6 +373,7 @@ new CodeColumn('Report Body', (e) => e.reportBody), new Column('Destination', (e) => e.conversionOrigin), new Column('Report URL', (e) => e.reportUrl), + new DateColumn('Trigger Time', (e) => e.triggerTime), new DateColumn('Report Time', (e) => e.reportTime), new Column('Report Priority', (e) => e.reportPriority), new Column('Fake Report', (e) => e.attributedTruthfully ? 'no' : 'yes'),
diff --git a/content/browser/service_worker/service_worker_controllee_request_handler.cc b/content/browser/service_worker/service_worker_controllee_request_handler.cc index 3f9b97c..abfcf8b 100644 --- a/content/browser/service_worker/service_worker_controllee_request_handler.cc +++ b/content/browser/service_worker/service_worker_controllee_request_handler.cc
@@ -168,7 +168,6 @@ loader_callback_ = std::move(loader_callback); fallback_callback_ = std::move(fallback_callback); - registration_lookup_start_time_ = base::TimeTicks::Now(); browser_context_ = browser_context; // Look up a registration. @@ -205,9 +204,6 @@ void ServiceWorkerControlleeRequestHandler::ContinueWithRegistration( blink::ServiceWorkerStatusCode status, scoped_refptr<ServiceWorkerRegistration> registration) { - ServiceWorkerMetrics::RecordLookupRegistrationTime( - status, base::TimeTicks::Now() - registration_lookup_start_time_); - if (status != blink::ServiceWorkerStatusCode::kOk) { TRACE_EVENT_WITH_FLOW1( "ServiceWorker",
diff --git a/content/browser/service_worker/service_worker_controllee_request_handler.h b/content/browser/service_worker/service_worker_controllee_request_handler.h index b9bdaed5..1aeada4 100644 --- a/content/browser/service_worker/service_worker_controllee_request_handler.h +++ b/content/browser/service_worker/service_worker_controllee_request_handler.h
@@ -118,7 +118,6 @@ GURL stripped_url_; blink::StorageKey storage_key_; bool force_update_started_; - base::TimeTicks registration_lookup_start_time_; const int frame_tree_node_id_; NavigationLoaderInterceptor::LoaderCallback loader_callback_;
diff --git a/content/browser/service_worker/service_worker_controllee_request_handler_unittest.cc b/content/browser/service_worker/service_worker_controllee_request_handler_unittest.cc index ac007ed..483e9b9 100644 --- a/content/browser/service_worker/service_worker_controllee_request_handler_unittest.cc +++ b/content/browser/service_worker/service_worker_controllee_request_handler_unittest.cc
@@ -12,7 +12,6 @@ #include "base/files/scoped_temp_dir.h" #include "base/run_loop.h" #include "base/test/bind.h" -#include "base/test/metrics/histogram_tester.h" #include "components/offline_pages/buildflags/buildflags.h" #include "content/browser/service_worker/embedded_worker_test_helper.h" #include "content/browser/service_worker/service_worker_container_host.h" @@ -169,8 +168,6 @@ }; TEST_F(ServiceWorkerControlleeRequestHandlerTest, Basic) { - base::HistogramTester histogram_tester; - // Prepare a valid version and registration. version_->set_fetch_handler_existence( ServiceWorkerVersion::FetchHandlerExistence::EXISTS); @@ -190,9 +187,6 @@ loop.Run(); } - histogram_tester.ExpectTotalCount( - "ServiceWorker.LookupRegistration.MainResource.Time.Exists", 0); - // Conduct a main resource load. ServiceWorkerRequestTestResources test_resources( this, GURL("https://host/scope/doc"), @@ -204,17 +198,11 @@ EXPECT_TRUE(test_resources.loader()); EXPECT_TRUE(version_->HasControllee()); - histogram_tester.ExpectTotalCount( - "ServiceWorker.LookupRegistration.MainResource.Time.Exists", 1); test_resources.ResetHandler(); } TEST_F(ServiceWorkerControlleeRequestHandlerTest, DoesNotExist) { - base::HistogramTester histogram_tester; - histogram_tester.ExpectTotalCount( - "ServiceWorker.LookupRegistration.MainResource.Time.DoesNotExist", 0); - // No version and registration exists in the scope. // Conduct a main resource load. @@ -226,21 +214,15 @@ base::RunLoop().RunUntilIdle(); - histogram_tester.ExpectTotalCount( - "ServiceWorker.LookupRegistration.MainResource.Time.DoesNotExist", 1); - + EXPECT_FALSE(test_resources.loader()); + EXPECT_FALSE(version_->HasControllee()); test_resources.ResetHandler(); } TEST_F(ServiceWorkerControlleeRequestHandlerTest, Error) { - base::HistogramTester histogram_tester; - // Disabling the storage makes looking up the registration return an error. context()->registry()->DisableStorageForTesting(base::DoNothing()); - histogram_tester.ExpectTotalCount( - "ServiceWorker.LookupRegistration.MainResource.Time.Error", 0); - // Conduct a main resource load. ServiceWorkerRequestTestResources test_resources( this, GURL("https://host/scope/doc"), @@ -250,9 +232,8 @@ base::RunLoop().RunUntilIdle(); - histogram_tester.ExpectTotalCount( - "ServiceWorker.LookupRegistration.MainResource.Time.Error", 1); - + EXPECT_FALSE(test_resources.loader()); + EXPECT_FALSE(version_->HasControllee()); test_resources.ResetHandler(); }
diff --git a/content/browser/service_worker/service_worker_metrics.cc b/content/browser/service_worker/service_worker_metrics.cc index 3eaa314..01e3668 100644 --- a/content/browser/service_worker/service_worker_metrics.cc +++ b/content/browser/service_worker/service_worker_metrics.cc
@@ -513,22 +513,6 @@ result); } -void ServiceWorkerMetrics::RecordLookupRegistrationTime( - blink::ServiceWorkerStatusCode status, - base::TimeDelta duration) { - if (status == blink::ServiceWorkerStatusCode::kOk) { - UMA_HISTOGRAM_TIMES( - "ServiceWorker.LookupRegistration.MainResource.Time.Exists", duration); - } else if (status == blink::ServiceWorkerStatusCode::kErrorNotFound) { - UMA_HISTOGRAM_TIMES( - "ServiceWorker.LookupRegistration.MainResource.Time.DoesNotExist", - duration); - } else { - UMA_HISTOGRAM_TIMES( - "ServiceWorker.LookupRegistration.MainResource.Time.Error", duration); - } -} - void ServiceWorkerMetrics::RecordOfflineCapableReason( blink::ServiceWorkerStatusCode status, int status_code) {
diff --git a/content/browser/service_worker/service_worker_metrics.h b/content/browser/service_worker/service_worker_metrics.h index 450b5fd..704c3be 100644 --- a/content/browser/service_worker/service_worker_metrics.h +++ b/content/browser/service_worker/service_worker_metrics.h
@@ -215,15 +215,6 @@ static void RecordStartServiceWorkerForNavigationHintResult( StartServiceWorkerForNavigationHintResult result); - // Records the duration of looking up an existing registration. - // |status| is the result of lookup. The records for the cases where - // the registration is found (kOk), not found (kErrorNotFound), or an error - // happens (other errors) are saved separately into a relevant suffixed - // histogram. - static void RecordLookupRegistrationTime( - blink::ServiceWorkerStatusCode status, - base::TimeDelta duration); - // Records the reason a service worker was deemed to be offline capable. The // reason may be that the service worker responded with 2xx..., 3xx..., or the // check timed out.
diff --git a/content/browser/utility_process_host.cc b/content/browser/utility_process_host.cc index c80f808..9230b5c 100644 --- a/content/browser/utility_process_host.cc +++ b/content/browser/utility_process_host.cc
@@ -76,17 +76,13 @@ started_(false), name_(u"utility process"), client_(std::move(client)) { - DCHECK_CURRENTLY_ON(base::FeatureList::IsEnabled(features::kProcessHostOnUI) - ? BrowserThread::UI - : BrowserThread::IO); + DCHECK_CURRENTLY_ON(BrowserThread::UI); process_ = std::make_unique<BrowserChildProcessHostImpl>( PROCESS_TYPE_UTILITY, this, ChildProcessHost::IpcMode::kNormal); } UtilityProcessHost::~UtilityProcessHost() { - DCHECK_CURRENTLY_ON(base::FeatureList::IsEnabled(features::kProcessHostOnUI) - ? BrowserThread::UI - : BrowserThread::IO); + DCHECK_CURRENTLY_ON(BrowserThread::UI); if (client_ && launch_state_ == LaunchState::kLaunchComplete) client_->OnProcessTerminatedNormally(); }
diff --git a/content/browser/utility_process_host_browsertest.cc b/content/browser/utility_process_host_browsertest.cc index 0484198c..2b5cfb7 100644 --- a/content/browser/utility_process_host_browsertest.cc +++ b/content/browser/utility_process_host_browsertest.cc
@@ -46,29 +46,7 @@ done_closure_ = base::BindOnce(&UtilityProcessHostBrowserTest::DoneRunning, base::Unretained(this), run_loop.QuitClosure(), crash); - auto task_runner = base::FeatureList::IsEnabled(features::kProcessHostOnUI) - ? content::GetUIThreadTaskRunner({}) - : content::GetIOThreadTaskRunner({}); - task_runner->PostTask( - FROM_HERE, - base::BindOnce( - &UtilityProcessHostBrowserTest::RunUtilityProcessOnProcessThread, - base::Unretained(this), elevated, crash)); - run_loop.Run(); - } - protected: - void DoneRunning(base::OnceClosure quit_closure, bool expect_crashed) { - DCHECK_CURRENTLY_ON(BrowserThread::UI); - BrowserChildProcessObserver::Remove(this); - EXPECT_EQ(expect_crashed, has_crashed); - std::move(quit_closure).Run(); - } - - void RunUtilityProcessOnProcessThread(bool elevated, bool crash) { - DCHECK_CURRENTLY_ON(base::FeatureList::IsEnabled(features::kProcessHostOnUI) - ? content::BrowserThread::UI - : content::BrowserThread::IO); UtilityProcessHost* host = new UtilityProcessHost(); host->SetName(u"TestProcess"); host->SetMetricsName(kTestProcessName); @@ -82,30 +60,36 @@ host->GetChildProcess()->BindReceiver( service_.BindNewPipeAndPassReceiver()); if (crash) { - service_->DoCrashImmediately(base::BindOnce( - &UtilityProcessHostBrowserTest::OnSomethingOnProcessThread, - base::Unretained(this), crash)); + service_->DoCrashImmediately( + base::BindOnce(&UtilityProcessHostBrowserTest::OnSomething, + base::Unretained(this), crash)); } else { - service_->DoSomething(base::BindOnce( - &UtilityProcessHostBrowserTest::OnSomethingOnProcessThread, - base::Unretained(this), crash)); + service_->DoSomething( + base::BindOnce(&UtilityProcessHostBrowserTest::OnSomething, + base::Unretained(this), crash)); } + + run_loop.Run(); } - void ResetServiceOnProcessThread() { - DCHECK_CURRENTLY_ON(base::FeatureList::IsEnabled(features::kProcessHostOnUI) - ? content::BrowserThread::UI - : content::BrowserThread::IO); + protected: + void DoneRunning(base::OnceClosure quit_closure, bool expect_crashed) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + BrowserChildProcessObserver::Remove(this); + EXPECT_EQ(expect_crashed, has_crashed); + std::move(quit_closure).Run(); + } + + void ResetService() { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); service_.reset(); } - void OnSomethingOnProcessThread(bool expect_crash) { - DCHECK_CURRENTLY_ON(base::FeatureList::IsEnabled(features::kProcessHostOnUI) - ? content::BrowserThread::UI - : content::BrowserThread::IO); + void OnSomething(bool expect_crash) { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); // If service crashes then this never gets called. ASSERT_EQ(false, expect_crash); - ResetServiceOnProcessThread(); + ResetService(); GetUIThreadTaskRunner({})->PostTask(FROM_HERE, std::move(done_closure_)); } @@ -143,14 +127,7 @@ EXPECT_EQ(kTestProcessName, data.metrics_name); EXPECT_EQ(false, has_crashed); has_crashed = true; - auto task_runner = base::FeatureList::IsEnabled(features::kProcessHostOnUI) - ? content::GetUIThreadTaskRunner({}) - : content::GetIOThreadTaskRunner({}); - task_runner->PostTask( - FROM_HERE, - base::BindOnce( - &UtilityProcessHostBrowserTest::ResetServiceOnProcessThread, - base::Unretained(this))); + ResetService(); std::move(done_closure_).Run(); } };
diff --git a/content/browser/utility_process_sandbox_browsertest.cc b/content/browser/utility_process_sandbox_browsertest.cc index b019abfa..d2f65c31 100644 --- a/content/browser/utility_process_sandbox_browsertest.cc +++ b/content/browser/utility_process_sandbox_browsertest.cc
@@ -76,22 +76,6 @@ done_closure_ = base::BindOnce(&UtilityProcessSandboxBrowserTest::DoneRunning, base::Unretained(this), run_loop.QuitClosure()); - if (base::FeatureList::IsEnabled(features::kProcessHostOnUI)) { - RunUtilityProcessOnProcessThread(); - } else { - GetIOThreadTaskRunner({})->PostTask( - FROM_HERE, base::BindOnce(&UtilityProcessSandboxBrowserTest:: - RunUtilityProcessOnProcessThread, - base::Unretained(this))); - run_loop.Run(); - } - } - - private: - void RunUtilityProcessOnProcessThread() { - DCHECK_CURRENTLY_ON(base::FeatureList::IsEnabled(features::kProcessHostOnUI) - ? content::BrowserThread::UI - : content::BrowserThread::IO); UtilityProcessHost* host = new UtilityProcessHost(); host->SetSandboxType(GetParam()); host->SetName(u"SandboxTestProcess"); @@ -100,15 +84,16 @@ host->GetChildProcess()->BindReceiver( service_.BindNewPipeAndPassReceiver()); - service_->GetSandboxStatus(base::BindOnce( - &UtilityProcessSandboxBrowserTest::OnGotSandboxStatusOnProcessThread, - base::Unretained(this))); + service_->GetSandboxStatus( + base::BindOnce(&UtilityProcessSandboxBrowserTest::OnGotSandboxStatus, + base::Unretained(this))); + + run_loop.Run(); } - void OnGotSandboxStatusOnProcessThread(int32_t sandbox_status) { - DCHECK_CURRENTLY_ON(base::FeatureList::IsEnabled(features::kProcessHostOnUI) - ? content::BrowserThread::UI - : content::BrowserThread::IO); + private: + void OnGotSandboxStatus(int32_t sandbox_status) { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); // Aside from kNoSandbox, every utility process launched explicitly with a // sandbox type should always end up with a sandbox.
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc index 87eb11b..6b077ac 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1469,21 +1469,6 @@ // this local process display::Screen signal should not trigger updates. // TODO(crbug.com/1169291): Unify screen info plumbing, caching, etc. #if !defined(OS_MAC) - // Send |is_multi_screen_changed| events to all visible frames, but limit - // other events to frames with the Window Placement permission. This obviates - // the most pressing need for sites to poll window.screen.isExtended which is - // exposed without explicit permission, while also protecting privacy. - // TODO(crbug.com/1109989): Postpone events; refine utility/privacy balance. - // TODO(crbug.com/1205676): Remove this deprecated window.screenschange code. - for (FrameTreeNode* node : frame_tree_.Nodes()) { - RenderFrameHostImpl* rfh = node->current_frame_host(); - if ((is_multi_screen_changed && - rfh->GetVisibilityState() == PageVisibilityState::kVisible) || - IsWindowPlacementGranted(rfh)) { - rfh->GetAssociatedLocalFrame()->OnScreensChange(); - } - } - // This updates Screen attributes and fires Screen.change events as needed, // propagating to all widgets through the VisualProperties update waterfall. // This is triggered by system changes, not renderer IPC, so explicitly check
diff --git a/content/public/browser/browser_child_process_host_iterator.cc b/content/public/browser/browser_child_process_host_iterator.cc index 85861b34..033e2817 100644 --- a/content/public/browser/browser_child_process_host_iterator.cc +++ b/content/public/browser/browser_child_process_host_iterator.cc
@@ -7,26 +7,19 @@ #include "base/check_op.h" #include "content/browser/browser_child_process_host_impl.h" #include "content/public/browser/browser_thread.h" -#include "content/public/common/content_features.h" namespace content { BrowserChildProcessHostIterator::BrowserChildProcessHostIterator() : all_(true), process_type_(PROCESS_TYPE_UNKNOWN) { - CHECK(BrowserThread::CurrentlyOn( - base::FeatureList::IsEnabled(features::kProcessHostOnUI) - ? BrowserThread::UI - : BrowserThread::IO)) + CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)) << "BrowserChildProcessHostIterator must be used on the IO thread."; iterator_ = BrowserChildProcessHostImpl::GetIterator()->begin(); } BrowserChildProcessHostIterator::BrowserChildProcessHostIterator(int type) : all_(false), process_type_(type) { - CHECK(BrowserThread::CurrentlyOn( - base::FeatureList::IsEnabled(features::kProcessHostOnUI) - ? BrowserThread::UI - : BrowserThread::IO)) + CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)) << "BrowserChildProcessHostIterator must be used on the IO thread."; DCHECK_NE(PROCESS_TYPE_RENDERER, type) << "BrowserChildProcessHostIterator doesn't work for renderer processes; "
diff --git a/content/public/test/accessibility_notification_waiter.cc b/content/public/test/accessibility_notification_waiter.cc index 2a3aa29..3020dbc 100644 --- a/content/public/test/accessibility_notification_waiter.cc +++ b/content/public/test/accessibility_notification_waiter.cc
@@ -77,6 +77,8 @@ void AccessibilityNotificationWaiter::ListenToAllFrames( WebContents* web_contents) { + if (event_to_wait_for_) + VLOG(1) << "Waiting for AccessibilityEvent " << *event_to_wait_for_; WebContentsImpl* web_contents_impl = static_cast<WebContentsImpl*>(web_contents); FrameTree* frame_tree = web_contents_impl->GetFrameTree(); @@ -153,7 +155,7 @@ if (IsAboutBlank()) return; - LOG(INFO) << "OnAccessibilityEvent " << event_type; + VLOG(1) << "OnAccessibilityEvent " << event_type; if (event_to_wait_for_ == ax::mojom::Event::kNone || event_to_wait_for_ == event_type) {
diff --git a/content/public/test/fake_local_frame.cc b/content/public/test/fake_local_frame.cc index c92f319..4cb567e 100644 --- a/content/public/test/fake_local_frame.cc +++ b/content/public/test/fake_local_frame.cc
@@ -105,8 +105,6 @@ void FakeLocalFrame::DidUpdateFramePolicy( const blink::FramePolicy& frame_policy) {} -void FakeLocalFrame::OnScreensChange() {} - void FakeLocalFrame::PostMessageEvent( const absl::optional<blink::RemoteFrameToken>& source_frame_token, const std::u16string& source_origin,
diff --git a/content/public/test/fake_local_frame.h b/content/public/test/fake_local_frame.h index 01cc48c..32afb64 100644 --- a/content/public/test/fake_local_frame.h +++ b/content/public/test/fake_local_frame.h
@@ -77,7 +77,6 @@ void ReportContentSecurityPolicyViolation( network::mojom::CSPViolationPtr violation) override; void DidUpdateFramePolicy(const blink::FramePolicy& frame_policy) override; - void OnScreensChange() override; void PostMessageEvent( const absl::optional<blink::RemoteFrameToken>& source_frame_token, const std::u16string& source_origin,
diff --git a/content/public/test/test_utils.cc b/content/public/test/test_utils.cc index 41bf56bc..ffec93a 100644 --- a/content/public/test/test_utils.cc +++ b/content/public/test/test_utils.cc
@@ -441,12 +441,9 @@ std::move(quit_closure).Run(); }; - auto task_runner = base::FeatureList::IsEnabled(features::kProcessHostOnUI) - ? GetUIThreadTaskRunner({}) - : GetIOThreadTaskRunner({}); - task_runner->PostTask(FROM_HERE, - base::BindOnce(check_has_running_child_process_on_io, - run_loop_->QuitClosure())); + GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce(check_has_running_child_process_on_io, + run_loop_->QuitClosure())); } void InProcessUtilityThreadHelper::BrowserChildProcessHostDisconnected(
diff --git a/content/renderer/render_thread_impl_discardable_memory_browsertest.cc b/content/renderer/render_thread_impl_discardable_memory_browsertest.cc index 762ab17..221beaa 100644 --- a/content/renderer/render_thread_impl_discardable_memory_browsertest.cc +++ b/content/renderer/render_thread_impl_discardable_memory_browsertest.cc
@@ -58,36 +58,25 @@ std::unique_ptr<base::DiscardableMemory> AllocateLockedDiscardableMemory( size_t size) { - if (base::FeatureList::IsEnabled(features::kProcessHostOnUI)) { - std::unique_ptr<base::DiscardableMemory> rv; - PostTaskToInProcessRendererAndWait(base::BindLambdaForTesting([&] { - rv = discardable_memory_allocator()->AllocateLockedDiscardableMemory( - size); - })); - return rv; - } else { - return discardable_memory_allocator()->AllocateLockedDiscardableMemory( - size); - } + std::unique_ptr<base::DiscardableMemory> rv; + PostTaskToInProcessRendererAndWait(base::BindLambdaForTesting([&] { + rv = + discardable_memory_allocator()->AllocateLockedDiscardableMemory(size); + })); + return rv; } std::unique_ptr<base::DiscardableMemory> AllocateLockedDiscardableMemoryWithRetryOrDie( size_t size, base::OnceClosure on_no_memory) { - if (base::FeatureList::IsEnabled(features::kProcessHostOnUI)) { - std::unique_ptr<base::DiscardableMemory> rv; - PostTaskToInProcessRendererAndWait(base::BindLambdaForTesting([&] { - rv = discardable_memory_allocator() - ->AllocateLockedDiscardableMemoryWithRetryOrDie( - size, std::move(on_no_memory)); - })); - return rv; - } else { - return discardable_memory_allocator() - ->AllocateLockedDiscardableMemoryWithRetryOrDie( - size, std::move(on_no_memory)); - } + std::unique_ptr<base::DiscardableMemory> rv; + PostTaskToInProcessRendererAndWait(base::BindLambdaForTesting([&] { + rv = discardable_memory_allocator() + ->AllocateLockedDiscardableMemoryWithRetryOrDie( + size, std::move(on_no_memory)); + })); + return rv; } base::DiscardableMemoryAllocator* discardable_memory_allocator() {
diff --git a/extensions/browser/api/virtual_keyboard/virtual_keyboard_api.cc b/extensions/browser/api/virtual_keyboard/virtual_keyboard_api.cc index 72655016..718850f3 100644 --- a/extensions/browser/api/virtual_keyboard/virtual_keyboard_api.cc +++ b/extensions/browser/api/virtual_keyboard/virtual_keyboard_api.cc
@@ -13,8 +13,6 @@ #if BUILDFLAG(IS_CHROMEOS_ASH) #include "ui/base/ime/ash/input_method_manager.h" - -using chromeos::input_method::InputMethodManager; #endif namespace extensions { @@ -28,6 +26,7 @@ api::virtual_keyboard::RestrictFeatures::Params::Create(args()); EXTENSION_FUNCTION_VALIDATE(params); #if BUILDFLAG(IS_CHROMEOS_ASH) + using ::ash::input_method::InputMethodManager; InputMethodManager* input_method_manager = InputMethodManager::Get(); if (input_method_manager) { if (params->restrictions.handwriting_enabled) {
diff --git a/gpu/command_buffer/common/shared_image_usage.cc b/gpu/command_buffer/common/shared_image_usage.cc index f64e555..118f3fd 100644 --- a/gpu/command_buffer/common/shared_image_usage.cc +++ b/gpu/command_buffer/common/shared_image_usage.cc
@@ -20,6 +20,9 @@ if (usage & SHARED_IMAGE_USAGE_RASTER) { label += "|Raster"; } + if (usage & SHARED_IMAGE_USAGE_RAW_DRAW) { + label += "|RawDraw"; + } if (usage & SHARED_IMAGE_USAGE_DISPLAY) { label += "|Display"; }
diff --git a/gpu/command_buffer/common/shared_image_usage.h b/gpu/command_buffer/common/shared_image_usage.h index 76e449a..128bfc3 100644 --- a/gpu/command_buffer/common/shared_image_usage.h +++ b/gpu/command_buffer/common/shared_image_usage.h
@@ -52,6 +52,8 @@ SHARED_IMAGE_USAGE_MIPMAP = 1 << 13, // Image will be used for CPU Writes by client SHARED_IMAGE_USAGE_CPU_WRITE = 1 << 14, + // Image will be used in RasterInterface with RawDraw. + SHARED_IMAGE_USAGE_RAW_DRAW = 1 << 15, }; // Create a string to label SharedImageUsage.
diff --git a/gpu/command_buffer/service/BUILD.gn b/gpu/command_buffer/service/BUILD.gn index e3e4c68..af8090dc 100644 --- a/gpu/command_buffer/service/BUILD.gn +++ b/gpu/command_buffer/service/BUILD.gn
@@ -233,6 +233,8 @@ "shared_image_backing_factory_gl_image.h", "shared_image_backing_factory_gl_texture.cc", "shared_image_backing_factory_gl_texture.h", + "shared_image_backing_factory_raw_draw.cc", + "shared_image_backing_factory_raw_draw.h", "shared_image_backing_factory_shared_memory.cc", "shared_image_backing_factory_shared_memory.h", "shared_image_backing_gl_common.cc",
diff --git a/gpu/command_buffer/service/raster_decoder.cc b/gpu/command_buffer/service/raster_decoder.cc index d7157e1..05e017e 100644 --- a/gpu/command_buffer/service/raster_decoder.cc +++ b/gpu/command_buffer/service/raster_decoder.cc
@@ -936,6 +936,11 @@ std::unique_ptr<SharedImageRepresentationSkia> shared_image_; std::unique_ptr<SharedImageRepresentationSkia::ScopedWriteAccess> scoped_shared_image_write_; + + std::unique_ptr<SharedImageRepresentationRaster> shared_image_raster_; + std::unique_ptr<SharedImageRepresentationRaster::ScopedWriteAccess> + scoped_shared_image_raster_write_; + SkSurface* sk_surface_ = nullptr; std::unique_ptr<SharedImageProviderImpl> paint_op_shared_image_provider_; @@ -960,6 +965,8 @@ bool is_privileged_ = false; + const bool is_raw_draw_enabled_; + gl::GLApi* api_ = nullptr; base::WeakPtrFactory<DecoderContext> weak_ptr_factory_{this}; @@ -1073,7 +1080,8 @@ font_manager_(base::MakeRefCounted<ServiceFontManager>( this, gpu_preferences_.disable_oopr_debug_crash_dump)), - is_privileged_(is_privileged) { + is_privileged_(is_privileged), + is_raw_draw_enabled_(features::IsUsingRawDraw()) { DCHECK(shared_context_state_); shared_context_state_->AddContextLostObserver(this); } @@ -3483,9 +3491,22 @@ "generated by ProduceTextureCHROMIUM."; DCHECK(!shared_image_); - shared_image_ = shared_image_representation_factory_.ProduceSkia( - mailbox, shared_context_state_.get()); - if (!shared_image_) { + DCHECK(!shared_image_raster_); + + SharedImageRepresentation* shared_image = nullptr; + if (is_raw_draw_enabled_) { + shared_image_raster_ = + shared_image_representation_factory_.ProduceRaster(mailbox); + shared_image = shared_image_raster_.get(); + } + + if (!shared_image) { + shared_image_ = shared_image_representation_factory_.ProduceSkia( + mailbox, shared_context_state_.get()); + shared_image = shared_image_.get(); + } + + if (!shared_image) { LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glBeginRasterCHROMIUM", "passed invalid mailbox."); return; @@ -3494,9 +3515,10 @@ // This check only fails on validating decoder since clear tracking for // passthrough textures is done by ANGLE. Nonetheless the check is important // so that clients cannot use uninitialized textures with validating decoder. - if (!needs_clear && !shared_image_->IsCleared()) { + if (!needs_clear && !shared_image->IsCleared()) { LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, "glBeginRasterCHROMIUM", "SharedImage not cleared before use."); + shared_image_raster_.reset(); shared_image_.reset(); return; } @@ -3505,7 +3527,7 @@ DCHECK(!raster_canvas_); SkColorType sk_color_type = viz::ResourceFormatToClosestSkColorType( - /*gpu_compositing=*/true, shared_image_->format()); + /*gpu_compositing=*/true, shared_image->format()); int final_msaa_count; uint32_t flags; @@ -3539,6 +3561,26 @@ surface_props = skia::LegacyDisplayGlobals::GetSkSurfaceProps(flags); } + if (shared_image_raster_) { + absl::optional<SkColor> clear_color; + if (needs_clear) + clear_color.emplace(sk_color); + scoped_shared_image_raster_write_ = + shared_image_raster_->BeginScopedWriteAccess( + final_msaa_count, surface_props, clear_color); + if (!scoped_shared_image_raster_write_) { + LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, "glBeginRasterCHROMIUM", + "failed to create surface"); + shared_image_raster_.reset(); + return; + } + + if (needs_clear) + shared_image_raster_->SetCleared(); + + return; + } + std::vector<GrBackendSemaphore> begin_semaphores; DCHECK(end_semaphores_.empty()); DCHECK(!scoped_shared_image_write_); @@ -3611,7 +3653,7 @@ TRACE_EVENT1("gpu", "RasterDecoderImpl::DoRasterCHROMIUM", "raster_id", ++raster_chromium_id_); - if (!sk_surface_) { + if (!sk_surface_ && !scoped_shared_image_raster_write_) { LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, "glRasterCHROMIUM", "RasterCHROMIUM without BeginRasterCHROMIUM"); return; @@ -3647,9 +3689,6 @@ return; } - alignas( - cc::PaintOpBuffer::PaintOpAlign) char data[sizeof(cc::LargestPaintOp)]; - cc::PlaybackParams playback_params(nullptr, SkM44()); TransferCacheDeserializeHelperImpl impl(raster_decoder_id_, transfer_cache()); cc::PaintOp::DeserializeOptions options( @@ -3659,6 +3698,16 @@ options.crash_dump_on_failure = !gpu_preferences_.disable_oopr_debug_crash_dump; + if (scoped_shared_image_raster_write_) { + auto* paint_op_buffer = + scoped_shared_image_raster_write_->paint_op_buffer(); + paint_op_buffer->Deserialize(paint_buffer_memory, raster_shm_size, options); + return; + } + + alignas( + cc::PaintOpBuffer::PaintOpAlign) char data[sizeof(cc::LargestPaintOp)]; + size_t paint_buffer_size = raster_shm_size; gl::ScopedProgressReporter report_progress( shared_context_state_->progress_reporter()); @@ -3710,12 +3759,26 @@ void RasterDecoderImpl::DoEndRasterCHROMIUM() { TRACE_EVENT0("gpu", "RasterDecoderImpl::DoEndRasterCHROMIUM"); - if (!sk_surface_) { + if (!sk_surface_ && !scoped_shared_image_raster_write_) { LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, "glEndRasterCHROMIUM", "EndRasterCHROMIUM without BeginRasterCHROMIUM"); return; } + if (scoped_shared_image_raster_write_) { + scoped_shared_image_raster_write_->set_callback(base::BindOnce( + [](scoped_refptr<ServiceFontManager> font_manager, + std::vector<SkDiscardableHandleId> handles) { + if (!font_manager->is_destroyed()) + font_manager->Unlock(handles); + }, + font_manager_, std::move(locked_handles_))); + scoped_shared_image_raster_write_.reset(); + shared_image_raster_.reset(); + locked_handles_.clear(); + return; + } + raster_canvas_ = nullptr; if (use_ddl_in_current_raster_session_) {
diff --git a/gpu/command_buffer/service/service_font_manager.h b/gpu/command_buffer/service/service_font_manager.h index 379473ae..56d21860 100644 --- a/gpu/command_buffer/service/service_font_manager.h +++ b/gpu/command_buffer/service/service_font_manager.h
@@ -37,6 +37,7 @@ bool disable_oopr_debug_crash_dump() const { return disable_oopr_debug_crash_dump_; } + bool is_destroyed() const { return destroyed_; } private: friend class base::RefCountedThreadSafe<ServiceFontManager>;
diff --git a/gpu/command_buffer/service/shared_image_backing.cc b/gpu/command_buffer/service/shared_image_backing.cc index f98ba6ac..a1be683 100644 --- a/gpu/command_buffer/service/shared_image_backing.cc +++ b/gpu/command_buffer/service/shared_image_backing.cc
@@ -103,6 +103,12 @@ return nullptr; } +std::unique_ptr<SharedImageRepresentationRaster> +SharedImageBacking::ProduceRaster(SharedImageManager* manager, + MemoryTypeTracker* tracker) { + return nullptr; +} + void SharedImageBacking::AddRef(SharedImageRepresentation* representation) { AutoLock auto_lock(this);
diff --git a/gpu/command_buffer/service/shared_image_backing.h b/gpu/command_buffer/service/shared_image_backing.h index baa3598..b03d38b 100644 --- a/gpu/command_buffer/service/shared_image_backing.h +++ b/gpu/command_buffer/service/shared_image_backing.h
@@ -52,6 +52,7 @@ class SharedImageRepresentationOverlay; class SharedImageRepresentationMemory; class SharedImageRepresentationVaapi; +class SharedImageRepresentationRaster; class MemoryTypeTracker; class SharedImageFactory; class VaapiDependenciesFactory; @@ -177,6 +178,9 @@ virtual std::unique_ptr<SharedImageRepresentationMemory> ProduceMemory( SharedImageManager* manager, MemoryTypeTracker* tracker); + virtual std::unique_ptr<SharedImageRepresentationRaster> ProduceRaster( + SharedImageManager* manager, + MemoryTypeTracker* tracker); // Used by subclasses during destruction. bool have_context() const EXCLUSIVE_LOCKS_REQUIRED(lock_);
diff --git a/gpu/command_buffer/service/shared_image_backing_factory_raw_draw.cc b/gpu/command_buffer/service/shared_image_backing_factory_raw_draw.cc new file mode 100644 index 0000000..27383e53 --- /dev/null +++ b/gpu/command_buffer/service/shared_image_backing_factory_raw_draw.cc
@@ -0,0 +1,448 @@ +// 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 "gpu/command_buffer/service/shared_image_backing_factory_raw_draw.h" + +#include "base/hash/hash.h" +#include "base/logging.h" +#include "base/memory/scoped_refptr.h" +#include "base/trace_event/memory_dump_manager.h" +#include "base/trace_event/process_memory_dump.h" +#include "base/types/pass_key.h" +#include "build/build_config.h" +#include "cc/paint/paint_op_buffer.h" +#include "components/viz/common/resources/resource_format.h" +#include "components/viz/common/resources/resource_format_utils.h" +#include "components/viz/common/resources/resource_sizes.h" +#include "gpu/command_buffer/common/shared_image_usage.h" +#include "gpu/command_buffer/service/feature_info.h" +#include "gpu/command_buffer/service/mailbox_manager.h" +#include "gpu/command_buffer/service/shared_context_state.h" +#include "gpu/command_buffer/service/shared_image_backing.h" +#include "gpu/command_buffer/service/shared_image_representation.h" +#include "gpu/command_buffer/service/skia_utils.h" +#include "skia/buildflags.h" +#include "third_party/skia/include/core/SkCanvas.h" +#include "third_party/skia/include/core/SkPromiseImageTexture.h" +#include "third_party/skia/include/core/SkSurface.h" +#include "third_party/skia/include/core/SkSurfaceProps.h" +#include "third_party/skia/include/gpu/GrBackendSurface.h" +#include "third_party/skia/include/gpu/GrTypes.h" +#include "ui/gl/gl_context.h" +#include "ui/gl/gl_gl_api_implementation.h" +#include "ui/gl/trace_util.h" + +namespace gpu { +namespace raster { + +class SharedImageBackingFactoryRawDraw; + +namespace { + +class RawDrawBacking : public ClearTrackingSharedImageBacking { + public: + RawDrawBacking(base::PassKey<SharedImageBackingFactoryRawDraw>, + const Mailbox& mailbox, + viz::ResourceFormat format, + const gfx::Size& size, + const gfx::ColorSpace& color_space, + GrSurfaceOrigin surface_origin, + SkAlphaType alpha_type, + uint32_t usage, + size_t estimated_size, + scoped_refptr<SharedContextState> context_state) + : ClearTrackingSharedImageBacking(mailbox, + format, + size, + color_space, + surface_origin, + alpha_type, + usage, + estimated_size, + false /* is_thread_safe */), + context_state_(std::move(context_state)) { + DCHECK(!!context_state_); + } + + ~RawDrawBacking() override { + context_state_->MakeCurrent(nullptr); + promise_texture_.reset(); + context_state_->EraseCachedSkSurface(this); + + ResetPaintOpBuffer(); + + if (backend_texture_.isValid()) + DeleteGrBackendTexture(context_state_.get(), &backend_texture_); + + if (!context_state_->context_lost()) + context_state_->set_need_context_state_reset(true); + } + + // SharedImageBacking implementation. + bool ProduceLegacyMailbox(MailboxManager* mailbox_manager) override { + NOTREACHED() << "Not supported."; + return false; + } + + void Update(std::unique_ptr<gfx::GpuFence> in_fence) override { + NOTREACHED() << "Not supported."; + } + + void OnMemoryDump(const std::string& dump_name, + base::trace_event::MemoryAllocatorDump* dump, + base::trace_event::ProcessMemoryDump* pmd, + uint64_t client_tracing_id) override {} + + SkColorType GetSkColorType() { + return viz::ResourceFormatToClosestSkColorType( + /*gpu_compositing=*/true, format()); + } + + sk_sp<SkSurface> GetSkSurface(int final_msaa_count, + const SkSurfaceProps& surface_props) { + if (context_state_->context_lost()) { + LOG(ERROR) << "Context is lost."; + return nullptr; + } + + DCHECK(context_state_->IsCurrent(nullptr)); + + auto surface = context_state_->GetCachedSkSurface(this); + if (!surface || final_msaa_count != surface_msaa_count_ || + surface_props != surface->props()) { + DCHECK(backend_texture_.isValid()); + surface = SkSurface::MakeFromBackendTexture( + context_state_->gr_context(), backend_texture_, surface_origin(), + final_msaa_count, GetSkColorType(), color_space().ToSkColorSpace(), + &surface_props); + if (!surface) { + LOG(ERROR) << "MakeFromBackendTexture() failed."; + context_state_->EraseCachedSkSurface(this); + return nullptr; + } + surface_msaa_count_ = final_msaa_count; + context_state_->CacheSkSurface(this, surface); + } + return surface; + } + + bool SkSurfaceUnique() { + return context_state_->CachedSkSurfaceIsUnique(this); + } + + protected: + std::unique_ptr<SharedImageRepresentationSkia> ProduceSkia( + SharedImageManager* manager, + MemoryTypeTracker* tracker, + scoped_refptr<SharedContextState> context_state) override; + + std::unique_ptr<SharedImageRepresentationRaster> ProduceRaster( + SharedImageManager* manager, + MemoryTypeTracker* tracker) override; + + private: + friend class gpu::raster::SharedImageBackingFactoryRawDraw; + class RepresentationSkia; + class RepresentationRaster; + + bool Initialize() { + if (context_state_->context_lost()) { + LOG(ERROR) << "Context is lost."; + return false; + } + + // MakeCurrent to avoid destroying another client's state because Skia may + // change GL state to create and upload textures (crbug.com/1095679). + context_state_->MakeCurrent(nullptr); + context_state_->set_need_context_state_reset(true); + + DCHECK_NE(format(), viz::ResourceFormat::ETC1); + auto mipmap = usage() & SHARED_IMAGE_USAGE_MIPMAP ? GrMipMapped::kYes + : GrMipMapped::kNo; +#if DCHECK_IS_ON() + // Initializing to bright green makes it obvious if the pixels are not + // properly set before they are displayed (e.g. https://crbug.com/956555). + // We don't do this on release builds because there is a slight overhead. + backend_texture_ = context_state_->gr_context()->createBackendTexture( + size().width(), size().height(), GetSkColorType(), SkColors::kBlue, + mipmap, GrRenderable::kYes, GrProtected::kNo); +#else + backend_texture_ = context_state_->gr_context()->createBackendTexture( + size().width(), size().height(), GetSkColorType(), mipmap, + GrRenderable::kYes, GrProtected::kNo); +#endif + + if (!backend_texture_.isValid()) { + DLOG(ERROR) << "createBackendTexture() failed with SkColorType:" + << GetSkColorType(); + return false; + } + + promise_texture_ = SkPromiseImageTexture::Make(backend_texture_); + + return true; + } + + void ResetPaintOpBuffer() { + if (!paint_op_buffer_) { + DCHECK(!clear_color_); + DCHECK(!paint_op_release_callback_); + return; + } + + final_msaa_count_ = 0; + clear_color_.reset(); + paint_op_buffer_->Reset(); + + if (paint_op_release_callback_) + std::move(paint_op_release_callback_).Run(); + } + + void FlushPaintOpBuffer() { + bool need_flush = + clear_color_ || (paint_op_buffer_ && paint_op_buffer_->size()); + + if (!need_flush) + return; + auto surface = GetSkSurface(final_msaa_count_, surface_props_); + auto* canvas = surface->getCanvas(); + + if (clear_color_) + canvas->drawColor(*clear_color_, SkBlendMode::kSrc); + + if (paint_op_buffer_ && paint_op_buffer_->size()) { + cc::PlaybackParams playback_params(nullptr, SkM44()); + paint_op_buffer_->Playback(canvas, playback_params); + } + + surface->flush(); + } + + scoped_refptr<SharedContextState> context_state_; + + GrBackendTexture backend_texture_; + sk_sp<SkPromiseImageTexture> promise_texture_; + int surface_msaa_count_ = 0; + + int32_t final_msaa_count_ = 0; + + SkSurfaceProps surface_props_{/*flags=*/0, kUnknown_SkPixelGeometry}; + absl::optional<SkColor> clear_color_; + sk_sp<cc::PaintOpBuffer> paint_op_buffer_; + base::OnceClosure paint_op_release_callback_; +}; + +class RawDrawBacking::RepresentationSkia + : public SharedImageRepresentationSkia { + public: + RepresentationSkia(SharedImageManager* manager, + SharedImageBacking* backing, + MemoryTypeTracker* tracker) + : SharedImageRepresentationSkia(manager, backing, tracker) {} + + ~RepresentationSkia() override = default; + + sk_sp<SkSurface> BeginWriteAccess( + int final_msaa_count, + const SkSurfaceProps& surface_props, + std::vector<GrBackendSemaphore>* begin_semaphores, + std::vector<GrBackendSemaphore>* end_semaphores) override { + NOTREACHED() << "Not supported"; + return nullptr; + } + + sk_sp<SkPromiseImageTexture> BeginWriteAccess( + std::vector<GrBackendSemaphore>* begin_semaphores, + std::vector<GrBackendSemaphore>* end_semaphores, + std::unique_ptr<GrBackendSurfaceMutableState>* end_state) override { + NOTREACHED() << "Not supported"; + return nullptr; + } + + void EndWriteAccess(sk_sp<SkSurface> surface) override { NOTREACHED(); } + + // Skia read access is supported temporarily. It will be removed when RawDraw + // is fully supported. + sk_sp<SkPromiseImageTexture> BeginReadAccess( + std::vector<GrBackendSemaphore>* begin_semaphores, + std::vector<GrBackendSemaphore>* end_semaphores) override { + raw_draw_backing()->FlushPaintOpBuffer(); + raw_draw_backing()->ResetPaintOpBuffer(); + return raw_draw_backing()->promise_texture_; + } + + void EndReadAccess() override {} + + bool SupportsMultipleConcurrentReadAccess() override { return true; } + + private: + RawDrawBacking* raw_draw_backing() { + return static_cast<RawDrawBacking*>(backing()); + } +}; + +class RawDrawBacking::RepresentationRaster + : public SharedImageRepresentationRaster { + public: + RepresentationRaster(SharedImageManager* manager, + SharedImageBacking* backing, + MemoryTypeTracker* tracker) + : SharedImageRepresentationRaster(manager, backing, tracker) {} + ~RepresentationRaster() override = default; + + cc::PaintOpBuffer* BeginReadAccess( + absl::optional<SkColor>& clear_color) override { + if (!raw_draw_backing()->paint_op_buffer_) { + raw_draw_backing()->paint_op_buffer_ = sk_make_sp<cc::PaintOpBuffer>(); + } + clear_color = raw_draw_backing()->clear_color_; + return raw_draw_backing()->paint_op_buffer_.get(); + } + + void EndReadAccess() override {} + + cc::PaintOpBuffer* BeginWriteAccess( + int final_msaa_count, + const SkSurfaceProps& surface_props, + const absl::optional<SkColor>& clear_color) override { + raw_draw_backing()->ResetPaintOpBuffer(); + if (!raw_draw_backing()->paint_op_buffer_) { + raw_draw_backing()->paint_op_buffer_ = sk_make_sp<cc::PaintOpBuffer>(); + } + raw_draw_backing()->final_msaa_count_ = final_msaa_count; + raw_draw_backing()->surface_props_ = surface_props; + raw_draw_backing()->clear_color_ = clear_color; + + return raw_draw_backing()->paint_op_buffer_.get(); + } + + void EndWriteAccess(base::OnceClosure callback) override { + if (callback) { + DCHECK(!raw_draw_backing()->paint_op_release_callback_); + raw_draw_backing()->paint_op_release_callback_ = std::move(callback); + } + } + + private: + RawDrawBacking* raw_draw_backing() { + return static_cast<RawDrawBacking*>(backing()); + } +}; + +// Remove skia representation support when raw draw is fully supported. +std::unique_ptr<SharedImageRepresentationSkia> RawDrawBacking::ProduceSkia( + SharedImageManager* manager, + MemoryTypeTracker* tracker, + scoped_refptr<SharedContextState> context_state) { + if (context_state_->context_lost()) + return nullptr; + + DCHECK_EQ(context_state_, context_state.get()); + return std::make_unique<RepresentationSkia>(manager, this, tracker); +} + +std::unique_ptr<SharedImageRepresentationRaster> RawDrawBacking::ProduceRaster( + SharedImageManager* manager, + MemoryTypeTracker* tracker) { + return std::make_unique<RepresentationRaster>(manager, this, tracker); +} + +} // namespace + +SharedImageBackingFactoryRawDraw::SharedImageBackingFactoryRawDraw( + scoped_refptr<SharedContextState> context_state) + : context_state_(std::move(context_state)) {} + +SharedImageBackingFactoryRawDraw::~SharedImageBackingFactoryRawDraw() = default; + +std::unique_ptr<SharedImageBacking> +SharedImageBackingFactoryRawDraw::CreateSharedImage( + const Mailbox& mailbox, + viz::ResourceFormat format, + SurfaceHandle surface_handle, + const gfx::Size& size, + const gfx::ColorSpace& color_space, + GrSurfaceOrigin surface_origin, + SkAlphaType alpha_type, + uint32_t usage, + bool is_thread_safe) { + DCHECK(!is_thread_safe); + auto texture = std::make_unique<RawDrawBacking>( + base::PassKey<SharedImageBackingFactoryRawDraw>(), mailbox, format, size, + color_space, surface_origin, alpha_type, usage, /*estimated_size=*/0, + context_state_); + if (!texture->Initialize()) + return nullptr; + return texture; +} + +std::unique_ptr<SharedImageBacking> +SharedImageBackingFactoryRawDraw::CreateSharedImage( + const Mailbox& mailbox, + viz::ResourceFormat format, + const gfx::Size& size, + const gfx::ColorSpace& color_space, + GrSurfaceOrigin surface_origin, + SkAlphaType alpha_type, + uint32_t usage, + base::span<const uint8_t> data) { + NOTREACHED() << "Not supported"; + return nullptr; +} + +std::unique_ptr<SharedImageBacking> +SharedImageBackingFactoryRawDraw::CreateSharedImage( + const Mailbox& mailbox, + int client_id, + gfx::GpuMemoryBufferHandle handle, + gfx::BufferFormat buffer_format, + gfx::BufferPlane plane, + SurfaceHandle surface_handle, + const gfx::Size& size, + const gfx::ColorSpace& color_space, + GrSurfaceOrigin surface_origin, + SkAlphaType alpha_type, + uint32_t usage) { + NOTREACHED() << "Not supported"; + return nullptr; +} + +bool SharedImageBackingFactoryRawDraw::CanUseRawDrawBacking( + uint32_t usage, + GrContextType gr_context_type) const { + // Ignore for mipmap usage. + usage &= ~SHARED_IMAGE_USAGE_MIPMAP; + + auto kRawDrawBackingUsage = + SHARED_IMAGE_USAGE_DISPLAY | SHARED_IMAGE_USAGE_RASTER | + SHARED_IMAGE_USAGE_OOP_RASTERIZATION | SHARED_IMAGE_USAGE_RAW_DRAW; + return usage == kRawDrawBackingUsage; +} + +bool SharedImageBackingFactoryRawDraw::IsSupported( + uint32_t usage, + viz::ResourceFormat format, + bool thread_safe, + gfx::GpuMemoryBufferType gmb_type, + GrContextType gr_context_type, + bool* allow_legacy_mailbox, + bool is_pixel_used) { + if (!CanUseRawDrawBacking(usage, gr_context_type)) { + return false; + } + + if (!is_pixel_used) { + return false; + } + + if (gmb_type != gfx::EMPTY_BUFFER) { + return false; + } + + *allow_legacy_mailbox = false; + return true; +} + +} // namespace raster +} // namespace gpu
diff --git a/gpu/command_buffer/service/shared_image_backing_factory_raw_draw.h b/gpu/command_buffer/service/shared_image_backing_factory_raw_draw.h new file mode 100644 index 0000000..7a28bd9a --- /dev/null +++ b/gpu/command_buffer/service/shared_image_backing_factory_raw_draw.h
@@ -0,0 +1,81 @@ +// 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 GPU_COMMAND_BUFFER_SERVICE_SHARED_IMAGE_BACKING_FACTORY_RAW_DRAW_H_ +#define GPU_COMMAND_BUFFER_SERVICE_SHARED_IMAGE_BACKING_FACTORY_RAW_DRAW_H_ + +#include <memory> + +#include "base/macros.h" +#include "components/viz/common/resources/resource_format.h" +#include "gpu/command_buffer/service/shared_image_backing_factory.h" +#include "gpu/command_buffer/service/texture_base.h" +#include "gpu/gpu_gles2_export.h" +#include "third_party/skia/include/core/SkImage.h" +#include "ui/gfx/geometry/size.h" + +namespace gpu { + +class SharedContextState; + +namespace raster { + +class GPU_GLES2_EXPORT SharedImageBackingFactoryRawDraw + : public gpu::SharedImageBackingFactory { + public: + explicit SharedImageBackingFactoryRawDraw( + scoped_refptr<SharedContextState> context_state); + ~SharedImageBackingFactoryRawDraw() override; + + // SharedImageBackingFactory implementation: + std::unique_ptr<SharedImageBacking> CreateSharedImage( + const Mailbox& mailbox, + viz::ResourceFormat format, + SurfaceHandle surface_handle, + const gfx::Size& size, + const gfx::ColorSpace& color_space, + GrSurfaceOrigin surface_origin, + SkAlphaType alpha_type, + uint32_t usage, + bool is_thread_safe) override; + std::unique_ptr<SharedImageBacking> CreateSharedImage( + const Mailbox& mailbox, + viz::ResourceFormat format, + const gfx::Size& size, + const gfx::ColorSpace& color_space, + GrSurfaceOrigin surface_origin, + SkAlphaType alpha_type, + uint32_t usage, + base::span<const uint8_t> pixel_data) override; + std::unique_ptr<SharedImageBacking> CreateSharedImage( + const Mailbox& mailbox, + int client_id, + gfx::GpuMemoryBufferHandle handle, + gfx::BufferFormat format, + gfx::BufferPlane plane, + SurfaceHandle surface_handle, + const gfx::Size& size, + const gfx::ColorSpace& color_space, + GrSurfaceOrigin surface_origin, + SkAlphaType alpha_type, + uint32_t usage) override; + bool IsSupported(uint32_t usage, + viz::ResourceFormat format, + bool thread_safe, + gfx::GpuMemoryBufferType gmb_type, + GrContextType gr_context_type, + bool* allow_legacy_mailbox, + bool is_pixel_used) override; + + private: + bool CanUseRawDrawBacking(uint32_t usage, + GrContextType gr_context_type) const; + + scoped_refptr<SharedContextState> context_state_; +}; + +} // namespace raster +} // namespace gpu + +#endif // GPU_COMMAND_BUFFER_SERVICE_SHARED_IMAGE_BACKING_FACTORY_RAW_DRAW_H_
diff --git a/gpu/command_buffer/service/shared_image_backing_ozone.cc b/gpu/command_buffer/service/shared_image_backing_ozone.cc index c1f6f2d..39b42ae 100644 --- a/gpu/command_buffer/service/shared_image_backing_ozone.cc +++ b/gpu/command_buffer/service/shared_image_backing_ozone.cc
@@ -155,16 +155,16 @@ std::unique_ptr<SharedImageRepresentationGLTexture> SharedImageBackingOzone::ProduceGLTexture(SharedImageManager* manager, MemoryTypeTracker* tracker) { - return SharedImageRepresentationGLOzone::Create(manager, this, tracker, - pixmap_, format()); + return SharedImageRepresentationGLTextureOzone::Create(manager, this, tracker, + pixmap_, format()); } std::unique_ptr<SharedImageRepresentationGLTexturePassthrough> SharedImageBackingOzone::ProduceGLTexturePassthrough( SharedImageManager* manager, MemoryTypeTracker* tracker) { - NOTIMPLEMENTED_LOG_ONCE(); - return nullptr; + return SharedImageRepresentationGLTexturePassthroughOzone::Create( + manager, this, tracker, pixmap_, format()); } std::unique_ptr<SharedImageRepresentationSkia>
diff --git a/gpu/command_buffer/service/shared_image_backing_ozone.h b/gpu/command_buffer/service/shared_image_backing_ozone.h index d85c125..a40105c1 100644 --- a/gpu/command_buffer/service/shared_image_backing_ozone.h +++ b/gpu/command_buffer/service/shared_image_backing_ozone.h
@@ -84,7 +84,7 @@ VaapiDependenciesFactory* dep_factory) override; private: - friend class SharedImageRepresentationGLOzone; + friend class SharedImageRepresentationGLOzoneShared; friend class SharedImageRepresentationDawnOzone; class SharedImageRepresentationVaapiOzone; class SharedImageRepresentationOverlayOzone;
diff --git a/gpu/command_buffer/service/shared_image_factory.cc b/gpu/command_buffer/service/shared_image_factory.cc index c6b672c7..e8a306e 100644 --- a/gpu/command_buffer/service/shared_image_factory.cc +++ b/gpu/command_buffer/service/shared_image_factory.cc
@@ -23,10 +23,12 @@ #include "gpu/command_buffer/service/shared_image_backing.h" #include "gpu/command_buffer/service/shared_image_backing_factory_gl_image.h" #include "gpu/command_buffer/service/shared_image_backing_factory_gl_texture.h" +#include "gpu/command_buffer/service/shared_image_backing_factory_raw_draw.h" #include "gpu/command_buffer/service/shared_image_backing_factory_shared_memory.h" #include "gpu/command_buffer/service/shared_image_manager.h" #include "gpu/command_buffer/service/shared_image_representation.h" #include "gpu/command_buffer/service/wrapped_sk_image.h" +#include "gpu/config/gpu_finch_features.h" #include "gpu/config/gpu_preferences.h" #include "ui/gl/gl_implementation.h" #include "ui/gl/trace_util.h" @@ -147,6 +149,12 @@ factories_.push_back(std::move(wrapped_sk_image_factory)); } + if (features::IsUsingRawDraw() && context_state) { + auto factory = std::make_unique<raster::SharedImageBackingFactoryRawDraw>( + context_state); + factories_.push_back(std::move(factory)); + } + bool use_gl = gl::GetGLImplementation() != gl::kGLImplementationNone; if (use_gl) { auto gl_texture_backing_factory = @@ -638,4 +646,9 @@ return manager_->ProduceMemory(mailbox, tracker_.get()); } +std::unique_ptr<SharedImageRepresentationRaster> +SharedImageRepresentationFactory::ProduceRaster(const Mailbox& mailbox) { + return manager_->ProduceRaster(mailbox, tracker_.get()); +} + } // namespace gpu
diff --git a/gpu/command_buffer/service/shared_image_factory.h b/gpu/command_buffer/service/shared_image_factory.h index 1bb4f844..dc229c7 100644 --- a/gpu/command_buffer/service/shared_image_factory.h +++ b/gpu/command_buffer/service/shared_image_factory.h
@@ -216,6 +216,8 @@ const Mailbox& mailbox); std::unique_ptr<SharedImageRepresentationMemory> ProduceMemory( const Mailbox& mailbox); + std::unique_ptr<SharedImageRepresentationRaster> ProduceRaster( + const Mailbox& mailbox); private: SharedImageManager* const manager_;
diff --git a/gpu/command_buffer/service/shared_image_manager.cc b/gpu/command_buffer/service/shared_image_manager.cc index 8e56114..35679a04 100644 --- a/gpu/command_buffer/service/shared_image_manager.cc +++ b/gpu/command_buffer/service/shared_image_manager.cc
@@ -307,7 +307,7 @@ AutoLock autolock(this); auto found = images_.find(mailbox); if (found == images_.end()) { - LOG(ERROR) << "SharedImageManager::Producememory: Trying to Produce a " + LOG(ERROR) << "SharedImageManager::ProduceMemory: Trying to Produce a " "Memory representation from a non-existent mailbox."; return nullptr; } @@ -317,6 +317,24 @@ return (*found)->ProduceMemory(this, tracker); } +std::unique_ptr<SharedImageRepresentationRaster> +SharedImageManager::ProduceRaster(const Mailbox& mailbox, + MemoryTypeTracker* tracker) { + CALLED_ON_VALID_THREAD(); + + AutoLock autolock(this); + auto found = images_.find(mailbox); + if (found == images_.end()) { + LOG(ERROR) << "SharedImageManager::ProduceRaster: Trying to Produce a " + "Raster representation from a non-existent mailbox."; + return nullptr; + } + + // This is expected to fail based on the SharedImageBacking type, so don't log + // error here. Caller is expected to handle nullptr. + return (*found)->ProduceRaster(this, tracker); +} + void SharedImageManager::OnRepresentationDestroyed( const Mailbox& mailbox, SharedImageRepresentation* representation) {
diff --git a/gpu/command_buffer/service/shared_image_manager.h b/gpu/command_buffer/service/shared_image_manager.h index 2c4f2d7..b76b96d 100644 --- a/gpu/command_buffer/service/shared_image_manager.h +++ b/gpu/command_buffer/service/shared_image_manager.h
@@ -79,6 +79,9 @@ std::unique_ptr<SharedImageRepresentationMemory> ProduceMemory( const Mailbox& mailbox, MemoryTypeTracker* ref); + std::unique_ptr<SharedImageRepresentationRaster> ProduceRaster( + const Mailbox& mailbox, + MemoryTypeTracker* ref); // Called by SharedImageRepresentation in the destructor. void OnRepresentationDestroyed(const Mailbox& mailbox,
diff --git a/gpu/command_buffer/service/shared_image_representation.cc b/gpu/command_buffer/service/shared_image_representation.cc index e8aa1b3..a79b3b8 100644 --- a/gpu/command_buffer/service/shared_image_representation.cc +++ b/gpu/command_buffer/service/shared_image_representation.cc
@@ -391,4 +391,48 @@ BeginReadAccess()); } +SharedImageRepresentationRaster::ScopedReadAccess::ScopedReadAccess( + base::PassKey<SharedImageRepresentationRaster> pass_key, + SharedImageRepresentationRaster* representation, + const cc::PaintOpBuffer* paint_op_buffer, + const absl::optional<SkColor>& clear_color) + : ScopedAccessBase(representation), + paint_op_buffer_(paint_op_buffer), + clear_color_(clear_color) {} + +SharedImageRepresentationRaster::ScopedReadAccess::~ScopedReadAccess() { + representation()->EndReadAccess(); +} + +SharedImageRepresentationRaster::ScopedWriteAccess::ScopedWriteAccess( + base::PassKey<SharedImageRepresentationRaster> pass_key, + SharedImageRepresentationRaster* representation, + cc::PaintOpBuffer* paint_op_buffer) + : ScopedAccessBase(representation), paint_op_buffer_(paint_op_buffer) {} + +SharedImageRepresentationRaster::ScopedWriteAccess::~ScopedWriteAccess() { + representation()->EndWriteAccess(std::move(callback_)); +} + +std::unique_ptr<SharedImageRepresentationRaster::ScopedReadAccess> +SharedImageRepresentationRaster::BeginScopedReadAccess() { + absl::optional<SkColor> clear_color; + auto* paint_op_buffer = BeginReadAccess(clear_color); + if (!paint_op_buffer) + return nullptr; + return std::make_unique<ScopedReadAccess>( + base::PassKey<SharedImageRepresentationRaster>(), this, paint_op_buffer, + clear_color); +} + +std::unique_ptr<SharedImageRepresentationRaster::ScopedWriteAccess> +SharedImageRepresentationRaster::BeginScopedWriteAccess( + int final_msaa_count, + const SkSurfaceProps& surface_props, + const absl::optional<SkColor>& clear_color) { + return std::make_unique<ScopedWriteAccess>( + base::PassKey<SharedImageRepresentationRaster>(), this, + BeginWriteAccess(final_msaa_count, surface_props, clear_color)); +} + } // namespace gpu
diff --git a/gpu/command_buffer/service/shared_image_representation.h b/gpu/command_buffer/service/shared_image_representation.h index f4d895ba..98c691f5 100644 --- a/gpu/command_buffer/service/shared_image_representation.h +++ b/gpu/command_buffer/service/shared_image_representation.h
@@ -33,6 +33,10 @@ } // namespace android } // namespace base +namespace cc { +class PaintOpBuffer; +} + namespace gl { class GLImage; } @@ -564,6 +568,78 @@ virtual void BeginAccess() = 0; }; +// Representation of a SharedImageBacking for raster work. +// This representation is used for raster work and compositor. The raster work +// will be converted to a cc::PaintOpBuffer and stored in the +// SharedImageBacking. And then the the compositor will access the stored +// cc::PaintOpBuffer and execute paint ops in it. +class GPU_GLES2_EXPORT SharedImageRepresentationRaster + : public SharedImageRepresentation { + public: + class GPU_GLES2_EXPORT ScopedReadAccess + : public ScopedAccessBase<SharedImageRepresentationRaster> { + public: + ScopedReadAccess(base::PassKey<SharedImageRepresentationRaster> pass_key, + SharedImageRepresentationRaster* representation, + const cc::PaintOpBuffer* paint_op_buffer, + const absl::optional<SkColor>& clear_color); + ~ScopedReadAccess(); + + const cc::PaintOpBuffer* paint_op_buffer() const { + return paint_op_buffer_; + } + const absl::optional<SkColor>& clear_color() const { return clear_color_; } + + private: + const cc::PaintOpBuffer* const paint_op_buffer_; + absl::optional<SkColor> clear_color_; + }; + + class GPU_GLES2_EXPORT ScopedWriteAccess + : public ScopedAccessBase<SharedImageRepresentationRaster> { + public: + ScopedWriteAccess(base::PassKey<SharedImageRepresentationRaster> pass_key, + SharedImageRepresentationRaster* representation, + cc::PaintOpBuffer* paint_op_buffer); + ~ScopedWriteAccess(); + + cc::PaintOpBuffer* paint_op_buffer() { return paint_op_buffer_; } + // An optional callback which will be called when the all paint ops in the + // |paint_op_buffer_| are released. + void set_callback(base::OnceClosure callback) { + DCHECK(!callback_); + DCHECK(callback); + callback_ = std::move(callback); + } + + private: + cc::PaintOpBuffer* const paint_op_buffer_; + base::OnceClosure callback_; + }; + + SharedImageRepresentationRaster(SharedImageManager* manager, + SharedImageBacking* backing, + MemoryTypeTracker* tracker) + : SharedImageRepresentation(manager, backing, tracker) {} + + std::unique_ptr<ScopedReadAccess> BeginScopedReadAccess(); + + std::unique_ptr<ScopedWriteAccess> BeginScopedWriteAccess( + int final_msaa_count, + const SkSurfaceProps& surface_props, + const absl::optional<SkColor>& clear_color); + + protected: + virtual cc::PaintOpBuffer* BeginReadAccess( + absl::optional<SkColor>& clear_color) = 0; + virtual void EndReadAccess() = 0; + virtual cc::PaintOpBuffer* BeginWriteAccess( + int final_msaa_count, + const SkSurfaceProps& surface_props, + const absl::optional<SkColor>& clear_color) = 0; + virtual void EndWriteAccess(base::OnceClosure callback) = 0; +}; + } // namespace gpu #endif // GPU_COMMAND_BUFFER_SERVICE_SHARED_IMAGE_REPRESENTATION_H_
diff --git a/gpu/command_buffer/service/shared_image_representation_gl_ozone.cc b/gpu/command_buffer/service/shared_image_representation_gl_ozone.cc index cebf7b5..26d2ac7 100644 --- a/gpu/command_buffer/service/shared_image_representation_gl_ozone.cc +++ b/gpu/command_buffer/service/shared_image_representation_gl_ozone.cc
@@ -3,6 +3,7 @@ // found in the LICENSE file. #include "gpu/command_buffer/service/shared_image_representation_gl_ozone.h" +#include <memory> #include "base/memory/ptr_util.h" #include "base/memory/scoped_refptr.h" @@ -13,6 +14,7 @@ #include "gpu/command_buffer/service/shared_image_manager.h" #include "gpu/command_buffer/service/shared_image_representation.h" #include "gpu/command_buffer/service/texture_manager.h" +#include "third_party/abseil-cpp/absl/types/optional.h" #include "ui/gfx/native_pixmap.h" #include "ui/gl/buffer_format_utils.h" #include "ui/gl/gl_bindings.h" @@ -26,29 +28,64 @@ namespace gpu { -// static -std::unique_ptr<SharedImageRepresentationGLOzone> -SharedImageRepresentationGLOzone::Create( - SharedImageManager* manager, - SharedImageBacking* backing, - MemoryTypeTracker* tracker, +bool SharedImageRepresentationGLOzoneShared::BeginAccess( + SharedImageBackingOzone* ozone_backing) { + std::vector<gfx::GpuFenceHandle> fences; + ozone_backing->BeginAccess(&fences); + + if (ozone_backing->NeedsSynchronization()) { + // ChromeOS VMs don't support gpu fences, so there is no good way to + // synchronize with GL. + if (gl::GLFence::IsGpuFenceSupported()) { + for (auto& fence : fences) { + gfx::GpuFence gpu_fence = gfx::GpuFence(std::move(fence)); + std::unique_ptr<gl::GLFence> gl_fence = + gl::GLFence::CreateFromGpuFence(gpu_fence); + gl_fence->ServerWait(); + } + } + } + + // We must call VaapiWrapper::SyncSurface() to ensure all VA-API work is done + // prior to using the buffer in a graphics API. + return ozone_backing->VaSync(); +} + +void SharedImageRepresentationGLOzoneShared::EndAccess( + GLenum mode, + SharedImageBackingOzone* ozone_backing) { + gfx::GpuFenceHandle fence; + if (ozone_backing->NeedsSynchronization()) { + // ChromeOS VMs don't support gpu fences, so there is no good way to + // synchronize with GL. + if (gl::GLFence::IsGpuFenceSupported()) { + auto gl_fence = gl::GLFence::CreateForGpuFence(); + DCHECK(gl_fence); + fence = gl_fence->GetGpuFence()->GetGpuFenceHandle().Clone(); + } + } + bool readonly = mode != GL_SHARED_IMAGE_ACCESS_MODE_READWRITE_CHROMIUM; + ozone_backing->EndAccess(readonly, std::move(fence)); +} + +absl::optional<GLuint> SharedImageRepresentationGLOzoneShared::SetupTexture( + scoped_refptr<gl::GLImageNativePixmap> image, scoped_refptr<gfx::NativePixmap> pixmap, viz::ResourceFormat format) { gl::GLApi* api = gl::g_current_gl_context; DCHECK(api); - GLuint internal_format = viz::TextureStorageFormat(format); - GLuint gl_texture_service_id; api->glGenTexturesFn(1, &gl_texture_service_id); gl::ScopedTextureBinder binder(GL_TEXTURE_2D, gl_texture_service_id); gfx::BufferFormat buffer_format = viz::BufferFormat(format); - auto image = base::MakeRefCounted<gl::GLImageNativePixmap>( - pixmap->GetBufferSize(), buffer_format); + image = base::MakeRefCounted<gl::GLImageNativePixmap>(pixmap->GetBufferSize(), + buffer_format); if (!image->Initialize(pixmap)) { - DLOG(ERROR) << "Unable to initialize EGL image from pixmap"; - return nullptr; + DLOG(ERROR) << "Unable to initialize GL image from pixmap"; + api->glDeleteTexturesFn(1, &gl_texture_service_id); + return absl::nullopt; } api->glTexParameteriFn(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); @@ -56,11 +93,31 @@ api->glTexParameteriFn(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); api->glTexParameteriFn(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); if (!image->BindTexImage(GL_TEXTURE_2D)) { - DLOG(ERROR) << "Unable to bind EGL image to GL_TEXTURE_2D"; + DLOG(ERROR) << "Unable to bind GL image to GL_TEXTURE_2D"; + api->glDeleteTexturesFn(1, &gl_texture_service_id); + return absl::nullopt; + } + + return gl_texture_service_id; +} + +// static +std::unique_ptr<SharedImageRepresentationGLTextureOzone> +SharedImageRepresentationGLTextureOzone::Create( + SharedImageManager* manager, + SharedImageBacking* backing, + MemoryTypeTracker* tracker, + scoped_refptr<gfx::NativePixmap> pixmap, + viz::ResourceFormat format) { + scoped_refptr<gl::GLImageNativePixmap> image; + auto gl_texture_service_id = + SharedImageRepresentationGLOzoneShared::SetupTexture(image, pixmap, + format); + if (!gl_texture_service_id.has_value()) { return nullptr; } - gles2::Texture* texture = new gles2::Texture(gl_texture_service_id); + gles2::Texture* texture = new gles2::Texture(*gl_texture_service_id); texture->SetLightweightRef(); texture->SetTarget(GL_TEXTURE_2D, 1 /*max_levels=*/); texture->set_min_filter(GL_LINEAR); @@ -68,6 +125,7 @@ texture->set_wrap_t(GL_CLAMP_TO_EDGE); texture->set_wrap_s(GL_CLAMP_TO_EDGE); + GLuint internal_format = viz::TextureStorageFormat(format); GLenum gl_format = viz::GLDataFormat(format); GLenum gl_type = viz::GLDataType(format); texture->SetLevelInfo(GL_TEXTURE_2D, 0, internal_format, @@ -77,56 +135,98 @@ texture->SetLevelImage(GL_TEXTURE_2D, 0, image.get(), gles2::Texture::BOUND); texture->SetImmutable(true, true); - return base::WrapUnique<SharedImageRepresentationGLOzone>( - new SharedImageRepresentationGLOzone(manager, backing, tracker, texture)); + return base::WrapUnique<SharedImageRepresentationGLTextureOzone>( + new SharedImageRepresentationGLTextureOzone(manager, backing, tracker, + texture)); } -SharedImageRepresentationGLOzone::SharedImageRepresentationGLOzone( - SharedImageManager* manager, - SharedImageBacking* backing, - MemoryTypeTracker* tracker, - gles2::Texture* texture) +SharedImageRepresentationGLTextureOzone:: + SharedImageRepresentationGLTextureOzone(SharedImageManager* manager, + SharedImageBacking* backing, + MemoryTypeTracker* tracker, + gles2::Texture* texture) : SharedImageRepresentationGLTexture(manager, backing, tracker), texture_(texture) {} -SharedImageRepresentationGLOzone::~SharedImageRepresentationGLOzone() { +SharedImageRepresentationGLTextureOzone:: + ~SharedImageRepresentationGLTextureOzone() { texture_->RemoveLightweightRef(has_context()); } -gles2::Texture* SharedImageRepresentationGLOzone::GetTexture() { +gles2::Texture* SharedImageRepresentationGLTextureOzone::GetTexture() { return texture_; } -bool SharedImageRepresentationGLOzone::BeginAccess(GLenum mode) { +bool SharedImageRepresentationGLTextureOzone::BeginAccess(GLenum mode) { DCHECK(!current_access_mode_); current_access_mode_ = mode; - std::vector<gfx::GpuFenceHandle> fences; - ozone_backing()->BeginAccess(&fences); - - if (ozone_backing()->NeedsSynchronization()) { - for (auto& fence : fences) { - gfx::GpuFence gpu_fence = gfx::GpuFence(std::move(fence)); - std::unique_ptr<gl::GLFence> gl_fence = - gl::GLFence::CreateFromGpuFence(gpu_fence); - gl_fence->ServerWait(); - } - } - - // We must call VaapiWrapper::SyncSurface() to ensure all VA-API work is done - // prior to using the buffer in a graphics API. - return ozone_backing()->VaSync(); + return SharedImageRepresentationGLOzoneShared::BeginAccess(ozone_backing()); } -void SharedImageRepresentationGLOzone::EndAccess() { - gfx::GpuFenceHandle fence; - if (ozone_backing()->NeedsSynchronization()) { - auto gl_fence = gl::GLFence::CreateForGpuFence(); - DCHECK(gl_fence); - fence = gl_fence->GetGpuFence()->GetGpuFenceHandle().Clone(); +void SharedImageRepresentationGLTextureOzone::EndAccess() { + SharedImageRepresentationGLOzoneShared::EndAccess(current_access_mode_, + ozone_backing()); + current_access_mode_ = 0; +} + +// static +std::unique_ptr<SharedImageRepresentationGLTexturePassthroughOzone> +SharedImageRepresentationGLTexturePassthroughOzone::Create( + SharedImageManager* manager, + SharedImageBacking* backing, + MemoryTypeTracker* tracker, + scoped_refptr<gfx::NativePixmap> pixmap, + viz::ResourceFormat format) { + scoped_refptr<gl::GLImageNativePixmap> image; + auto gl_texture_service_id = + SharedImageRepresentationGLOzoneShared::SetupTexture( + image, std::move(pixmap), format); + if (!gl_texture_service_id.has_value()) { + return nullptr; } - bool readonly = - current_access_mode_ != GL_SHARED_IMAGE_ACCESS_MODE_READWRITE_CHROMIUM; - ozone_backing()->EndAccess(readonly, std::move(fence)); + + GLuint internal_format = viz::TextureStorageFormat(format); + GLenum gl_format = viz::GLDataFormat(format); + GLenum gl_type = viz::GLDataType(format); + + scoped_refptr<gles2::TexturePassthrough> texture_passthrough = + base::MakeRefCounted<gpu::gles2::TexturePassthrough>( + *gl_texture_service_id, GL_TEXTURE_2D, internal_format, + backing->size().width(), backing->size().height(), + /*depth=*/1, /*border=*/0, gl_format, gl_type); + + return base::WrapUnique<SharedImageRepresentationGLTexturePassthroughOzone>( + new SharedImageRepresentationGLTexturePassthroughOzone( + manager, backing, tracker, texture_passthrough)); +} + +SharedImageRepresentationGLTexturePassthroughOzone:: + SharedImageRepresentationGLTexturePassthroughOzone( + SharedImageManager* manager, + SharedImageBacking* backing, + MemoryTypeTracker* tracker, + scoped_refptr<gles2::TexturePassthrough> texture_passthrough) + : SharedImageRepresentationGLTexturePassthrough(manager, backing, tracker), + texture_passthrough_(texture_passthrough) {} + +SharedImageRepresentationGLTexturePassthroughOzone:: + ~SharedImageRepresentationGLTexturePassthroughOzone() = default; + +const scoped_refptr<gles2::TexturePassthrough>& +SharedImageRepresentationGLTexturePassthroughOzone::GetTexturePassthrough() { + return texture_passthrough_; +} + +bool SharedImageRepresentationGLTexturePassthroughOzone::BeginAccess( + GLenum mode) { + DCHECK(!current_access_mode_); + current_access_mode_ = mode; + return SharedImageRepresentationGLOzoneShared::BeginAccess(ozone_backing()); +} + +void SharedImageRepresentationGLTexturePassthroughOzone::EndAccess() { + SharedImageRepresentationGLOzoneShared::EndAccess(current_access_mode_, + ozone_backing()); current_access_mode_ = 0; }
diff --git a/gpu/command_buffer/service/shared_image_representation_gl_ozone.h b/gpu/command_buffer/service/shared_image_representation_gl_ozone.h index 78cc7f888b..0174a26 100644 --- a/gpu/command_buffer/service/shared_image_representation_gl_ozone.h +++ b/gpu/command_buffer/service/shared_image_representation_gl_ozone.h
@@ -5,6 +5,7 @@ #ifndef GPU_COMMAND_BUFFER_SERVICE_SHARED_IMAGE_REPRESENTATION_GL_OZONE_H_ #define GPU_COMMAND_BUFFER_SERVICE_SHARED_IMAGE_REPRESENTATION_GL_OZONE_H_ +#include <memory> #include "base/macros.h" #include "base/memory/scoped_refptr.h" #include "components/viz/common/resources/resource_format.h" @@ -15,24 +16,35 @@ #include "gpu/command_buffer/service/shared_image_representation.h" #include "gpu/command_buffer/service/texture_manager.h" #include "ui/gfx/native_pixmap.h" +#include "ui/gl/gl_image_native_pixmap.h" namespace gpu { +class SharedImageRepresentationGLOzoneShared { + public: + static bool BeginAccess(SharedImageBackingOzone* ozone_backing); + static void EndAccess(GLenum mode, SharedImageBackingOzone* ozone_backing); + static absl::optional<GLuint> SetupTexture( + scoped_refptr<gl::GLImageNativePixmap> image, + scoped_refptr<gfx::NativePixmap> pixmap, + viz::ResourceFormat format); +}; + // Representation of an Ozone-backed SharedImage that can be accessed as a // GL texture. -class SharedImageRepresentationGLOzone +class SharedImageRepresentationGLTextureOzone : public SharedImageRepresentationGLTexture { public: - // Creates and initializes a SharedImageRepresentationGLOzone. On failure, - // returns nullptr. - static std::unique_ptr<SharedImageRepresentationGLOzone> Create( + // Creates and initializes a SharedImageRepresentationGLTextureOzone. On + // failure, returns nullptr. + static std::unique_ptr<SharedImageRepresentationGLTextureOzone> Create( SharedImageManager* manager, SharedImageBacking* backing, MemoryTypeTracker* tracker, scoped_refptr<gfx::NativePixmap> pixmap, viz::ResourceFormat format); - ~SharedImageRepresentationGLOzone() override; + ~SharedImageRepresentationGLTextureOzone() override; // SharedImageRepresentationGLTexture implementation. gles2::Texture* GetTexture() override; @@ -40,10 +52,10 @@ void EndAccess() override; private: - SharedImageRepresentationGLOzone(SharedImageManager* manager, - SharedImageBacking* backing, - MemoryTypeTracker* tracker, - gles2::Texture* texture); + SharedImageRepresentationGLTextureOzone(SharedImageManager* manager, + SharedImageBacking* backing, + MemoryTypeTracker* tracker, + gles2::Texture* texture); SharedImageBackingOzone* ozone_backing() { return static_cast<SharedImageBackingOzone*>(backing()); @@ -51,8 +63,44 @@ gles2::Texture* texture_; GLenum current_access_mode_ = 0; +}; - DISALLOW_COPY_AND_ASSIGN(SharedImageRepresentationGLOzone); +// Representation of an Ozone-backed SharedImage that can be accessed as a +// GL texture with passthrough. +class SharedImageRepresentationGLTexturePassthroughOzone + : public SharedImageRepresentationGLTexturePassthrough { + public: + // Creates and initializes a + // SharedImageRepresentationGLTexturePassthroughOzone. On failure, returns + // nullptr. + static std::unique_ptr<SharedImageRepresentationGLTexturePassthroughOzone> + Create(SharedImageManager* manager, + SharedImageBacking* backing, + MemoryTypeTracker* tracker, + scoped_refptr<gfx::NativePixmap> pixmap, + viz::ResourceFormat format); + + ~SharedImageRepresentationGLTexturePassthroughOzone() override; + + // SharedImageRepresentationGLTexturePassthrough implementation. + const scoped_refptr<gles2::TexturePassthrough>& GetTexturePassthrough() + override; + bool BeginAccess(GLenum mode) override; + void EndAccess() override; + + private: + SharedImageRepresentationGLTexturePassthroughOzone( + SharedImageManager* manager, + SharedImageBacking* backing, + MemoryTypeTracker* tracker, + scoped_refptr<gles2::TexturePassthrough> texture_passthrough); + + SharedImageBackingOzone* ozone_backing() { + return static_cast<SharedImageBackingOzone*>(backing()); + } + + scoped_refptr<gles2::TexturePassthrough> texture_passthrough_; + GLenum current_access_mode_ = 0; }; } // namespace gpu
diff --git a/gpu/config/gpu_finch_features.cc b/gpu/config/gpu_finch_features.cc index 33a889f..66369c4 100644 --- a/gpu/config/gpu_finch_features.cc +++ b/gpu/config/gpu_finch_features.cc
@@ -209,6 +209,8 @@ // before gpu service is enabled by default. const base::Feature kWebGPUService{"WebGPUService", base::FEATURE_DISABLED_BY_DEFAULT}; +// Enable raw draw for tiles. +const base::Feature kRawDraw{"RawDraw", base::FEATURE_ENABLED_BY_DEFAULT}; #if defined(OS_ANDROID) @@ -364,6 +366,10 @@ return base::FeatureList::IsEnabled(kDefaultEnableANGLEValidation); } +bool IsUsingRawDraw() { + return base::FeatureList::IsEnabled(kRawDraw); +} + #if defined(OS_ANDROID) bool IsAImageReaderEnabled() { return base::FeatureList::IsEnabled(kAImageReader) &&
diff --git a/gpu/config/gpu_finch_features.h b/gpu/config/gpu_finch_features.h index 71a942d..fcb8985 100644 --- a/gpu/config/gpu_finch_features.h +++ b/gpu/config/gpu_finch_features.h
@@ -62,14 +62,18 @@ GPU_EXPORT extern const base::Feature kEnableVkPipelineCache; GPU_EXPORT extern const base::Feature kReduceOpsTaskSplitting; + GPU_EXPORT extern const base::Feature kEnableDrDc; GPU_EXPORT extern const base::Feature kWebGPUService; +GPU_EXPORT extern const base::Feature kRawDraw; + GPU_EXPORT bool IsUsingVulkan(); GPU_EXPORT bool IsDrDcEnabled(); GPU_EXPORT bool NeedThreadSafeAndroidMedia(); GPU_EXPORT bool IsANGLEValidationEnabled(); +GPU_EXPORT bool IsUsingRawDraw(); #if defined(OS_ANDROID) GPU_EXPORT bool IsAImageReaderEnabled();
diff --git a/ios/chrome/app/app_metrics_app_state_agent_unittest.mm b/ios/chrome/app/app_metrics_app_state_agent_unittest.mm index 6c29a42..9fbb779 100644 --- a/ios/chrome/app/app_metrics_app_state_agent_unittest.mm +++ b/ios/chrome/app/app_metrics_app_state_agent_unittest.mm
@@ -26,6 +26,12 @@ public: FakeProfileSessionDurationsService() : IOSProfileSessionDurationsService(nullptr, nullptr) {} + + FakeProfileSessionDurationsService( + const FakeProfileSessionDurationsService&) = delete; + FakeProfileSessionDurationsService& operator=( + const FakeProfileSessionDurationsService&) = delete; + ~FakeProfileSessionDurationsService() override = default; static std::unique_ptr<KeyedService> Create( @@ -51,8 +57,6 @@ private: int session_started_count_ = 0; int session_ended_count_ = 0; - - DISALLOW_COPY_AND_ASSIGN(FakeProfileSessionDurationsService); }; } // namespace
diff --git a/ios/chrome/app/main_controller.mm b/ios/chrome/app/main_controller.mm index 0b2e9f3..2bb80c5 100644 --- a/ios/chrome/app/main_controller.mm +++ b/ios/chrome/app/main_controller.mm
@@ -214,6 +214,12 @@ MainControllerAuthenticationServiceDelegate( ChromeBrowserState* browser_state, id<BrowsingDataCommands> dispatcher); + + MainControllerAuthenticationServiceDelegate( + const MainControllerAuthenticationServiceDelegate&) = delete; + MainControllerAuthenticationServiceDelegate& operator=( + const MainControllerAuthenticationServiceDelegate&) = delete; + ~MainControllerAuthenticationServiceDelegate() override; // AuthenticationServiceDelegate implementation. @@ -222,8 +228,6 @@ private: ChromeBrowserState* browser_state_ = nullptr; __weak id<BrowsingDataCommands> dispatcher_ = nil; - - DISALLOW_COPY_AND_ASSIGN(MainControllerAuthenticationServiceDelegate); }; MainControllerAuthenticationServiceDelegate::
diff --git a/ios/chrome/app/startup/ios_chrome_main_delegate.h b/ios/chrome/app/startup/ios_chrome_main_delegate.h index 4f25bb5..6ee3d418 100644 --- a/ios/chrome/app/startup/ios_chrome_main_delegate.h +++ b/ios/chrome/app/startup/ios_chrome_main_delegate.h
@@ -12,13 +12,15 @@ class IOSChromeMainDelegate : public web::WebMainDelegate { public: IOSChromeMainDelegate(); + + IOSChromeMainDelegate(const IOSChromeMainDelegate&) = delete; + IOSChromeMainDelegate& operator=(const IOSChromeMainDelegate&) = delete; + ~IOSChromeMainDelegate() override; protected: // web::WebMainDelegate implementation: void BasicStartupComplete() override; - - DISALLOW_COPY_AND_ASSIGN(IOSChromeMainDelegate); }; #endif // IOS_CHROME_APP_STARTUP_IOS_CHROME_MAIN_DELEGATE_H_
diff --git a/ios/chrome/browser/app_launcher/app_launcher_tab_helper.h b/ios/chrome/browser/app_launcher/app_launcher_tab_helper.h index 1b0e1713..7abf4173 100644 --- a/ios/chrome/browser/app_launcher/app_launcher_tab_helper.h +++ b/ios/chrome/browser/app_launcher/app_launcher_tab_helper.h
@@ -19,6 +19,9 @@ : public web::WebStatePolicyDecider, public web::WebStateUserData<AppLauncherTabHelper> { public: + AppLauncherTabHelper(const AppLauncherTabHelper&) = delete; + AppLauncherTabHelper& operator=(const AppLauncherTabHelper&) = delete; + ~AppLauncherTabHelper() override; // Creates a tab helper for |web_state| that uses |abuse_detector| to make @@ -78,8 +81,6 @@ base::WeakPtrFactory<AppLauncherTabHelper> weak_factory_{this}; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(AppLauncherTabHelper); }; #endif // IOS_CHROME_BROWSER_APP_LAUNCHER_APP_LAUNCHER_TAB_HELPER_H_
diff --git a/ios/chrome/browser/application_context.h b/ios/chrome/browser/application_context.h index 41550ceb..227097b 100644 --- a/ios/chrome/browser/application_context.h +++ b/ios/chrome/browser/application_context.h
@@ -75,6 +75,10 @@ class ApplicationContext { public: ApplicationContext(); + + ApplicationContext(const ApplicationContext&) = delete; + ApplicationContext& operator=(const ApplicationContext&) = delete; + virtual ~ApplicationContext(); // Invoked when application enters foreground. Cancels the effect of @@ -160,9 +164,6 @@ protected: // Sets the global ApplicationContext instance. static void SetApplicationContext(ApplicationContext* context); - - private: - DISALLOW_COPY_AND_ASSIGN(ApplicationContext); }; #endif // IOS_CHROME_BROWSER_APPLICATION_CONTEXT_H_
diff --git a/ios/chrome/browser/application_context_impl.h b/ios/chrome/browser/application_context_impl.h index 0de63e91..e2e91a4 100644 --- a/ios/chrome/browser/application_context_impl.h +++ b/ios/chrome/browser/application_context_impl.h
@@ -34,6 +34,10 @@ ApplicationContextImpl(base::SequencedTaskRunner* local_state_task_runner, const base::CommandLine& command_line, const std::string& locale); + + ApplicationContextImpl(const ApplicationContextImpl&) = delete; + ApplicationContextImpl& operator=(const ApplicationContextImpl&) = delete; + ~ApplicationContextImpl() override; // Called before the browser threads are created. @@ -124,8 +128,6 @@ network_connection_tracker_; scoped_refptr<SafeBrowsingService> safe_browsing_service_; - - DISALLOW_COPY_AND_ASSIGN(ApplicationContextImpl); }; #endif // IOS_CHROME_BROWSER_APPLICATION_CONTEXT_IMPL_H_
diff --git a/ios/chrome/browser/autocomplete/autocomplete_provider_client_impl.h b/ios/chrome/browser/autocomplete/autocomplete_provider_client_impl.h index a5b1cabd..1863309 100644 --- a/ios/chrome/browser/autocomplete/autocomplete_provider_client_impl.h +++ b/ios/chrome/browser/autocomplete/autocomplete_provider_client_impl.h
@@ -24,6 +24,12 @@ class AutocompleteProviderClientImpl : public AutocompleteProviderClient { public: explicit AutocompleteProviderClientImpl(ChromeBrowserState* browser_state); + + AutocompleteProviderClientImpl(const AutocompleteProviderClientImpl&) = + delete; + AutocompleteProviderClientImpl& operator=( + const AutocompleteProviderClientImpl&) = delete; + ~AutocompleteProviderClientImpl() override; // AutocompleteProviderClient implementation. @@ -91,8 +97,6 @@ url_consent_helper_; std::unique_ptr<OmniboxTriggeredFeatureService> omnibox_triggered_feature_service_; - - DISALLOW_COPY_AND_ASSIGN(AutocompleteProviderClientImpl); }; #endif // IOS_CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_PROVIDER_CLIENT_IMPL_H_
diff --git a/ios/chrome/browser/autocomplete/autocomplete_scheme_classifier_impl.h b/ios/chrome/browser/autocomplete/autocomplete_scheme_classifier_impl.h index d192cf3d..ede68f0 100644 --- a/ios/chrome/browser/autocomplete/autocomplete_scheme_classifier_impl.h +++ b/ios/chrome/browser/autocomplete/autocomplete_scheme_classifier_impl.h
@@ -13,14 +13,17 @@ class AutocompleteSchemeClassifierImpl : public AutocompleteSchemeClassifier { public: AutocompleteSchemeClassifierImpl(); + + AutocompleteSchemeClassifierImpl(const AutocompleteSchemeClassifierImpl&) = + delete; + AutocompleteSchemeClassifierImpl& operator=( + const AutocompleteSchemeClassifierImpl&) = delete; + ~AutocompleteSchemeClassifierImpl() override; // AutocompleteInputSchemeChecker implementation. metrics::OmniboxInputType GetInputTypeForScheme( const std::string& scheme) const override; - - private: - DISALLOW_COPY_AND_ASSIGN(AutocompleteSchemeClassifierImpl); }; #endif // IOS_CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_SCHEME_CLASSIFIER_IMPL_H_
diff --git a/ios/chrome/browser/autofill/autofill_controller_unittest.mm b/ios/chrome/browser/autofill/autofill_controller_unittest.mm index d0959a6..b0a8e588 100644 --- a/ios/chrome/browser/autofill/autofill_controller_unittest.mm +++ b/ios/chrome/browser/autofill/autofill_controller_unittest.mm
@@ -186,6 +186,10 @@ public: AutofillControllerTest() : ChromeWebTest(std::make_unique<ChromeWebClient>()) {} + + AutofillControllerTest(const AutofillControllerTest&) = delete; + AutofillControllerTest& operator=(const AutofillControllerTest&) = delete; + ~AutofillControllerTest() override {} protected: @@ -239,8 +243,6 @@ FormInputAccessoryMediator* accessory_mediator_; PasswordController* passwordController_; - - DISALLOW_COPY_AND_ASSIGN(AutofillControllerTest); }; void AutofillControllerTest::SetUp() {
diff --git a/ios/chrome/browser/autofill/autofill_tab_helper.h b/ios/chrome/browser/autofill/autofill_tab_helper.h index 8131e352..1cecfd9 100644 --- a/ios/chrome/browser/autofill/autofill_tab_helper.h +++ b/ios/chrome/browser/autofill/autofill_tab_helper.h
@@ -28,6 +28,9 @@ class AutofillTabHelper : public web::WebStateObserver, public web::WebStateUserData<AutofillTabHelper> { public: + AutofillTabHelper(const AutofillTabHelper&) = delete; + AutofillTabHelper& operator=(const AutofillTabHelper&) = delete; + ~AutofillTabHelper() override; // Create an AutofillTabHelper and attaches it to the given |web_state|. @@ -60,8 +63,6 @@ std::unique_ptr<autofill::ChromeAutofillClientIOS> autofill_client_; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(AutofillTabHelper); }; #endif // IOS_CHROME_BROWSER_AUTOFILL_AUTOFILL_TAB_HELPER_H_
diff --git a/ios/chrome/browser/autofill/form_suggestion_tab_helper.h b/ios/chrome/browser/autofill/form_suggestion_tab_helper.h index 55c1b31..0ba77e2 100644 --- a/ios/chrome/browser/autofill/form_suggestion_tab_helper.h +++ b/ios/chrome/browser/autofill/form_suggestion_tab_helper.h
@@ -20,6 +20,9 @@ : public web::WebStateObserver, public web::WebStateUserData<FormSuggestionTabHelper> { public: + FormSuggestionTabHelper(const FormSuggestionTabHelper&) = delete; + FormSuggestionTabHelper& operator=(const FormSuggestionTabHelper&) = delete; + ~FormSuggestionTabHelper() override; // Creates a FormSuggestionTabHelper and attaches it to the given |web_state|. @@ -43,8 +46,6 @@ __strong FormSuggestionController* controller_; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(FormSuggestionTabHelper); }; #endif // IOS_CHROME_BROWSER_AUTOFILL_FORM_SUGGESTION_TAB_HELPER_H_
diff --git a/ios/chrome/browser/bookmarks/bookmark_client_impl.h b/ios/chrome/browser/bookmarks/bookmark_client_impl.h index 0f064cb..330bef0 100644 --- a/ios/chrome/browser/bookmarks/bookmark_client_impl.h +++ b/ios/chrome/browser/bookmarks/bookmark_client_impl.h
@@ -31,6 +31,10 @@ ChromeBrowserState* browser_state, bookmarks::ManagedBookmarkService* managed_bookmark_service, sync_bookmarks::BookmarkSyncService* bookmark_sync_service); + + BookmarkClientImpl(const BookmarkClientImpl&) = delete; + BookmarkClientImpl& operator=(const BookmarkClientImpl&) = delete; + ~BookmarkClientImpl() override; // bookmarks::BookmarkClient: @@ -68,8 +72,6 @@ // Pointer to the BookmarkSyncService responsible for encoding and decoding // sync metadata persisted together with the bookmarks model. sync_bookmarks::BookmarkSyncService* bookmark_sync_service_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(BookmarkClientImpl); }; #endif // IOS_CHROME_BROWSER_BOOKMARKS_BOOKMARK_CLIENT_IMPL_H_
diff --git a/ios/chrome/browser/bookmarks/bookmark_remover_helper.h b/ios/chrome/browser/bookmarks/bookmark_remover_helper.h index 41776b6..5f5c601 100644 --- a/ios/chrome/browser/bookmarks/bookmark_remover_helper.h +++ b/ios/chrome/browser/bookmarks/bookmark_remover_helper.h
@@ -21,6 +21,10 @@ using Callback = base::OnceCallback<void(bool)>; explicit BookmarkRemoverHelper(ChromeBrowserState* browser_state); + + BookmarkRemoverHelper(const BookmarkRemoverHelper&) = delete; + BookmarkRemoverHelper& operator=(const BookmarkRemoverHelper&) = delete; + ~BookmarkRemoverHelper() override; // Removes all bookmarks and asynchronously invoke |completion| with @@ -45,8 +49,6 @@ ChromeBrowserState* browser_state_ = nullptr; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(BookmarkRemoverHelper); }; #endif // IOS_CHROME_BROWSER_BOOKMARKS_BOOKMARK_REMOVER_HELPER_H_
diff --git a/ios/chrome/browser/browser_state/browser_state_info_cache.h b/ios/chrome/browser/browser_state/browser_state_info_cache.h index ed11d12..57168e2 100644 --- a/ios/chrome/browser/browser_state/browser_state_info_cache.h +++ b/ios/chrome/browser/browser_state/browser_state_info_cache.h
@@ -29,6 +29,10 @@ public: BrowserStateInfoCache(PrefService* prefs, const base::FilePath& user_data_dir); + + BrowserStateInfoCache(const BrowserStateInfoCache&) = delete; + BrowserStateInfoCache& operator=(const BrowserStateInfoCache&) = delete; + virtual ~BrowserStateInfoCache(); void AddBrowserState(const base::FilePath& browser_state_path, @@ -76,8 +80,6 @@ base::FilePath user_data_dir_; base::ObserverList<BrowserStateInfoCacheObserver, true>::Unchecked observer_list_; - - DISALLOW_COPY_AND_ASSIGN(BrowserStateInfoCache); }; #endif // IOS_CHROME_BROWSER_BROWSER_STATE_BROWSER_STATE_INFO_CACHE_H_
diff --git a/ios/chrome/browser/browser_state/browser_state_info_cache_observer.h b/ios/chrome/browser/browser_state/browser_state_info_cache_observer.h index 1dbd5bf9..e840e476 100644 --- a/ios/chrome/browser/browser_state/browser_state_info_cache_observer.h +++ b/ios/chrome/browser/browser_state/browser_state_info_cache_observer.h
@@ -16,6 +16,11 @@ class BrowserStateInfoCacheObserver { public: BrowserStateInfoCacheObserver() {} + + BrowserStateInfoCacheObserver(const BrowserStateInfoCacheObserver&) = delete; + BrowserStateInfoCacheObserver& operator=( + const BrowserStateInfoCacheObserver&) = delete; + virtual ~BrowserStateInfoCacheObserver() {} // Called when a BrowserState has been added. @@ -23,9 +28,6 @@ // Called when a BrowserState has been removed. virtual void OnBrowserStateWasRemoved(const base::FilePath& path) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(BrowserStateInfoCacheObserver); }; #endif // IOS_CHROME_BROWSER_BROWSER_STATE_BROWSER_STATE_INFO_CACHE_OBSERVER_H_
diff --git a/ios/chrome/browser/browser_state/chrome_browser_state.h b/ios/chrome/browser/browser_state/chrome_browser_state.h index 8abcb15e..c1b057e 100644 --- a/ios/chrome/browser/browser_state/chrome_browser_state.h +++ b/ios/chrome/browser/browser_state/chrome_browser_state.h
@@ -44,6 +44,9 @@ // This class is a Chrome-specific extension of the BrowserState interface. class ChromeBrowserState : public web::BrowserState { public: + ChromeBrowserState(const ChromeBrowserState&) = delete; + ChromeBrowserState& operator=(const ChromeBrowserState&) = delete; + ~ChromeBrowserState() override; // Returns the ChromeBrowserState corresponding to the given BrowserState. @@ -128,8 +131,6 @@ scoped_refptr<base::SequencedTaskRunner> io_task_runner_; scoped_refptr<net::URLRequestContextGetter> request_context_getter_; - - DISALLOW_COPY_AND_ASSIGN(ChromeBrowserState); }; #endif // IOS_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_H_
diff --git a/ios/chrome/browser/browser_state/chrome_browser_state_impl.h b/ios/chrome/browser/browser_state/chrome_browser_state_impl.h index 344726d7..8327cebe 100644 --- a/ios/chrome/browser/browser_state/chrome_browser_state_impl.h +++ b/ios/chrome/browser/browser_state/chrome_browser_state_impl.h
@@ -29,6 +29,9 @@ // non-incognito browsing. class ChromeBrowserStateImpl final : public ChromeBrowserState { public: + ChromeBrowserStateImpl(const ChromeBrowserStateImpl&) = delete; + ChromeBrowserStateImpl& operator=(const ChromeBrowserStateImpl&) = delete; + ~ChromeBrowserStateImpl() override; // ChromeBrowserState: @@ -101,8 +104,6 @@ // components/keyed_service/ios/browser_state_dependency_manager.* // components/keyed_service/core/keyed_service.h // components/keyed_service/ios/browser_state_keyed_service_factory.* - - DISALLOW_COPY_AND_ASSIGN(ChromeBrowserStateImpl); }; #endif // IOS_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_IMPL_H_
diff --git a/ios/chrome/browser/browser_state/chrome_browser_state_impl_io_data.h b/ios/chrome/browser/browser_state/chrome_browser_state_impl_io_data.h index 32b8257c..823a62c 100644 --- a/ios/chrome/browser/browser_state/chrome_browser_state_impl_io_data.h +++ b/ios/chrome/browser/browser_state/chrome_browser_state_impl_io_data.h
@@ -27,6 +27,10 @@ class Handle { public: explicit Handle(ChromeBrowserState* browser_state); + + Handle(const Handle&) = delete; + Handle& operator=(const Handle&) = delete; + ~Handle(); // Init() must be called before ~Handle(). It records most of the @@ -83,8 +87,6 @@ ChromeBrowserState* const browser_state_; mutable bool initialized_; - - DISALLOW_COPY_AND_ASSIGN(Handle); }; private:
diff --git a/ios/chrome/browser/browser_state/chrome_browser_state_io_data.h b/ios/chrome/browser/browser_state/chrome_browser_state_io_data.h index bffc8b4d..78f2182 100644 --- a/ios/chrome/browser/browser_state/chrome_browser_state_io_data.h +++ b/ios/chrome/browser/browser_state/chrome_browser_state_io_data.h
@@ -60,6 +60,9 @@ typedef std::vector<scoped_refptr<IOSChromeURLRequestContextGetter>> IOSChromeURLRequestContextGetterVector; + ChromeBrowserStateIOData(const ChromeBrowserStateIOData&) = delete; + ChromeBrowserStateIOData& operator=(const ChromeBrowserStateIOData&) = delete; + virtual ~ChromeBrowserStateIOData(); // Utility to install additional WebUI handlers into the |job_factory|. @@ -260,8 +263,6 @@ chrome_http_user_agent_settings_; const ChromeBrowserStateType browser_state_type_; - - DISALLOW_COPY_AND_ASSIGN(ChromeBrowserStateIOData); }; #endif // IOS_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_IO_DATA_H_
diff --git a/ios/chrome/browser/browser_state/chrome_browser_state_manager.h b/ios/chrome/browser/browser_state/chrome_browser_state_manager.h index 25dbc6fb..9c45cfc02 100644 --- a/ios/chrome/browser/browser_state/chrome_browser_state_manager.h +++ b/ios/chrome/browser/browser_state/chrome_browser_state_manager.h
@@ -22,6 +22,10 @@ // ChromeBrowserState instances. Owns all instances that it creates. class ChromeBrowserStateManager { public: + ChromeBrowserStateManager(const ChromeBrowserStateManager&) = delete; + ChromeBrowserStateManager& operator=(const ChromeBrowserStateManager&) = + delete; + virtual ~ChromeBrowserStateManager() {} // Returns the ChromeBrowserState that was last used, creating one if @@ -40,9 +44,6 @@ protected: ChromeBrowserStateManager() {} - - private: - DISALLOW_COPY_AND_ASSIGN(ChromeBrowserStateManager); }; } // namespace ios
diff --git a/ios/chrome/browser/browser_state/chrome_browser_state_manager_impl.h b/ios/chrome/browser/browser_state/chrome_browser_state_manager_impl.h index 25fe42b4..d6a365bf 100644 --- a/ios/chrome/browser/browser_state/chrome_browser_state_manager_impl.h +++ b/ios/chrome/browser/browser_state/chrome_browser_state_manager_impl.h
@@ -19,6 +19,11 @@ class ChromeBrowserStateManagerImpl : public ios::ChromeBrowserStateManager { public: ChromeBrowserStateManagerImpl(); + + ChromeBrowserStateManagerImpl(const ChromeBrowserStateManagerImpl&) = delete; + ChromeBrowserStateManagerImpl& operator=( + const ChromeBrowserStateManagerImpl&) = delete; + ~ChromeBrowserStateManagerImpl() override; // ChromeBrowserStateManager: @@ -47,8 +52,6 @@ // Holds the ChromeBrowserStateImpl instances that this instance has created. ChromeBrowserStateImplPathMap browser_states_; std::unique_ptr<BrowserStateInfoCache> browser_state_info_cache_; - - DISALLOW_COPY_AND_ASSIGN(ChromeBrowserStateManagerImpl); }; #endif // IOS_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_MANAGER_IMPL_H_
diff --git a/ios/chrome/browser/browser_state/off_the_record_chrome_browser_state_impl.h b/ios/chrome/browser/browser_state/off_the_record_chrome_browser_state_impl.h index b8acd3c..3788881 100644 --- a/ios/chrome/browser/browser_state/off_the_record_chrome_browser_state_impl.h +++ b/ios/chrome/browser/browser_state/off_the_record_chrome_browser_state_impl.h
@@ -18,6 +18,11 @@ // by a non-incognito ChromeBrowserState instance. class OffTheRecordChromeBrowserStateImpl final : public ChromeBrowserState { public: + OffTheRecordChromeBrowserStateImpl( + const OffTheRecordChromeBrowserStateImpl&) = delete; + OffTheRecordChromeBrowserStateImpl& operator=( + const OffTheRecordChromeBrowserStateImpl&) = delete; + ~OffTheRecordChromeBrowserStateImpl() override; // ChromeBrowserState: @@ -58,8 +63,6 @@ std::unique_ptr<OffTheRecordChromeBrowserStateIOData::Handle> io_data_; std::unique_ptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; - - DISALLOW_COPY_AND_ASSIGN(OffTheRecordChromeBrowserStateImpl); }; #endif // IOS_CHROME_BROWSER_BROWSER_STATE_OFF_THE_RECORD_CHROME_BROWSER_STATE_IMPL_H_
diff --git a/ios/chrome/browser/browser_state/off_the_record_chrome_browser_state_io_data.h b/ios/chrome/browser/browser_state/off_the_record_chrome_browser_state_io_data.h index 7531904..80458b5 100644 --- a/ios/chrome/browser/browser_state/off_the_record_chrome_browser_state_io_data.h +++ b/ios/chrome/browser/browser_state/off_the_record_chrome_browser_state_io_data.h
@@ -44,6 +44,10 @@ class Handle { public: explicit Handle(ChromeBrowserState* browser_state); + + Handle(const Handle&) = delete; + Handle& operator=(const Handle&) = delete; + ~Handle(); scoped_refptr<IOSChromeURLRequestContextGetter> @@ -77,8 +81,6 @@ ChromeBrowserState* const browser_state_; mutable bool initialized_; - - DISALLOW_COPY_AND_ASSIGN(Handle); }; private:
diff --git a/ios/chrome/browser/browser_state/test_chrome_browser_state.h b/ios/chrome/browser/browser_state/test_chrome_browser_state.h index 1e45269..773347c7 100644 --- a/ios/chrome/browser/browser_state/test_chrome_browser_state.h +++ b/ios/chrome/browser/browser_state/test_chrome_browser_state.h
@@ -37,6 +37,9 @@ RefcountedBrowserStateKeyedServiceFactory::TestingFactory>> RefcountedTestingFactories; + TestChromeBrowserState(const TestChromeBrowserState&) = delete; + TestChromeBrowserState& operator=(const TestChromeBrowserState&) = delete; + ~TestChromeBrowserState() override; // BrowserState: @@ -93,6 +96,10 @@ class Builder { public: Builder(); + + Builder(const Builder&) = delete; + Builder& operator=(const Builder&) = delete; + ~Builder(); // Adds a testing factory to the TestChromeBrowserState. These testing @@ -131,8 +138,6 @@ TestingFactories testing_factories_; RefcountedTestingFactories refcounted_testing_factories_; - - DISALLOW_COPY_AND_ASSIGN(Builder); }; protected: @@ -174,8 +179,6 @@ // non-incognito ChromeBrowserState instance. std::unique_ptr<TestChromeBrowserState> otr_browser_state_; TestChromeBrowserState* original_browser_state_; - - DISALLOW_COPY_AND_ASSIGN(TestChromeBrowserState); }; #endif // IOS_CHROME_BROWSER_BROWSER_STATE_TEST_CHROME_BROWSER_STATE_H_
diff --git a/ios/chrome/browser/browser_state/test_chrome_browser_state_manager.h b/ios/chrome/browser/browser_state/test_chrome_browser_state_manager.h index fc190fd..bda533f 100644 --- a/ios/chrome/browser/browser_state/test_chrome_browser_state_manager.h +++ b/ios/chrome/browser/browser_state/test_chrome_browser_state_manager.h
@@ -19,6 +19,11 @@ explicit TestChromeBrowserStateManager(const base::FilePath& user_data_dir); explicit TestChromeBrowserStateManager( std::unique_ptr<ChromeBrowserState> browser_state); + + TestChromeBrowserStateManager(const TestChromeBrowserStateManager&) = delete; + TestChromeBrowserStateManager& operator=( + const TestChromeBrowserStateManager&) = delete; + ~TestChromeBrowserStateManager() override; // ChromeBrowserStateManager: @@ -35,8 +40,6 @@ IOSChromeScopedTestingLocalState local_state_; std::unique_ptr<ChromeBrowserState> browser_state_; BrowserStateInfoCache browser_state_info_cache_; - - DISALLOW_COPY_AND_ASSIGN(TestChromeBrowserStateManager); }; #endif // IOS_CHROME_BROWSER_BROWSER_STATE_TEST_CHROME_BROWSER_STATE_MANAGER_H_
diff --git a/ios/chrome/browser/browsing_data/browsing_data_counter_wrapper.h b/ios/chrome/browser/browsing_data/browsing_data_counter_wrapper.h index 3d57f985..361b1be7 100644 --- a/ios/chrome/browser/browsing_data/browsing_data_counter_wrapper.h +++ b/ios/chrome/browser/browsing_data/browsing_data_counter_wrapper.h
@@ -29,6 +29,10 @@ PrefService* pref_service, UpdateUICallback update_ui_callback); + BrowsingDataCounterWrapper(const BrowsingDataCounterWrapper&) = delete; + BrowsingDataCounterWrapper& operator=(const BrowsingDataCounterWrapper&) = + delete; + ~BrowsingDataCounterWrapper(); void RestartCounter(); @@ -50,8 +54,6 @@ // Callback that updates the UI once the counter result is ready. This is // invoked by UpdateWithResult. UpdateUICallback update_ui_callback_; - - DISALLOW_COPY_AND_ASSIGN(BrowsingDataCounterWrapper); }; #endif // IOS_CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_COUNTER_WRAPPER_H_
diff --git a/ios/chrome/browser/browsing_data/browsing_data_remover.h b/ios/chrome/browser/browsing_data/browsing_data_remover.h index 4bc17640..51f7a4f 100644 --- a/ios/chrome/browser/browsing_data/browsing_data_remover.h +++ b/ios/chrome/browser/browsing_data/browsing_data_remover.h
@@ -21,6 +21,10 @@ class BrowsingDataRemover : public KeyedService { public: BrowsingDataRemover(); + + BrowsingDataRemover(const BrowsingDataRemover&) = delete; + BrowsingDataRemover& operator=(const BrowsingDataRemover&) = delete; + ~BrowsingDataRemover() override; // Is the service currently in the process of removing data? @@ -47,8 +51,6 @@ private: base::ObserverList<BrowsingDataRemoverObserver, true>::Unchecked observers_; - - DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); }; #endif // IOS_CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_
diff --git a/ios/chrome/browser/browsing_data/browsing_data_remover_impl.h b/ios/chrome/browser/browsing_data/browsing_data_remover_impl.h index 2a899ffa..a705a60 100644 --- a/ios/chrome/browser/browsing_data/browsing_data_remover_impl.h +++ b/ios/chrome/browser/browsing_data/browsing_data_remover_impl.h
@@ -35,6 +35,10 @@ // specified ChromeBrowserstate. Use Remove to initiate the removal. BrowsingDataRemoverImpl(ChromeBrowserState* browser_state, SessionServiceIOS* session_service); + + BrowsingDataRemoverImpl(const BrowsingDataRemoverImpl&) = delete; + BrowsingDataRemoverImpl& operator=(const BrowsingDataRemoverImpl&) = delete; + ~BrowsingDataRemoverImpl() override; // KeyedService implementation. @@ -130,8 +134,6 @@ base::CallbackListSubscription template_url_subscription_; base::WeakPtrFactory<BrowsingDataRemoverImpl> weak_ptr_factory_; - - DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemoverImpl); }; #endif // IOS_CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_IMPL_H_
diff --git a/ios/chrome/browser/browsing_data/browsing_data_remover_impl_unittest.mm b/ios/chrome/browser/browsing_data/browsing_data_remover_impl_unittest.mm index 6f84387..38d0e65 100644 --- a/ios/chrome/browser/browsing_data/browsing_data_remover_impl_unittest.mm +++ b/ios/chrome/browser/browsing_data/browsing_data_remover_impl_unittest.mm
@@ -58,6 +58,12 @@ class TestBrowsingDataRemoverObserver : public BrowsingDataRemoverObserver { public: TestBrowsingDataRemoverObserver() = default; + + TestBrowsingDataRemoverObserver(const TestBrowsingDataRemoverObserver&) = + delete; + TestBrowsingDataRemoverObserver& operator=( + const TestBrowsingDataRemoverObserver&) = delete; + ~TestBrowsingDataRemoverObserver() override = default; // BrowsingDataRemoverObserver implementation. @@ -71,8 +77,6 @@ private: BrowsingDataRemoveMask last_remove_mask_ = BrowsingDataRemoveMask::REMOVE_NOTHING; - - DISALLOW_COPY_AND_ASSIGN(TestBrowsingDataRemoverObserver); }; void TestBrowsingDataRemoverObserver::OnBrowsingDataRemoved( @@ -94,6 +98,10 @@ std::make_unique<FakeClipboardRecentContent>()); } + BrowsingDataRemoverImplTest(const BrowsingDataRemoverImplTest&) = delete; + BrowsingDataRemoverImplTest& operator=(const BrowsingDataRemoverImplTest&) = + delete; + ~BrowsingDataRemoverImplTest() override { DCHECK_NE(ClipboardRecentContent::GetInstance(), nullptr); ClipboardRecentContent::SetInstance(nullptr); @@ -104,9 +112,6 @@ web::WebTaskEnvironment task_environment_; std::unique_ptr<ChromeBrowserState> browser_state_; BrowsingDataRemoverImpl browsing_data_remover_; - - private: - DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemoverImplTest); }; // Tests that BrowsingDataRemoverImpl::Remove() invokes the observers.
diff --git a/ios/chrome/browser/browsing_data/browsing_data_remover_observer.h b/ios/chrome/browser/browsing_data/browsing_data_remover_observer.h index 995a9974..0ff08cb 100644 --- a/ios/chrome/browser/browsing_data/browsing_data_remover_observer.h +++ b/ios/chrome/browser/browsing_data/browsing_data_remover_observer.h
@@ -15,15 +15,17 @@ class BrowsingDataRemoverObserver { public: BrowsingDataRemoverObserver() = default; + + BrowsingDataRemoverObserver(const BrowsingDataRemoverObserver&) = delete; + BrowsingDataRemoverObserver& operator=(const BrowsingDataRemoverObserver&) = + delete; + virtual ~BrowsingDataRemoverObserver() = default; // Invoked when data was successfully removed. The |mask| will represent // the type of removed data. See BrowsingDataRemoveMask for details. virtual void OnBrowsingDataRemoved(BrowsingDataRemover* remover, BrowsingDataRemoveMask mask) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemoverObserver); }; #endif // IOS_CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_OBSERVER_H_
diff --git a/ios/chrome/browser/browsing_data/browsing_data_remover_observer_bridge.h b/ios/chrome/browser/browsing_data/browsing_data_remover_observer_bridge.h index b4850a5a..5adf99d 100644 --- a/ios/chrome/browser/browsing_data/browsing_data_remover_observer_bridge.h +++ b/ios/chrome/browser/browsing_data/browsing_data_remover_observer_bridge.h
@@ -25,6 +25,12 @@ public: explicit BrowsingDataRemoverObserverBridge( id<BrowsingDataRemoverObserving> observer); + + BrowsingDataRemoverObserverBridge(const BrowsingDataRemoverObserverBridge&) = + delete; + BrowsingDataRemoverObserverBridge& operator=( + const BrowsingDataRemoverObserverBridge&) = delete; + ~BrowsingDataRemoverObserverBridge() override; // BrowsingDataRemoverObserver methods. @@ -33,8 +39,6 @@ private: __weak id<BrowsingDataRemoverObserving> observer_ = nil; - - DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemoverObserverBridge); }; #endif // IOS_CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_OBSERVER_BRIDGE_H_
diff --git a/ios/chrome/browser/browsing_data/cache_counter.h b/ios/chrome/browser/browsing_data/cache_counter.h index f9d6caa..aca7888f 100644 --- a/ios/chrome/browser/browsing_data/cache_counter.h +++ b/ios/chrome/browser/browsing_data/cache_counter.h
@@ -15,6 +15,10 @@ class CacheCounter : public browsing_data::BrowsingDataCounter { public: explicit CacheCounter(ChromeBrowserState* browser_state); + + CacheCounter(const CacheCounter&) = delete; + CacheCounter& operator=(const CacheCounter&) = delete; + ~CacheCounter() override; // browsing_data::BrowsingDataCounter implementation. @@ -28,8 +32,6 @@ ChromeBrowserState* browser_state_; base::WeakPtrFactory<CacheCounter> weak_ptr_factory_; - - DISALLOW_COPY_AND_ASSIGN(CacheCounter); }; #endif // IOS_CHROME_BROWSER_BROWSING_DATA_CACHE_COUNTER_H_
diff --git a/ios/chrome/browser/chrome_browser_provider_observer_bridge.h b/ios/chrome/browser/chrome_browser_provider_observer_bridge.h index 4b38250..308460e6 100644 --- a/ios/chrome/browser/chrome_browser_provider_observer_bridge.h +++ b/ios/chrome/browser/chrome_browser_provider_observer_bridge.h
@@ -27,6 +27,12 @@ public: explicit ChromeBrowserProviderObserverBridge( id<ChromeBrowserProviderObserver> observer); + + ChromeBrowserProviderObserverBridge( + const ChromeBrowserProviderObserverBridge&) = delete; + ChromeBrowserProviderObserverBridge& operator=( + const ChromeBrowserProviderObserverBridge&) = delete; + ~ChromeBrowserProviderObserverBridge() override; private: @@ -39,8 +45,6 @@ base::ScopedObservation<ios::ChromeBrowserProvider, ios::ChromeBrowserProvider::Observer> scoped_observation_{this}; - - DISALLOW_COPY_AND_ASSIGN(ChromeBrowserProviderObserverBridge); }; #endif // IOS_CHROME_BROWSER_CHROME_BROWSER_PROVIDER_OBSERVER_BRIDGE_H_
diff --git a/ios/chrome/browser/complex_tasks/ios_task_tab_helper.h b/ios/chrome/browser/complex_tasks/ios_task_tab_helper.h index 4401f8d7..5077cd8 100644 --- a/ios/chrome/browser/complex_tasks/ios_task_tab_helper.h +++ b/ios/chrome/browser/complex_tasks/ios_task_tab_helper.h
@@ -22,6 +22,10 @@ public web::WebStateUserData<IOSTaskTabHelper> { public: explicit IOSTaskTabHelper(web::WebState* web_state); + + IOSTaskTabHelper(const IOSTaskTabHelper&) = delete; + IOSTaskTabHelper& operator=(const IOSTaskTabHelper&) = delete; + ~IOSTaskTabHelper() override; // web::WebStateObserver @@ -40,7 +44,5 @@ web::WebState* web_state_ = nullptr; int prev_item_unique_id_ = -1; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(IOSTaskTabHelper); }; #endif // IOS_CHROME_BROWSER_COMPLEX_TASKS_IOS_TASK_TAB_HELPER_H_
diff --git a/ios/chrome/browser/credential_provider/credential_provider_service.h b/ios/chrome/browser/credential_provider/credential_provider_service.h index 089a10c..e02a77c4 100644 --- a/ios/chrome/browser/credential_provider/credential_provider_service.h +++ b/ios/chrome/browser/credential_provider/credential_provider_service.h
@@ -37,6 +37,11 @@ id<MutableCredentialStore> credential_store, signin::IdentityManager* identity_manager, syncer::SyncService* sync_service); + + CredentialProviderService(const CredentialProviderService&) = delete; + CredentialProviderService& operator=(const CredentialProviderService&) = + delete; + ~CredentialProviderService() override; // KeyedService: @@ -127,8 +132,6 @@ // Weak pointer factory. base::WeakPtrFactory<CredentialProviderService> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(CredentialProviderService); }; #endif // IOS_CHROME_BROWSER_CREDENTIAL_PROVIDER_CREDENTIAL_PROVIDER_SERVICE_H_
diff --git a/ios/chrome/browser/discover_feed/discover_feed_service.h b/ios/chrome/browser/discover_feed/discover_feed_service.h index f8ad395..04483a77 100644 --- a/ios/chrome/browser/discover_feed/discover_feed_service.h +++ b/ios/chrome/browser/discover_feed/discover_feed_service.h
@@ -22,6 +22,10 @@ DiscoverFeedService(PrefService* pref_service, AuthenticationService* authentication_service, signin::IdentityManager* identity_manager); + + DiscoverFeedService(const DiscoverFeedService&) = delete; + DiscoverFeedService& operator=(const DiscoverFeedService&) = delete; + ~DiscoverFeedService() override; // Returns the FeedMetricsRecorder to be used by the Feed, a single instance @@ -43,8 +47,6 @@ // Metrics recorder for the DiscoverFeed. __strong DiscoverFeedMetricsRecorder* discover_feed_metrics_recorder_ = nil; - - DISALLOW_COPY_AND_ASSIGN(DiscoverFeedService); }; #endif // IOS_CHROME_BROWSER_DISCOVER_FEED_DISCOVER_FEED_SERVICE_H_
diff --git a/ios/chrome/browser/dom_distiller/distiller_viewer.h b/ios/chrome/browser/dom_distiller/distiller_viewer.h index 815104a..e3edb048 100644 --- a/ios/chrome/browser/dom_distiller/distiller_viewer.h +++ b/ios/chrome/browser/dom_distiller/distiller_viewer.h
@@ -38,6 +38,10 @@ DistillerViewerInterface(PrefService* prefs) : DomDistillerRequestViewBase(new DistilledPagePrefs(prefs)) {} + + DistillerViewerInterface(const DistillerViewerInterface&) = delete; + DistillerViewerInterface& operator=(const DistillerViewerInterface&) = delete; + ~DistillerViewerInterface() override {} void OnArticleReady( @@ -46,8 +50,6 @@ void SendJavaScript(const std::string& buffer) override = 0; virtual std::string GetCspNonce() = 0; - - DISALLOW_COPY_AND_ASSIGN(DistillerViewerInterface); }; // A very simple and naive implementation of the DistillerViewer. @@ -70,6 +72,10 @@ PrefService* prefs, const GURL& url, DistillationFinishedCallback callback); + + DistillerViewer(const DistillerViewer&) = delete; + DistillerViewer& operator=(const DistillerViewer&) = delete; + ~DistillerViewer() override; // DistillerViewerInterface implementation @@ -100,8 +106,6 @@ DistillationFinishedCallback callback_; // Keep reference of the distiller_ during distillation. std::unique_ptr<Distiller> distiller_; - - DISALLOW_COPY_AND_ASSIGN(DistillerViewer); }; } // namespace dom_distiller
diff --git a/ios/chrome/browser/dom_distiller/dom_distiller_service_factory.cc b/ios/chrome/browser/dom_distiller/dom_distiller_service_factory.cc index 778bdb21..58f213b 100644 --- a/ios/chrome/browser/dom_distiller/dom_distiller_service_factory.cc +++ b/ios/chrome/browser/dom_distiller/dom_distiller_service_factory.cc
@@ -40,10 +40,10 @@ std::move(distilled_page_prefs), std::move(distiller_ui_handle)) {} - ~DomDistillerKeyedService() override {} + DomDistillerKeyedService(const DomDistillerKeyedService&) = delete; + DomDistillerKeyedService& operator=(const DomDistillerKeyedService&) = delete; - private: - DISALLOW_COPY_AND_ASSIGN(DomDistillerKeyedService); + ~DomDistillerKeyedService() override {} }; } // namespace
diff --git a/ios/chrome/browser/download/ar_quick_look_tab_helper.h b/ios/chrome/browser/download/ar_quick_look_tab_helper.h index f010955..42af8ea85 100644 --- a/ios/chrome/browser/download/ar_quick_look_tab_helper.h +++ b/ios/chrome/browser/download/ar_quick_look_tab_helper.h
@@ -61,6 +61,10 @@ public web::WebStateUserData<ARQuickLookTabHelper> { public: ARQuickLookTabHelper(web::WebState* web_state); + + ARQuickLookTabHelper(const ARQuickLookTabHelper&) = delete; + ARQuickLookTabHelper& operator=(const ARQuickLookTabHelper&) = delete; + ~ARQuickLookTabHelper() override; // Creates TabHelper. |delegate| is not retained by this instance. |web_state| @@ -110,8 +114,6 @@ std::unique_ptr<web::DownloadTask> download_task_; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(ARQuickLookTabHelper); }; #endif // IOS_CHROME_BROWSER_DOWNLOAD_AR_QUICK_LOOK_TAB_HELPER_H_
diff --git a/ios/chrome/browser/download/browser_download_service.h b/ios/chrome/browser/download/browser_download_service.h index 8c62b34..dd73d13e 100644 --- a/ios/chrome/browser/download/browser_download_service.h +++ b/ios/chrome/browser/download/browser_download_service.h
@@ -73,6 +73,10 @@ public web::DownloadControllerDelegate { public: explicit BrowserDownloadService(web::DownloadController* download_controller); + + BrowserDownloadService(const BrowserDownloadService&) = delete; + BrowserDownloadService& operator=(const BrowserDownloadService&) = delete; + ~BrowserDownloadService() override; private: @@ -83,8 +87,6 @@ void OnDownloadControllerDestroyed(web::DownloadController*) override; web::DownloadController* download_controller_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(BrowserDownloadService); }; #endif // IOS_CHROME_BROWSER_DOWNLOAD_BROWSER_DOWNLOAD_SERVICE_H_
diff --git a/ios/chrome/browser/download/download_manager_tab_helper.h b/ios/chrome/browser/download/download_manager_tab_helper.h index 43e09898..2e07e524 100644 --- a/ios/chrome/browser/download/download_manager_tab_helper.h +++ b/ios/chrome/browser/download/download_manager_tab_helper.h
@@ -26,6 +26,9 @@ public web::WebStateObserver, public web::DownloadTaskObserver { public: + DownloadManagerTabHelper(const DownloadManagerTabHelper&) = delete; + DownloadManagerTabHelper& operator=(const DownloadManagerTabHelper&) = delete; + ~DownloadManagerTabHelper() override; // Creates TabHelper. |delegate| is not retained by TabHelper. |web_state| @@ -68,8 +71,6 @@ std::unique_ptr<web::DownloadTask> task_; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(DownloadManagerTabHelper); }; #endif // IOS_CHROME_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_TAB_HELPER_H_
diff --git a/ios/chrome/browser/download/pass_kit_tab_helper.h b/ios/chrome/browser/download/pass_kit_tab_helper.h index 846c6bc5..db387be 100644 --- a/ios/chrome/browser/download/pass_kit_tab_helper.h +++ b/ios/chrome/browser/download/pass_kit_tab_helper.h
@@ -44,6 +44,9 @@ class PassKitTabHelper : public web::WebStateUserData<PassKitTabHelper>, public web::DownloadTaskObserver { public: + PassKitTabHelper(const PassKitTabHelper&) = delete; + PassKitTabHelper& operator=(const PassKitTabHelper&) = delete; + ~PassKitTabHelper() override; // Creates TabHelper. |delegate| is not retained by TabHelper. |web_state| @@ -73,8 +76,6 @@ tasks_; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(PassKitTabHelper); }; #endif // IOS_CHROME_BROWSER_DOWNLOAD_PASS_KIT_TAB_HELPER_H_
diff --git a/ios/chrome/browser/external_files/external_file_remover.h b/ios/chrome/browser/external_files/external_file_remover.h index ae3ffd6b..0f9aa97 100644 --- a/ios/chrome/browser/external_files/external_file_remover.h +++ b/ios/chrome/browser/external_files/external_file_remover.h
@@ -13,14 +13,15 @@ class ExternalFileRemover : public KeyedService { public: ExternalFileRemover() = default; + + ExternalFileRemover(const ExternalFileRemover&) = delete; + ExternalFileRemover& operator=(const ExternalFileRemover&) = delete; + ~ExternalFileRemover() override = default; // Post a delayed task to clean up the files received from other applications. // |callback| is called when the clean up has finished; it may be null. virtual void RemoveAfterDelay(base::TimeDelta delay, base::OnceClosure callback) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(ExternalFileRemover); }; #endif // IOS_CHROME_BROWSER_EXTERNAL_FILES_EXTERNAL_FILE_REMOVER_H_
diff --git a/ios/chrome/browser/external_files/external_file_remover_impl.h b/ios/chrome/browser/external_files/external_file_remover_impl.h index 2190cad2..fcab33ee 100644 --- a/ios/chrome/browser/external_files/external_file_remover_impl.h +++ b/ios/chrome/browser/external_files/external_file_remover_impl.h
@@ -29,6 +29,10 @@ // the removal. ExternalFileRemoverImpl(ChromeBrowserState* browser_state, sessions::TabRestoreService* tab_restore_service); + + ExternalFileRemoverImpl(const ExternalFileRemoverImpl&) = delete; + ExternalFileRemoverImpl& operator=(const ExternalFileRemoverImpl&) = delete; + ~ExternalFileRemoverImpl() override; // ExternalFileRemover methods. @@ -71,8 +75,6 @@ SEQUENCE_CHECKER(sequence_checker_); // Used to ensure |Remove()| is not run when this object is destroyed. base::WeakPtrFactory<ExternalFileRemoverImpl> weak_ptr_factory_; - - DISALLOW_COPY_AND_ASSIGN(ExternalFileRemoverImpl); }; #endif // IOS_CHROME_BROWSER_EXTERNAL_FILES_EXTERNAL_FILE_REMOVER_IMPL_H_
diff --git a/ios/chrome/browser/favicon/favicon_client_impl.h b/ios/chrome/browser/favicon/favicon_client_impl.h index 93fb50f..7011da4 100644 --- a/ios/chrome/browser/favicon/favicon_client_impl.h +++ b/ios/chrome/browser/favicon/favicon_client_impl.h
@@ -18,6 +18,10 @@ class FaviconClientImpl : public favicon::FaviconClient { public: FaviconClientImpl(); + + FaviconClientImpl(const FaviconClientImpl&) = delete; + FaviconClientImpl& operator=(const FaviconClientImpl&) = delete; + ~FaviconClientImpl() override; private: @@ -30,8 +34,6 @@ const std::vector<int>& desired_sizes_in_pixel, favicon_base::FaviconResultsCallback callback, base::CancelableTaskTracker* tracker) override; - - DISALLOW_COPY_AND_ASSIGN(FaviconClientImpl); }; #endif // IOS_CHROME_BROWSER_FAVICON_FAVICON_CLIENT_IMPL_H_
diff --git a/ios/chrome/browser/favicon/favicon_loader.h b/ios/chrome/browser/favicon/favicon_loader.h index b2099eec..835f798 100644 --- a/ios/chrome/browser/favicon/favicon_loader.h +++ b/ios/chrome/browser/favicon/favicon_loader.h
@@ -26,6 +26,10 @@ typedef void (^FaviconAttributesCompletionBlock)(FaviconAttributes*); explicit FaviconLoader(favicon::LargeIconService* large_icon_service); + + FaviconLoader(const FaviconLoader&) = delete; + FaviconLoader& operator=(const FaviconLoader&) = delete; + ~FaviconLoader() override; // Tries to find a FaviconAttributes in |favicon_cache_| with |page_url|: @@ -85,8 +89,6 @@ // removed during low-memory conditions based on its inherent LRU removal // algorithm. Keyed by NSString of URL (page URL or icon URL) spec. NSCache<NSString*, FaviconAttributes*>* favicon_cache_; - - DISALLOW_COPY_AND_ASSIGN(FaviconLoader); }; #endif // IOS_CHROME_BROWSER_FAVICON_FAVICON_LOADER_H_
diff --git a/ios/chrome/browser/favicon/large_icon_cache.h b/ios/chrome/browser/favicon/large_icon_cache.h index afe7af0..bfb8eca7 100644 --- a/ios/chrome/browser/favicon/large_icon_cache.h +++ b/ios/chrome/browser/favicon/large_icon_cache.h
@@ -29,6 +29,10 @@ class LargeIconCache : public KeyedService { public: LargeIconCache(); + + LargeIconCache(const LargeIconCache&) = delete; + LargeIconCache& operator=(const LargeIconCache&) = delete; + ~LargeIconCache() override; // |LargeIconService| does everything on callbacks, and iOS needs to load the @@ -46,8 +50,6 @@ const favicon_base::LargeIconResult& large_icon_result); base::MRUCache<GURL, std::unique_ptr<LargeIconCacheEntry>> cache_; - - DISALLOW_COPY_AND_ASSIGN(LargeIconCache); }; #endif // IOS_CHROME_BROWSER_FAVICON_LARGE_ICON_CACHE_H_
diff --git a/ios/chrome/browser/favicon/large_icon_cache_unittest.cc b/ios/chrome/browser/favicon/large_icon_cache_unittest.cc index cad7a76..8e2ee74 100644 --- a/ios/chrome/browser/favicon/large_icon_cache_unittest.cc +++ b/ios/chrome/browser/favicon/large_icon_cache_unittest.cc
@@ -49,6 +49,9 @@ large_icon_cache_.reset(new LargeIconCache); } + LargeIconCacheTest(const LargeIconCacheTest&) = delete; + LargeIconCacheTest& operator=(const LargeIconCacheTest&) = delete; + ~LargeIconCacheTest() override {} protected: @@ -58,9 +61,6 @@ expected_fallback_icon_style_; bool is_callback_invoked_; - - private: - DISALLOW_COPY_AND_ASSIGN(LargeIconCacheTest); }; TEST_F(LargeIconCacheTest, EmptyCache) {
diff --git a/ios/chrome/browser/find_in_page/find_tab_helper.h b/ios/chrome/browser/find_in_page/find_tab_helper.h index b6e0ce1c..47bd27c4 100644 --- a/ios/chrome/browser/find_in_page/find_tab_helper.h +++ b/ios/chrome/browser/find_in_page/find_tab_helper.h
@@ -20,6 +20,9 @@ class FindTabHelper : public web::WebStateObserver, public web::WebStateUserData<FindTabHelper> { public: + FindTabHelper(const FindTabHelper&) = delete; + FindTabHelper& operator=(const FindTabHelper&) = delete; + ~FindTabHelper() override; enum FindDirection { @@ -81,8 +84,6 @@ FindInPageController* controller_; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(FindTabHelper); }; #endif // IOS_CHROME_BROWSER_FIND_IN_PAGE_FIND_TAB_HELPER_H_
diff --git a/ios/chrome/browser/google/google_logo_service.h b/ios/chrome/browser/google/google_logo_service.h index fc90e88..7d611702 100644 --- a/ios/chrome/browser/google/google_logo_service.h +++ b/ios/chrome/browser/google/google_logo_service.h
@@ -25,6 +25,10 @@ TemplateURLService* template_url_service, signin::IdentityManager* identity_manager, scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory); + + GoogleLogoService(const GoogleLogoService&) = delete; + GoogleLogoService& operator=(const GoogleLogoService&) = delete; + ~GoogleLogoService() override; using LogoServiceImpl::GetLogo; @@ -41,8 +45,6 @@ SkBitmap cached_image_; search_provider_logos::LogoMetadata cached_metadata_; const search_provider_logos::LogoMetadata empty_metadata; - - DISALLOW_COPY_AND_ASSIGN(GoogleLogoService); }; #endif // IOS_CHROME_BROWSER_GOOGLE_GOOGLE_LOGO_SERVICE_H_
diff --git a/ios/chrome/browser/history/history_backend_client_impl.h b/ios/chrome/browser/history/history_backend_client_impl.h index 228d9854..eee6129 100644 --- a/ios/chrome/browser/history/history_backend_client_impl.h +++ b/ios/chrome/browser/history/history_backend_client_impl.h
@@ -21,6 +21,10 @@ public: explicit HistoryBackendClientImpl( scoped_refptr<bookmarks::ModelLoader> model_loader); + + HistoryBackendClientImpl(const HistoryBackendClientImpl&) = delete; + HistoryBackendClientImpl& operator=(const HistoryBackendClientImpl&) = delete; + ~HistoryBackendClientImpl() override; private: @@ -31,8 +35,6 @@ // ModelLoader is used to access bookmarks. May be null during testing. scoped_refptr<bookmarks::ModelLoader> model_loader_; - - DISALLOW_COPY_AND_ASSIGN(HistoryBackendClientImpl); }; #endif // IOS_CHROME_BROWSER_HISTORY_HISTORY_BACKEND_CLIENT_IMPL_H_
diff --git a/ios/chrome/browser/history/history_client_impl.h b/ios/chrome/browser/history/history_client_impl.h index 1fa4803..af482ba 100644 --- a/ios/chrome/browser/history/history_client_impl.h +++ b/ios/chrome/browser/history/history_client_impl.h
@@ -26,6 +26,10 @@ public bookmarks::BaseBookmarkModelObserver { public: explicit HistoryClientImpl(bookmarks::BookmarkModel* bookmark_model); + + HistoryClientImpl(const HistoryClientImpl&) = delete; + HistoryClientImpl& operator=(const HistoryClientImpl&) = delete; + ~HistoryClientImpl() override; private: @@ -60,8 +64,6 @@ // Subscription for notifications of changes to favicons. base::CallbackListSubscription favicons_changed_subscription_; - - DISALLOW_COPY_AND_ASSIGN(HistoryClientImpl); }; #endif // IOS_CHROME_BROWSER_HISTORY_HISTORY_CLIENT_IMPL_H_
diff --git a/ios/chrome/browser/history/history_tab_helper.h b/ios/chrome/browser/history/history_tab_helper.h index d8beb4c..78fc805d 100644 --- a/ios/chrome/browser/history/history_tab_helper.h +++ b/ios/chrome/browser/history/history_tab_helper.h
@@ -28,6 +28,9 @@ public web::WebStateObserver, public web::WebStateUserData<HistoryTabHelper> { public: + HistoryTabHelper(const HistoryTabHelper&) = delete; + HistoryTabHelper& operator=(const HistoryTabHelper&) = delete; + ~HistoryTabHelper() override; // Updates history with the specified navigation. @@ -84,8 +87,6 @@ base::TimeTicks last_load_completion_; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(HistoryTabHelper); }; #endif // IOS_CHROME_BROWSER_HISTORY_HISTORY_TAB_HELPER_H_
diff --git a/ios/chrome/browser/infobars/infobar_badge_tab_helper.h b/ios/chrome/browser/infobars/infobar_badge_tab_helper.h index e287273d..e7ac652 100644 --- a/ios/chrome/browser/infobars/infobar_badge_tab_helper.h +++ b/ios/chrome/browser/infobars/infobar_badge_tab_helper.h
@@ -28,6 +28,9 @@ class InfobarBadgeTabHelper : public web::WebStateUserData<InfobarBadgeTabHelper> { public: + InfobarBadgeTabHelper(const InfobarBadgeTabHelper&) = delete; + InfobarBadgeTabHelper& operator=(const InfobarBadgeTabHelper&) = delete; + ~InfobarBadgeTabHelper() override; // Sets the InfobarBadgeTabHelperDelegate to |delegate|. @@ -123,7 +126,6 @@ std::map<InfobarType, InfobarBadgeModel*> infobar_badge_models_; WEB_STATE_USER_DATA_KEY_DECL(); - DISALLOW_COPY_AND_ASSIGN(InfobarBadgeTabHelper); }; #endif // IOS_CHROME_BROWSER_INFOBARS_INFOBAR_BADGE_TAB_HELPER_H_
diff --git a/ios/chrome/browser/infobars/infobar_manager_impl.h b/ios/chrome/browser/infobars/infobar_manager_impl.h index d7acc55..d2150ec 100644 --- a/ios/chrome/browser/infobars/infobar_manager_impl.h +++ b/ios/chrome/browser/infobars/infobar_manager_impl.h
@@ -20,6 +20,9 @@ public web::WebStateObserver, public web::WebStateUserData<InfoBarManagerImpl> { public: + InfoBarManagerImpl(const InfoBarManagerImpl&) = delete; + InfoBarManagerImpl& operator=(const InfoBarManagerImpl&) = delete; + ~InfoBarManagerImpl() override; // Returns the |web_state_| tied to this InfobarManager. @@ -46,8 +49,6 @@ web::WebState* web_state_ = nullptr; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(InfoBarManagerImpl); }; #endif // IOS_CHROME_BROWSER_INFOBARS_INFOBAR_MANAGER_IMPL_H_
diff --git a/ios/chrome/browser/ios_chrome_field_trials.h b/ios/chrome/browser/ios_chrome_field_trials.h index 1a048ee8..1da6c4d 100644 --- a/ios/chrome/browser/ios_chrome_field_trials.h +++ b/ios/chrome/browser/ios_chrome_field_trials.h
@@ -13,6 +13,10 @@ class IOSChromeFieldTrials : public variations::PlatformFieldTrials { public: IOSChromeFieldTrials() {} + + IOSChromeFieldTrials(const IOSChromeFieldTrials&) = delete; + IOSChromeFieldTrials& operator=(const IOSChromeFieldTrials&) = delete; + ~IOSChromeFieldTrials() override {} // variations::PlatformFieldTrials: @@ -21,9 +25,6 @@ bool has_seed, const base::FieldTrial::EntropyProvider* low_entropy_provider, base::FeatureList* feature_list) override; - - private: - DISALLOW_COPY_AND_ASSIGN(IOSChromeFieldTrials); }; #endif // IOS_CHROME_BROWSER_IOS_CHROME_FIELD_TRIALS_H_
diff --git a/ios/chrome/browser/ios_chrome_io_thread.h b/ios/chrome/browser/ios_chrome_io_thread.h index 836abf92..81cbd0d5 100644 --- a/ios/chrome/browser/ios_chrome_io_thread.h +++ b/ios/chrome/browser/ios_chrome_io_thread.h
@@ -33,6 +33,10 @@ class IOSChromeIOThread : public io_thread::IOSIOThread { public: IOSChromeIOThread(PrefService* local_state, net::NetLog* net_log); + + IOSChromeIOThread(const IOSChromeIOThread&) = delete; + IOSChromeIOThread& operator=(const IOSChromeIOThread&) = delete; + ~IOSChromeIOThread() override; network::mojom::NetworkContext* GetSystemNetworkContext(); @@ -53,8 +57,6 @@ mojo::Remote<network::mojom::NetworkContext> network_context_; std::unique_ptr<web::NetworkContextOwner> network_context_owner_; - - DISALLOW_COPY_AND_ASSIGN(IOSChromeIOThread); }; #endif // IOS_CHROME_BROWSER_IOS_CHROME_IO_THREAD_H_
diff --git a/ios/chrome/browser/ios_chrome_main_parts.h b/ios/chrome/browser/ios_chrome_main_parts.h index 9eff4a71..c29e26a 100644 --- a/ios/chrome/browser/ios_chrome_main_parts.h +++ b/ios/chrome/browser/ios_chrome_main_parts.h
@@ -22,6 +22,10 @@ class IOSChromeMainParts : public web::WebMainParts { public: explicit IOSChromeMainParts(const base::CommandLine& parsed_command_line); + + IOSChromeMainParts(const IOSChromeMainParts&) = delete; + IOSChromeMainParts& operator=(const IOSChromeMainParts&) = delete; + ~IOSChromeMainParts() override; private: @@ -64,8 +68,6 @@ // Manages heap (memory) profiling. Requires the allocator shim to be enabled. std::unique_ptr<HeapProfilerController> heap_profiler_controller_; #endif - - DISALLOW_COPY_AND_ASSIGN(IOSChromeMainParts); }; #endif // IOS_CHROME_BROWSER_IOS_CHROME_MAIN_PARTS_H_
diff --git a/ios/chrome/browser/itunes_urls/itunes_urls_handler_tab_helper.h b/ios/chrome/browser/itunes_urls/itunes_urls_handler_tab_helper.h index 894c23a..fe247f7 100644 --- a/ios/chrome/browser/itunes_urls/itunes_urls_handler_tab_helper.h +++ b/ios/chrome/browser/itunes_urls/itunes_urls_handler_tab_helper.h
@@ -37,6 +37,10 @@ : public web::WebStatePolicyDecider, public web::WebStateUserData<ITunesUrlsHandlerTabHelper> { public: + ITunesUrlsHandlerTabHelper(const ITunesUrlsHandlerTabHelper&) = delete; + ITunesUrlsHandlerTabHelper& operator=(const ITunesUrlsHandlerTabHelper&) = + delete; + ~ITunesUrlsHandlerTabHelper() override; explicit ITunesUrlsHandlerTabHelper(web::WebState* web_state); @@ -56,8 +60,6 @@ void HandleITunesUrl(const GURL& url); WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(ITunesUrlsHandlerTabHelper); }; #endif // IOS_CHROME_BROWSER_ITUNES_URLS_ITUNES_URLS_HANDLER_TAB_HELPER_H_
diff --git a/ios/chrome/browser/main/browser.h b/ios/chrome/browser/main/browser.h index b58d8be..c7aba65 100644 --- a/ios/chrome/browser/main/browser.h +++ b/ios/chrome/browser/main/browser.h
@@ -25,6 +25,9 @@ // Creates a new Browser attached to |browser_state|. static std::unique_ptr<Browser> Create(ChromeBrowserState* browser_state); + Browser(const Browser&) = delete; + Browser& operator=(const Browser&) = delete; + ~Browser() override {} // Accessor for the owning ChromeBrowserState. @@ -42,9 +45,6 @@ protected: Browser() {} - - private: - DISALLOW_COPY_AND_ASSIGN(Browser); }; #endif // IOS_CHROME_BROWSER_MAIN_BROWSER_H_
diff --git a/ios/chrome/browser/main/browser_impl.h b/ios/chrome/browser/main/browser_impl.h index 714384e..fa20410 100644 --- a/ios/chrome/browser/main/browser_impl.h +++ b/ios/chrome/browser/main/browser_impl.h
@@ -26,6 +26,10 @@ public: // Constructs a BrowserImpl attached to |browser_state|. BrowserImpl(ChromeBrowserState* browser_state); + + BrowserImpl(const BrowserImpl&) = delete; + BrowserImpl& operator=(const BrowserImpl&) = delete; + ~BrowserImpl() override; // Browser. @@ -46,8 +50,6 @@ std::unique_ptr<WebStateList> web_state_list_; __strong CommandDispatcher* command_dispatcher_; base::ObserverList<BrowserObserver, /* check_empty= */ true> observers_; - - DISALLOW_COPY_AND_ASSIGN(BrowserImpl); }; #endif // IOS_CHROME_BROWSER_MAIN_BROWSER_IMPL_H_
diff --git a/ios/chrome/browser/main/browser_list_observer.h b/ios/chrome/browser/main/browser_list_observer.h index 699fa6f..2837628d 100644 --- a/ios/chrome/browser/main/browser_list_observer.h +++ b/ios/chrome/browser/main/browser_list_observer.h
@@ -14,6 +14,10 @@ class BrowserListObserver { public: BrowserListObserver() = default; + + BrowserListObserver(const BrowserListObserver&) = delete; + BrowserListObserver& operator=(const BrowserListObserver&) = delete; + virtual ~BrowserListObserver() = default; // Called after |browser| is added to |browser_list|. @@ -35,9 +39,6 @@ // do any cleanup. After this method is called, all observers will be removed // from |browser_list|, and no firther obeserver methods will be called. virtual void OnBrowserListShutdown(BrowserList* browser_list) {} - - private: - DISALLOW_COPY_AND_ASSIGN(BrowserListObserver); }; #endif // IOS_CHROME_BROWSER_MAIN_BROWSER_LIST_OBSERVER_H_
diff --git a/ios/chrome/browser/main/browser_web_state_list_delegate.h b/ios/chrome/browser/main/browser_web_state_list_delegate.h index 809c8f34..5fa94b7 100644 --- a/ios/chrome/browser/main/browser_web_state_list_delegate.h +++ b/ios/chrome/browser/main/browser_web_state_list_delegate.h
@@ -14,14 +14,16 @@ class BrowserWebStateListDelegate : public WebStateListDelegate { public: BrowserWebStateListDelegate(); + + BrowserWebStateListDelegate(const BrowserWebStateListDelegate&) = delete; + BrowserWebStateListDelegate& operator=(const BrowserWebStateListDelegate&) = + delete; + ~BrowserWebStateListDelegate() override; // WebStateListDelegate implementation. void WillAddWebState(web::WebState* web_state) override; void WebStateDetached(web::WebState* web_state) override; - - private: - DISALLOW_COPY_AND_ASSIGN(BrowserWebStateListDelegate); }; #endif // IOS_CHROME_BROWSER_MAIN_BROWSER_WEB_STATE_LIST_DELEGATE_H_
diff --git a/ios/chrome/browser/main/test_browser.h b/ios/chrome/browser/main/test_browser.h index 6cf2296..4ab51846 100644 --- a/ios/chrome/browser/main/test_browser.h +++ b/ios/chrome/browser/main/test_browser.h
@@ -28,6 +28,9 @@ // requires a task environment). TestBrowser(); + TestBrowser(const TestBrowser&) = delete; + TestBrowser& operator=(const TestBrowser&) = delete; + ~TestBrowser() override; // Browser. @@ -48,8 +51,6 @@ ChromeBrowserState* browser_state_ = nullptr; WebStateList* web_state_list_ = nullptr; base::ObserverList<BrowserObserver, /* check_empty= */ true> observers_; - - DISALLOW_COPY_AND_ASSIGN(TestBrowser); }; #endif // IOS_CHROME_BROWSER_MAIN_TEST_BROWSER_H_
diff --git a/ios/chrome/browser/main/test_browser_list_observer.h b/ios/chrome/browser/main/test_browser_list_observer.h index 6ed498e..0446b71 100644 --- a/ios/chrome/browser/main/test_browser_list_observer.h +++ b/ios/chrome/browser/main/test_browser_list_observer.h
@@ -16,6 +16,10 @@ class TestBrowserListObserver : public BrowserListObserver { public: TestBrowserListObserver(); + + TestBrowserListObserver(const TestBrowserListObserver&) = delete; + TestBrowserListObserver& operator=(const TestBrowserListObserver&) = delete; + ~TestBrowserListObserver() override; // A weak pointer to the last Browser that was observed being added to the @@ -54,8 +58,6 @@ Browser* browser) override; private: - DISALLOW_COPY_AND_ASSIGN(TestBrowserListObserver); - // Backing vars for the corresponding getter methods. Browser* last_added_browser_ = nullptr; Browser* last_removed_browser_ = nullptr;
diff --git a/ios/chrome/browser/metrics/chrome_browser_state_client.h b/ios/chrome/browser/metrics/chrome_browser_state_client.h index 67075fe..b4f743ec 100644 --- a/ios/chrome/browser/metrics/chrome_browser_state_client.h +++ b/ios/chrome/browser/metrics/chrome_browser_state_client.h
@@ -14,6 +14,9 @@ class ChromeBrowserStateClient : public metrics::DemographicMetricsProvider::ProfileClient { public: + ChromeBrowserStateClient(const ChromeBrowserStateClient&) = delete; + ChromeBrowserStateClient& operator=(const ChromeBrowserStateClient&) = delete; + ~ChromeBrowserStateClient() override; ChromeBrowserStateClient() = default; @@ -22,8 +25,6 @@ syncer::SyncService* GetSyncService() override; PrefService* GetPrefService() override; base::Time GetNetworkTime() const override; - - DISALLOW_COPY_AND_ASSIGN(ChromeBrowserStateClient); }; } // namespace metrics
diff --git a/ios/chrome/browser/metrics/first_user_action_recorder.h b/ios/chrome/browser/metrics/first_user_action_recorder.h index 6ce03cc..c58269c 100644 --- a/ios/chrome/browser/metrics/first_user_action_recorder.h +++ b/ios/chrome/browser/metrics/first_user_action_recorder.h
@@ -47,6 +47,10 @@ }; explicit FirstUserActionRecorder(base::TimeDelta background_duration); + + FirstUserActionRecorder(const FirstUserActionRecorder&) = delete; + FirstUserActionRecorder& operator=(const FirstUserActionRecorder&) = delete; + virtual ~FirstUserActionRecorder(); // Records that no applicable user action occurred. @@ -95,8 +99,6 @@ // A potential action that needs to be confirmed if there is no other relevant // action. base::CancelableOnceClosure rethrow_callback_; - - DISALLOW_COPY_AND_ASSIGN(FirstUserActionRecorder); }; #endif // IOS_CHROME_BROWSER_METRICS_FIRST_USER_ACTION_RECORDER_H_
diff --git a/ios/chrome/browser/metrics/ios_chrome_default_browser_metrics_provider.h b/ios/chrome/browser/metrics/ios_chrome_default_browser_metrics_provider.h index e1742999..b67712e 100644 --- a/ios/chrome/browser/metrics/ios_chrome_default_browser_metrics_provider.h +++ b/ios/chrome/browser/metrics/ios_chrome_default_browser_metrics_provider.h
@@ -14,6 +14,12 @@ public: explicit IOSChromeDefaultBrowserMetricsProvider( metrics::MetricsLogUploader::MetricServiceType metrics_service_type); + + IOSChromeDefaultBrowserMetricsProvider( + const IOSChromeDefaultBrowserMetricsProvider&) = delete; + IOSChromeDefaultBrowserMetricsProvider& operator=( + const IOSChromeDefaultBrowserMetricsProvider&) = delete; + ~IOSChromeDefaultBrowserMetricsProvider() override; // metrics::MetricsProvider: @@ -21,8 +27,6 @@ metrics::ChromeUserMetricsExtension* uma_proto) override; private: - DISALLOW_COPY_AND_ASSIGN(IOSChromeDefaultBrowserMetricsProvider); - // The type of the metrics service for which to emit the user demographics // status histogram (e.g., UMA). const metrics::MetricsLogUploader::MetricServiceType metrics_service_type_;
diff --git a/ios/chrome/browser/metrics/ios_chrome_metrics_service_client.h b/ios/chrome/browser/metrics/ios_chrome_metrics_service_client.h index ebdc8ec8..40737d7f 100644 --- a/ios/chrome/browser/metrics/ios_chrome_metrics_service_client.h +++ b/ios/chrome/browser/metrics/ios_chrome_metrics_service_client.h
@@ -45,6 +45,10 @@ public ukm::UkmConsentStateObserver, public web::GlobalWebStateObserver { public: + IOSChromeMetricsServiceClient(const IOSChromeMetricsServiceClient&) = delete; + IOSChromeMetricsServiceClient& operator=( + const IOSChromeMetricsServiceClient&) = delete; + ~IOSChromeMetricsServiceClient() override; // Factory function. @@ -162,8 +166,6 @@ base::CallbackListSubscription omnibox_url_opened_subscription_; base::WeakPtrFactory<IOSChromeMetricsServiceClient> weak_ptr_factory_; - - DISALLOW_COPY_AND_ASSIGN(IOSChromeMetricsServiceClient); }; #endif // IOS_CHROME_BROWSER_METRICS_IOS_CHROME_METRICS_SERVICE_CLIENT_H_
diff --git a/ios/chrome/browser/metrics/ios_chrome_metrics_services_manager_client.h b/ios/chrome/browser/metrics/ios_chrome_metrics_services_manager_client.h index bffcae2..1759723 100644 --- a/ios/chrome/browser/metrics/ios_chrome_metrics_services_manager_client.h +++ b/ios/chrome/browser/metrics/ios_chrome_metrics_services_manager_client.h
@@ -24,6 +24,12 @@ : public metrics_services_manager::MetricsServicesManagerClient { public: explicit IOSChromeMetricsServicesManagerClient(PrefService* local_state); + + IOSChromeMetricsServicesManagerClient( + const IOSChromeMetricsServicesManagerClient&) = delete; + IOSChromeMetricsServicesManagerClient& operator=( + const IOSChromeMetricsServicesManagerClient&) = delete; + ~IOSChromeMetricsServicesManagerClient() override; private: @@ -60,8 +66,6 @@ // Weak pointer to the local state prefs store. PrefService* local_state_; - - DISALLOW_COPY_AND_ASSIGN(IOSChromeMetricsServicesManagerClient); }; #endif // IOS_CHROME_BROWSER_METRICS_IOS_CHROME_METRICS_SERVICES_MANAGER_CLIENT_H_
diff --git a/ios/chrome/browser/metrics/ios_chrome_metrics_services_manager_client.mm b/ios/chrome/browser/metrics/ios_chrome_metrics_services_manager_client.mm index ff9d6f6..495fbb85 100644 --- a/ios/chrome/browser/metrics/ios_chrome_metrics_services_manager_client.mm +++ b/ios/chrome/browser/metrics/ios_chrome_metrics_services_manager_client.mm
@@ -47,13 +47,16 @@ : public metrics::EnabledStateProvider { public: IOSChromeEnabledStateProvider() {} + + IOSChromeEnabledStateProvider(const IOSChromeEnabledStateProvider&) = delete; + IOSChromeEnabledStateProvider& operator=( + const IOSChromeEnabledStateProvider&) = delete; + ~IOSChromeEnabledStateProvider() override {} bool IsConsentGiven() const override { return IOSChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(); } - - DISALLOW_COPY_AND_ASSIGN(IOSChromeEnabledStateProvider); }; IOSChromeMetricsServicesManagerClient::IOSChromeMetricsServicesManagerClient(
diff --git a/ios/chrome/browser/metrics/ios_chrome_stability_metrics_provider.h b/ios/chrome/browser/metrics/ios_chrome_stability_metrics_provider.h index cbf287a..40fe3aa 100644 --- a/ios/chrome/browser/metrics/ios_chrome_stability_metrics_provider.h +++ b/ios/chrome/browser/metrics/ios_chrome_stability_metrics_provider.h
@@ -42,6 +42,12 @@ }; explicit IOSChromeStabilityMetricsProvider(PrefService* local_state); + + IOSChromeStabilityMetricsProvider(const IOSChromeStabilityMetricsProvider&) = + delete; + IOSChromeStabilityMetricsProvider& operator=( + const IOSChromeStabilityMetricsProvider&) = delete; + ~IOSChromeStabilityMetricsProvider() override; // metrics::MetricsDataProvider: @@ -69,8 +75,6 @@ // True if recording is currently enabled. bool recording_enabled_; - - DISALLOW_COPY_AND_ASSIGN(IOSChromeStabilityMetricsProvider); }; #endif // IOS_CHROME_BROWSER_METRICS_IOS_CHROME_STABILITY_METRICS_PROVIDER_H_
diff --git a/ios/chrome/browser/metrics/ios_profile_session_durations_service.h b/ios/chrome/browser/metrics/ios_profile_session_durations_service.h index 229e29c..5d73dc7 100644 --- a/ios/chrome/browser/metrics/ios_profile_session_durations_service.h +++ b/ios/chrome/browser/metrics/ios_profile_session_durations_service.h
@@ -25,6 +25,12 @@ // not monitor profile session durations. IOSProfileSessionDurationsService(syncer::SyncService* sync_service, signin::IdentityManager* identity_manager); + + IOSProfileSessionDurationsService(const IOSProfileSessionDurationsService&) = + delete; + IOSProfileSessionDurationsService& operator=( + const IOSProfileSessionDurationsService&) = delete; + ~IOSProfileSessionDurationsService() override; // KeyedService: @@ -42,8 +48,6 @@ metrics_recorder_; bool is_session_active_ = false; - - DISALLOW_COPY_AND_ASSIGN(IOSProfileSessionDurationsService); }; #endif // IOS_CHROME_BROWSER_METRICS_IOS_PROFILE_SESSION_DURATIONS_SERVICE_H_
diff --git a/ios/chrome/browser/metrics/mobile_session_shutdown_metrics_provider.h b/ios/chrome/browser/metrics/mobile_session_shutdown_metrics_provider.h index 42d6463..136c8c73 100644 --- a/ios/chrome/browser/metrics/mobile_session_shutdown_metrics_provider.h +++ b/ios/chrome/browser/metrics/mobile_session_shutdown_metrics_provider.h
@@ -35,6 +35,12 @@ public: explicit MobileSessionShutdownMetricsProvider( metrics::MetricsService* metrics_service); + + MobileSessionShutdownMetricsProvider( + const MobileSessionShutdownMetricsProvider&) = delete; + MobileSessionShutdownMetricsProvider& operator=( + const MobileSessionShutdownMetricsProvider&) = delete; + ~MobileSessionShutdownMetricsProvider() override; // metrics::MetricsProvider @@ -65,7 +71,6 @@ private: metrics::MetricsService* metrics_service_; - DISALLOW_COPY_AND_ASSIGN(MobileSessionShutdownMetricsProvider); }; #endif // IOS_CHROME_BROWSER_METRICS_MOBILE_SESSION_SHUTDOWN_METRICS_PROVIDER_H_
diff --git a/ios/chrome/browser/net/connection_type_observer_bridge.h b/ios/chrome/browser/net/connection_type_observer_bridge.h index 0f81517..1e71c6f 100644 --- a/ios/chrome/browser/net/connection_type_observer_bridge.h +++ b/ios/chrome/browser/net/connection_type_observer_bridge.h
@@ -20,6 +20,11 @@ public: explicit ConnectionTypeObserverBridge( id<CRConnectionTypeObserverBridge> delegate); + + ConnectionTypeObserverBridge(const ConnectionTypeObserverBridge&) = delete; + ConnectionTypeObserverBridge& operator=(const ConnectionTypeObserverBridge&) = + delete; + ~ConnectionTypeObserverBridge() override; private: @@ -28,7 +33,6 @@ net::NetworkChangeNotifier::ConnectionType type) override; __weak id<CRConnectionTypeObserverBridge> delegate_; - DISALLOW_COPY_AND_ASSIGN(ConnectionTypeObserverBridge); }; #endif // IOS_CHROME_BROWSER_NET_CONNECTION_TYPE_OBSERVER_BRIDGE_H_
diff --git a/ios/chrome/browser/net/http_server_properties_factory.cc b/ios/chrome/browser/net/http_server_properties_factory.cc index 924383f..1aa8f29 100644 --- a/ios/chrome/browser/net/http_server_properties_factory.cc +++ b/ios/chrome/browser/net/http_server_properties_factory.cc
@@ -23,6 +23,9 @@ : pref_store_(std::move(pref_store)), path_(prefs::kHttpServerProperties) {} + PrefServiceAdapter(const PrefServiceAdapter&) = delete; + PrefServiceAdapter& operator=(const PrefServiceAdapter&) = delete; + ~PrefServiceAdapter() override { if (on_pref_load_callback_) pref_store_->RemoveObserver(this); @@ -73,8 +76,6 @@ // Only non-null while waiting for initial pref load. |this| is observes the // |pref_store_| exactly when non-null. base::OnceClosure on_pref_load_callback_; - - DISALLOW_COPY_AND_ASSIGN(PrefServiceAdapter); }; } // namespace
diff --git a/ios/chrome/browser/net/ios_chrome_http_user_agent_settings.h b/ios/chrome/browser/net/ios_chrome_http_user_agent_settings.h index 1a26c38..50a0d96 100644 --- a/ios/chrome/browser/net/ios_chrome_http_user_agent_settings.h +++ b/ios/chrome/browser/net/ios_chrome_http_user_agent_settings.h
@@ -20,6 +20,12 @@ public: // Must be called on the UI thread. explicit IOSChromeHttpUserAgentSettings(PrefService* prefs); + + IOSChromeHttpUserAgentSettings(const IOSChromeHttpUserAgentSettings&) = + delete; + IOSChromeHttpUserAgentSettings& operator=( + const IOSChromeHttpUserAgentSettings&) = delete; + // Must be called on the IO thread. ~IOSChromeHttpUserAgentSettings() override; @@ -36,8 +42,6 @@ // last result of processing via net::HttpUtil::GenerateAccept*Header(). mutable std::string last_pref_accept_language_; mutable std::string last_http_accept_language_; - - DISALLOW_COPY_AND_ASSIGN(IOSChromeHttpUserAgentSettings); }; #endif // IOS_CHROME_BROWSER_NET_IOS_CHROME_HTTP_USER_AGENT_SETTINGS_H_
diff --git a/ios/chrome/browser/net/ios_chrome_network_delegate.h b/ios/chrome/browser/net/ios_chrome_network_delegate.h index 39364499..1b3312a0 100644 --- a/ios/chrome/browser/net/ios_chrome_network_delegate.h +++ b/ios/chrome/browser/net/ios_chrome_network_delegate.h
@@ -26,6 +26,10 @@ class IOSChromeNetworkDelegate : public net::NetworkDelegateImpl { public: IOSChromeNetworkDelegate(); + + IOSChromeNetworkDelegate(const IOSChromeNetworkDelegate&) = delete; + IOSChromeNetworkDelegate& operator=(const IOSChromeNetworkDelegate&) = delete; + ~IOSChromeNetworkDelegate() override; // If |cookie_settings| is null or not set, all cookies are enabled, @@ -73,8 +77,6 @@ // Weak, owned by our owner. BooleanPrefMember* enable_do_not_track_; - - DISALLOW_COPY_AND_ASSIGN(IOSChromeNetworkDelegate); }; #endif // IOS_CHROME_BROWSER_NET_IOS_CHROME_NETWORK_DELEGATE_H_
diff --git a/ios/chrome/browser/net/ios_chrome_url_request_context_getter.cc b/ios/chrome/browser/net/ios_chrome_url_request_context_getter.cc index 84ce0aed..dce98d7 100644 --- a/ios/chrome/browser/net/ios_chrome_url_request_context_getter.cc +++ b/ios/chrome/browser/net/ios_chrome_url_request_context_getter.cc
@@ -17,13 +17,18 @@ class IOSChromeURLRequestContextFactory { public: IOSChromeURLRequestContextFactory() {} + + IOSChromeURLRequestContextFactory(const IOSChromeURLRequestContextFactory&) = + delete; + IOSChromeURLRequestContextFactory& operator=( + const IOSChromeURLRequestContextFactory&) = delete; + virtual ~IOSChromeURLRequestContextFactory() {} // Called to create a new instance (will only be called once). virtual net::URLRequestContext* Create() = 0; protected: - DISALLOW_COPY_AND_ASSIGN(IOSChromeURLRequestContextFactory); }; namespace {
diff --git a/ios/chrome/browser/notification_promo.h b/ios/chrome/browser/notification_promo.h index 2e7a24b..dc678ba 100644 --- a/ios/chrome/browser/notification_promo.h +++ b/ios/chrome/browser/notification_promo.h
@@ -27,6 +27,10 @@ class NotificationPromo { public: explicit NotificationPromo(PrefService* local_state); + + NotificationPromo(const NotificationPromo&) = delete; + NotificationPromo& operator=(const NotificationPromo&) = delete; + ~NotificationPromo(); // Initialize from finch parameters. @@ -104,8 +108,6 @@ int views_; bool closed_; - - DISALLOW_COPY_AND_ASSIGN(NotificationPromo); }; } // namespace ios
diff --git a/ios/chrome/browser/ntp/new_tab_page_tab_helper.h b/ios/chrome/browser/ntp/new_tab_page_tab_helper.h index 5bafb376..be2d747 100644 --- a/ios/chrome/browser/ntp/new_tab_page_tab_helper.h +++ b/ios/chrome/browser/ntp/new_tab_page_tab_helper.h
@@ -23,6 +23,9 @@ class NewTabPageTabHelper : public web::WebStateObserver, public web::WebStateUserData<NewTabPageTabHelper> { public: + NewTabPageTabHelper(const NewTabPageTabHelper&) = delete; + NewTabPageTabHelper& operator=(const NewTabPageTabHelper&) = delete; + ~NewTabPageTabHelper() override; static void CreateForWebState(web::WebState* web_state); @@ -95,8 +98,6 @@ std::unique_ptr<base::OneShotTimer> ignore_load_requests_timer_; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(NewTabPageTabHelper); }; #endif // IOS_CHROME_BROWSER_NTP_NEW_TAB_PAGE_TAB_HELPER_H_
diff --git a/ios/chrome/browser/ntp_tiles/most_visited_sites_observer_bridge.h b/ios/chrome/browser/ntp_tiles/most_visited_sites_observer_bridge.h index 5462b71b..13c81a3 100644 --- a/ios/chrome/browser/ntp_tiles/most_visited_sites_observer_bridge.h +++ b/ios/chrome/browser/ntp_tiles/most_visited_sites_observer_bridge.h
@@ -32,6 +32,12 @@ class MostVisitedSitesObserverBridge : public MostVisitedSites::Observer { public: MostVisitedSitesObserverBridge(id<MostVisitedSitesObserving> observer); + + MostVisitedSitesObserverBridge(const MostVisitedSitesObserverBridge&) = + delete; + MostVisitedSitesObserverBridge& operator=( + const MostVisitedSitesObserverBridge&) = delete; + ~MostVisitedSitesObserverBridge() override; void OnURLsAvailable( @@ -40,8 +46,6 @@ private: __weak id<MostVisitedSitesObserving> observer_ = nil; - - DISALLOW_COPY_AND_ASSIGN(MostVisitedSitesObserverBridge); }; } // namespace ntp_tiles
diff --git a/ios/chrome/browser/open_in/open_in_tab_helper.h b/ios/chrome/browser/open_in/open_in_tab_helper.h index 99b9c4ddc..8ef377c 100644 --- a/ios/chrome/browser/open_in/open_in_tab_helper.h +++ b/ios/chrome/browser/open_in/open_in_tab_helper.h
@@ -78,6 +78,9 @@ class OpenInTabHelper : public web::WebStateObserver, public web::WebStateUserData<OpenInTabHelper> { public: + OpenInTabHelper(const OpenInTabHelper&) = delete; + OpenInTabHelper& operator=(const OpenInTabHelper&) = delete; + ~OpenInTabHelper() override; // Creates OpenInTabHelper and attaches to |web_state|. |web_state| must not @@ -121,8 +124,6 @@ __weak id<OpenInTabHelperDelegate> delegate_ = nil; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(OpenInTabHelper); }; #endif // IOS_CHROME_BROWSER_OPEN_IN_OPEN_IN_TAB_HELPER_H_
diff --git a/ios/chrome/browser/overlays/public/overlay_presenter_observer_bridge.h b/ios/chrome/browser/overlays/public/overlay_presenter_observer_bridge.h index 96d1df9..af036ab1 100644 --- a/ios/chrome/browser/overlays/public/overlay_presenter_observer_bridge.h +++ b/ios/chrome/browser/overlays/public/overlay_presenter_observer_bridge.h
@@ -45,6 +45,12 @@ // It it the responsibility of calling code to add/remove the instance // from OverlayPresenter's observer list. OverlayPresenterObserverBridge(id<OverlayPresenterObserving> observer); + + OverlayPresenterObserverBridge(const OverlayPresenterObserverBridge&) = + delete; + OverlayPresenterObserverBridge& operator=( + const OverlayPresenterObserverBridge&) = delete; + ~OverlayPresenterObserverBridge() override; // OverlayPresenterObserver: @@ -61,8 +67,6 @@ private: __weak id<OverlayPresenterObserving> observer_ = nil; - - DISALLOW_COPY_AND_ASSIGN(OverlayPresenterObserverBridge); }; #endif // IOS_CHROME_BROWSER_OVERLAYS_PUBLIC_OVERLAY_PRESENTER_OBSERVER_BRIDGE_H_
diff --git a/ios/chrome/browser/overlays/public/overlay_request_queue.h b/ios/chrome/browser/overlays/public/overlay_request_queue.h index 8f6341b0..7ea195fb 100644 --- a/ios/chrome/browser/overlays/public/overlay_request_queue.h +++ b/ios/chrome/browser/overlays/public/overlay_request_queue.h
@@ -19,6 +19,9 @@ // A queue of OverlayRequests for a specific WebState. class OverlayRequestQueue { public: + OverlayRequestQueue(const OverlayRequestQueue&) = delete; + OverlayRequestQueue& operator=(const OverlayRequestQueue&) = delete; + virtual ~OverlayRequestQueue() = default; // Returns the request queue for |web_state| at |modality|. @@ -65,7 +68,6 @@ private: friend class OverlayRequestCancelHandler; - DISALLOW_COPY_AND_ASSIGN(OverlayRequestQueue); // Called by cancellation handlers to cancel |request|. virtual void CancelRequest(OverlayRequest* request) = 0;
diff --git a/ios/chrome/browser/overscroll_actions/overscroll_actions_tab_helper.h b/ios/chrome/browser/overscroll_actions/overscroll_actions_tab_helper.h index b2b29dc0..80d66aac 100644 --- a/ios/chrome/browser/overscroll_actions/overscroll_actions_tab_helper.h +++ b/ios/chrome/browser/overscroll_actions/overscroll_actions_tab_helper.h
@@ -22,6 +22,10 @@ : public web::WebStateObserver, public web::WebStateUserData<OverscrollActionsTabHelper> { public: + OverscrollActionsTabHelper(const OverscrollActionsTabHelper&) = delete; + OverscrollActionsTabHelper& operator=(const OverscrollActionsTabHelper&) = + delete; + ~OverscrollActionsTabHelper() override; // Sets the delegate. The delegate is not owned by the tab helper. @@ -53,8 +57,6 @@ web::WebState* web_state_ = nullptr; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(OverscrollActionsTabHelper); }; #endif // IOS_CHROME_BROWSER_OVERSCROLL_ACTIONS_OVERSCROLL_ACTIONS_TAB_HELPER_H_
diff --git a/ios/chrome/browser/passwords/ios_chrome_password_manager_client.h b/ios/chrome/browser/passwords/ios_chrome_password_manager_client.h index 5129d7d..c7d6ed7 100644 --- a/ios/chrome/browser/passwords/ios_chrome_password_manager_client.h +++ b/ios/chrome/browser/passwords/ios_chrome_password_manager_client.h
@@ -69,6 +69,11 @@ explicit IOSChromePasswordManagerClient( id<IOSChromePasswordManagerClientBridge> bridge); + IOSChromePasswordManagerClient(const IOSChromePasswordManagerClient&) = + delete; + IOSChromePasswordManagerClient& operator=( + const IOSChromePasswordManagerClient&) = delete; + ~IOSChromePasswordManagerClient() override; // password_manager::PasswordManagerClient implementation. @@ -204,8 +209,6 @@ base::ScopedObservation<PasswordProtectionJavaScriptFeature, InputEventObserver> input_event_observation_{this}; - - DISALLOW_COPY_AND_ASSIGN(IOSChromePasswordManagerClient); base::WeakPtrFactory<IOSChromePasswordManagerClient> weak_factory_{this}; };
diff --git a/ios/chrome/browser/passwords/ios_chrome_password_manager_driver.h b/ios/chrome/browser/passwords/ios_chrome_password_manager_driver.h index e4959cd..9031a836 100644 --- a/ios/chrome/browser/passwords/ios_chrome_password_manager_driver.h +++ b/ios/chrome/browser/passwords/ios_chrome_password_manager_driver.h
@@ -27,6 +27,12 @@ explicit IOSChromePasswordManagerDriver( id<PasswordManagerDriverBridge> bridge, password_manager::PasswordManager* password_manager); + + IOSChromePasswordManagerDriver(const IOSChromePasswordManagerDriver&) = + delete; + IOSChromePasswordManagerDriver& operator=( + const IOSChromePasswordManagerDriver&) = delete; + ~IOSChromePasswordManagerDriver() override; // password_manager::PasswordManagerDriver implementation. @@ -56,8 +62,6 @@ private: __weak id<PasswordManagerDriverBridge> bridge_; // (weak) password_manager::PasswordManager* password_manager_; - - DISALLOW_COPY_AND_ASSIGN(IOSChromePasswordManagerDriver); }; #endif // IOS_CHROME_BROWSER_PASSWORDS_IOS_CHROME_PASSWORD_MANAGER_DRIVER_H_
diff --git a/ios/chrome/browser/passwords/ios_chrome_password_manager_infobar_delegate.h b/ios/chrome/browser/passwords/ios_chrome_password_manager_infobar_delegate.h index aeecfc00..159e0ae0 100644 --- a/ios/chrome/browser/passwords/ios_chrome_password_manager_infobar_delegate.h +++ b/ios/chrome/browser/passwords/ios_chrome_password_manager_infobar_delegate.h
@@ -21,6 +21,11 @@ // IOSChromeSavePasswordInfoBarDelegate. class IOSChromePasswordManagerInfoBarDelegate : public ConfirmInfoBarDelegate { public: + IOSChromePasswordManagerInfoBarDelegate( + const IOSChromePasswordManagerInfoBarDelegate&) = delete; + IOSChromePasswordManagerInfoBarDelegate& operator=( + const IOSChromePasswordManagerInfoBarDelegate&) = delete; + ~IOSChromePasswordManagerInfoBarDelegate() override; // Getter for the message displayed in addition to the title. If no message @@ -75,7 +80,5 @@ // Handler for calling Application commands. __weak id<ApplicationCommands> handler_ = nil; - - DISALLOW_COPY_AND_ASSIGN(IOSChromePasswordManagerInfoBarDelegate); }; #endif // IOS_CHROME_BROWSER_PASSWORDS_IOS_CHROME_PASSWORD_MANAGER_INFOBAR_DELEGATE_H_
diff --git a/ios/chrome/browser/passwords/ios_chrome_save_password_infobar_delegate.h b/ios/chrome/browser/passwords/ios_chrome_save_password_infobar_delegate.h index ed7760e..61189262 100644 --- a/ios/chrome/browser/passwords/ios_chrome_save_password_infobar_delegate.h +++ b/ios/chrome/browser/passwords/ios_chrome_save_password_infobar_delegate.h
@@ -31,6 +31,11 @@ bool password_update, std::unique_ptr<password_manager::PasswordFormManagerForUI> form_to_save); + IOSChromeSavePasswordInfoBarDelegate( + const IOSChromeSavePasswordInfoBarDelegate&) = delete; + IOSChromeSavePasswordInfoBarDelegate& operator=( + const IOSChromeSavePasswordInfoBarDelegate&) = delete; + ~IOSChromeSavePasswordInfoBarDelegate() override; // Returns |delegate| as an IOSChromeSavePasswordInfoBarDelegate, or nullptr @@ -97,8 +102,6 @@ // YES if an Infobar is being presented by this delegate. bool infobar_presenting_ = false; - - DISALLOW_COPY_AND_ASSIGN(IOSChromeSavePasswordInfoBarDelegate); }; #endif // IOS_CHROME_BROWSER_PASSWORDS_IOS_CHROME_SAVE_PASSWORD_INFOBAR_DELEGATE_H_
diff --git a/ios/chrome/browser/passwords/password_tab_helper.h b/ios/chrome/browser/passwords/password_tab_helper.h index d1c957c6d..628acc9 100644 --- a/ios/chrome/browser/passwords/password_tab_helper.h +++ b/ios/chrome/browser/passwords/password_tab_helper.h
@@ -27,6 +27,9 @@ class PasswordTabHelper : public web::WebStateObserver, public web::WebStateUserData<PasswordTabHelper> { public: + PasswordTabHelper(const PasswordTabHelper&) = delete; + PasswordTabHelper& operator=(const PasswordTabHelper&) = delete; + ~PasswordTabHelper() override; // Creates a PasswordTabHelper and attaches it to the given |web_state|. @@ -70,8 +73,6 @@ __strong PasswordController* controller_; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(PasswordTabHelper); }; #endif // IOS_CHROME_BROWSER_PASSWORDS_PASSWORD_TAB_HELPER_H_
diff --git a/ios/chrome/browser/passwords/save_passwords_consumer.h b/ios/chrome/browser/passwords/save_passwords_consumer.h index 456c4db..cad154d 100644 --- a/ios/chrome/browser/passwords/save_passwords_consumer.h +++ b/ios/chrome/browser/passwords/save_passwords_consumer.h
@@ -27,6 +27,10 @@ class SavePasswordsConsumer : public password_manager::PasswordStoreConsumer { public: explicit SavePasswordsConsumer(id<SavePasswordsConsumerDelegate> delegate); + + SavePasswordsConsumer(const SavePasswordsConsumer&) = delete; + SavePasswordsConsumer& operator=(const SavePasswordsConsumer&) = delete; + ~SavePasswordsConsumer() override; void OnGetPasswordStoreResults( std::vector<std::unique_ptr<password_manager::PasswordForm>> results) @@ -34,7 +38,6 @@ private: __weak id<SavePasswordsConsumerDelegate> delegate_ = nil; - DISALLOW_COPY_AND_ASSIGN(SavePasswordsConsumer); }; } // namespace ios
diff --git a/ios/chrome/browser/passwords/test/test_password_manager_client.h b/ios/chrome/browser/passwords/test/test_password_manager_client.h index 33abccd..8e1bafd 100644 --- a/ios/chrome/browser/passwords/test/test_password_manager_client.h +++ b/ios/chrome/browser/passwords/test/test_password_manager_client.h
@@ -27,6 +27,11 @@ : public password_manager::StubPasswordManagerClient { public: TestPasswordManagerClient(); + + TestPasswordManagerClient(const TestPasswordManagerClient&) = delete; + TestPasswordManagerClient& operator=(const TestPasswordManagerClient&) = + delete; + ~TestPasswordManagerClient() override; // PromptUserTo*Ptr functions allow to both override PromptUserTo* methods @@ -69,8 +74,6 @@ PasswordManager password_manager_; std::unique_ptr<PasswordFormManagerForUI> manager_; scoped_refptr<TestPasswordStore> store_; - - DISALLOW_COPY_AND_ASSIGN(TestPasswordManagerClient); }; #endif // IOS_CHROME_BROWSER_PASSWORDS_TEST_TEST_PASSWORD_MANAGER_CLIENT_H_
diff --git a/ios/chrome/browser/prerender/prerender_service_impl_unittest.mm b/ios/chrome/browser/prerender/prerender_service_impl_unittest.mm index 23b2b02..7918eb29 100644 --- a/ios/chrome/browser/prerender/prerender_service_impl_unittest.mm +++ b/ios/chrome/browser/prerender/prerender_service_impl_unittest.mm
@@ -25,6 +25,10 @@ browser_state_ = builder.Build(); service_ = std::make_unique<PrerenderServiceImpl>(browser_state_.get()); } + + PrerenderServiceImplTest(const PrerenderServiceImplTest&) = delete; + PrerenderServiceImplTest& operator=(const PrerenderServiceImplTest&) = delete; + ~PrerenderServiceImplTest() override = default; protected: @@ -32,9 +36,6 @@ std::unique_ptr<TestChromeBrowserState> browser_state_; std::unique_ptr<PrerenderService> service_; web::FakeWebState web_state_; - - private: - DISALLOW_COPY_AND_ASSIGN(PrerenderServiceImplTest); }; } // namespace
diff --git a/ios/chrome/browser/reading_list/reading_list_distiller_page.h b/ios/chrome/browser/reading_list/reading_list_distiller_page.h index c56bcd6..7c0f39c 100644 --- a/ios/chrome/browser/reading_list/reading_list_distiller_page.h +++ b/ios/chrome/browser/reading_list/reading_list_distiller_page.h
@@ -25,6 +25,11 @@ // distillation. class ReadingListDistillerPageDelegate { public: + ReadingListDistillerPageDelegate(const ReadingListDistillerPageDelegate&) = + delete; + ReadingListDistillerPageDelegate& operator=( + const ReadingListDistillerPageDelegate&) = delete; + virtual ~ReadingListDistillerPageDelegate(); // A callback called if the URL passed to the distilled led to a redirection. @@ -37,7 +42,6 @@ protected: ReadingListDistillerPageDelegate(); - DISALLOW_COPY_AND_ASSIGN(ReadingListDistillerPageDelegate); }; // An DistillerPageIOS that will retain WebState to allow favicon download and @@ -52,6 +56,10 @@ web::BrowserState* browser_state, FaviconWebStateDispatcher* web_state_dispatcher, ReadingListDistillerPageDelegate* delegate); + + ReadingListDistillerPage(const ReadingListDistillerPage&) = delete; + ReadingListDistillerPage& operator=(const ReadingListDistillerPage&) = delete; + ~ReadingListDistillerPage() override; protected: @@ -103,8 +111,6 @@ ReadingListDistillerPageDelegate* delegate_; int delayed_task_id_; base::WeakPtrFactory<ReadingListDistillerPage> weak_ptr_factory_; - - DISALLOW_COPY_AND_ASSIGN(ReadingListDistillerPage); }; } // namespace reading_list
diff --git a/ios/chrome/browser/reading_list/reading_list_distiller_page_factory.h b/ios/chrome/browser/reading_list/reading_list_distiller_page_factory.h index daabebe..85193402 100644 --- a/ios/chrome/browser/reading_list/reading_list_distiller_page_factory.h +++ b/ios/chrome/browser/reading_list/reading_list_distiller_page_factory.h
@@ -27,6 +27,12 @@ class ReadingListDistillerPageFactory { public: explicit ReadingListDistillerPageFactory(web::BrowserState* browser_state); + + ReadingListDistillerPageFactory(const ReadingListDistillerPageFactory&) = + delete; + ReadingListDistillerPageFactory& operator=( + const ReadingListDistillerPageFactory&) = delete; + virtual ~ReadingListDistillerPageFactory(); // Creates a ReadingListDistillerPage to distill |url|. @@ -41,8 +47,6 @@ private: web::BrowserState* browser_state_; std::unique_ptr<FaviconWebStateDispatcher> web_state_dispatcher_; - - DISALLOW_COPY_AND_ASSIGN(ReadingListDistillerPageFactory); }; } // namespace reading_list
diff --git a/ios/chrome/browser/reading_list/reading_list_download_service.h b/ios/chrome/browser/reading_list/reading_list_download_service.h index 4e383475..9000a55 100644 --- a/ios/chrome/browser/reading_list/reading_list_download_service.h +++ b/ios/chrome/browser/reading_list/reading_list_download_service.h
@@ -41,6 +41,11 @@ std::unique_ptr<dom_distiller::DistillerFactory> distiller_factory, std::unique_ptr<reading_list::ReadingListDistillerPageFactory> distiller_page_factory); + + ReadingListDownloadService(const ReadingListDownloadService&) = delete; + ReadingListDownloadService& operator=(const ReadingListDownloadService&) = + delete; + ~ReadingListDownloadService() override; // Initializes the reading list download service. @@ -111,8 +116,6 @@ std::unique_ptr<dom_distiller::DistillerFactory> distiller_factory_; base::WeakPtrFactory<ReadingListDownloadService> weak_ptr_factory_; - - DISALLOW_COPY_AND_ASSIGN(ReadingListDownloadService); }; #endif // IOS_CHROME_BROWSER_READING_LIST_READING_LIST_DOWNLOAD_SERVICE_H_
diff --git a/ios/chrome/browser/reading_list/reading_list_remover_helper.h b/ios/chrome/browser/reading_list/reading_list_remover_helper.h index 94477c0..4595b01 100644 --- a/ios/chrome/browser/reading_list/reading_list_remover_helper.h +++ b/ios/chrome/browser/reading_list/reading_list_remover_helper.h
@@ -22,6 +22,10 @@ using Callback = base::OnceCallback<void(bool)>; explicit ReadingListRemoverHelper(ChromeBrowserState* browser_state); + + ReadingListRemoverHelper(const ReadingListRemoverHelper&) = delete; + ReadingListRemoverHelper& operator=(const ReadingListRemoverHelper&) = delete; + ~ReadingListRemoverHelper() override; // Removes all Reading list items and asynchronously invoke |completion| with @@ -45,8 +49,6 @@ scoped_observation_{this}; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(ReadingListRemoverHelper); }; } // namespace reading_list
diff --git a/ios/chrome/browser/reading_list/reading_list_web_state_observer.h b/ios/chrome/browser/reading_list/reading_list_web_state_observer.h index a34b377..f59da1d6 100644 --- a/ios/chrome/browser/reading_list/reading_list_web_state_observer.h +++ b/ios/chrome/browser/reading_list/reading_list_web_state_observer.h
@@ -29,6 +29,10 @@ static void CreateForWebState(web::WebState* web_state, ReadingListModel* reading_list_model); + ReadingListWebStateObserver(const ReadingListWebStateObserver&) = delete; + ReadingListWebStateObserver& operator=(const ReadingListWebStateObserver&) = + delete; + ~ReadingListWebStateObserver() override; // ReadingListModelObserver implementation. @@ -89,8 +93,6 @@ web::PageLoadCompletionStatus last_load_result_; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(ReadingListWebStateObserver); }; #endif // IOS_CHROME_BROWSER_READING_LIST_READING_LIST_WEB_STATE_OBSERVER_H_
diff --git a/ios/chrome/browser/reading_list/url_downloader.h b/ios/chrome/browser/reading_list/url_downloader.h index 30f044f3..4266ef3 100644 --- a/ios/chrome/browser/reading_list/url_downloader.h +++ b/ios/chrome/browser/reading_list/url_downloader.h
@@ -85,6 +85,10 @@ scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory, const DownloadCompletion& download_completion, const SuccessCompletion& delete_completion); + + URLDownloader(const URLDownloader&) = delete; + URLDownloader& operator=(const URLDownloader&) = delete; + ~URLDownloader() override; // Asynchronously download an offline version of the URL. @@ -191,8 +195,6 @@ std::unique_ptr<dom_distiller::DistillerViewerInterface> distiller_; scoped_refptr<base::SequencedTaskRunner> task_runner_; base::CancelableTaskTracker task_tracker_; - - DISALLOW_COPY_AND_ASSIGN(URLDownloader); }; #endif // IOS_CHROME_BROWSER_READING_LIST_URL_DOWNLOADER_H_
diff --git a/ios/chrome/browser/reading_list/url_downloader_unittest.mm b/ios/chrome/browser/reading_list/url_downloader_unittest.mm index fd267b5e..d080816 100644 --- a/ios/chrome/browser/reading_list/url_downloader_unittest.mm +++ b/ios/chrome/browser/reading_list/url_downloader_unittest.mm
@@ -184,6 +184,9 @@ new MockURLDownloader(data_dir, test_shared_url_loader_factory_)); } + URLDownloaderTest(const URLDownloaderTest&) = delete; + URLDownloaderTest& operator=(const URLDownloaderTest&) = delete; + ~URLDownloaderTest() override {} void TearDown() override { @@ -201,9 +204,6 @@ test_shared_url_loader_factory_; std::unique_ptr<MockURLDownloader> downloader_; - - private: - DISALLOW_COPY_AND_ASSIGN(URLDownloaderTest); }; TEST_F(URLDownloaderTest, SingleDownload) {
diff --git a/ios/chrome/browser/rlz/rlz_tracker_delegate_impl.h b/ios/chrome/browser/rlz/rlz_tracker_delegate_impl.h index 459547a1..78d694e5 100644 --- a/ios/chrome/browser/rlz/rlz_tracker_delegate_impl.h +++ b/ios/chrome/browser/rlz/rlz_tracker_delegate_impl.h
@@ -20,6 +20,10 @@ class RLZTrackerDelegateImpl : public rlz::RLZTrackerDelegate { public: RLZTrackerDelegateImpl(); + + RLZTrackerDelegateImpl(const RLZTrackerDelegateImpl&) = delete; + RLZTrackerDelegateImpl& operator=(const RLZTrackerDelegateImpl&) = delete; + ~RLZTrackerDelegateImpl() override; static bool IsGoogleDefaultSearch(ChromeBrowserState* browser_state); @@ -47,8 +51,6 @@ base::OnceClosure on_omnibox_search_callback_; base::CallbackListSubscription on_omnibox_url_opened_subscription_; - - DISALLOW_COPY_AND_ASSIGN(RLZTrackerDelegateImpl); }; #endif // IOS_CHROME_BROWSER_RLZ_RLZ_TRACKER_DELEGATE_IMPL_H_
diff --git a/ios/chrome/browser/safe_browsing/safe_browsing_service_unittest.mm b/ios/chrome/browser/safe_browsing/safe_browsing_service_unittest.mm index 9a5ea74..67612dab 100644 --- a/ios/chrome/browser/safe_browsing/safe_browsing_service_unittest.mm +++ b/ios/chrome/browser/safe_browsing/safe_browsing_service_unittest.mm
@@ -155,6 +155,9 @@ base::RunLoop().RunUntilIdle(); } + SafeBrowsingServiceTest(const SafeBrowsingServiceTest&) = delete; + SafeBrowsingServiceTest& operator=(const SafeBrowsingServiceTest&) = delete; + ~SafeBrowsingServiceTest() override { safe_browsing_service_->ShutDown(); @@ -231,8 +234,6 @@ safe_browsing::TestV4GetHashProtocolManagerFactory* v4_get_hash_factory_; // Owned by V4Database. safe_browsing::TestV4StoreFactory* store_factory_; - - DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceTest); }; TEST_F(SafeBrowsingServiceTest, SafeAndUnsafePages) {
diff --git a/ios/chrome/browser/screen_time/screen_time_history_deleter.h b/ios/chrome/browser/screen_time/screen_time_history_deleter.h index 704c2f4..ad83b95 100644 --- a/ios/chrome/browser/screen_time/screen_time_history_deleter.h +++ b/ios/chrome/browser/screen_time/screen_time_history_deleter.h
@@ -20,6 +20,10 @@ public history::HistoryServiceObserver { public: explicit ScreenTimeHistoryDeleter(history::HistoryService* history_service); + + ScreenTimeHistoryDeleter(const ScreenTimeHistoryDeleter&) = delete; + ScreenTimeHistoryDeleter& operator=(const ScreenTimeHistoryDeleter&) = delete; + ~ScreenTimeHistoryDeleter() override; // KeyedService: @@ -36,8 +40,6 @@ base::ScopedObservation<history::HistoryService, history::HistoryServiceObserver> history_service_observation_{this}; - - DISALLOW_COPY_AND_ASSIGN(ScreenTimeHistoryDeleter); }; #endif // IOS_CHROME_BROWSER_SCREEN_TIME_SCREEN_TIME_HISTORY_DELETER_H_
diff --git a/ios/chrome/browser/search_engines/search_engine_tab_helper.h b/ios/chrome/browser/search_engines/search_engine_tab_helper.h index b9f5a2b..1c4291c 100644 --- a/ios/chrome/browser/search_engines/search_engine_tab_helper.h +++ b/ios/chrome/browser/search_engines/search_engine_tab_helper.h
@@ -37,6 +37,9 @@ public web::WebStateUserData<SearchEngineTabHelper>, public favicon::FaviconDriverObserver { public: + SearchEngineTabHelper(const SearchEngineTabHelper&) = delete; + SearchEngineTabHelper& operator=(const SearchEngineTabHelper&) = delete; + ~SearchEngineTabHelper() override; private: @@ -90,8 +93,6 @@ base::CallbackListSubscription subscription_; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(SearchEngineTabHelper); }; #endif // IOS_CHROME_BROWSER_SEARCH_ENGINES_SEARCH_ENGINE_TAB_HELPER_H_
diff --git a/ios/chrome/browser/search_engines/template_url_service_client_impl.h b/ios/chrome/browser/search_engines/template_url_service_client_impl.h index 17389f5..e93120c 100644 --- a/ios/chrome/browser/search_engines/template_url_service_client_impl.h +++ b/ios/chrome/browser/search_engines/template_url_service_client_impl.h
@@ -22,6 +22,11 @@ public: explicit TemplateURLServiceClientImpl( history::HistoryService* history_service); + + TemplateURLServiceClientImpl(const TemplateURLServiceClientImpl&) = delete; + TemplateURLServiceClientImpl& operator=(const TemplateURLServiceClientImpl&) = + delete; + ~TemplateURLServiceClientImpl() override; private: @@ -46,8 +51,6 @@ base::ScopedObservation<history::HistoryService, history::HistoryServiceObserver> history_service_observation_{this}; - - DISALLOW_COPY_AND_ASSIGN(TemplateURLServiceClientImpl); }; } // namespace ios
diff --git a/ios/chrome/browser/search_engines/ui_thread_search_terms_data.h b/ios/chrome/browser/search_engines/ui_thread_search_terms_data.h index 7526b69a..a76fa2b 100644 --- a/ios/chrome/browser/search_engines/ui_thread_search_terms_data.h +++ b/ios/chrome/browser/search_engines/ui_thread_search_terms_data.h
@@ -15,6 +15,10 @@ class UIThreadSearchTermsData : public SearchTermsData { public: UIThreadSearchTermsData(); + + UIThreadSearchTermsData(const UIThreadSearchTermsData&) = delete; + UIThreadSearchTermsData& operator=(const UIThreadSearchTermsData&) = delete; + ~UIThreadSearchTermsData() override; // SearchTermsData implementation. @@ -28,8 +32,6 @@ private: base::ThreadChecker thread_checker_; - - DISALLOW_COPY_AND_ASSIGN(UIThreadSearchTermsData); }; } // namespace ios
diff --git a/ios/chrome/browser/send_tab_to_self/ios_send_tab_to_self_infobar_delegate.h b/ios/chrome/browser/send_tab_to_self/ios_send_tab_to_self_infobar_delegate.h index 86e7ea11..50f85bb8 100644 --- a/ios/chrome/browser/send_tab_to_self/ios_send_tab_to_self_infobar_delegate.h +++ b/ios/chrome/browser/send_tab_to_self/ios_send_tab_to_self_infobar_delegate.h
@@ -27,6 +27,12 @@ explicit IOSSendTabToSelfInfoBarDelegate(const SendTabToSelfEntry* entry, SendTabToSelfModel* model); + + IOSSendTabToSelfInfoBarDelegate(const IOSSendTabToSelfInfoBarDelegate&) = + delete; + IOSSendTabToSelfInfoBarDelegate& operator=( + const IOSSendTabToSelfInfoBarDelegate&) = delete; + ~IOSSendTabToSelfInfoBarDelegate() override; private: @@ -54,8 +60,6 @@ __strong id<NSObject> registration_ = nil; base::WeakPtrFactory<IOSSendTabToSelfInfoBarDelegate> weak_ptr_factory_; - - DISALLOW_COPY_AND_ASSIGN(IOSSendTabToSelfInfoBarDelegate); }; } // namespace send_tab_to_self
diff --git a/ios/chrome/browser/sessions/ios_chrome_session_tab_helper.h b/ios/chrome/browser/sessions/ios_chrome_session_tab_helper.h index a3bb23a9..844133b0 100644 --- a/ios/chrome/browser/sessions/ios_chrome_session_tab_helper.h +++ b/ios/chrome/browser/sessions/ios_chrome_session_tab_helper.h
@@ -12,6 +12,10 @@ class IOSChromeSessionTabHelper : public web::WebStateUserData<IOSChromeSessionTabHelper> { public: + IOSChromeSessionTabHelper(const IOSChromeSessionTabHelper&) = delete; + IOSChromeSessionTabHelper& operator=(const IOSChromeSessionTabHelper&) = + delete; + ~IOSChromeSessionTabHelper() override; // Returns the identifier used by session restore for this tab. @@ -34,8 +38,6 @@ SessionID window_id_; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(IOSChromeSessionTabHelper); }; #endif // IOS_CHROME_BROWSER_SESSIONS_IOS_CHROME_SESSION_TAB_HELPER_H_
diff --git a/ios/chrome/browser/sessions/ios_chrome_tab_restore_service_client.h b/ios/chrome/browser/sessions/ios_chrome_tab_restore_service_client.h index 3f5d6103..e308228 100644 --- a/ios/chrome/browser/sessions/ios_chrome_tab_restore_service_client.h +++ b/ios/chrome/browser/sessions/ios_chrome_tab_restore_service_client.h
@@ -16,6 +16,12 @@ : public sessions::TabRestoreServiceClient { public: explicit IOSChromeTabRestoreServiceClient(ChromeBrowserState* browser_state); + + IOSChromeTabRestoreServiceClient(const IOSChromeTabRestoreServiceClient&) = + delete; + IOSChromeTabRestoreServiceClient& operator=( + const IOSChromeTabRestoreServiceClient&) = delete; + ~IOSChromeTabRestoreServiceClient() override; private: @@ -40,8 +46,6 @@ void GetLastSession(sessions::GetLastSessionCallback callback) override; ChromeBrowserState* browser_state_; - - DISALLOW_COPY_AND_ASSIGN(IOSChromeTabRestoreServiceClient); }; #endif // IOS_CHROME_BROWSER_SESSIONS_IOS_CHROME_TAB_RESTORE_SERVICE_CLIENT_H_
diff --git a/ios/chrome/browser/sessions/session_service_ios_unittest.mm b/ios/chrome/browser/sessions/session_service_ios_unittest.mm index 4817825..ac2fb7e6 100644 --- a/ios/chrome/browser/sessions/session_service_ios_unittest.mm +++ b/ios/chrome/browser/sessions/session_service_ios_unittest.mm
@@ -40,6 +40,10 @@ class SessionServiceTest : public PlatformTest { public: SessionServiceTest() = default; + + SessionServiceTest(const SessionServiceTest&) = delete; + SessionServiceTest& operator=(const SessionServiceTest&) = delete; + ~SessionServiceTest() override = default; protected: @@ -103,8 +107,6 @@ SessionServiceIOS* session_service_ = nil; FakeWebStateListDelegate web_state_list_delegate_; base::FilePath directory_; - - DISALLOW_COPY_AND_ASSIGN(SessionServiceTest); }; TEST_F(SessionServiceTest, SessionPathForDirectory) {
diff --git a/ios/chrome/browser/share_extension/share_extension_service.h b/ios/chrome/browser/share_extension/share_extension_service.h index 1bbaeaa..ebe7666 100644 --- a/ios/chrome/browser/share_extension/share_extension_service.h +++ b/ios/chrome/browser/share_extension/share_extension_service.h
@@ -24,6 +24,10 @@ public: ShareExtensionService(bookmarks::BookmarkModel* bookmark_model, ReadingListModel* reading_list_model); + + ShareExtensionService(const ShareExtensionService&) = delete; + ShareExtensionService& operator=(const ShareExtensionService&) = delete; + ~ShareExtensionService() override; void Initialize(); @@ -49,8 +53,6 @@ bookmarks::BookmarkModel* bookmark_model_; bool bookmark_model_loaded_; __strong ShareExtensionItemReceiver* receiver_; - - DISALLOW_COPY_AND_ASSIGN(ShareExtensionService); }; #endif // IOS_CHROME_BROWSER_SHARE_EXTENSION_SHARE_EXTENSION_SERVICE_H_
diff --git a/ios/chrome/browser/signin/authentication_service.h b/ios/chrome/browser/signin/authentication_service.h index 193af57..7954311 100644 --- a/ios/chrome/browser/signin/authentication_service.h +++ b/ios/chrome/browser/signin/authentication_service.h
@@ -45,6 +45,10 @@ ChromeAccountManagerService* account_manager_service, signin::IdentityManager* identity_manager, syncer::SyncService* sync_service); + + AuthenticationService(const AuthenticationService&) = delete; + AuthenticationService& operator=(const AuthenticationService&) = delete; + ~AuthenticationService() override; // Registers the preferences used by AuthenticationService; @@ -241,8 +245,6 @@ account_manager_service_observation_{this}; base::WeakPtrFactory<AuthenticationService> weak_pointer_factory_; - - DISALLOW_COPY_AND_ASSIGN(AuthenticationService); }; #endif // IOS_CHROME_BROWSER_SIGNIN_AUTHENTICATION_SERVICE_H_
diff --git a/ios/chrome/browser/signin/authentication_service_delegate.h b/ios/chrome/browser/signin/authentication_service_delegate.h index 9eb12db..044f755 100644 --- a/ios/chrome/browser/signin/authentication_service_delegate.h +++ b/ios/chrome/browser/signin/authentication_service_delegate.h
@@ -12,6 +12,11 @@ class AuthenticationServiceDelegate { public: AuthenticationServiceDelegate() = default; + + AuthenticationServiceDelegate(const AuthenticationServiceDelegate&) = delete; + AuthenticationServiceDelegate& operator=( + const AuthenticationServiceDelegate&) = delete; + virtual ~AuthenticationServiceDelegate() = default; // Invoked by AuthenticationService after the user has signed out. All the @@ -23,7 +28,6 @@ friend class AuthenticationServiceDelegateFake; int clear_browsing_data_counter_ = 0; - DISALLOW_COPY_AND_ASSIGN(AuthenticationServiceDelegate); }; #endif // IOS_CHROME_BROWSER_SIGNIN_AUTHENTICATION_SERVICE_DELEGATE_H_
diff --git a/ios/chrome/browser/signin/chrome_identity_service_observer_bridge.h b/ios/chrome/browser/signin/chrome_identity_service_observer_bridge.h index b66868b..7230b33 100644 --- a/ios/chrome/browser/signin/chrome_identity_service_observer_bridge.h +++ b/ios/chrome/browser/signin/chrome_identity_service_observer_bridge.h
@@ -27,6 +27,12 @@ public: explicit ChromeIdentityServiceObserverBridge( id<ChromeIdentityServiceObserver> observer); + + ChromeIdentityServiceObserverBridge( + const ChromeIdentityServiceObserverBridge&) = delete; + ChromeIdentityServiceObserverBridge& operator=( + const ChromeIdentityServiceObserverBridge&) = delete; + ~ChromeIdentityServiceObserverBridge() override; private: @@ -41,8 +47,6 @@ base::ScopedObservation<ios::ChromeIdentityService, ios::ChromeIdentityService::Observer> scoped_observation_{this}; - - DISALLOW_COPY_AND_ASSIGN(ChromeIdentityServiceObserverBridge); }; #endif // IOS_CHROME_BROWSER_SIGNIN_CHROME_IDENTITY_SERVICE_OBSERVER_BRIDGE_H_
diff --git a/ios/chrome/browser/signin/device_accounts_provider_impl.h b/ios/chrome/browser/signin/device_accounts_provider_impl.h index 320c8019d..10c1041 100644 --- a/ios/chrome/browser/signin/device_accounts_provider_impl.h +++ b/ios/chrome/browser/signin/device_accounts_provider_impl.h
@@ -19,6 +19,11 @@ public: explicit DeviceAccountsProviderImpl( ChromeAccountManagerService* account_manager_service); + + DeviceAccountsProviderImpl(const DeviceAccountsProviderImpl&) = delete; + DeviceAccountsProviderImpl& operator=(const DeviceAccountsProviderImpl&) = + delete; + ~DeviceAccountsProviderImpl() override; // ios::DeviceAccountsProvider @@ -33,8 +38,6 @@ private: ChromeAccountManagerService* account_manager_service_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(DeviceAccountsProviderImpl); }; #endif // IOS_CHROME_BROWSER_SIGNIN_DEVICE_ACCOUNTS_PROVIDER_IMPL_H_
diff --git a/ios/chrome/browser/signin/gaia_auth_fetcher_ios.h b/ios/chrome/browser/signin/gaia_auth_fetcher_ios.h index 19094839..b365f3e 100644 --- a/ios/chrome/browser/signin/gaia_auth_fetcher_ios.h +++ b/ios/chrome/browser/signin/gaia_auth_fetcher_ios.h
@@ -39,6 +39,10 @@ gaia::GaiaSource source, scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory, web::BrowserState* browser_state); + + GaiaAuthFetcherIOS(const GaiaAuthFetcherIOS&) = delete; + GaiaAuthFetcherIOS& operator=(const GaiaAuthFetcherIOS&) = delete; + ~GaiaAuthFetcherIOS() override; void CancelRequest() override; @@ -63,8 +67,6 @@ web::BrowserState* browser_state_; std::unique_ptr<GaiaAuthFetcherIOSBridge> bridge_; - - DISALLOW_COPY_AND_ASSIGN(GaiaAuthFetcherIOS); }; #endif // IOS_CHROME_BROWSER_SIGNIN_GAIA_AUTH_FETCHER_IOS_H_
diff --git a/ios/chrome/browser/signin/gaia_auth_fetcher_ios_bridge.h b/ios/chrome/browser/signin/gaia_auth_fetcher_ios_bridge.h index 51b9647..15499b2 100644 --- a/ios/chrome/browser/signin/gaia_auth_fetcher_ios_bridge.h +++ b/ios/chrome/browser/signin/gaia_auth_fetcher_ios_bridge.h
@@ -23,6 +23,12 @@ class GaiaAuthFetcherIOSBridgeDelegate { public: GaiaAuthFetcherIOSBridgeDelegate(); + + GaiaAuthFetcherIOSBridgeDelegate(const GaiaAuthFetcherIOSBridgeDelegate&) = + delete; + GaiaAuthFetcherIOSBridgeDelegate& operator=( + const GaiaAuthFetcherIOSBridgeDelegate&) = delete; + virtual ~GaiaAuthFetcherIOSBridgeDelegate(); // Called when the request is done. @@ -30,12 +36,14 @@ const std::string& data, net::Error net_error, int response_code) = 0; - - DISALLOW_COPY_AND_ASSIGN(GaiaAuthFetcherIOSBridgeDelegate); }; // Initializes the instance. GaiaAuthFetcherIOSBridge(GaiaAuthFetcherIOSBridgeDelegate* delegate); + + GaiaAuthFetcherIOSBridge(const GaiaAuthFetcherIOSBridge&) = delete; + GaiaAuthFetcherIOSBridge& operator=(const GaiaAuthFetcherIOSBridge&) = delete; + virtual ~GaiaAuthFetcherIOSBridge(); // Starts a network fetch. @@ -64,8 +72,6 @@ private: GaiaAuthFetcherIOSBridgeDelegate* delegate_; - - DISALLOW_COPY_AND_ASSIGN(GaiaAuthFetcherIOSBridge); }; #endif // IOS_CHROME_BROWSER_SIGNIN_GAIA_AUTH_FETCHER_IOS_BRIDGE_H_
diff --git a/ios/chrome/browser/signin/gaia_auth_fetcher_ios_ns_url_session_bridge.h b/ios/chrome/browser/signin/gaia_auth_fetcher_ios_ns_url_session_bridge.h index d26a9bc3..3d03e397 100644 --- a/ios/chrome/browser/signin/gaia_auth_fetcher_ios_ns_url_session_bridge.h +++ b/ios/chrome/browser/signin/gaia_auth_fetcher_ios_ns_url_session_bridge.h
@@ -29,6 +29,12 @@ GaiaAuthFetcherIOSNSURLSessionBridge( GaiaAuthFetcherIOSBridge::GaiaAuthFetcherIOSBridgeDelegate* delegate, web::BrowserState* browser_state); + + GaiaAuthFetcherIOSNSURLSessionBridge( + const GaiaAuthFetcherIOSNSURLSessionBridge&) = delete; + GaiaAuthFetcherIOSNSURLSessionBridge& operator=( + const GaiaAuthFetcherIOSNSURLSessionBridge&) = delete; + ~GaiaAuthFetcherIOSNSURLSessionBridge() override; // GaiaAuthFetcherIOSBridge: @@ -113,8 +119,6 @@ // Task to send the NSURLRequest. NSURLSessionDataTask* url_session_data_task_; - - DISALLOW_COPY_AND_ASSIGN(GaiaAuthFetcherIOSNSURLSessionBridge); }; #endif // IOS_CHROME_BROWSER_SIGNIN_GAIA_AUTH_FETCHER_IOS_NS_URL_SESSION_BRIDGE_H_
diff --git a/ios/chrome/browser/signin/identity_manager_factory_observer.h b/ios/chrome/browser/signin/identity_manager_factory_observer.h index c66031e27..c47dea6 100644 --- a/ios/chrome/browser/signin/identity_manager_factory_observer.h +++ b/ios/chrome/browser/signin/identity_manager_factory_observer.h
@@ -16,13 +16,16 @@ class IdentityManagerFactoryObserver : public base::CheckedObserver { public: IdentityManagerFactoryObserver() {} + + IdentityManagerFactoryObserver(const IdentityManagerFactoryObserver&) = + delete; + IdentityManagerFactoryObserver& operator=( + const IdentityManagerFactoryObserver&) = delete; + ~IdentityManagerFactoryObserver() override {} // Called when an IdentityManager instance is created. virtual void IdentityManagerCreated(signin::IdentityManager* manager) {} - - private: - DISALLOW_COPY_AND_ASSIGN(IdentityManagerFactoryObserver); }; #endif // IOS_CHROME_BROWSER_SIGNIN_IDENTITY_MANAGER_FACTORY_OBSERVER_H_
diff --git a/ios/chrome/browser/signin/ios_chrome_signin_client.h b/ios/chrome/browser/signin/ios_chrome_signin_client.h index 085edd1de..9b7f08c 100644 --- a/ios/chrome/browser/signin/ios_chrome_signin_client.h +++ b/ios/chrome/browser/signin/ios_chrome_signin_client.h
@@ -23,6 +23,10 @@ ChromeBrowserState* browser_state, scoped_refptr<content_settings::CookieSettings> cookie_settings, scoped_refptr<HostContentSettingsMap> host_content_settings_map); + + IOSChromeSigninClient(const IOSChromeSigninClient&) = delete; + IOSChromeSigninClient& operator=(const IOSChromeSigninClient&) = delete; + ~IOSChromeSigninClient() override; // KeyedService implementation. @@ -54,8 +58,6 @@ scoped_refptr<content_settings::CookieSettings> cookie_settings_; // Used to add and remove content settings observers. scoped_refptr<HostContentSettingsMap> host_content_settings_map_; - - DISALLOW_COPY_AND_ASSIGN(IOSChromeSigninClient); }; #endif // IOS_CHROME_BROWSER_SIGNIN_IOS_CHROME_SIGNIN_CLIENT_H_
diff --git a/ios/chrome/browser/signin/ios_chrome_signin_status_metrics_provider_delegate.h b/ios/chrome/browser/signin/ios_chrome_signin_status_metrics_provider_delegate.h index 9ac6538..dde757e1 100644 --- a/ios/chrome/browser/signin/ios_chrome_signin_status_metrics_provider_delegate.h +++ b/ios/chrome/browser/signin/ios_chrome_signin_status_metrics_provider_delegate.h
@@ -18,6 +18,12 @@ public IdentityManagerFactoryObserver { public: IOSChromeSigninStatusMetricsProviderDelegate(); + + IOSChromeSigninStatusMetricsProviderDelegate( + const IOSChromeSigninStatusMetricsProviderDelegate&) = delete; + IOSChromeSigninStatusMetricsProviderDelegate& operator=( + const IOSChromeSigninStatusMetricsProviderDelegate&) = delete; + ~IOSChromeSigninStatusMetricsProviderDelegate() override; private: @@ -32,8 +38,6 @@ // Returns the loaded ChromeBrowserState instances. std::vector<ChromeBrowserState*> GetLoadedChromeBrowserStates(); - - DISALLOW_COPY_AND_ASSIGN(IOSChromeSigninStatusMetricsProviderDelegate); }; #endif // IOS_CHROME_BROWSER_SIGNIN_IOS_CHROME_SIGNIN_STATUS_METRICS_PROVIDER_DELEGATE_H_
diff --git a/ios/chrome/browser/signin/signin_browser_state_info_updater.h b/ios/chrome/browser/signin/signin_browser_state_info_updater.h index 10a7981..fead573 100644 --- a/ios/chrome/browser/signin/signin_browser_state_info_updater.h +++ b/ios/chrome/browser/signin/signin_browser_state_info_updater.h
@@ -23,6 +23,10 @@ SigninErrorController* signin_error_controller, const base::FilePath& browser_state_path); + SigninBrowserStateInfoUpdater(const SigninBrowserStateInfoUpdater&) = delete; + SigninBrowserStateInfoUpdater& operator=( + const SigninBrowserStateInfoUpdater&) = delete; + ~SigninBrowserStateInfoUpdater() override; private: @@ -48,8 +52,6 @@ base::ScopedObservation<SigninErrorController, SigninErrorController::Observer> signin_error_controller_observation_{this}; - - DISALLOW_COPY_AND_ASSIGN(SigninBrowserStateInfoUpdater); }; #endif // IOS_CHROME_BROWSER_SIGNIN_SIGNIN_BROWSER_STATE_INFO_UPDATER_H_
diff --git a/ios/chrome/browser/snapshots/snapshot_cache_web_state_list_observer.h b/ios/chrome/browser/snapshots/snapshot_cache_web_state_list_observer.h index 3c665cd3..f09e47c 100644 --- a/ios/chrome/browser/snapshots/snapshot_cache_web_state_list_observer.h +++ b/ios/chrome/browser/snapshots/snapshot_cache_web_state_list_observer.h
@@ -14,6 +14,12 @@ class SnapshotCacheWebStateListObserver : public WebStateListObserver { public: explicit SnapshotCacheWebStateListObserver(SnapshotCache* snapshot_cache); + + SnapshotCacheWebStateListObserver(const SnapshotCacheWebStateListObserver&) = + delete; + SnapshotCacheWebStateListObserver& operator=( + const SnapshotCacheWebStateListObserver&) = delete; + ~SnapshotCacheWebStateListObserver() override; private: @@ -25,8 +31,6 @@ ActiveWebStateChangeReason reason) override; SnapshotCache* snapshot_cache_; - - DISALLOW_COPY_AND_ASSIGN(SnapshotCacheWebStateListObserver); }; #endif // IOS_CHROME_BROWSER_SNAPSHOTS_SNAPSHOT_CACHE_WEB_STATE_LIST_OBSERVER_H_
diff --git a/ios/chrome/browser/snapshots/snapshot_tab_helper.h b/ios/chrome/browser/snapshots/snapshot_tab_helper.h index a9d612d..54d0996 100644 --- a/ios/chrome/browser/snapshots/snapshot_tab_helper.h +++ b/ios/chrome/browser/snapshots/snapshot_tab_helper.h
@@ -25,6 +25,9 @@ class SnapshotTabHelper : public web::WebStateObserver, public web::WebStateUserData<SnapshotTabHelper> { public: + SnapshotTabHelper(const SnapshotTabHelper&) = delete; + SnapshotTabHelper& operator=(const SnapshotTabHelper&) = delete; + ~SnapshotTabHelper() override; // Creates the tab helper for |web_state| if it does not exists. The @@ -110,8 +113,6 @@ base::WeakPtrFactory<SnapshotTabHelper> weak_ptr_factory_; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(SnapshotTabHelper); }; #endif // IOS_CHROME_BROWSER_SNAPSHOTS_SNAPSHOT_TAB_HELPER_H_
diff --git a/ios/chrome/browser/snapshots/snapshot_tab_helper_unittest.mm b/ios/chrome/browser/snapshots/snapshot_tab_helper_unittest.mm index dc92b8c..f2d1d2e4 100644 --- a/ios/chrome/browser/snapshots/snapshot_tab_helper_unittest.mm +++ b/ios/chrome/browser/snapshots/snapshot_tab_helper_unittest.mm
@@ -107,6 +107,10 @@ view.backgroundColor = [UIColor redColor]; delegate_.view = view; } + + SnapshotTabHelperTest(const SnapshotTabHelperTest&) = delete; + SnapshotTabHelperTest& operator=(const SnapshotTabHelperTest&) = delete; + ~SnapshotTabHelperTest() override { [snapshot_cache_ shutdown]; } void SetCachedSnapshot(UIImage* image) { @@ -135,9 +139,6 @@ SnapshotCache* snapshot_cache_ = nil; NSString* snapshot_id_ = nil; web::FakeWebState web_state_; - - private: - DISALLOW_COPY_AND_ASSIGN(SnapshotTabHelperTest); }; // Tests that RetrieveColorSnapshot uses the image from the cache if
diff --git a/ios/chrome/browser/ssl/captive_portal_detector_tab_helper.h b/ios/chrome/browser/ssl/captive_portal_detector_tab_helper.h index 1668b27..4f153fd 100644 --- a/ios/chrome/browser/ssl/captive_portal_detector_tab_helper.h +++ b/ios/chrome/browser/ssl/captive_portal_detector_tab_helper.h
@@ -27,6 +27,11 @@ class CaptivePortalDetectorTabHelper : public web::WebStateUserData<CaptivePortalDetectorTabHelper> { public: + CaptivePortalDetectorTabHelper(const CaptivePortalDetectorTabHelper&) = + delete; + CaptivePortalDetectorTabHelper& operator=( + const CaptivePortalDetectorTabHelper&) = delete; + ~CaptivePortalDetectorTabHelper() override; // Creates a Tab Helper and attaches it to |web_state|. The |delegate| is not @@ -57,8 +62,6 @@ std::unique_ptr<captive_portal::CaptivePortalDetector> detector_; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(CaptivePortalDetectorTabHelper); }; #endif // IOS_CHROME_BROWSER_SSL_CAPTIVE_PORTAL_DETECTOR_TAB_HELPER_H_
diff --git a/ios/chrome/browser/ssl/ios_captive_portal_blocking_page.h b/ios/chrome/browser/ssl/ios_captive_portal_blocking_page.h index 48a747a..0c75f589 100644 --- a/ios/chrome/browser/ssl/ios_captive_portal_blocking_page.h +++ b/ios/chrome/browser/ssl/ios_captive_portal_blocking_page.h
@@ -16,6 +16,10 @@ class IOSCaptivePortalBlockingPage : public security_interstitials::IOSSecurityInterstitialPage { public: + IOSCaptivePortalBlockingPage(const IOSCaptivePortalBlockingPage&) = delete; + IOSCaptivePortalBlockingPage& operator=(const IOSCaptivePortalBlockingPage&) = + delete; + ~IOSCaptivePortalBlockingPage() override; // Creates a captive portal blocking page. If the blocking page isn't shown, @@ -42,8 +46,6 @@ // The landing page url for the captive portal network. const GURL landing_url_; - - DISALLOW_COPY_AND_ASSIGN(IOSCaptivePortalBlockingPage); }; #endif // IOS_CHROME_BROWSER_SSL_IOS_CAPTIVE_PORTAL_BLOCKING_PAGE_H_
diff --git a/ios/chrome/browser/ssl/ios_ssl_blocking_page.h b/ios/chrome/browser/ssl/ios_ssl_blocking_page.h index 4190a4e..e4c3848 100644 --- a/ios/chrome/browser/ssl/ios_ssl_blocking_page.h +++ b/ios/chrome/browser/ssl/ios_ssl_blocking_page.h
@@ -27,6 +27,9 @@ class IOSSSLBlockingPage : public security_interstitials::IOSSecurityInterstitialPage { public: + IOSSSLBlockingPage(const IOSSSLBlockingPage&) = delete; + IOSSSLBlockingPage& operator=(const IOSSSLBlockingPage&) = delete; + ~IOSSSLBlockingPage() override; // Creates an SSL blocking page. If the blocking page isn't shown, the caller @@ -65,8 +68,6 @@ std::unique_ptr<security_interstitials::IOSBlockingPageControllerClient> controller_; std::unique_ptr<security_interstitials::SSLErrorUI> ssl_error_ui_; - - DISALLOW_COPY_AND_ASSIGN(IOSSSLBlockingPage); }; #endif // IOS_CHROME_BROWSER_SSL_IOS_SSL_BLOCKING_PAGE_H_
diff --git a/ios/chrome/browser/ssl/ios_ssl_error_handler.h b/ios/chrome/browser/ssl/ios_ssl_error_handler.h index ac8d666d..f94941c 100644 --- a/ios/chrome/browser/ssl/ios_ssl_error_handler.h +++ b/ios/chrome/browser/ssl/ios_ssl_error_handler.h
@@ -41,6 +41,10 @@ bool overridable, int64_t navigation_id, base::OnceCallback<void(NSString*)> blocking_page_callback); + + IOSSSLErrorHandler(const IOSSSLErrorHandler&) = delete; + IOSSSLErrorHandler& operator=(const IOSSSLErrorHandler&) = delete; + ~IOSSSLErrorHandler() override; private: @@ -107,8 +111,6 @@ base::WeakPtrFactory<IOSSSLErrorHandler> weak_factory_; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(IOSSSLErrorHandler); }; #endif // IOS_CHROME_BROWSER_SSL_IOS_SSL_ERROR_HANDLER_H_
diff --git a/ios/chrome/browser/store_kit/store_kit_tab_helper.h b/ios/chrome/browser/store_kit/store_kit_tab_helper.h index f17863b2f..c9c3b54 100644 --- a/ios/chrome/browser/store_kit/store_kit_tab_helper.h +++ b/ios/chrome/browser/store_kit/store_kit_tab_helper.h
@@ -14,6 +14,10 @@ class StoreKitTabHelper : public web::WebStateUserData<StoreKitTabHelper> { public: explicit StoreKitTabHelper(web::WebState* web_state); + + StoreKitTabHelper(const StoreKitTabHelper&) = delete; + StoreKitTabHelper& operator=(const StoreKitTabHelper&) = delete; + ~StoreKitTabHelper() override; void SetLauncher(id<StoreKitLauncher> launcher); @@ -35,8 +39,6 @@ __weak id<StoreKitLauncher> store_kit_launcher_ = nil; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(StoreKitTabHelper); }; #endif // IOS_CHROME_BROWSER_STORE_KIT_STORE_KIT_TAB_HELPER_H_
diff --git a/ios/chrome/browser/store_kit/store_kit_tab_helper_unittest.mm b/ios/chrome/browser/store_kit/store_kit_tab_helper_unittest.mm index 0075c9c8..0b9d31d 100644 --- a/ios/chrome/browser/store_kit/store_kit_tab_helper_unittest.mm +++ b/ios/chrome/browser/store_kit/store_kit_tab_helper_unittest.mm
@@ -15,10 +15,11 @@ class StoreKitTabHelperTest : public web::WebTestWithWebState { public: StoreKitTabHelperTest() = default; - ~StoreKitTabHelperTest() override = default; - private: - DISALLOW_COPY_AND_ASSIGN(StoreKitTabHelperTest); + StoreKitTabHelperTest(const StoreKitTabHelperTest&) = delete; + StoreKitTabHelperTest& operator=(const StoreKitTabHelperTest&) = delete; + + ~StoreKitTabHelperTest() override = default; }; TEST_F(StoreKitTabHelperTest, Constructor) {
diff --git a/ios/chrome/browser/sync/ios_chrome_sync_client.h b/ios/chrome/browser/sync/ios_chrome_sync_client.h index 8646a1b..9b1f41f 100644 --- a/ios/chrome/browser/sync/ios_chrome_sync_client.h +++ b/ios/chrome/browser/sync/ios_chrome_sync_client.h
@@ -30,6 +30,10 @@ class IOSChromeSyncClient : public browser_sync::BrowserSyncClient { public: explicit IOSChromeSyncClient(ChromeBrowserState* browser_state); + + IOSChromeSyncClient(const IOSChromeSyncClient&) = delete; + IOSChromeSyncClient& operator=(const IOSChromeSyncClient&) = delete; + ~IOSChromeSyncClient() override; // BrowserSyncClient implementation. @@ -75,8 +79,6 @@ // The task runner for the |web_data_service_|, if any. scoped_refptr<base::SingleThreadTaskRunner> db_thread_; - - DISALLOW_COPY_AND_ASSIGN(IOSChromeSyncClient); }; #endif // IOS_CHROME_BROWSER_SYNC_IOS_CHROME_SYNC_CLIENT_H__
diff --git a/ios/chrome/browser/sync/ios_chrome_synced_tab_delegate.h b/ios/chrome/browser/sync/ios_chrome_synced_tab_delegate.h index 4bc0d362..bcfdc7ba 100644 --- a/ios/chrome/browser/sync/ios_chrome_synced_tab_delegate.h +++ b/ios/chrome/browser/sync/ios_chrome_synced_tab_delegate.h
@@ -22,6 +22,10 @@ : public sync_sessions::SyncedTabDelegate, public web::WebStateUserData<IOSChromeSyncedTabDelegate> { public: + IOSChromeSyncedTabDelegate(const IOSChromeSyncedTabDelegate&) = delete; + IOSChromeSyncedTabDelegate& operator=(const IOSChromeSyncedTabDelegate&) = + delete; + ~IOSChromeSyncedTabDelegate() override; // SyncedTabDelegate: @@ -64,8 +68,6 @@ mutable CRWSessionStorage* session_storage_; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(IOSChromeSyncedTabDelegate); }; #endif // IOS_CHROME_BROWSER_SYNC_IOS_CHROME_SYNCED_TAB_DELEGATE_H_
diff --git a/ios/chrome/browser/sync/session_sync_service_factory.mm b/ios/chrome/browser/sync/session_sync_service_factory.mm index 701a07c7d..f1c94f6 100644 --- a/ios/chrome/browser/sync/session_sync_service_factory.mm +++ b/ios/chrome/browser/sync/session_sync_service_factory.mm
@@ -72,6 +72,9 @@ browser_state_->GetStatePath()))), session_sync_prefs_(browser_state->GetPrefs()) {} + SyncSessionsClientImpl(const SyncSessionsClientImpl&) = delete; + SyncSessionsClientImpl& operator=(const SyncSessionsClientImpl&) = delete; + ~SyncSessionsClientImpl() override {} // SyncSessionsClient implementation. @@ -121,8 +124,6 @@ const std::unique_ptr<IOSChromeLocalSessionEventRouter> local_session_event_router_; sync_sessions::SessionSyncPrefs session_sync_prefs_; - - DISALLOW_COPY_AND_ASSIGN(SyncSessionsClientImpl); }; } // namespace
diff --git a/ios/chrome/browser/sync/sessions/ios_chrome_local_session_event_router.h b/ios/chrome/browser/sync/sessions/ios_chrome_local_session_event_router.h index 42aef0f..b7b76f4 100644 --- a/ios/chrome/browser/sync/sessions/ios_chrome_local_session_event_router.h +++ b/ios/chrome/browser/sync/sessions/ios_chrome_local_session_event_router.h
@@ -33,6 +33,12 @@ ChromeBrowserState* browser_state, sync_sessions::SyncSessionsClient* sessions_client_, const syncer::SyncableService::StartSyncFlare& flare); + + IOSChromeLocalSessionEventRouter(const IOSChromeLocalSessionEventRouter&) = + delete; + IOSChromeLocalSessionEventRouter& operator=( + const IOSChromeLocalSessionEventRouter&) = delete; + ~IOSChromeLocalSessionEventRouter() override; // LocalEventRouter: @@ -104,8 +110,6 @@ // Track the number of WebStateList we are observing that are in a batch // operation. int batch_in_progress_ = 0; - - DISALLOW_COPY_AND_ASSIGN(IOSChromeLocalSessionEventRouter); }; #endif // IOS_CHROME_BROWSER_SYNC_SESSIONS_IOS_CHROME_LOCAL_SESSION_EVENT_ROUTER_H_
diff --git a/ios/chrome/browser/sync/sync_observer_bridge.h b/ios/chrome/browser/sync/sync_observer_bridge.h index 65fc382f..c26c4038b 100644 --- a/ios/chrome/browser/sync/sync_observer_bridge.h +++ b/ios/chrome/browser/sync/sync_observer_bridge.h
@@ -26,6 +26,9 @@ SyncObserverBridge(id<SyncObserverModelBridge> delegate, syncer::SyncService* service); + SyncObserverBridge(const SyncObserverBridge&) = delete; + SyncObserverBridge& operator=(const SyncObserverBridge&) = delete; + ~SyncObserverBridge() override; // syncer::SyncServiceObserver implementation: @@ -36,8 +39,6 @@ __weak id<SyncObserverModelBridge> delegate_ = nil; base::ScopedObservation<syncer::SyncService, syncer::SyncServiceObserver> scoped_observation_{this}; - - DISALLOW_COPY_AND_ASSIGN(SyncObserverBridge); }; #endif // IOS_CHROME_BROWSER_SYNC_SYNC_OBSERVER_BRIDGE_H_
diff --git a/ios/chrome/browser/sync/sync_setup_service.h b/ios/chrome/browser/sync/sync_setup_service.h index 77bb4e4..b1f6b77 100644 --- a/ios/chrome/browser/sync/sync_setup_service.h +++ b/ios/chrome/browser/sync/sync_setup_service.h
@@ -47,6 +47,10 @@ }; explicit SyncSetupService(syncer::SyncService* sync_service); + + SyncSetupService(const SyncSetupService&) = delete; + SyncSetupService& operator=(const SyncSetupService&) = delete; + ~SyncSetupService() override; // Returns the |syncer::ModelType| associated to the given @@ -129,8 +133,6 @@ // Prevents Sync from running until configuration is complete. std::unique_ptr<syncer::SyncSetupInProgressHandle> sync_blocker_; - - DISALLOW_COPY_AND_ASSIGN(SyncSetupService); }; #endif // IOS_CHROME_BROWSER_SYNC_SYNC_SETUP_SERVICE_H_
diff --git a/ios/chrome/browser/translate/chrome_ios_translate_client.h b/ios/chrome/browser/translate/chrome_ios_translate_client.h index e63b9da..c40e8fc7 100644 --- a/ios/chrome/browser/translate/chrome_ios_translate_client.h +++ b/ios/chrome/browser/translate/chrome_ios_translate_client.h
@@ -35,6 +35,9 @@ public web::WebStateObserver, public web::WebStateUserData<ChromeIOSTranslateClient> { public: + ChromeIOSTranslateClient(const ChromeIOSTranslateClient&) = delete; + ChromeIOSTranslateClient& operator=(const ChromeIOSTranslateClient&) = delete; + ~ChromeIOSTranslateClient() override; // Creates a translation client tab helper and attaches it to |web_state| @@ -79,8 +82,6 @@ translate::IOSTranslateDriver translate_driver_; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(ChromeIOSTranslateClient); }; #endif // IOS_CHROME_BROWSER_TRANSLATE_CHROME_IOS_TRANSLATE_CLIENT_H_
diff --git a/ios/chrome/browser/translate/translate_accept_languages_factory.cc b/ios/chrome/browser/translate/translate_accept_languages_factory.cc index b141dad..b5c12c13 100644 --- a/ios/chrome/browser/translate/translate_accept_languages_factory.cc +++ b/ios/chrome/browser/translate/translate_accept_languages_factory.cc
@@ -20,6 +20,12 @@ class TranslateAcceptLanguagesService : public KeyedService { public: explicit TranslateAcceptLanguagesService(PrefService* prefs); + + TranslateAcceptLanguagesService(const TranslateAcceptLanguagesService&) = + delete; + TranslateAcceptLanguagesService& operator=( + const TranslateAcceptLanguagesService&) = delete; + ~TranslateAcceptLanguagesService() override; // Returns the associated TranslateAcceptLanguages. @@ -29,8 +35,6 @@ private: translate::TranslateAcceptLanguages accept_languages_; - - DISALLOW_COPY_AND_ASSIGN(TranslateAcceptLanguagesService); }; TranslateAcceptLanguagesService::TranslateAcceptLanguagesService(
diff --git a/ios/chrome/browser/translate/translate_ranker_metrics_provider.h b/ios/chrome/browser/translate/translate_ranker_metrics_provider.h index 22c17965..5c739a5 100644 --- a/ios/chrome/browser/translate/translate_ranker_metrics_provider.h +++ b/ios/chrome/browser/translate/translate_ranker_metrics_provider.h
@@ -13,6 +13,12 @@ class TranslateRankerMetricsProvider : public metrics::MetricsProvider { public: TranslateRankerMetricsProvider() : logging_enabled_(false) {} + + TranslateRankerMetricsProvider(const TranslateRankerMetricsProvider&) = + delete; + TranslateRankerMetricsProvider& operator=( + const TranslateRankerMetricsProvider&) = delete; + ~TranslateRankerMetricsProvider() override {} // From metrics::MetricsProvider... @@ -27,8 +33,6 @@ // The current state of logging. bool logging_enabled_; - - DISALLOW_COPY_AND_ASSIGN(TranslateRankerMetricsProvider); }; } // namespace translate
diff --git a/ios/chrome/browser/u2f/u2f_tab_helper.h b/ios/chrome/browser/u2f/u2f_tab_helper.h index 8268ba14..5b25c83d 100644 --- a/ios/chrome/browser/u2f/u2f_tab_helper.h +++ b/ios/chrome/browser/u2f/u2f_tab_helper.h
@@ -14,6 +14,9 @@ // A tab helper that handles Universal 2nd Factory (U2F) requests. class U2FTabHelper : public web::WebStateUserData<U2FTabHelper> { public: + U2FTabHelper(const U2FTabHelper&) = delete; + U2FTabHelper& operator=(const U2FTabHelper&) = delete; + ~U2FTabHelper() override; // Checks if the given |url| is U2F call URL. @@ -46,8 +49,6 @@ U2FController* second_factor_controller_ = nil; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(U2FTabHelper); }; #endif // IOS_CHROME_BROWSER_U2F_U2F_TAB_HELPER_H_
diff --git a/ios/chrome/browser/ui/activity_services/canonical_url_retriever_unittest.mm b/ios/chrome/browser/ui/activity_services/canonical_url_retriever_unittest.mm index 5c94d521..b924c30 100644 --- a/ios/chrome/browser/ui/activity_services/canonical_url_retriever_unittest.mm +++ b/ios/chrome/browser/ui/activity_services/canonical_url_retriever_unittest.mm
@@ -22,6 +22,11 @@ class CanonicalURLRetrieverTest : public web::WebTestWithWebState { public: CanonicalURLRetrieverTest() = default; + + CanonicalURLRetrieverTest(const CanonicalURLRetrieverTest&) = delete; + CanonicalURLRetrieverTest& operator=(const CanonicalURLRetrieverTest&) = + delete; + ~CanonicalURLRetrieverTest() override = default; protected: @@ -46,9 +51,6 @@ // Used to verify histogram logging. base::HistogramTester histogram_tester_; - - private: - DISALLOW_COPY_AND_ASSIGN(CanonicalURLRetrieverTest); }; // Validates that if the canonical URL is different from the visible URL, it is
diff --git a/ios/chrome/browser/ui/authentication/re_signin_infobar_delegate.h b/ios/chrome/browser/ui/authentication/re_signin_infobar_delegate.h index 07f3ba3..b589d93 100644 --- a/ios/chrome/browser/ui/authentication/re_signin_infobar_delegate.h +++ b/ios/chrome/browser/ui/authentication/re_signin_infobar_delegate.h
@@ -28,6 +28,10 @@ public: ReSignInInfoBarDelegate(ChromeBrowserState* browser_state, id<SigninPresenter> presenter); + + ReSignInInfoBarDelegate(const ReSignInInfoBarDelegate&) = delete; + ReSignInInfoBarDelegate& operator=(const ReSignInInfoBarDelegate&) = delete; + ~ReSignInInfoBarDelegate() override; // Creates a re-sign-in error infobar and adds it to the |web_state|. Returns @@ -62,8 +66,6 @@ ChromeBrowserState* browser_state_; gfx::Image icon_; id<SigninPresenter> presenter_; - - DISALLOW_COPY_AND_ASSIGN(ReSignInInfoBarDelegate); }; #endif // IOS_CHROME_BROWSER_UI_AUTHENTICATION_RE_SIGNIN_INFOBAR_DELEGATE_H_
diff --git a/ios/chrome/browser/ui/authentication/signin_notification_infobar_delegate.h b/ios/chrome/browser/ui/authentication/signin_notification_infobar_delegate.h index 901460f2..789c978 100644 --- a/ios/chrome/browser/ui/authentication/signin_notification_infobar_delegate.h +++ b/ios/chrome/browser/ui/authentication/signin_notification_infobar_delegate.h
@@ -32,6 +32,12 @@ SigninNotificationInfoBarDelegate(ChromeBrowserState* browser_state, id<ApplicationSettingsCommands> dispatcher, UIViewController* view_controller); + + SigninNotificationInfoBarDelegate(const SigninNotificationInfoBarDelegate&) = + delete; + SigninNotificationInfoBarDelegate& operator=( + const SigninNotificationInfoBarDelegate&) = delete; + ~SigninNotificationInfoBarDelegate() override; // Creates a sign-in notification infobar and adds it to |infobar_manager|. @@ -62,8 +68,6 @@ // Dispatcher. __weak id<ApplicationSettingsCommands> dispatcher_ = nil; __weak UIViewController* base_view_controller_ = nil; - - DISALLOW_COPY_AND_ASSIGN(SigninNotificationInfoBarDelegate); }; #endif // IOS_CHROME_BROWSER_UI_AUTHENTICATION_SIGNIN_NOTIFICATION_INFOBAR_DELEGATE_H_
diff --git a/ios/chrome/browser/ui/autofill/card_expiration_date_fix_flow_view_bridge.h b/ios/chrome/browser/ui/autofill/card_expiration_date_fix_flow_view_bridge.h index b9ef160..af9f0f3 100644 --- a/ios/chrome/browser/ui/autofill/card_expiration_date_fix_flow_view_bridge.h +++ b/ios/chrome/browser/ui/autofill/card_expiration_date_fix_flow_view_bridge.h
@@ -22,6 +22,12 @@ CardExpirationDateFixFlowViewBridge( CardExpirationDateFixFlowController* controller, UIViewController* base_view_controller); + + CardExpirationDateFixFlowViewBridge( + const CardExpirationDateFixFlowViewBridge&) = delete; + CardExpirationDateFixFlowViewBridge& operator=( + const CardExpirationDateFixFlowViewBridge&) = delete; + ~CardExpirationDateFixFlowViewBridge() override; // CardExpirationDateFixFlowView: @@ -57,8 +63,6 @@ base::WeakPtrFactory<CardExpirationDateFixFlowViewBridge> weak_ptr_factory_{ this}; - - DISALLOW_COPY_AND_ASSIGN(CardExpirationDateFixFlowViewBridge); }; } // namespace autofill
diff --git a/ios/chrome/browser/ui/autofill/card_name_fix_flow_view_bridge.h b/ios/chrome/browser/ui/autofill/card_name_fix_flow_view_bridge.h index 9e299b6..aa4e134 100644 --- a/ios/chrome/browser/ui/autofill/card_name_fix_flow_view_bridge.h +++ b/ios/chrome/browser/ui/autofill/card_name_fix_flow_view_bridge.h
@@ -22,6 +22,11 @@ public: CardNameFixFlowViewBridge(CardNameFixFlowController* controller, UIViewController* base_view_controller); + + CardNameFixFlowViewBridge(const CardNameFixFlowViewBridge&) = delete; + CardNameFixFlowViewBridge& operator=(const CardNameFixFlowViewBridge&) = + delete; + ~CardNameFixFlowViewBridge() override; // CardNameFixFlowView: @@ -54,8 +59,6 @@ __weak UIViewController* presenting_view_controller_; base::WeakPtrFactory<CardNameFixFlowViewBridge> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(CardNameFixFlowViewBridge); }; } // namespace autofill
diff --git a/ios/chrome/browser/ui/autofill/card_unmask_prompt_view_bridge.h b/ios/chrome/browser/ui/autofill/card_unmask_prompt_view_bridge.h index 32c67fca..74db81b 100644 --- a/ios/chrome/browser/ui/autofill/card_unmask_prompt_view_bridge.h +++ b/ios/chrome/browser/ui/autofill/card_unmask_prompt_view_bridge.h
@@ -27,6 +27,11 @@ // present UI. CardUnmaskPromptViewBridge(CardUnmaskPromptController* controller, UIViewController* base_view_controller); + + CardUnmaskPromptViewBridge(const CardUnmaskPromptViewBridge&) = delete; + CardUnmaskPromptViewBridge& operator=(const CardUnmaskPromptViewBridge&) = + delete; + ~CardUnmaskPromptViewBridge() override; // CardUnmaskPromptView: @@ -56,8 +61,6 @@ __weak UIViewController* base_view_controller_; base::WeakPtrFactory<CardUnmaskPromptViewBridge> weak_ptr_factory_; - - DISALLOW_COPY_AND_ASSIGN(CardUnmaskPromptViewBridge); }; } // namespace autofill
diff --git a/ios/chrome/browser/ui/autofill/chrome_autofill_client_ios.h b/ios/chrome/browser/ui/autofill/chrome_autofill_client_ios.h index 392e9ec3..ad4985d 100644 --- a/ios/chrome/browser/ui/autofill/chrome_autofill_client_ios.h +++ b/ios/chrome/browser/ui/autofill/chrome_autofill_client_ios.h
@@ -44,6 +44,10 @@ infobars::InfoBarManager* infobar_manager, id<AutofillClientIOSBridge> bridge, password_manager::PasswordManager* password_manager); + + ChromeAutofillClientIOS(const ChromeAutofillClientIOS&) = delete; + ChromeAutofillClientIOS& operator=(const ChromeAutofillClientIOS&) = delete; + ~ChromeAutofillClientIOS() override; // Sets a weak reference to the view controller used to present UI. @@ -152,8 +156,6 @@ // A weak reference to the view controller used to present UI. __weak UIViewController* base_view_controller_; - - DISALLOW_COPY_AND_ASSIGN(ChromeAutofillClientIOS); }; } // namespace autofill
diff --git a/ios/chrome/browser/ui/autofill/manual_fill/form_observer_helper_unittest.mm b/ios/chrome/browser/ui/autofill/manual_fill/form_observer_helper_unittest.mm index ec9f40a..3292d00 100644 --- a/ios/chrome/browser/ui/autofill/manual_fill/form_observer_helper_unittest.mm +++ b/ios/chrome/browser/ui/autofill/manual_fill/form_observer_helper_unittest.mm
@@ -23,6 +23,11 @@ ManualFillFormObserverHelperiOSTest() : web_state_list_(&web_state_list_delegate_) {} + ManualFillFormObserverHelperiOSTest( + const ManualFillFormObserverHelperiOSTest&) = delete; + ManualFillFormObserverHelperiOSTest& operator=( + const ManualFillFormObserverHelperiOSTest&) = delete; + ~ManualFillFormObserverHelperiOSTest() override {} void SetUp() override { @@ -60,9 +65,6 @@ CreateWebState(url), WebStateList::INSERT_NO_FLAGS, opener); } - - private: - DISALLOW_COPY_AND_ASSIGN(ManualFillFormObserverHelperiOSTest); }; // Tests that an observer is correctly created and set up.
diff --git a/ios/chrome/browser/ui/autofill/manual_fill/full_card_request_result_delegate_bridge.h b/ios/chrome/browser/ui/autofill/manual_fill/full_card_request_result_delegate_bridge.h index 8f79e59..a1f1680 100644 --- a/ios/chrome/browser/ui/autofill/manual_fill/full_card_request_result_delegate_bridge.h +++ b/ios/chrome/browser/ui/autofill/manual_fill/full_card_request_result_delegate_bridge.h
@@ -33,6 +33,12 @@ public: FullCardRequestResultDelegateBridge( id<FullCardRequestResultDelegateObserving> delegate); + + FullCardRequestResultDelegateBridge( + const FullCardRequestResultDelegateBridge&) = delete; + FullCardRequestResultDelegateBridge& operator=( + const FullCardRequestResultDelegateBridge&) = delete; + ~FullCardRequestResultDelegateBridge() override; base::WeakPtr<FullCardRequestResultDelegateBridge> GetWeakPtr(); @@ -48,8 +54,6 @@ __weak id<FullCardRequestResultDelegateObserving> delegate_ = nil; base::WeakPtrFactory<FullCardRequestResultDelegateBridge> weak_ptr_factory_; - - DISALLOW_COPY_AND_ASSIGN(FullCardRequestResultDelegateBridge); }; #endif // IOS_CHROME_BROWSER_UI_AUTOFILL_MANUAL_FILL_FULL_CARD_REQUEST_RESULT_DELEGATE_BRIDGE_H_
diff --git a/ios/chrome/browser/ui/autofill/manual_fill/full_card_requester_unittest.mm b/ios/chrome/browser/ui/autofill/manual_fill/full_card_requester_unittest.mm index b3a38a6..88c9517 100644 --- a/ios/chrome/browser/ui/autofill/manual_fill/full_card_requester_unittest.mm +++ b/ios/chrome/browser/ui/autofill/manual_fill/full_card_requester_unittest.mm
@@ -37,6 +37,10 @@ : public autofill::payments::FullCardRequest::ResultDelegate { public: FakeResultDelegate() : weak_ptr_factory_(this) {} + + FakeResultDelegate(const FakeResultDelegate&) = delete; + FakeResultDelegate& operator=(const FakeResultDelegate&) = delete; + ~FakeResultDelegate() override {} void OnFullCardRequestSucceeded( @@ -54,8 +58,6 @@ private: base::WeakPtrFactory<FakeResultDelegate> weak_ptr_factory_; - - DISALLOW_COPY_AND_ASSIGN(FakeResultDelegate); }; class PaymentRequestFullCardRequesterTest : public PlatformTest {
diff --git a/ios/chrome/browser/ui/bookmarks/synced_bookmarks_bridge.h b/ios/chrome/browser/ui/bookmarks/synced_bookmarks_bridge.h index ae5f51bb..a38548a 100644 --- a/ios/chrome/browser/ui/bookmarks/synced_bookmarks_bridge.h +++ b/ios/chrome/browser/ui/bookmarks/synced_bookmarks_bridge.h
@@ -24,6 +24,11 @@ public: SyncedBookmarksObserverBridge(id<SyncObserverModelBridge> delegate, ChromeBrowserState* browserState); + + SyncedBookmarksObserverBridge(const SyncedBookmarksObserverBridge&) = delete; + SyncedBookmarksObserverBridge& operator=( + const SyncedBookmarksObserverBridge&) = delete; + ~SyncedBookmarksObserverBridge() override; // Returns true if the user has consented to sync. bool HasSyncConsent(); @@ -33,8 +38,6 @@ private: signin::IdentityManager* identity_manager_; ChromeBrowserState* browser_state_; - - DISALLOW_COPY_AND_ASSIGN(SyncedBookmarksObserverBridge); }; } // namespace sync_bookmarks
diff --git a/ios/chrome/browser/ui/content_suggestions/BUILD.gn b/ios/chrome/browser/ui/content_suggestions/BUILD.gn index eb99cab..7c2e0b3 100644 --- a/ios/chrome/browser/ui/content_suggestions/BUILD.gn +++ b/ios/chrome/browser/ui/content_suggestions/BUILD.gn
@@ -4,12 +4,10 @@ source_set("content_suggestions") { sources = [ - "content_suggestions_action_handler.h", "content_suggestions_alert_factory.h", "content_suggestions_alert_factory.mm", "content_suggestions_category_wrapper.h", "content_suggestions_category_wrapper.mm", - "content_suggestions_consumer.h", "content_suggestions_coordinator.h", "content_suggestions_coordinator.mm", "content_suggestions_favicon_mediator.h", @@ -116,13 +114,11 @@ source_set("content_suggestions_ui") { sources = [ - "content_suggestions_action_handler.h", "content_suggestions_collection_controlling.h", "content_suggestions_collection_synchronizing.h", "content_suggestions_collection_updater.h", "content_suggestions_collection_updater.mm", "content_suggestions_commands.h", - "content_suggestions_consumer.h", "content_suggestions_data_sink.h", "content_suggestions_data_source.h", "content_suggestions_header_commands.h",
diff --git a/ios/chrome/browser/ui/content_suggestions/cells/BUILD.gn b/ios/chrome/browser/ui/content_suggestions/cells/BUILD.gn index 40a6c7c..b6d0a04 100644 --- a/ios/chrome/browser/ui/content_suggestions/cells/BUILD.gn +++ b/ios/chrome/browser/ui/content_suggestions/cells/BUILD.gn
@@ -31,12 +31,8 @@ source_set("cells_ui") { sources = [ - "content_suggestions_articles_header_item.h", - "content_suggestions_articles_header_item.mm", "content_suggestions_discover_header_item.h", "content_suggestions_discover_header_item.mm", - "content_suggestions_discover_item.h", - "content_suggestions_discover_item.mm", "content_suggestions_header_item.h", "content_suggestions_header_item.mm", "content_suggestions_most_visited_action_cell.h",
diff --git a/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_articles_header_item.h b/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_articles_header_item.h deleted file mode 100644 index 7aa8ee3..0000000 --- a/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_articles_header_item.h +++ /dev/null
@@ -1,55 +0,0 @@ -// Copyright 2018 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_CONTENT_SUGGESTIONS_CELLS_CONTENT_SUGGESTIONS_ARTICLES_HEADER_ITEM_H_ -#define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CELLS_CONTENT_SUGGESTIONS_ARTICLES_HEADER_ITEM_H_ - -#import <MaterialComponents/MaterialCollectionCells.h> - -#import "ios/chrome/browser/ui/collection_view/cells/collection_view_item.h" - -@class ContentSuggestionsArticlesHeaderCell; - -// Delegate for the cell. -@protocol ContentSuggestionsArticlesHeaderCellDelegate - -// Notifies the delegate that the button of the |cell| has been tapped. -- (void)cellButtonTapped:(nonnull ContentSuggestionsArticlesHeaderCell*)cell; - -@end - -// Item for a ArticlesHeader of a Content Suggestions section. Displays a -// header title and a button to toggle the collapsed/expanded state. -@interface ContentSuggestionsArticlesHeaderItem - : CollectionViewItem<ContentSuggestionsArticlesHeaderCellDelegate> - -@property(nonatomic, assign) BOOL expanded; - -// Initializes an ArticlesHeader with a button aligned to the trailing edge, -// with a |title| and a |callback| run when the cell button is tapped. -- (nullable instancetype)initWithType:(NSInteger)type - title:(nonnull NSString*)title - callback:(void (^_Nullable)())callback - NS_DESIGNATED_INITIALIZER; - -- (nullable instancetype)initWithType:(NSInteger)type NS_UNAVAILABLE; - -@end - -// Corresponding cell for a Content Suggestions' section ArticlesHeader. -@interface ContentSuggestionsArticlesHeaderCell : MDCCollectionViewCell - -// Label used to indicate expanded state and trigger callback. -@property(nonatomic, readonly, strong, nonnull) UIButton* button; - -// Label for this header items. -@property(nonatomic, strong, nonnull) UILabel* label; - -@property(nonatomic, weak, nullable) - id<ContentSuggestionsArticlesHeaderCellDelegate> - delegate; - -@end - -#endif // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CELLS_CONTENT_SUGGESTIONS_ARTICLES_HEADER_ITEM_H_
diff --git a/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_articles_header_item.mm b/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_articles_header_item.mm deleted file mode 100644 index 8f6b891e3..0000000 --- a/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_articles_header_item.mm +++ /dev/null
@@ -1,186 +0,0 @@ -// Copyright 2017 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 "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_articles_header_item.h" - -#import "ios/chrome/browser/ui/util/uikit_ui_util.h" -#import "ios/chrome/common/ui/colors/semantic_color_names.h" -#import "ios/chrome/common/ui/util/constraints_ui_util.h" -#include "ios/chrome/grit/ios_strings.h" -#include "ui/base/l10n/l10n_util.h" - -#if !defined(__has_feature) || !__has_feature(objc_arc) -#error "This file requires ARC support." -#endif - -namespace { -// Leading and trailing margin for label and button. -const CGFloat kTextMargin = 13; -} - -#pragma mark - ContentSuggestionsArticlesHeaderItem - -@interface ContentSuggestionsArticlesHeaderItem () - -@property(nonatomic, copy) NSString* title; -@property(nonatomic, copy) void (^callback)(); - -@end - -@implementation ContentSuggestionsArticlesHeaderItem - -@synthesize expanded = _expanded; -@synthesize title = _title; -@synthesize callback = _callback; - -- (instancetype)initWithType:(NSInteger)type - title:(NSString*)title - callback:(void (^)())callback { - self = [super initWithType:type]; - if (self) { - self.cellClass = [ContentSuggestionsArticlesHeaderCell class]; - _title = [title copy]; - _callback = [callback copy]; - } - return self; -} - -- (void)configureCell:(ContentSuggestionsArticlesHeaderCell*)cell { - [super configureCell:cell]; - [cell.button - setTitle:self.expanded - ? l10n_util::GetNSString(IDS_IOS_CONTENT_SUGGESTIONS_HIDE) - : l10n_util::GetNSString(IDS_IOS_CONTENT_SUGGESTIONS_SHOW) - forState:UIControlStateNormal]; - cell.label.text = [self.title uppercaseString]; - cell.delegate = self; -} - -#pragma mark ContentSuggestionsArticlesHeaderCellDelegate - -- (void)cellButtonTapped:(ContentSuggestionsArticlesHeaderCell*)cell { - if (self.callback) { - self.callback(); - } -} - -@end - -#pragma mark - ContentSuggestionsArticlesHeaderCell - -@interface ContentSuggestionsArticlesHeaderCell () - -@property(nonatomic, strong) NSArray<NSLayoutConstraint*>* standardConstraints; -@property(nonatomic, strong) - NSArray<NSLayoutConstraint*>* accessibilityConstraints; - -@end - -@implementation ContentSuggestionsArticlesHeaderCell - -@synthesize button = _button; -@synthesize delegate = _delegate; -@synthesize label = _label; - -- (instancetype)initWithFrame:(CGRect)frame { - self = [super initWithFrame:frame]; - if (self) { - _label = [[UILabel alloc] init]; - _label.translatesAutoresizingMaskIntoConstraints = NO; - _label.font = [UIFont preferredFontForTextStyle:UIFontTextStyleFootnote]; - _label.textColor = [UIColor colorNamed:kTextSecondaryColor]; - _label.adjustsFontForContentSizeCategory = YES; - _label.adjustsFontSizeToFitWidth = YES; - - _button = [UIButton buttonWithType:UIButtonTypeSystem]; - _button.translatesAutoresizingMaskIntoConstraints = NO; - _button.titleLabel.font = - [UIFont preferredFontForTextStyle:UIFontTextStyleFootnote]; - _button.titleLabel.adjustsFontForContentSizeCategory = YES; - [_button addTarget:self - action:@selector(buttonTapped) - forControlEvents:UIControlEventTouchUpInside]; - - [self.contentView addSubview:_button]; - [self.contentView addSubview:_label]; - - _standardConstraints = @[ - [_label.bottomAnchor - constraintEqualToAnchor:self.contentView.bottomAnchor], - [_button.topAnchor constraintEqualToAnchor:self.contentView.topAnchor], - [_label.trailingAnchor - constraintLessThanOrEqualToAnchor:_button.leadingAnchor], - [_button.trailingAnchor - constraintEqualToAnchor:self.contentView.trailingAnchor - constant:-kTextMargin], - ]; - _accessibilityConstraints = @[ - [_label.bottomAnchor - constraintEqualToAnchor:self.contentView.centerYAnchor], - [_button.topAnchor - constraintEqualToAnchor:self.contentView.centerYAnchor], - [_label.trailingAnchor - constraintLessThanOrEqualToAnchor:self.contentView.trailingAnchor - constant:-kTextMargin], - [_button.leadingAnchor - constraintEqualToAnchor:self.contentView.leadingAnchor - constant:kTextMargin], - [_button.trailingAnchor - constraintLessThanOrEqualToAnchor:self.contentView.trailingAnchor - constant:-kTextMargin], - ]; - - [NSLayoutConstraint activateConstraints:@[ - [_label.leadingAnchor - constraintEqualToAnchor:self.contentView.leadingAnchor - constant:kTextMargin], - [_label.topAnchor constraintEqualToAnchor:self.contentView.topAnchor], - [_button.bottomAnchor - constraintEqualToAnchor:self.contentView.bottomAnchor], - ]]; - - if (UIContentSizeCategoryIsAccessibilityCategory( - self.traitCollection.preferredContentSizeCategory)) { - [NSLayoutConstraint activateConstraints:_accessibilityConstraints]; - } else { - [NSLayoutConstraint activateConstraints:_standardConstraints]; - } - } - return self; -} - -- (void)prepareForReuse { - [super prepareForReuse]; - self.delegate = nil; -} - -#pragma mark - UIView - -- (void)traitCollectionDidChange:(UITraitCollection*)previousTraitCollection { - [super traitCollectionDidChange:previousTraitCollection]; - BOOL isCurrentCategoryAccessibility = - UIContentSizeCategoryIsAccessibilityCategory( - self.traitCollection.preferredContentSizeCategory); - BOOL isPreviousCategoryAccessibility = - UIContentSizeCategoryIsAccessibilityCategory( - previousTraitCollection.preferredContentSizeCategory); - if (isCurrentCategoryAccessibility != isPreviousCategoryAccessibility) { - if (isCurrentCategoryAccessibility) { - [NSLayoutConstraint deactivateConstraints:self.standardConstraints]; - [NSLayoutConstraint activateConstraints:self.accessibilityConstraints]; - } else { - [NSLayoutConstraint deactivateConstraints:self.accessibilityConstraints]; - [NSLayoutConstraint activateConstraints:self.standardConstraints]; - } - } -} - -#pragma mark Private - -// Callback for the button action. -- (void)buttonTapped { - [self.delegate cellButtonTapped:self]; -} - -@end
diff --git a/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_discover_item.h b/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_discover_item.h deleted file mode 100644 index 7a3ae77..0000000 --- a/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_discover_item.h +++ /dev/null
@@ -1,39 +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 IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CELLS_CONTENT_SUGGESTIONS_DISCOVER_ITEM_H_ -#define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CELLS_CONTENT_SUGGESTIONS_DISCOVER_ITEM_H_ - -#import <UIKit/UIKit.h> - -#import <MaterialComponents/MaterialCollectionCells.h> - -#import "ios/chrome/browser/ui/collection_view/cells/collection_view_item.h" -#import "ios/chrome/browser/ui/content_suggestions/cells/suggested_content.h" - -@class ContentSuggestionsDiscoverCell; - -// Item displaying entire Discover feed collection view. -@interface ContentSuggestionsDiscoverItem - : CollectionViewItem <SuggestedContent> - -// Contains the Discover feed coming from Discover provider. -@property(nonatomic, weak) UIViewController* discoverFeed; - -@end - -// Associated cell, displaying the Discover feed adjusted to prevent nested -// scrolling. -@interface ContentSuggestionsDiscoverCell : MDCCollectionViewCell - -// Height of Discover feed content to stretch the containing cell, in order to -// avoid nested scrolling. -- (CGFloat)feedHeight; - -// Sets the cell content as the Discover feed's view. -- (void)setDiscoverFeedView:(UIViewController*)discoverFeed; - -@end - -#endif // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CELLS_CONTENT_SUGGESTIONS_DISCOVER_ITEM_H_
diff --git a/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_discover_item.mm b/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_discover_item.mm deleted file mode 100644 index 1b08936..0000000 --- a/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_discover_item.mm +++ /dev/null
@@ -1,100 +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. - -#import "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_discover_item.h" - -#if !defined(__has_feature) || !__has_feature(objc_arc) -#error "This file requires ARC support." -#endif - -namespace { -// The minimum height for the Feed Cell. -const CGFloat kMinimumFeedCellHeight = 50; -} - -#pragma mark - ContentSuggestionsDiscoverItem - -@interface ContentSuggestionsDiscoverItem () - -// Contains a reference to the last configured cell containing the feed. -@property(nonatomic, weak) ContentSuggestionsDiscoverCell* lastConfiguredCell; - -@end - -@implementation ContentSuggestionsDiscoverItem -@synthesize suggestionIdentifier; -@synthesize metricsRecorded; - -- (instancetype)initWithType:(NSInteger)type { - self = [super initWithType:type]; - if (self) { - self.cellClass = [ContentSuggestionsDiscoverCell class]; - } - return self; -} - -- (void)configureCell:(ContentSuggestionsDiscoverCell*)cell { - [super configureCell:cell]; - [cell setDiscoverFeedView:self.discoverFeed]; - self.lastConfiguredCell = cell; -} - -- (CGFloat)cellHeightForWidth:(CGFloat)width { - return self.lastConfiguredCell ? [self.lastConfiguredCell feedHeight] - : kMinimumFeedCellHeight; -} - -@end - -#pragma mark - ContentSuggestionsDiscoverCell - -@interface ContentSuggestionsDiscoverCell () - -// The Discover feed which acts as the cell's content. -@property(nonatomic, weak) UIViewController* discoverFeed; - -@end - -@implementation ContentSuggestionsDiscoverCell - -- (void)setDiscoverFeedView:(UIViewController*)discoverFeed { - if (_discoverFeed == discoverFeed) { - return; - } - _discoverFeed = discoverFeed; - if (discoverFeed) { - UIView* discoverView = discoverFeed.view; - discoverView.translatesAutoresizingMaskIntoConstraints = NO; - [self.contentView addSubview:discoverView]; - [NSLayoutConstraint activateConstraints:@[ - [discoverView.trailingAnchor - constraintEqualToAnchor:self.contentView.trailingAnchor], - [discoverView.leadingAnchor - constraintEqualToAnchor:self.contentView.leadingAnchor], - [discoverView.topAnchor - constraintEqualToAnchor:self.contentView.topAnchor], - [discoverView.bottomAnchor - constraintEqualToAnchor:self.contentView.bottomAnchor], - ]]; - } -} - -- (CGFloat)feedHeight { - UICollectionView* feedView; - if (!self.discoverFeed) { - return kMinimumFeedCellHeight; - } - // TODO(crbug.com/1092900): Make this more robust. Will require - // the provider to expose the feed as a UICollectionViewController. - for (UIView* view in self.discoverFeed.view.subviews) { - if ([view isKindOfClass:[UICollectionView class]]) { - feedView = static_cast<UICollectionView*>(view); - } - } - // In order for the Feed loading spinner to be displayed, the minimum feed - // height must be kMinimumFeedCellHeight. - return fmax(feedView.contentSize.height, kMinimumFeedCellHeight); -} - -@end
diff --git a/ios/chrome/browser/ui/content_suggestions/content_suggestions_action_handler.h b/ios/chrome/browser/ui/content_suggestions/content_suggestions_action_handler.h deleted file mode 100644 index 83fb313a..0000000 --- a/ios/chrome/browser/ui/content_suggestions/content_suggestions_action_handler.h +++ /dev/null
@@ -1,15 +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 IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_ACTION_HANDLER_H_ -#define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_ACTION_HANDLER_H_ - -// Action handler protocol for the content suggestions view controller. -@protocol ContentSuggestionsActionHandler -// Paginates the Discover feed by appending a set of articles to -// the bottom of it. -- (void)loadMoreFeedArticles; -@end - -#endif // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_ACTION_HANDLER_H_
diff --git a/ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.h b/ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.h index 785edc7..3b78709 100644 --- a/ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.h +++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.h
@@ -22,12 +22,9 @@ // this type are empty and should not be displayed. The informations to be // displayed are contained in the SectionInfo. ContentSuggestionTypeEmpty, - ContentSuggestionTypeArticle, - ContentSuggestionTypeReadingList, ContentSuggestionTypeMostVisited, ContentSuggestionTypeReturnToRecentTab, ContentSuggestionTypePromo, - ContentSuggestionTypeLearnMore, ContentSuggestionTypeDiscover, }; @@ -94,10 +91,6 @@ // Returns whether |section| contains the Discover feed. - (BOOL)isDiscoverSection:(NSInteger)section; -// Returns whether |itemType| is a Discover ItemType. -- (BOOL)isDiscoverItem:(NSInteger)itemType; - - @end #endif // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_COLLECTION_UPDATER_H_
diff --git a/ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.mm b/ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.mm index 3cd15f0..e1c0f09 100644 --- a/ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.mm +++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.mm
@@ -4,9 +4,6 @@ #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.h" -#import <MaterialComponents/MaterialPalettes.h> -#import <MaterialComponents/MaterialSnackbar.h> - #include "base/check.h" #include "base/mac/foundation_util.h" #include "base/strings/sys_string_conversions.h" @@ -15,7 +12,6 @@ #import "ios/chrome/browser/ui/collection_view/collection_view_controller.h" #import "ios/chrome/browser/ui/collection_view/collection_view_model.h" #import "ios/chrome/browser/ui/commands/snackbar_commands.h" -#import "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_articles_header_item.h" #import "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_discover_header_item.h" #import "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_header_item.h" #import "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_text_item.h" @@ -43,14 +39,11 @@ // Enum defining the ItemType of this ContentSuggestionsCollectionUpdater. typedef NS_ENUM(NSInteger, ItemType) { - ItemTypeArticle = kItemTypeEnumZero, - ItemTypeFooter, + ItemTypeFooter = kItemTypeEnumZero, ItemTypeHeader, ItemTypeEmpty, - ItemTypeReadingList, ItemTypeMostVisited, ItemTypePromo, - ItemTypeLearnMore, ItemTypeDiscover, ItemTypeReturnToRecentTab, ItemTypeUnknown, @@ -59,33 +52,24 @@ // Enum defining the SectionIdentifier of this // ContentSuggestionsCollectionUpdater. typedef NS_ENUM(NSInteger, SectionIdentifier) { - SectionIdentifierArticles = kSectionIdentifierEnumZero, - SectionIdentifierReadingList, - SectionIdentifierMostVisited, + SectionIdentifierMostVisited = kSectionIdentifierEnumZero, SectionIdentifierLogo, SectionIdentifierReturnToRecentTab, SectionIdentifierPromo, - SectionIdentifierLearnMore, SectionIdentifierDiscover, SectionIdentifierDefault, }; // Returns the ContentSuggestionType associated with an ItemType |type|. ContentSuggestionType ContentSuggestionTypeForItemType(NSInteger type) { - if (type == ItemTypeArticle) - return ContentSuggestionTypeArticle; if (type == ItemTypeEmpty) return ContentSuggestionTypeEmpty; - if (type == ItemTypeReadingList) - return ContentSuggestionTypeReadingList; if (type == ItemTypeReturnToRecentTab) return ContentSuggestionTypeReturnToRecentTab; if (type == ItemTypeMostVisited) return ContentSuggestionTypeMostVisited; if (type == ItemTypePromo) return ContentSuggestionTypePromo; - if (type == ItemTypeLearnMore) - return ContentSuggestionTypeLearnMore; if (type == ItemTypeDiscover) return ContentSuggestionTypeDiscover; // Add new type here @@ -97,18 +81,12 @@ // Returns the item type corresponding to the section |info|. ItemType ItemTypeForInfo(ContentSuggestionsSectionInformation* info) { switch (info.sectionID) { - case ContentSuggestionsSectionArticles: - return ItemTypeArticle; - case ContentSuggestionsSectionReadingList: - return ItemTypeReadingList; case ContentSuggestionsSectionReturnToRecentTab: return ItemTypeReturnToRecentTab; case ContentSuggestionsSectionMostVisited: return ItemTypeMostVisited; case ContentSuggestionsSectionPromo: return ItemTypePromo; - case ContentSuggestionsSectionLearnMore: - return ItemTypeLearnMore; case ContentSuggestionsSectionDiscover: return ItemTypeDiscover; case ContentSuggestionsSectionLogo: @@ -121,10 +99,6 @@ SectionIdentifier SectionIdentifierForInfo( ContentSuggestionsSectionInformation* info) { switch (info.sectionID) { - case ContentSuggestionsSectionArticles: - return SectionIdentifierArticles; - case ContentSuggestionsSectionReadingList: - return SectionIdentifierReadingList; case ContentSuggestionsSectionMostVisited: return SectionIdentifierMostVisited; case ContentSuggestionsSectionLogo: @@ -133,8 +107,6 @@ return SectionIdentifierReturnToRecentTab; case ContentSuggestionsSectionPromo: return SectionIdentifierPromo; - case ContentSuggestionsSectionLearnMore: - return SectionIdentifierLearnMore; case ContentSuggestionsSectionDiscover: return SectionIdentifierDiscover; case ContentSuggestionsSectionUnknown: @@ -142,12 +114,6 @@ } } -// Returns whether this |sectionIdentifier| comes from ContentSuggestions. -BOOL IsFromContentSuggestionsService(NSInteger sectionIdentifier) { - return sectionIdentifier == SectionIdentifierArticles || - sectionIdentifier == SectionIdentifierReadingList; -} - NSString* const kContentSuggestionsCollectionUpdaterSnackbarCategory = @"ContentSuggestionsCollectionUpdaterSnackbarCategory"; @@ -472,34 +438,6 @@ return indexPaths; } - if (sectionIdentifier == SectionIdentifierLearnMore) { - // The "Learn more" items should only be displayed if there is at least one - // ContentSuggestions section. - if ((![model hasSectionForSectionIdentifier:SectionIdentifierArticles] && - ! - [model hasSectionForSectionIdentifier:SectionIdentifierReadingList]) || - [model itemsInSectionWithIdentifier:sectionIdentifier].count > 0) { - return @[]; - } - } else if (IsFromContentSuggestionsService(sectionIdentifier)) { - // If the section is a ContentSuggestions section, add the "Learn more" - // items if they are not already present. - if ([model hasSectionForSectionIdentifier:SectionIdentifierLearnMore] && - [model itemsInSectionWithIdentifier:SectionIdentifierLearnMore].count == - 0) { - ContentSuggestionsSectionInformation* learnMoreSectionInfo = - self.sectionInfoBySectionIdentifier[@(SectionIdentifierLearnMore)]; - for (CSCollectionViewItem* item in - [self.dataSource itemsForSectionInfo:learnMoreSectionInfo]) { - item.type = ItemTypeForInfo(learnMoreSectionInfo); - NSIndexPath* addedIndexPath = [self addItem:item - toSectionWithIdentifier:SectionIdentifierLearnMore]; - - [indexPaths addObject:addedIndexPath]; - } - } - } - // Add the items from this section. [suggestions enumerateObjectsUsingBlock:^(CSCollectionViewItem* item, NSUInteger index, BOOL* stop) { @@ -531,9 +469,7 @@ if ([model hasSectionForSectionIdentifier:sectionIdentifier] || (!sectionInfo.showIfEmpty && - [self.dataSource itemsForSectionInfo:sectionInfo].count == 0) || - (IsFromContentSuggestionsService(sectionIdentifier) && - IsDiscoverFeedEnabled())) { + [self.dataSource itemsForSectionInfo:sectionInfo].count == 0)) { continue; } @@ -611,16 +547,6 @@ sectionIdentifierForSection:section] == SectionIdentifierPromo; } -- (BOOL)isContentSuggestionsSection:(NSInteger)section { - return IsFromContentSuggestionsService( - [self.collectionViewController.collectionViewModel - sectionIdentifierForSection:section]); -} - -- (BOOL)isDiscoverItem:(NSInteger)itemType { - return itemType == ItemTypeDiscover; -} - #pragma mark - Private methods // Adds the header corresponding to |sectionInfo| to the section if there is
diff --git a/ios/chrome/browser/ui/content_suggestions/content_suggestions_consumer.h b/ios/chrome/browser/ui/content_suggestions/content_suggestions_consumer.h deleted file mode 100644 index a55dcc25..0000000 --- a/ios/chrome/browser/ui/content_suggestions/content_suggestions_consumer.h +++ /dev/null
@@ -1,20 +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 IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_CONSUMER_H_ -#define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_CONSUMER_H_ - -// Consumer protocol for the content suggestions view controller. -@protocol ContentSuggestionsConsumer -// Notifies the consumer to set the content suggestions enabled -// based on the user setting. Setting the feed to disabled removes the section -// entirely, including the feed header. -- (void)setContentSuggestionsEnabled:(BOOL)enabled; -// Notifies the consumer to set the content suggestions visibility -// based on the user setting. Setting the feed to invisible hides the feed -// content, but retains the feed header. -- (void)setContentSuggestionsVisible:(BOOL)visible; -@end - -#endif // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_CONSUMER_H_
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 6962c835..9b2d771 100644 --- a/ios/chrome/browser/ui/content_suggestions/content_suggestions_coordinator.h +++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_coordinator.h
@@ -58,9 +58,6 @@ // 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 3ba76c4..ce0d342d 100644 --- a/ios/chrome/browser/ui/content_suggestions/content_suggestions_coordinator.mm +++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_coordinator.mm
@@ -40,7 +40,6 @@ #import "ios/chrome/browser/ui/commands/omnibox_commands.h" #import "ios/chrome/browser/ui/commands/open_new_tab_command.h" #import "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_most_visited_item.h" -#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_action_handler.h" #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_constants.h" #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_data_sink.h" #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_feature.h" @@ -93,7 +92,6 @@ @interface ContentSuggestionsCoordinator () < AppStateObserver, - ContentSuggestionsActionHandler, ContentSuggestionsHeaderCommands, ContentSuggestionsMenuProvider, ContentSuggestionsViewControllerAudience, @@ -112,7 +110,6 @@ ContentSuggestionsMediator* contentSuggestionsMediator; @property(nonatomic, strong) ContentSuggestionsHeaderSynchronizer* headerCollectionInteractionHandler; -@property(nonatomic, strong) UIViewController* discoverFeedViewController; @property(nonatomic, strong) UIView* discoverFeedHeaderMenuButton; @property(nonatomic, strong) URLDragDropHandler* dragDropHandler; @property(nonatomic, strong) ActionSheetCoordinator* alertCoordinator; @@ -217,8 +214,6 @@ ReadingListModelFactory::GetForBrowserState( self.browser->GetBrowserState()); - self.discoverFeedViewController = [self discoverFeed]; - TemplateURLService* templateURLService = ios::TemplateURLServiceFactory::GetForBrowserState( self.browser->GetBrowserState()); @@ -235,14 +230,9 @@ mostVisitedSite:std::move(mostVisitedFactory) readingListModel:readingListModel prefService:prefs - discoverFeed:self.discoverFeedViewController isGoogleDefaultSearchProvider:isGoogleDefaultSearchProvider]; self.contentSuggestionsMediator.commandHandler = self.ntpMediator; self.contentSuggestionsMediator.headerProvider = self.headerController; - if (!IsRefactoredNTP()) { - self.contentSuggestionsMediator.contentArticlesExpanded = - self.contentSuggestionsExpanded; - } self.contentSuggestionsMediator.discoverFeedDelegate = self.discoverFeedDelegate; self.contentSuggestionsMediator.webStateList = @@ -267,8 +257,7 @@ self.suggestionsViewController = [[ContentSuggestionsViewController alloc] initWithStyle:CollectionViewControllerStyleDefault - offset:offset - feedVisible:[self isFeedVisible]]; + offset:offset]; [self.suggestionsViewController setDataSource:self.contentSuggestionsMediator]; self.suggestionsViewController.suggestionCommandHandler = self.ntpMediator; @@ -279,8 +268,6 @@ static_cast<id<SnackbarCommands>>(self.browser->GetCommandDispatcher()); self.suggestionsViewController.dispatcher = dispatcher; self.suggestionsViewController.discoverFeedMenuHandler = self; - self.suggestionsViewController.discoverFeedMetricsRecorder = - self.discoverFeedMetricsRecorder; self.suggestionsViewController.panGestureHandler = self.panGestureHandler; self.suggestionsViewController.bubblePresenter = self.bubblePresenter; @@ -291,8 +278,6 @@ value]]; self.suggestionsViewController.contentSuggestionsEnabled = self.contentSuggestionsEnabled; - self.suggestionsViewController.handler = self; - self.contentSuggestionsMediator.consumer = self.suggestionsViewController; if (@available(iOS 13.0, *)) { self.suggestionsViewController.menuProvider = self; @@ -346,11 +331,6 @@ [self.sharingCoordinator stop]; self.sharingCoordinator = nil; self.headerController = nil; - if (IsDiscoverFeedEnabled() && !IsRefactoredNTP()) { - ios::GetChromeBrowserProvider() - .GetDiscoverFeedProvider() - ->RemoveFeedViewController(self.discoverFeedViewController); - } self.contentSuggestionsExpanded = nil; _started = NO; } @@ -561,15 +541,6 @@ [self.ntpMediator dismissModals]; } -#pragma mark - ContentSuggestionsActionHandler - -- (void)loadMoreFeedArticles { - ios::GetChromeBrowserProvider() - .GetDiscoverFeedProvider() - ->LoadMoreFeedArticles(); - [self.discoverFeedMetricsRecorder recordInfiniteFeedTriggered]; -} - #pragma mark - Public methods - (UIView*)view { @@ -602,9 +573,6 @@ } - (void)reload { - if (IsDiscoverFeedEnabled() && !IsRefactoredNTP() && [self isFeedVisible]) { - ios::GetChromeBrowserProvider().GetDiscoverFeedProvider()->RefreshFeed(); - } [self.contentSuggestionsMediator.dataSink reloadAllData]; } @@ -735,29 +703,6 @@ scene.modifytVisibleNTPForStartSurface = NO; } -// Creates, configures and returns a DiscoverFeed ViewController. -- (UIViewController*)discoverFeed { - if (!IsDiscoverFeedEnabled() || IsRefactoredNTP() || - tests_hook::DisableContentSuggestions() || - tests_hook::DisableDiscoverFeed()) - return nil; - - UIViewController* discoverFeed = ios::GetChromeBrowserProvider() - .GetDiscoverFeedProvider() - ->NewFeedViewController(self.browser); - // 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]]) { - UICollectionView* feedView = static_cast<UICollectionView*>(view); - feedView.bounces = NO; - feedView.alwaysBounceVertical = NO; - feedView.scrollEnabled = NO; - } - } - return discoverFeed; -} - // Triggers the URL sharing flow for the given |URL| and |title|, with the // origin |view| representing the UI component for that URL. - (void)shareURL:(const GURL&)URL @@ -782,7 +727,6 @@ [self.contentSuggestionsMediator reloadAllData]; [self.discoverFeedMetricsRecorder recordDiscoverFeedVisibilityChanged:visible]; - self.suggestionsViewController.feedVisible = [self isFeedVisible]; } #pragma mark - AppStateObserver
diff --git a/ios/chrome/browser/ui/content_suggestions/content_suggestions_mediator.h b/ios/chrome/browser/ui/content_suggestions/content_suggestions_mediator.h index 852ae851..b00c270b 100644 --- a/ios/chrome/browser/ui/content_suggestions/content_suggestions_mediator.h +++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_mediator.h
@@ -11,8 +11,6 @@ #include "components/prefs/pref_service.h" #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_data_source.h" -#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_mediator.h" -#import "ios/chrome/browser/ui/settings/utils/pref_backed_boolean.h" #import "ios/chrome/browser/ui/start_surface/start_surface_recent_tab_removal_observer_bridge.h" namespace favicon { @@ -31,7 +29,6 @@ @protocol ContentSuggestionsConsumer; @protocol ContentSuggestionsGestureCommands; @protocol ContentSuggestionsHeaderProvider; -@class ContentSuggestionIdentifier; @protocol DiscoverFeedDelegate; class GURL; class LargeIconCache; @@ -56,7 +53,6 @@ mostVisitedSites readingListModel:(ReadingListModel*)readingListModel prefService:(PrefService*)prefService - discoverFeed:(UIViewController*)discoverFeed isGoogleDefaultSearchProvider:(BOOL)isGoogleDefaultSearchProvider NS_DESIGNATED_INITIALIZER; @@ -72,22 +68,9 @@ @property(nonatomic, weak) id<ContentSuggestionsHeaderProvider> headerProvider; -// Whether the contents section should be expanded or collapsed. Collapsed -// means to show the header, but not any content or footer. -@property(nonatomic, strong) PrefBackedBoolean* contentArticlesExpanded; -// Whether to force the reload the Reading List section next time it is updated. -// Reset to NO after actual reload. -@property(nonatomic, assign) BOOL readingListNeedsReload; - -// ViewController created by the Discover provider containing the Discover feed. -@property(nonatomic, weak) UIViewController* discoverFeed; - // Delegate used to communicate to communicate events to the DiscoverFeed. @property(nonatomic, weak) id<DiscoverFeedDelegate> discoverFeedDelegate; -// The consumer for this mediator. -@property(nonatomic, weak) id<ContentSuggestionsConsumer> consumer; - // WebStateList associated with this mediator. @property(nonatomic, assign) WebStateList* webStateList;
diff --git a/ios/chrome/browser/ui/content_suggestions/content_suggestions_mediator.mm b/ios/chrome/browser/ui/content_suggestions/content_suggestions_mediator.mm index 20d7724..ffdd350 100644 --- a/ios/chrome/browser/ui/content_suggestions/content_suggestions_mediator.mm +++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_mediator.mm
@@ -14,15 +14,12 @@ #include "components/ntp_tiles/most_visited_sites.h" #include "components/ntp_tiles/ntp_tile.h" #import "components/pref_registry/pref_registry_syncable.h" -#import "components/prefs/ios/pref_observer_bridge.h" -#include "components/prefs/pref_change_registrar.h" #include "components/reading_list/core/reading_list_model.h" #import "components/reading_list/ios/reading_list_model_bridge_observer.h" #include "ios/chrome/browser/application_context.h" #include "ios/chrome/browser/ntp_tiles/most_visited_sites_observer_bridge.h" #import "ios/chrome/browser/policy/policy_util.h" #import "ios/chrome/browser/pref_names.h" -#import "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_discover_item.h" #import "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_most_visited_action_item.h" #import "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_most_visited_item.h" #import "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_return_to_recent_tab_item.h" @@ -30,7 +27,6 @@ #import "ios/chrome/browser/ui/content_suggestions/cells/suggested_content.h" #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_category_wrapper.h" #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_commands.h" -#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_consumer.h" #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_data_sink.h" #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_favicon_mediator.h" #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_feature.h" @@ -63,18 +59,12 @@ } // namespace -@interface ContentSuggestionsMediator () <BooleanObserver, - MostVisitedSitesObserving, - PrefObserverDelegate, +@interface ContentSuggestionsMediator () <MostVisitedSitesObserving, ReadingListModelBridgeObserver> { std::unique_ptr<ntp_tiles::MostVisitedSites> _mostVisitedSites; std::unique_ptr<ntp_tiles::MostVisitedSitesObserverBridge> _mostVisitedBridge; std::unique_ptr<NotificationPromoWhatsNew> _notificationPromo; std::unique_ptr<ReadingListModelBridge> _readingListModelBridge; - // Pref observer to track changes to prefs. - std::unique_ptr<PrefObserverBridge> _prefObserverBridge; - // Registrar for pref changes notifications. - std::unique_ptr<PrefChangeRegistrar> _prefChangeRegistrar; } // Whether the contents section should be hidden completely. @@ -131,8 +121,6 @@ // reading list count. @property(nonatomic, strong) ContentSuggestionsMostVisitedActionItem* readingListItem; -// Item for the Discover feed. -@property(nonatomic, strong) ContentSuggestionsDiscoverItem* discoverItem; // Number of unread items in reading list model. @property(nonatomic, assign) NSInteger readingListUnreadCount; // YES if the Return to Recent Tab tile is being shown. @@ -156,7 +144,6 @@ mostVisitedSites readingListModel:(ReadingListModel*)readingListModel prefService:(PrefService*)prefService - discoverFeed:(UIViewController*)discoverFeed isGoogleDefaultSearchProvider:(BOOL)isGoogleDefaultSearchProvider { self = [super init]; if (self) { @@ -176,11 +163,8 @@ _promoSectionInfo = PromoSectionInformation(); _mostVisitedSectionInfo = MostVisitedSectionInformation(); - _discoverFeed = discoverFeed; _discoverSectionInfo = DiscoverSectionInformation(isGoogleDefaultSearchProvider); - _discoverItem = [[ContentSuggestionsDiscoverItem alloc] init]; - _discoverItem.discoverFeed = _discoverFeed; _notificationPromo = std::make_unique<NotificationPromoWhatsNew>( GetApplicationContext()->GetLocalState()); @@ -192,14 +176,6 @@ _mostVisitedSites->AddMostVisitedURLsObserver(_mostVisitedBridge.get(), kMaxNumMostVisitedTiles); - _prefChangeRegistrar = std::make_unique<PrefChangeRegistrar>(); - _prefChangeRegistrar->Init(prefService); - _prefObserverBridge.reset(new PrefObserverBridge(self)); - _prefObserverBridge->ObserveChangesForPreference( - prefs::kArticlesForYouEnabled, _prefChangeRegistrar.get()); - _prefObserverBridge->ObserveChangesForPreference( - prefs::kNTPContentSuggestionsEnabled, _prefChangeRegistrar.get()); - _readingListModelBridge = std::make_unique<ReadingListModelBridge>(self, readingListModel); } @@ -211,22 +187,14 @@ } - (void)disconnect { - _prefChangeRegistrar.reset(); - _prefObserverBridge.reset(); _mostVisitedBridge.reset(); _mostVisitedSites.reset(); - _contentArticlesExpanded = nil; } - (void)reloadAllData { [self.dataSink reloadAllData]; } -- (void)setConsumer:(id<ContentSuggestionsConsumer>)consumer { - _consumer = consumer; - [self.consumer setContentSuggestionsEnabled:self.contentSuggestionsEnabled]; -} - - (void)blockMostVisitedURL:(GURL)URL { _mostVisitedSites->AddOrRemoveBlockedUrl(URL, true); [self useFreshMostVisited]; @@ -359,10 +327,6 @@ if (!ShouldHideShortcutsForStartSurface()) { [convertedSuggestions addObjectsFromArray:self.actionButtonItems]; } - } else if (sectionInfo == self.discoverSectionInfo) { - if ([self.contentArticlesExpanded value] && !IsRefactoredNTP()) { - [convertedSuggestions addObject:self.discoverItem]; - } } return convertedSuggestions; @@ -374,12 +338,6 @@ safeAreaInsets:[self.discoverFeedDelegate safeAreaInsetsForDiscoverFeed]]; } -#pragma mark - BooleanObserver - -- (void)booleanDidChange:(id<ObservableBoolean>)observableBoolean { - [self reloadArticleSectionOrAllData:YES]; -} - #pragma mark - MostVisitedSitesObserving - (void)onMostVisitedURLsAvailable: @@ -438,42 +396,6 @@ #pragma mark - Private -// Reloads article section (for the page that trigers the request) or all -// for other tabs/windows observing the pref. It avoids issues with scroll -// changes, in hidden tabs/windows which leads to crashes. -- (void)reloadArticleSectionOrAllData:(BOOL)allData { - // Update the section information for new collapsed state. - ntp_snippets::Category category = ntp_snippets::Category::FromKnownCategory( - ntp_snippets::KnownCategories::ARTICLES); - ContentSuggestionsCategoryWrapper* wrapper = - [ContentSuggestionsCategoryWrapper wrapperWithCategory:category]; - ContentSuggestionsSectionInformation* sectionInfo = - self.sectionInformationByCategory[wrapper]; - sectionInfo.expanded = [self.contentArticlesExpanded value]; - [self.consumer - setContentSuggestionsVisible:[self.contentArticlesExpanded value]]; - - if (allData) { - [self reloadAllData]; - } else { - // Reloading the section with animations looks bad because the section - // border with the new collapsed height draws before the elements collapse. - BOOL animationsWereEnabled = [UIView areAnimationsEnabled]; - [UIView setAnimationsEnabled:NO]; - [self.dataSink reloadSection:sectionInfo]; - [UIView setAnimationsEnabled:animationsWereEnabled]; - } -} - - -// Returns whether the |sectionInfo| is associated with a category from the -// content suggestions service. -- (BOOL)isRelatedToContentSuggestionsService: - (ContentSuggestionsSectionInformation*)sectionInfo { - return sectionInfo != self.mostVisitedSectionInfo && - sectionInfo != self.logoSectionInfo; -} - // Replaces the Most Visited items currently displayed by the most recent ones. - (void)useFreshMostVisited { self.mostVisitedItems = self.freshMostVisitedItems; @@ -490,15 +412,6 @@ } } -// Returns whether the Articles category pref indicates it should be expanded, -// otherwise returns YES. -- (BOOL)isCategoryExpanded:(ntp_snippets::Category)category { - if (category.IsKnownCategory(ntp_snippets::KnownCategories::ARTICLES)) - return [self.contentArticlesExpanded value]; - else - return YES; -} - #pragma mark - Properties - (NSArray<ContentSuggestionsMostVisitedActionItem*>*)actionButtonItems { @@ -529,43 +442,11 @@ } } -- (void)setContentArticlesExpanded:(PrefBackedBoolean*)contentArticlesExpanded { - if (_contentArticlesExpanded == contentArticlesExpanded) - return; - _contentArticlesExpanded = contentArticlesExpanded; - [contentArticlesExpanded setObserver:self]; -} - -- (void)setDiscoverFeed:(UIViewController*)discoverFeed { - _discoverFeed = discoverFeed; - _discoverItem.discoverFeed = _discoverFeed; - // The UICollectionView -reloadData method is a no-op if it is called at the - // same time as other collection updates. This full refresh command can come - // at the same time as other collection update commands. To make sure that it - // is taken into account, dispatch it with a delay. See - // http://crbug.com/945726. - dispatch_after( - dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), - dispatch_get_main_queue(), ^{ - [self reloadAllData]; - }); -} - - (BOOL)contentSuggestionsEnabled { return self.articleForYouEnabled->GetValue()->GetBool() && self.contentSuggestionsPolicyEnabled->GetValue()->GetBool(); } -#pragma mark - PrefObserverDelegate - -- (void)onPreferenceChanged:(const std::string&)preferenceName { - if ((preferenceName == prefs::kArticlesForYouEnabled || - preferenceName == prefs::kNTPContentSuggestionsEnabled) && - !IsRefactoredNTP()) { - [self reloadAllData]; - } -} - #pragma mark - ReadingListModelBridgeObserver - (void)readingListModelLoaded:(const ReadingListModel*)model {
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 a6e00bc1..9ab307a 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
@@ -9,7 +9,6 @@ #import "ios/chrome/browser/ui/collection_view/collection_view_controller.h" #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_controlling.h" -#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_consumer.h" #import "ios/chrome/browser/ui/thumb_strip/thumb_strip_supporting.h" @class BubblePresenter; @@ -18,12 +17,10 @@ @protocol ContentSuggestionsCommands; @protocol ContentSuggestionsDataSource; @protocol ContentSuggestionsHeaderControlling; -@protocol ContentSuggestionsHeaderSynchronizing; @protocol ContentSuggestionsMenuProvider; @protocol ContentSuggestionsViewControllerAudience; @protocol DiscoverFeedHeaderChanging; @protocol DiscoverFeedMenuCommands; -@class DiscoverFeedMetricsRecorder; @protocol OverscrollActionsControllerDelegate; @protocol SnackbarCommands; @protocol SuggestedContent; @@ -33,15 +30,12 @@ // CollectionViewController to display the suggestions items. @interface ContentSuggestionsViewController : CollectionViewController <ContentSuggestionsCollectionControlling, - ContentSuggestionsConsumer, ThumbStripSupporting> // 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. - (instancetype)initWithStyle:(CollectionViewControllerStyle)style offset:(CGFloat)offset - feedVisible:(BOOL)visible NS_DESIGNATED_INITIALIZER; - (instancetype)initWithLayout:(UICollectionViewLayout*)layout @@ -77,9 +71,6 @@ @property(nonatomic, weak) id<ContentSuggestionsActionHandler> handler; // Provider of menu configurations for the contentSuggestions component. @property(nonatomic, weak) id<ContentSuggestionsMenuProvider> menuProvider; -// Discover Feed metrics recorder. -@property(nonatomic, strong) - DiscoverFeedMetricsRecorder* discoverFeedMetricsRecorder; // The pan gesture handler to notify of scroll events happening in this view // controller. @@ -88,9 +79,6 @@ // Bubble presenter for displaying IPH bubbles relating to the NTP. @property(nonatomic, strong) BubblePresenter* bubblePresenter; -// |YES| the NTP feed is collapsed and enabled. -@property(nonatomic, assign, getter=isFeedVisible) BOOL feedVisible; - - (void)setDataSource:(id<ContentSuggestionsDataSource>)dataSource; - (void)setDispatcher:(id<SnackbarCommands>)dispatcher;
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 e2b1a87a..fb1f381 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
@@ -12,27 +12,22 @@ #import "ios/chrome/browser/ui/collection_view/cells/collection_view_item.h" #import "ios/chrome/browser/ui/collection_view/collection_view_model.h" #import "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_discover_header_item.h" -#import "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_discover_item.h" #import "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_most_visited_cell.h" #import "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_most_visited_item.h" #import "ios/chrome/browser/ui/content_suggestions/cells/suggested_content.h" -#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_action_handler.h" #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.h" #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_utils.h" #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_commands.h" #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_constants.h" -#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_feature.h" #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_header_controlling.h" #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_header_synchronizing.h" #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_layout.h" #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_menu_provider.h" #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller_audience.h" #import "ios/chrome/browser/ui/content_suggestions/discover_feed_menu_commands.h" -#import "ios/chrome/browser/ui/content_suggestions/discover_feed_metrics_recorder.h" #import "ios/chrome/browser/ui/content_suggestions/ntp_home_constant.h" #import "ios/chrome/browser/ui/content_suggestions/theme_change_delegate.h" #import "ios/chrome/browser/ui/gestures/view_revealing_vertical_pan_handler.h" -#import "ios/chrome/browser/ui/ntp/new_tab_page_feature.h" #import "ios/chrome/browser/ui/ntp/new_tab_page_header_constants.h" #import "ios/chrome/browser/ui/ntp_tile_views/ntp_tile_layout_util.h" #import "ios/chrome/browser/ui/overscroll_actions/overscroll_actions_controller.h" @@ -57,9 +52,6 @@ const CGFloat kPaginationOffset = 800; // Height for the Discover Feed section header. const CGFloat kDiscoverFeedFeaderHeight = 30; -// Minimum height of the Discover feed content to indicate that the articles -// have loaded. -const CGFloat kDiscoverFeedLoadedHeight = 1000; } @interface ContentSuggestionsViewController ()<UIGestureRecognizerDelegate> { @@ -73,22 +65,10 @@ @property(nonatomic, strong) OverscrollActionsController* overscrollActionsController; -// The DiscoverFeedVC that might be displayed by this VC. -@property(nonatomic, weak) UIViewController* discoverFeedVC; -// The FeedView CollectionView contained by discoverFeedVC. -@property(nonatomic, strong) UICollectionView* feedView; - // Navigation offset applied to the layout height to maintain the scroll // position, since the feed height is dynamic. @property(nonatomic) CGFloat offset; -// Represents the last recorded height of the Discover feed for tracking when to -// trigger the infinite feed. -@property(nonatomic, assign) CGFloat discoverFeedHeight; - -// Whether this VC is observing the discoverFeedHeight using KVO or not. -@property(nonatomic, assign) BOOL observingDiscoverFeedHeight; - // The CollectionViewController scroll position when an scrolling event starts. @property(nonatomic, assign) int scrollStartPosition; @@ -111,10 +91,8 @@ #pragma mark - Lifecycle - (instancetype)initWithStyle:(CollectionViewControllerStyle)style - offset:(CGFloat)offset - feedVisible:(BOOL)visible { + offset:(CGFloat)offset { _offset = offset; - _feedVisible = visible; _layout = [[ContentSuggestionsLayout alloc] initWithOffset:offset]; self = [super initWithLayout:_layout style:style]; if (self) { @@ -126,12 +104,6 @@ } - (void)dealloc { - [self removeContentSizeKVO]; - if (self.discoverFeedVC.parentViewController) { - [self.discoverFeedVC willMoveToParentViewController:nil]; - [self.discoverFeedVC.view removeFromSuperview]; - [self.discoverFeedVC removeFromParentViewController]; - } [self.overscrollActionsController invalidate]; } @@ -398,11 +370,6 @@ [self.suggestionCommandHandler handlePromoTapped]; [self.collectionViewLayout invalidateLayout]; break; - case ContentSuggestionTypeLearnMore: - case ContentSuggestionTypeReadingList: - case ContentSuggestionTypeArticle: - // TODO(crbug.com/1200303): Remove these three types. - break; case ContentSuggestionTypeDiscover: case ContentSuggestionTypeEmpty: break; @@ -411,46 +378,6 @@ - (UICollectionViewCell*)collectionView:(UICollectionView*)collectionView cellForItemAtIndexPath:(NSIndexPath*)indexPath { - CSCollectionViewItem* item = - [self.collectionViewModel itemAtIndexPath:indexPath]; - - if ([self.collectionUpdater - isDiscoverItem:[self.collectionViewModel - itemTypeForIndexPath:indexPath]]) { - // TODO(crbug.com/1114792): Remove DiscoverItem logic once we stop - // containing the DiscoverFeed inside a cell. - ContentSuggestionsDiscoverItem* discoverFeedItem = - static_cast<ContentSuggestionsDiscoverItem*>(item); - UIViewController* newFeedViewController = discoverFeedItem.discoverFeed; - - if (newFeedViewController != self.discoverFeedVC) { - // If previous VC is not nil, remove it from the view hierarchy. - if (self.discoverFeedVC) { - self.feedView = nil; - [self.discoverFeedVC willMoveToParentViewController:nil]; - [self.discoverFeedVC.view removeFromSuperview]; - [self.discoverFeedVC removeFromParentViewController]; - } - - // If new VC is not nil, add it to the view hierarchy. - if (newFeedViewController) { - [self addChildViewController:newFeedViewController]; - UICollectionViewCell* cell = [super collectionView:collectionView - cellForItemAtIndexPath:indexPath]; - [newFeedViewController didMoveToParentViewController:self]; - - // Observe its CollectionView for contentSize changes. - for (UIView* view in newFeedViewController.view.subviews) { - if ([view isKindOfClass:[UICollectionView class]]) { - self.feedView = static_cast<UICollectionView*>(view); - } - } - self.discoverFeedVC = newFeedViewController; - return cell; - } - } - } - UICollectionViewCell* cell = [super collectionView:collectionView cellForItemAtIndexPath:indexPath]; if ([self.collectionUpdater isMostVisitedSection:indexPath.section]) { @@ -675,16 +602,6 @@ [self.headerSynchronizer updateFakeOmniboxForScrollPosition]; self.scrolledToTop = scrollView.contentOffset.y >= [self.headerSynchronizer pinnedOffsetY]; - - if (IsDiscoverFeedEnabled() && self.contentSuggestionsEnabled) { - if ([self shouldTriggerInfiniteFeed:scrollView]) { - CGFloat currentHeight = self.feedView.contentSize.height; - if (currentHeight != self.discoverFeedHeight) { - self.discoverFeedHeight = currentHeight; - [self.handler loadMoreFeedArticles]; - } - } - } scrollView.showsHorizontalScrollIndicator = NO; } @@ -711,13 +628,6 @@ willDecelerate:decelerate]; [self.panGestureHandler scrollViewDidEndDragging:scrollView willDecelerate:decelerate]; - - // Track scrolling for the legacy NTP with visible Discover feed. - if (IsDiscoverFeedEnabled() && !IsRefactoredNTP() && [self isFeedVisible]) { - [self.discoverFeedMetricsRecorder - recordFeedScrolled:scrollView.contentOffset.y - - self.scrollStartPosition]; - } } - (void)scrollViewWillEndDragging:(UIScrollView*)scrollView @@ -774,67 +684,8 @@ return YES; } -#pragma mark - ContentSuggestionsConsumer - -- (void)setContentSuggestionsEnabled:(BOOL)enabled { - _contentSuggestionsEnabled = enabled; -} - -- (void)setContentSuggestionsVisible:(BOOL)visible { - [self.collectionUpdater changeDiscoverFeedHeaderVisibility:visible]; -} - -#pragma mark - NSKeyValueObserving - -// TODO(crbug.com/1114792): Remove once we stop containing the DiscoverFeed -// inside a cell. -- (void)observeValueForKeyPath:(NSString*)keyPath - ofObject:(id)object - change:(NSDictionary*)change - context:(void*)context { - if (object == self.feedView && [keyPath isEqualToString:@"contentSize"]) { - // Reload the CollectionView data to adjust to the new Feed height. - [self.collectionView reloadData]; - // Indicates that the feed articles have been loaded by checking its height. - // TODO(crbug.com/1126940): Use a callback from Mulder to determine this - // more reliably. - if (self.feedView.contentSize.height > kDiscoverFeedLoadedHeight) { - [self.discoverFeedMenuHandler notifyFeedLoadedForHeaderMenu]; - [self.audience discoverFeedShown]; - } - } -} - #pragma mark - Private -// |self.feedView| setter. -- (void)setFeedView:(UICollectionView*)feedView { - if (feedView != _feedView) { - [self removeContentSizeKVO]; - _feedView = feedView; - [self addContentSizeKVO]; - } -} - -// Adds KVO observing for the feedView contentSize if there is not one already. -- (void)addContentSizeKVO { - if (!self.observingDiscoverFeedHeight) { - [self.feedView addObserver:self - forKeyPath:@"contentSize" - options:0 - context:nil]; - self.observingDiscoverFeedHeight = YES; - } -} - -// Removes KVO observing for the feedView contentSize if one exists. -- (void)removeContentSizeKVO { - if (self.observingDiscoverFeedHeight) { - [self.feedView removeObserver:self forKeyPath:@"contentSize"]; - self.observingDiscoverFeedHeight = NO; - } -} - - (void)handleLongPress:(UILongPressGestureRecognizer*)gestureRecognizer { if (self.editor.editing || gestureRecognizer.state != UIGestureRecognizerStateBegan) {
diff --git a/ios/chrome/browser/ui/content_suggestions/identifier/content_suggestion_identifier_unittest.mm b/ios/chrome/browser/ui/content_suggestions/identifier/content_suggestion_identifier_unittest.mm index e86afef..b57277af 100644 --- a/ios/chrome/browser/ui/content_suggestions/identifier/content_suggestion_identifier_unittest.mm +++ b/ios/chrome/browser/ui/content_suggestions/identifier/content_suggestion_identifier_unittest.mm
@@ -27,7 +27,7 @@ std::string id2("identifier"); ContentSuggestionsSectionInformation* sectionInfo = [[ContentSuggestionsSectionInformation alloc] - initWithSectionID:ContentSuggestionsSectionArticles]; + initWithSectionID:ContentSuggestionsSectionMostVisited]; ContentSuggestionIdentifier* suggestionIdentifier1 = [[ContentSuggestionIdentifier alloc] init]; @@ -68,10 +68,10 @@ std::string id2("identifier2"); ContentSuggestionsSectionInformation* sectionInfo1 = [[ContentSuggestionsSectionInformation alloc] - initWithSectionID:ContentSuggestionsSectionArticles]; + initWithSectionID:ContentSuggestionsSectionMostVisited]; ContentSuggestionsSectionInformation* sectionInfo2 = [[ContentSuggestionsSectionInformation alloc] - initWithSectionID:ContentSuggestionsSectionReadingList]; + initWithSectionID:ContentSuggestionsSectionLogo]; ContentSuggestionIdentifier* suggestionIdentifier1 = [[ContentSuggestionIdentifier alloc] init];
diff --git a/ios/chrome/browser/ui/content_suggestions/identifier/content_suggestions_section_information.h b/ios/chrome/browser/ui/content_suggestions/identifier/content_suggestions_section_information.h index 5397557..9abdeb9 100644 --- a/ios/chrome/browser/ui/content_suggestions/identifier/content_suggestions_section_information.h +++ b/ios/chrome/browser/ui/content_suggestions/identifier/content_suggestions_section_information.h
@@ -22,9 +22,6 @@ ContentSuggestionsSectionReturnToRecentTab, ContentSuggestionsSectionPromo, ContentSuggestionsSectionMostVisited, - ContentSuggestionsSectionArticles, - ContentSuggestionsSectionReadingList, - ContentSuggestionsSectionLearnMore, ContentSuggestionsSectionDiscover, // Do not use this. It will trigger a DCHECK.
diff --git a/ios/chrome/browser/ui/content_suggestions/mediator_util.mm b/ios/chrome/browser/ui/content_suggestions/mediator_util.mm index a4ed707..66bf06c6 100644 --- a/ios/chrome/browser/ui/content_suggestions/mediator_util.mm +++ b/ios/chrome/browser/ui/content_suggestions/mediator_util.mm
@@ -58,10 +58,6 @@ return EmptySectionInfo(ContentSuggestionsSectionMostVisited); } -ContentSuggestionsSectionInformation* LearnMoreSectionInformation() { - return EmptySectionInfo(ContentSuggestionsSectionLearnMore); -} - ContentSuggestionsSectionInformation* DiscoverSectionInformation( BOOL isGoogleDefaultSearchProvider) { ContentSuggestionsSectionInformation* sectionInfo =
diff --git a/ios/chrome/browser/ui/context_menu/context_menu_configuration_provider.mm b/ios/chrome/browser/ui/context_menu/context_menu_configuration_provider.mm index 561ba9e0..fe9ff078 100644 --- a/ios/chrome/browser/ui/context_menu/context_menu_configuration_provider.mm +++ b/ios/chrome/browser/ui/context_menu/context_menu_configuration_provider.mm
@@ -214,9 +214,8 @@ if (!strongSelf) return; - id<BrowserCommands> handler = HandlerForProtocol( - strongSelf.browser->GetCommandDispatcher(), - BrowserCommands); + id<BrowserCommands> handler = static_cast<id<BrowserCommands>>( + strongSelf.browser->GetCommandDispatcher()); [handler addToReadingList:[[ReadingListAddCommand alloc] initWithURL:link title:innerText]]; @@ -307,10 +306,9 @@ inNewTab:YES]; id<BrowserCommands> handler = - HandlerForProtocol( + static_cast<id<BrowserCommands>>( strongSelf.browser - ->GetCommandDispatcher(), - BrowserCommands); + ->GetCommandDispatcher()); [handler searchByImage:command]; }); }]; @@ -552,8 +550,8 @@ base::RecordAction( base::UserMetricsAction("MobileWebContextMenuReadLater")); Record(ACTION_READ_LATER, isImage, isLink); - id<BrowserCommands> handler = HandlerForProtocol( - strongSelf.browser->GetCommandDispatcher(), BrowserCommands); + id<BrowserCommands> handler = static_cast<id<BrowserCommands>>( + strongSelf.browser->GetCommandDispatcher()); [handler addToReadingList:[[ReadingListAddCommand alloc] initWithURL:link title:innerText]]; @@ -684,8 +682,8 @@ URL:imageUrl inNewTab:YES]; - id<BrowserCommands> handler = HandlerForProtocol( - strongSelf.browser->GetCommandDispatcher(), BrowserCommands); + id<BrowserCommands> handler = static_cast<id<BrowserCommands>>( + strongSelf.browser->GetCommandDispatcher()); [handler searchByImage:command]; }); };
diff --git a/ios/chrome/browser/ui/dialogs/java_script_dialog_blocking_state.h b/ios/chrome/browser/ui/dialogs/java_script_dialog_blocking_state.h index 155faa594..45c9ec4 100644 --- a/ios/chrome/browser/ui/dialogs/java_script_dialog_blocking_state.h +++ b/ios/chrome/browser/ui/dialogs/java_script_dialog_blocking_state.h
@@ -20,6 +20,10 @@ : public web::WebStateUserData<JavaScriptDialogBlockingState>, public web::WebStateObserver { public: + JavaScriptDialogBlockingState(const JavaScriptDialogBlockingState&) = delete; + JavaScriptDialogBlockingState& operator=( + const JavaScriptDialogBlockingState&) = delete; + ~JavaScriptDialogBlockingState() override; // Whether to show the blocking option for the next JavaScript dialog from its @@ -57,8 +61,6 @@ web::NavigationItem* blocked_item_ = nullptr; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(JavaScriptDialogBlockingState); }; #endif // IOS_CHROME_BROWSER_UI_DIALOGS_JAVA_SCRIPT_DIALOG_BLOCKING_STATE_H_
diff --git a/ios/chrome/browser/ui/download/download_manager_mediator.h b/ios/chrome/browser/ui/download/download_manager_mediator.h index dd44a124..9f2f2f1 100644 --- a/ios/chrome/browser/ui/download/download_manager_mediator.h +++ b/ios/chrome/browser/ui/download/download_manager_mediator.h
@@ -28,6 +28,10 @@ class DownloadManagerMediator : public web::DownloadTaskObserver { public: DownloadManagerMediator(); + + DownloadManagerMediator(const DownloadManagerMediator&) = delete; + DownloadManagerMediator& operator=(const DownloadManagerMediator&) = delete; + ~DownloadManagerMediator() override; // Sets download manager consumer. Not retained by mediator. @@ -84,7 +88,6 @@ web::DownloadTask* task_ = nullptr; __weak id<DownloadManagerConsumer> consumer_ = nil; base::WeakPtrFactory<DownloadManagerMediator> weak_ptr_factory_; - DISALLOW_COPY_AND_ASSIGN(DownloadManagerMediator); }; #endif // IOS_CHROME_BROWSER_UI_DOWNLOAD_DOWNLOAD_MANAGER_MEDIATOR_H_
diff --git a/ios/chrome/browser/ui/first_run/ios_first_run_field_trials.h b/ios/chrome/browser/ui/first_run/ios_first_run_field_trials.h index fd278b26..c9a3cd78 100644 --- a/ios/chrome/browser/ui/first_run/ios_first_run_field_trials.h +++ b/ios/chrome/browser/ui/first_run/ios_first_run_field_trials.h
@@ -39,6 +39,10 @@ public: // Initializes with |trial_name| as the name of the FieldTrial. FirstRunFieldTrialConfig(const std::string& trial_name); + + FirstRunFieldTrialConfig(const FirstRunFieldTrialConfig&) = delete; + FirstRunFieldTrialConfig& operator=(const FirstRunFieldTrialConfig&) = delete; + ~FirstRunFieldTrialConfig(); // Creates and returns a one-time randomized FieldTrial with @@ -64,8 +68,6 @@ private: std::string trial_name_; std::vector<FirstRunFieldTrialGroup> groups_; - - DISALLOW_COPY_AND_ASSIGN(FirstRunFieldTrialConfig); }; #endif // IOS_CHROME_BROWSER_UI_FIRST_RUN_IOS_FIRST_RUN_FIELD_TRIALS_H_
diff --git a/ios/chrome/browser/ui/fullscreen/animated_scoped_fullscreen_disabler.h b/ios/chrome/browser/ui/fullscreen/animated_scoped_fullscreen_disabler.h index 3571be4..2911c01 100644 --- a/ios/chrome/browser/ui/fullscreen/animated_scoped_fullscreen_disabler.h +++ b/ios/chrome/browser/ui/fullscreen/animated_scoped_fullscreen_disabler.h
@@ -18,6 +18,12 @@ class AnimatedScopedFullscreenDisabler { public: explicit AnimatedScopedFullscreenDisabler(FullscreenController* controller); + + AnimatedScopedFullscreenDisabler(const AnimatedScopedFullscreenDisabler&) = + delete; + AnimatedScopedFullscreenDisabler& operator=( + const AnimatedScopedFullscreenDisabler&) = delete; + ~AnimatedScopedFullscreenDisabler(); // Adds and removes AnimatedScopedFullscreenDisablerObservers. @@ -37,8 +43,6 @@ observer_list_container_; // Whether this disabler is contributing to |controller_|'s disabled counter. bool disabling_ = false; - - DISALLOW_COPY_AND_ASSIGN(AnimatedScopedFullscreenDisabler); }; // Obsever class for listening to animated fullscreen disabling events.
diff --git a/ios/chrome/browser/ui/fullscreen/fullscreen_controller_observer.h b/ios/chrome/browser/ui/fullscreen/fullscreen_controller_observer.h index fd33de5..82a1715 100644 --- a/ios/chrome/browser/ui/fullscreen/fullscreen_controller_observer.h +++ b/ios/chrome/browser/ui/fullscreen/fullscreen_controller_observer.h
@@ -16,6 +16,11 @@ class FullscreenControllerObserver { public: FullscreenControllerObserver() = default; + + FullscreenControllerObserver(const FullscreenControllerObserver&) = delete; + FullscreenControllerObserver& operator=(const FullscreenControllerObserver&) = + delete; + virtual ~FullscreenControllerObserver() = default; // Invoked when the maximum or minimum viewport insets for |controller| have @@ -50,9 +55,6 @@ // Invoked when |controller| needs to resize its horizontal insets. // TODO(crbug.com/1114054) remove after fixing multiwindow resizing issue. virtual void ResizeHorizontalInsets(FullscreenController* controller) {} - - private: - DISALLOW_COPY_AND_ASSIGN(FullscreenControllerObserver); }; #endif // IOS_CHROME_BROWSER_UI_FULLSCREEN_FULLSCREEN_CONTROLLER_OBSERVER_H_
diff --git a/ios/chrome/browser/ui/fullscreen/fullscreen_mediator.h b/ios/chrome/browser/ui/fullscreen/fullscreen_mediator.h index 902d7fdf..f5c5c2d 100644 --- a/ios/chrome/browser/ui/fullscreen/fullscreen_mediator.h +++ b/ios/chrome/browser/ui/fullscreen/fullscreen_mediator.h
@@ -30,6 +30,10 @@ class FullscreenMediator : public FullscreenModelObserver { public: FullscreenMediator(FullscreenController* controller, FullscreenModel* model); + + FullscreenMediator(const FullscreenMediator&) = delete; + FullscreenMediator& operator=(const FullscreenMediator&) = delete; + ~FullscreenMediator() override; // Adds and removes FullscreenControllerObservers. @@ -97,8 +101,6 @@ base::ObserverList<FullscreenControllerObserver>::Unchecked observers_; base::WeakPtrFactory<FullscreenMediator> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FullscreenMediator); }; #endif // IOS_CHROME_BROWSER_UI_FULLSCREEN_FULLSCREEN_MEDIATOR_H_
diff --git a/ios/chrome/browser/ui/fullscreen/fullscreen_model.h b/ios/chrome/browser/ui/fullscreen/fullscreen_model.h index c3b7e09..1bf17e9 100644 --- a/ios/chrome/browser/ui/fullscreen/fullscreen_model.h +++ b/ios/chrome/browser/ui/fullscreen/fullscreen_model.h
@@ -20,6 +20,10 @@ class FullscreenModel : public ChromeBroadcastObserverInterface { public: FullscreenModel(); + + FullscreenModel(const FullscreenModel&) = delete; + FullscreenModel& operator=(const FullscreenModel&) = delete; + ~FullscreenModel() override; // Adds and removes FullscreenModelObservers. @@ -238,8 +242,6 @@ // The number of FullscreenModelObserver callbacks currently being executed. size_t observer_callback_count_ = 0; bool freeze_toolbar_height_ = false; - - DISALLOW_COPY_AND_ASSIGN(FullscreenModel); }; #endif // IOS_CHROME_BROWSER_UI_FULLSCREEN_FULLSCREEN_MODEL_H_
diff --git a/ios/chrome/browser/ui/fullscreen/fullscreen_model_observer.h b/ios/chrome/browser/ui/fullscreen/fullscreen_model_observer.h index c0797dd..0e89576 100644 --- a/ios/chrome/browser/ui/fullscreen/fullscreen_model_observer.h +++ b/ios/chrome/browser/ui/fullscreen/fullscreen_model_observer.h
@@ -15,6 +15,10 @@ class FullscreenModelObserver { public: FullscreenModelObserver() = default; + + FullscreenModelObserver(const FullscreenModelObserver&) = delete; + FullscreenModelObserver& operator=(const FullscreenModelObserver&) = delete; + virtual ~FullscreenModelObserver() = default; // Invoked when |model|'s toolbar heights have been updated. @@ -34,9 +38,6 @@ // Invoked when the model is reset. virtual void FullscreenModelWasReset(FullscreenModel* model) {} - - private: - DISALLOW_COPY_AND_ASSIGN(FullscreenModelObserver); }; #endif // IOS_CHROME_BROWSER_UI_FULLSCREEN_FULLSCREEN_MODEL_OBSERVER_H_
diff --git a/ios/chrome/browser/ui/fullscreen/scoped_fullscreen_disabler.h b/ios/chrome/browser/ui/fullscreen/scoped_fullscreen_disabler.h index 2d024ad..9b95ea3 100644 --- a/ios/chrome/browser/ui/fullscreen/scoped_fullscreen_disabler.h +++ b/ios/chrome/browser/ui/fullscreen/scoped_fullscreen_disabler.h
@@ -16,6 +16,10 @@ class ScopedFullscreenDisabler : public FullscreenControllerObserver { public: explicit ScopedFullscreenDisabler(FullscreenController* controller); + + ScopedFullscreenDisabler(const ScopedFullscreenDisabler&) = delete; + ScopedFullscreenDisabler& operator=(const ScopedFullscreenDisabler&) = delete; + ~ScopedFullscreenDisabler() override; private: @@ -27,8 +31,6 @@ scoped_observer_{this}; // The FullscreenController being disabled by this object. FullscreenController* controller_; - - DISALLOW_COPY_AND_ASSIGN(ScopedFullscreenDisabler); }; #endif // IOS_CHROME_BROWSER_UI_FULLSCREEN_SCOPED_FULLSCREEN_DISABLER_H_
diff --git a/ios/chrome/browser/ui/history/ios_browsing_history_driver.h b/ios/chrome/browser/ui/history/ios_browsing_history_driver.h index acad88d1..5d8f1fe 100644 --- a/ios/chrome/browser/ui/history/ios_browsing_history_driver.h +++ b/ios/chrome/browser/ui/history/ios_browsing_history_driver.h
@@ -26,6 +26,10 @@ public: IOSBrowsingHistoryDriver(ChromeBrowserState* browser_state, id<HistoryConsumer> consumer); + + IOSBrowsingHistoryDriver(const IOSBrowsingHistoryDriver&) = delete; + IOSBrowsingHistoryDriver& operator=(const IOSBrowsingHistoryDriver&) = delete; + ~IOSBrowsingHistoryDriver() override; private: @@ -55,8 +59,6 @@ // Consumer for IOSBrowsingHistoryDriver. Serves as client for HistoryService. __weak id<HistoryConsumer> consumer_; - - DISALLOW_COPY_AND_ASSIGN(IOSBrowsingHistoryDriver); }; #endif // IOS_CHROME_BROWSER_UI_HISTORY_IOS_BROWSING_HISTORY_DRIVER_H_
diff --git a/ios/chrome/browser/ui/infobars/test/test_infobar_password_delegate.mm b/ios/chrome/browser/ui/infobars/test/test_infobar_password_delegate.mm index d1f88b84..c633e13 100644 --- a/ios/chrome/browser/ui/infobars/test/test_infobar_password_delegate.mm +++ b/ios/chrome/browser/ui/infobars/test/test_infobar_password_delegate.mm
@@ -33,6 +33,10 @@ class MockFormSaver : public password_manager::StubFormSaver { public: MockFormSaver() = default; + + MockFormSaver(const MockFormSaver&) = delete; + MockFormSaver& operator=(const MockFormSaver&) = delete; + ~MockFormSaver() override = default; // FormSaver: @@ -51,9 +55,6 @@ return *static_cast<MockFormSaver*>( form_manager->profile_store_form_saver()); } - - private: - DISALLOW_COPY_AND_ASSIGN(MockFormSaver); }; std::unique_ptr<password_manager::CredentialManagerPasswordFormManager>
diff --git a/ios/chrome/browser/ui/location_bar/location_bar_model_delegate_ios.h b/ios/chrome/browser/ui/location_bar/location_bar_model_delegate_ios.h index db34704..626c72f 100644 --- a/ios/chrome/browser/ui/location_bar/location_bar_model_delegate_ios.h +++ b/ios/chrome/browser/ui/location_bar/location_bar_model_delegate_ios.h
@@ -21,6 +21,11 @@ public: // |web_state_list| must outlive this LocationBarModelDelegateIOS object. explicit LocationBarModelDelegateIOS(WebStateList* web_state_list); + + LocationBarModelDelegateIOS(const LocationBarModelDelegateIOS&) = delete; + LocationBarModelDelegateIOS& operator=(const LocationBarModelDelegateIOS&) = + delete; + ~LocationBarModelDelegateIOS() override; // LocationBarModelDelegate implementation: @@ -49,8 +54,6 @@ web::WebState* GetActiveWebState() const; WebStateList* web_state_list_; // weak - - DISALLOW_COPY_AND_ASSIGN(LocationBarModelDelegateIOS); }; #endif // IOS_CHROME_BROWSER_UI_LOCATION_BAR_LOCATION_BAR_MODEL_DELEGATE_IOS_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 fe244abab..ef24298 100644 --- a/ios/chrome/browser/ui/ntp/new_tab_page_coordinator.mm +++ b/ios/chrome/browser/ui/ntp/new_tab_page_coordinator.mm
@@ -254,7 +254,6 @@ self.discoverFeedViewController = [self discoverFeed]; } - self.contentSuggestionsCoordinator.feedVisible = [self isFeedVisible]; [self.contentSuggestionsCoordinator start]; [self configureNTPAsMainViewController]; self.ntpViewController.discoverFeedMetricsRecorder =
diff --git a/ios/chrome/browser/ui/ntp/notification_promo_whats_new.h b/ios/chrome/browser/ui/ntp/notification_promo_whats_new.h index be57d7f..a7fadda 100644 --- a/ios/chrome/browser/ui/ntp/notification_promo_whats_new.h +++ b/ios/chrome/browser/ui/ntp/notification_promo_whats_new.h
@@ -35,6 +35,11 @@ }; explicit NotificationPromoWhatsNew(PrefService* local_state); + + NotificationPromoWhatsNew(const NotificationPromoWhatsNew&) = delete; + NotificationPromoWhatsNew& operator=(const NotificationPromoWhatsNew&) = + delete; + ~NotificationPromoWhatsNew(); // Initialize from variations/prefs/JSON. @@ -114,8 +119,6 @@ // The lower-level notification promo. ios::NotificationPromo notification_promo_; - - DISALLOW_COPY_AND_ASSIGN(NotificationPromoWhatsNew); }; #endif // IOS_CHROME_BROWSER_UI_NTP_NOTIFICATION_PROMO_WHATS_NEW_H_
diff --git a/ios/chrome/browser/ui/omnibox/chrome_omnibox_client_ios.h b/ios/chrome/browser/ui/omnibox/chrome_omnibox_client_ios.h index ca4c7e9..23dcd14 100644 --- a/ios/chrome/browser/ui/omnibox/chrome_omnibox_client_ios.h +++ b/ios/chrome/browser/ui/omnibox/chrome_omnibox_client_ios.h
@@ -18,6 +18,10 @@ public: ChromeOmniboxClientIOS(WebOmniboxEditController* controller, ChromeBrowserState* browser_state); + + ChromeOmniboxClientIOS(const ChromeOmniboxClientIOS&) = delete; + ChromeOmniboxClientIOS& operator=(const ChromeOmniboxClientIOS&) = delete; + ~ChromeOmniboxClientIOS() override; // OmniboxClient. @@ -59,8 +63,6 @@ WebOmniboxEditController* controller_; ChromeBrowserState* browser_state_; AutocompleteSchemeClassifierImpl scheme_classifier_; - - DISALLOW_COPY_AND_ASSIGN(ChromeOmniboxClientIOS); }; #endif // IOS_CHROME_BROWSER_UI_OMNIBOX_CHROME_OMNIBOX_CLIENT_IOS_H_
diff --git a/ios/chrome/browser/ui/qr_scanner/qr_scanner_view_controller_egtest.mm b/ios/chrome/browser/ui/qr_scanner/qr_scanner_view_controller_egtest.mm index 44517dd..9532490 100644 --- a/ios/chrome/browser/ui/qr_scanner/qr_scanner_view_controller_egtest.mm +++ b/ios/chrome/browser/ui/qr_scanner/qr_scanner_view_controller_egtest.mm
@@ -44,6 +44,11 @@ isOn:YES]; } + ScopedQRScannerVoiceSearchOverride( + const ScopedQRScannerVoiceSearchOverride&) = delete; + ScopedQRScannerVoiceSearchOverride& operator=( + const ScopedQRScannerVoiceSearchOverride&) = delete; + ~ScopedQRScannerVoiceSearchOverride() { [QRScannerAppInterface overrideVoiceOverCheckForQRScannerViewController: scanner_view_controller_ @@ -52,8 +57,6 @@ private: UIViewController* scanner_view_controller_; - - DISALLOW_COPY_AND_ASSIGN(ScopedQRScannerVoiceSearchOverride); }; // TODO(crbug.com/1015113) The EG2 macro is breaking indexing for some reason
diff --git a/ios/chrome/browser/ui/recent_tabs/closed_tabs_observer_bridge.h b/ios/chrome/browser/ui/recent_tabs/closed_tabs_observer_bridge.h index 356a8a7..cd9492e 100644 --- a/ios/chrome/browser/ui/recent_tabs/closed_tabs_observer_bridge.h +++ b/ios/chrome/browser/ui/recent_tabs/closed_tabs_observer_bridge.h
@@ -25,6 +25,10 @@ class ClosedTabsObserverBridge : public sessions::TabRestoreServiceObserver { public: explicit ClosedTabsObserverBridge(id<ClosedTabsObserving> owner); + + ClosedTabsObserverBridge(const ClosedTabsObserverBridge&) = delete; + ClosedTabsObserverBridge& operator=(const ClosedTabsObserverBridge&) = delete; + ~ClosedTabsObserverBridge() override; // sessions::TabRestoreServiceObserver implementation. @@ -34,8 +38,6 @@ private: __weak id<ClosedTabsObserving> owner_; - - DISALLOW_COPY_AND_ASSIGN(ClosedTabsObserverBridge); }; } // namespace recent_tabs
diff --git a/ios/chrome/browser/ui/recent_tabs/synced_sessions.h b/ios/chrome/browser/ui/recent_tabs/synced_sessions.h index 23f8f48..17e1d1dc3 100644 --- a/ios/chrome/browser/ui/recent_tabs/synced_sessions.h +++ b/ios/chrome/browser/ui/recent_tabs/synced_sessions.h
@@ -54,6 +54,10 @@ // |sync_service|. |sync_service| must not be null. DistantSession(sync_sessions::SessionSyncService* sync_service, const std::string& tag); + + DistantSession(const DistantSession&) = delete; + DistantSession& operator=(const DistantSession&) = delete; + ~DistantSession(); void InitWithSyncedSession(const sync_sessions::SyncedSession* synced_session, sync_sessions::OpenTabsUIDelegate* open_tabs); @@ -62,8 +66,6 @@ base::Time modified_time; sync_pb::SyncEnums::DeviceType device_type; std::vector<std::unique_ptr<DistantTab>> tabs; - - DISALLOW_COPY_AND_ASSIGN(DistantSession); }; // Class containing distant sessions. @@ -76,6 +78,10 @@ explicit SyncedSessions(sync_sessions::SessionSyncService* sync_service); SyncedSessions(sync_sessions::SessionSyncService* sync_service, const std::string& tag); + + SyncedSessions(const SyncedSessions&) = delete; + SyncedSessions& operator=(const SyncedSessions&) = delete; + ~SyncedSessions(); DistantSession const* GetSession(size_t index) const; DistantSession const* GetSessionWithTag(const std::string& tag) const; @@ -88,8 +94,6 @@ private: std::vector<std::unique_ptr<const DistantSession>> sessions_; - - DISALLOW_COPY_AND_ASSIGN(SyncedSessions); }; } // namespace synced_sessions
diff --git a/ios/chrome/browser/ui/recent_tabs/synced_sessions_bridge.h b/ios/chrome/browser/ui/recent_tabs/synced_sessions_bridge.h index 5e132c0e..2f29037 100644 --- a/ios/chrome/browser/ui/recent_tabs/synced_sessions_bridge.h +++ b/ios/chrome/browser/ui/recent_tabs/synced_sessions_bridge.h
@@ -32,6 +32,11 @@ public: SyncedSessionsObserverBridge(id<SyncedSessionsObserver> owner, ChromeBrowserState* browserState); + + SyncedSessionsObserverBridge(const SyncedSessionsObserverBridge&) = delete; + SyncedSessionsObserverBridge& operator=(const SyncedSessionsObserverBridge&) = + delete; + ~SyncedSessionsObserverBridge() override; // signin::IdentityManager::Observer implementation. void OnPrimaryAccountChanged( @@ -49,8 +54,6 @@ signin::IdentityManager::Observer> identity_manager_observation_{this}; base::CallbackListSubscription foreign_session_updated_subscription_; - - DISALLOW_COPY_AND_ASSIGN(SyncedSessionsObserverBridge); }; } // namespace synced_sessions
diff --git a/ios/chrome/browser/ui/settings/block_popups_egtest.mm b/ios/chrome/browser/ui/settings/block_popups_egtest.mm index 713ef40..3228fef 100644 --- a/ios/chrome/browser/ui/settings/block_popups_egtest.mm +++ b/ios/chrome/browser/ui/settings/block_popups_egtest.mm
@@ -66,6 +66,11 @@ [BlockPopupsAppInterface setPopupPolicy:CONTENT_SETTING_ALLOW forPattern:pattern_]; } + + ScopedBlockPopupsException(const ScopedBlockPopupsException&) = delete; + ScopedBlockPopupsException& operator=(const ScopedBlockPopupsException&) = + delete; + ~ScopedBlockPopupsException() { [BlockPopupsAppInterface setPopupPolicy:CONTENT_SETTING_DEFAULT forPattern:pattern_]; @@ -74,8 +79,6 @@ private: // The exception pattern that this object is managing. NSString* pattern_; - - DISALLOW_COPY_AND_ASSIGN(ScopedBlockPopupsException); }; } // namespace
diff --git a/ios/chrome/browser/ui/settings/personal_data_manager_finished_profile_tasks_waiter.h b/ios/chrome/browser/ui/settings/personal_data_manager_finished_profile_tasks_waiter.h index 186348f..37996927 100644 --- a/ios/chrome/browser/ui/settings/personal_data_manager_finished_profile_tasks_waiter.h +++ b/ios/chrome/browser/ui/settings/personal_data_manager_finished_profile_tasks_waiter.h
@@ -26,6 +26,12 @@ public: PersonalDataManagerFinishedProfileTasksWaiter( autofill::PersonalDataManager* personal_data_manager); + + PersonalDataManagerFinishedProfileTasksWaiter( + const PersonalDataManagerFinishedProfileTasksWaiter&) = delete; + PersonalDataManagerFinishedProfileTasksWaiter& operator=( + const PersonalDataManagerFinishedProfileTasksWaiter&) = delete; + ~PersonalDataManagerFinishedProfileTasksWaiter() override; // Blocks until |OnPersonalDataFinishedProfileTasks| is invoked at the end of @@ -39,8 +45,6 @@ private: autofill::PersonalDataManager* personal_data_manager_; base::RunLoop run_loop_; - - DISALLOW_COPY_AND_ASSIGN(PersonalDataManagerFinishedProfileTasksWaiter); }; #endif // IOS_CHROME_BROWSER_UI_SETTINGS_PERSONAL_DATA_MANAGER_FINISHED_PROFILE_TASKS_WAITER_H_
diff --git a/ios/chrome/browser/ui/settings/sync/utils/sync_error_infobar_delegate.h b/ios/chrome/browser/ui/settings/sync/utils/sync_error_infobar_delegate.h index 39b54668..f83a9f5 100644 --- a/ios/chrome/browser/ui/settings/sync/utils/sync_error_infobar_delegate.h +++ b/ios/chrome/browser/ui/settings/sync/utils/sync_error_infobar_delegate.h
@@ -31,6 +31,10 @@ public: SyncErrorInfoBarDelegate(ChromeBrowserState* browser_state, id<SyncPresenter> presenter); + + SyncErrorInfoBarDelegate(const SyncErrorInfoBarDelegate&) = delete; + SyncErrorInfoBarDelegate& operator=(const SyncErrorInfoBarDelegate&) = delete; + ~SyncErrorInfoBarDelegate() override; // Creates a sync error infobar and adds it to |infobar_manager|. @@ -59,8 +63,6 @@ std::u16string message_; std::u16string button_text_; id<SyncPresenter> presenter_; - - DISALLOW_COPY_AND_ASSIGN(SyncErrorInfoBarDelegate); }; #endif // IOS_CHROME_BROWSER_UI_SETTINGS_SYNC_UTILS_SYNC_ERROR_INFOBAR_DELEGATE_H_
diff --git a/ios/chrome/browser/ui/side_swipe/side_swipe_controller.mm b/ios/chrome/browser/ui/side_swipe/side_swipe_controller.mm index 963aa75..a71b18d2 100644 --- a/ios/chrome/browser/ui/side_swipe/side_swipe_controller.mm +++ b/ios/chrome/browser/ui/side_swipe/side_swipe_controller.mm
@@ -677,13 +677,13 @@ } // If the previous page is an NTP, enable leading edge swipe. - web::NavigationItemList backItems = + std::vector<web::NavigationItem*> backItems = webState->GetNavigationManager()->GetBackwardItems(); if (backItems.size() > 0 && UseNativeSwipe(backItems[0])) self.leadingEdgeNavigationEnabled = YES; // If the next page is an NTP, enable trailing edge swipe. - web::NavigationItemList fordwardItems = + std::vector<web::NavigationItem*> fordwardItems = webState->GetNavigationManager()->GetForwardItems(); if (fordwardItems.size() > 0 && UseNativeSwipe(fordwardItems[0])) self.trailingEdgeNavigationEnabled = YES;
diff --git a/ios/chrome/browser/ui/webui/about_ui.h b/ios/chrome/browser/ui/webui/about_ui.h index 6a5495b..00a0ef3 100644 --- a/ios/chrome/browser/ui/webui/about_ui.h +++ b/ios/chrome/browser/ui/webui/about_ui.h
@@ -19,10 +19,11 @@ class AboutUI : public web::WebUIIOSController { public: explicit AboutUI(web::WebUIIOS* web_ui, const std::string& name); - ~AboutUI() override; - private: - DISALLOW_COPY_AND_ASSIGN(AboutUI); + AboutUI(const AboutUI&) = delete; + AboutUI& operator=(const AboutUI&) = delete; + + ~AboutUI() override; }; #endif // IOS_CHROME_BROWSER_UI_WEBUI_ABOUT_UI_H_
diff --git a/ios/chrome/browser/ui/webui/autofill_and_password_manager_internals/autofill_internals_ui_ios.h b/ios/chrome/browser/ui/webui/autofill_and_password_manager_internals/autofill_internals_ui_ios.h index a93d9b2..b0e7563 100644 --- a/ios/chrome/browser/ui/webui/autofill_and_password_manager_internals/autofill_internals_ui_ios.h +++ b/ios/chrome/browser/ui/webui/autofill_and_password_manager_internals/autofill_internals_ui_ios.h
@@ -15,10 +15,11 @@ public: explicit AutofillInternalsUIIOS(web::WebUIIOS* web_ui, const std::string& host); - ~AutofillInternalsUIIOS() override; - private: - DISALLOW_COPY_AND_ASSIGN(AutofillInternalsUIIOS); + AutofillInternalsUIIOS(const AutofillInternalsUIIOS&) = delete; + AutofillInternalsUIIOS& operator=(const AutofillInternalsUIIOS&) = delete; + + ~AutofillInternalsUIIOS() override; }; #endif // IOS_CHROME_BROWSER_UI_WEBUI_AUTOFILL_AND_PASSWORD_MANAGER_INTERNALS_AUTOFILL_INTERNALS_UI_IOS_H_
diff --git a/ios/chrome/browser/ui/webui/autofill_and_password_manager_internals/internals_ui_handler.h b/ios/chrome/browser/ui/webui/autofill_and_password_manager_internals/internals_ui_handler.h index ec07d525..1d115867 100644 --- a/ios/chrome/browser/ui/webui/autofill_and_password_manager_internals/internals_ui_handler.h +++ b/ios/chrome/browser/ui/webui/autofill_and_password_manager_internals/internals_ui_handler.h
@@ -37,6 +37,10 @@ explicit InternalsUIHandler(std::string call_on_load, GetLogRouterFunction get_log_router_function); + + InternalsUIHandler(const InternalsUIHandler&) = delete; + InternalsUIHandler& operator=(const InternalsUIHandler&) = delete; + ~InternalsUIHandler() override; private: @@ -58,8 +62,6 @@ // Whether |this| is registered as a log receiver with the LogRouter. bool registered_with_log_router_ = false; - - DISALLOW_COPY_AND_ASSIGN(InternalsUIHandler); }; } // namespace autofill
diff --git a/ios/chrome/browser/ui/webui/autofill_and_password_manager_internals/password_manager_internals_ui_ios.h b/ios/chrome/browser/ui/webui/autofill_and_password_manager_internals/password_manager_internals_ui_ios.h index fb485bba..fe198fe 100644 --- a/ios/chrome/browser/ui/webui/autofill_and_password_manager_internals/password_manager_internals_ui_ios.h +++ b/ios/chrome/browser/ui/webui/autofill_and_password_manager_internals/password_manager_internals_ui_ios.h
@@ -15,10 +15,12 @@ public: explicit PasswordManagerInternalsUIIOS(web::WebUIIOS* web_ui, const std::string& host); - ~PasswordManagerInternalsUIIOS() override; - private: - DISALLOW_COPY_AND_ASSIGN(PasswordManagerInternalsUIIOS); + PasswordManagerInternalsUIIOS(const PasswordManagerInternalsUIIOS&) = delete; + PasswordManagerInternalsUIIOS& operator=( + const PasswordManagerInternalsUIIOS&) = delete; + + ~PasswordManagerInternalsUIIOS() override; }; #endif // IOS_CHROME_BROWSER_UI_WEBUI_AUTOFILL_AND_PASSWORD_MANAGER_INTERNALS_PASSWORD_MANAGER_INTERNALS_UI_IOS_H_
diff --git a/ios/chrome/browser/ui/webui/crashes_ui.cc b/ios/chrome/browser/ui/webui/crashes_ui.cc index bc868274..6161d12a 100644 --- a/ios/chrome/browser/ui/webui/crashes_ui.cc +++ b/ios/chrome/browser/ui/webui/crashes_ui.cc
@@ -65,6 +65,10 @@ class CrashesDOMHandler : public web::WebUIIOSMessageHandler { public: CrashesDOMHandler(); + + CrashesDOMHandler(const CrashesDOMHandler&) = delete; + CrashesDOMHandler& operator=(const CrashesDOMHandler&) = delete; + ~CrashesDOMHandler() override; // WebUIMessageHandler implementation. @@ -84,8 +88,6 @@ scoped_refptr<UploadList> upload_list_; bool list_available_; bool first_load_; - - DISALLOW_COPY_AND_ASSIGN(CrashesDOMHandler); }; CrashesDOMHandler::CrashesDOMHandler()
diff --git a/ios/chrome/browser/ui/webui/flags_ui.cc b/ios/chrome/browser/ui/webui/flags_ui.cc index 344edce..85191f90 100644 --- a/ios/chrome/browser/ui/webui/flags_ui.cc +++ b/ios/chrome/browser/ui/webui/flags_ui.cc
@@ -60,6 +60,10 @@ class FlagsDOMHandler : public web::WebUIIOSMessageHandler { public: FlagsDOMHandler() : access_(flags_ui::kGeneralAccessFlagsOnly) {} + + FlagsDOMHandler(const FlagsDOMHandler&) = delete; + FlagsDOMHandler& operator=(const FlagsDOMHandler&) = delete; + ~FlagsDOMHandler() override {} // Initializes the DOM handler with the provided flags storage and flags @@ -86,8 +90,6 @@ private: std::unique_ptr<flags_ui::FlagsStorage> flags_storage_; flags_ui::FlagAccess access_; - - DISALLOW_COPY_AND_ASSIGN(FlagsDOMHandler); }; void FlagsDOMHandler::RegisterMessages() {
diff --git a/ios/chrome/browser/ui/webui/flags_ui.h b/ios/chrome/browser/ui/webui/flags_ui.h index b676cc8..3c33c44 100644 --- a/ios/chrome/browser/ui/webui/flags_ui.h +++ b/ios/chrome/browser/ui/webui/flags_ui.h
@@ -18,12 +18,15 @@ class FlagsUI : public web::WebUIIOSController { public: explicit FlagsUI(web::WebUIIOS* web_ui, const std::string& host); + + FlagsUI(const FlagsUI&) = delete; + FlagsUI& operator=(const FlagsUI&) = delete; + ~FlagsUI() override; static void AddFlagsIOSStrings(web::WebUIIOSDataSource* source); private: base::WeakPtrFactory<FlagsUI> weak_factory_; - DISALLOW_COPY_AND_ASSIGN(FlagsUI); }; #endif // IOS_CHROME_BROWSER_UI_WEBUI_FLAGS_UI_H_
diff --git a/ios/chrome/browser/ui/webui/gcm/gcm_internals_ui.cc b/ios/chrome/browser/ui/webui/gcm/gcm_internals_ui.cc index e4a181ad..e4745a29 100644 --- a/ios/chrome/browser/ui/webui/gcm/gcm_internals_ui.cc +++ b/ios/chrome/browser/ui/webui/gcm/gcm_internals_ui.cc
@@ -31,6 +31,11 @@ class GcmInternalsUIMessageHandler : public web::WebUIIOSMessageHandler { public: GcmInternalsUIMessageHandler(); + + GcmInternalsUIMessageHandler(const GcmInternalsUIMessageHandler&) = delete; + GcmInternalsUIMessageHandler& operator=(const GcmInternalsUIMessageHandler&) = + delete; + ~GcmInternalsUIMessageHandler() override; // WebUIMessageHandler implementation. @@ -55,8 +60,6 @@ // Factory for creating references in callbacks. base::WeakPtrFactory<GcmInternalsUIMessageHandler> weak_ptr_factory_; - - DISALLOW_COPY_AND_ASSIGN(GcmInternalsUIMessageHandler); }; GcmInternalsUIMessageHandler::GcmInternalsUIMessageHandler()
diff --git a/ios/chrome/browser/ui/webui/gcm/gcm_internals_ui.h b/ios/chrome/browser/ui/webui/gcm/gcm_internals_ui.h index a61a03a..14e46b9 100644 --- a/ios/chrome/browser/ui/webui/gcm/gcm_internals_ui.h +++ b/ios/chrome/browser/ui/webui/gcm/gcm_internals_ui.h
@@ -18,10 +18,11 @@ class GCMInternalsUI : public web::WebUIIOSController { public: explicit GCMInternalsUI(web::WebUIIOS* web_ui, const std::string& host); - ~GCMInternalsUI() override; - private: - DISALLOW_COPY_AND_ASSIGN(GCMInternalsUI); + GCMInternalsUI(const GCMInternalsUI&) = delete; + GCMInternalsUI& operator=(const GCMInternalsUI&) = delete; + + ~GCMInternalsUI() override; }; #endif // IOS_CHROME_BROWSER_UI_WEBUI_GCM_GCM_INTERNALS_UI_H_
diff --git a/ios/chrome/browser/ui/webui/inspect/inspect_ui.h b/ios/chrome/browser/ui/webui/inspect/inspect_ui.h index 4939422..cce1387 100644 --- a/ios/chrome/browser/ui/webui/inspect/inspect_ui.h +++ b/ios/chrome/browser/ui/webui/inspect/inspect_ui.h
@@ -15,10 +15,11 @@ class InspectUI : public web::WebUIIOSController { public: explicit InspectUI(web::WebUIIOS* web_ui, const std::string& host); - ~InspectUI() override; - private: - DISALLOW_COPY_AND_ASSIGN(InspectUI); + InspectUI(const InspectUI&) = delete; + InspectUI& operator=(const InspectUI&) = delete; + + ~InspectUI() override; }; #endif // IOS_CHROME_BROWSER_UI_WEBUI_INSPECT_INSPECT_UI_H_
diff --git a/ios/chrome/browser/ui/webui/inspect/inspect_ui.mm b/ios/chrome/browser/ui/webui/inspect/inspect_ui.mm index 0bee517..b192c13 100644 --- a/ios/chrome/browser/ui/webui/inspect/inspect_ui.mm +++ b/ios/chrome/browser/ui/webui/inspect/inspect_ui.mm
@@ -61,6 +61,10 @@ public JavaScriptConsoleFeatureDelegate { public: InspectDOMHandler(); + + InspectDOMHandler(const InspectDOMHandler&) = delete; + InspectDOMHandler& operator=(const InspectDOMHandler&) = delete; + ~InspectDOMHandler() override; // WebUIIOSMessageHandler implementation @@ -81,8 +85,6 @@ // Whether or not logging is enabled. bool logging_enabled_ = false; - - DISALLOW_COPY_AND_ASSIGN(InspectDOMHandler); }; InspectDOMHandler::InspectDOMHandler() {}
diff --git a/ios/chrome/browser/ui/webui/net_export/net_export_ui.mm b/ios/chrome/browser/ui/webui/net_export/net_export_ui.mm index 67a0bdf..2a1ed44 100644 --- a/ios/chrome/browser/ui/webui/net_export/net_export_ui.mm +++ b/ios/chrome/browser/ui/webui/net_export/net_export_ui.mm
@@ -56,6 +56,10 @@ public net_log::NetExportFileWriter::StateObserver { public: NetExportMessageHandler(); + + NetExportMessageHandler(const NetExportMessageHandler&) = delete; + NetExportMessageHandler& operator=(const NetExportMessageHandler&) = delete; + ~NetExportMessageHandler() override; // WebUIMessageHandler implementation. @@ -86,8 +90,6 @@ state_observation_manager_{this}; base::WeakPtrFactory<NetExportMessageHandler> weak_ptr_factory_; - - DISALLOW_COPY_AND_ASSIGN(NetExportMessageHandler); }; NetExportMessageHandler::NetExportMessageHandler()
diff --git a/ios/chrome/browser/ui/webui/ntp_tiles_internals_ui.h b/ios/chrome/browser/ui/webui/ntp_tiles_internals_ui.h index da7a21c..5b73475 100644 --- a/ios/chrome/browser/ui/webui/ntp_tiles_internals_ui.h +++ b/ios/chrome/browser/ui/webui/ntp_tiles_internals_ui.h
@@ -14,10 +14,11 @@ class NTPTilesInternalsUI : public web::WebUIIOSController { public: explicit NTPTilesInternalsUI(web::WebUIIOS* web_ui, const std::string& host); - ~NTPTilesInternalsUI() override; - private: - DISALLOW_COPY_AND_ASSIGN(NTPTilesInternalsUI); + NTPTilesInternalsUI(const NTPTilesInternalsUI&) = delete; + NTPTilesInternalsUI& operator=(const NTPTilesInternalsUI&) = delete; + + ~NTPTilesInternalsUI() override; }; #endif // IOS_CHROME_BROWSER_UI_WEBUI_NTP_TILES_INTERNALS_UI_H_
diff --git a/ios/chrome/browser/ui/webui/omaha_ui.cc b/ios/chrome/browser/ui/webui/omaha_ui.cc index 1a844db4..e7e1f17 100644 --- a/ios/chrome/browser/ui/webui/omaha_ui.cc +++ b/ios/chrome/browser/ui/webui/omaha_ui.cc
@@ -37,6 +37,10 @@ class OmahaDOMHandler : public WebUIIOSMessageHandler { public: OmahaDOMHandler(); + + OmahaDOMHandler(const OmahaDOMHandler&) = delete; + OmahaDOMHandler& operator=(const OmahaDOMHandler&) = delete; + ~OmahaDOMHandler() override; // WebUIIOSMessageHandler implementation. @@ -52,8 +56,6 @@ // WeakPtr factory needed because this object might be deleted before // receiving the callbacks from the OmahaService. base::WeakPtrFactory<OmahaDOMHandler> weak_ptr_factory_; - - DISALLOW_COPY_AND_ASSIGN(OmahaDOMHandler); }; OmahaDOMHandler::OmahaDOMHandler() : weak_ptr_factory_(this) {}
diff --git a/ios/chrome/browser/ui/webui/omaha_ui.h b/ios/chrome/browser/ui/webui/omaha_ui.h index 5b29ede..5bec250 100644 --- a/ios/chrome/browser/ui/webui/omaha_ui.h +++ b/ios/chrome/browser/ui/webui/omaha_ui.h
@@ -13,10 +13,11 @@ class OmahaUI : public web::WebUIIOSController { public: explicit OmahaUI(web::WebUIIOS* web_ui, const std::string& host); - ~OmahaUI() override; - private: - DISALLOW_COPY_AND_ASSIGN(OmahaUI); + OmahaUI(const OmahaUI&) = delete; + OmahaUI& operator=(const OmahaUI&) = delete; + + ~OmahaUI() override; }; #endif // IOS_CHROME_BROWSER_UI_WEBUI_OMAHA_UI_H_
diff --git a/ios/chrome/browser/ui/webui/prefs_internals_ui.cc b/ios/chrome/browser/ui/webui/prefs_internals_ui.cc index 02fae48..2405712 100644 --- a/ios/chrome/browser/ui/webui/prefs_internals_ui.cc +++ b/ios/chrome/browser/ui/webui/prefs_internals_ui.cc
@@ -23,6 +23,10 @@ public: explicit PrefsInternalsSource(ChromeBrowserState* browser_state) : browser_state_(browser_state) {} + + PrefsInternalsSource(const PrefsInternalsSource&) = delete; + PrefsInternalsSource& operator=(const PrefsInternalsSource&) = delete; + ~PrefsInternalsSource() override = default; // content::URLDataSource: @@ -53,8 +57,6 @@ private: ChromeBrowserState* browser_state_; - - DISALLOW_COPY_AND_ASSIGN(PrefsInternalsSource); }; } // namespace
diff --git a/ios/chrome/browser/ui/webui/prefs_internals_ui.h b/ios/chrome/browser/ui/webui/prefs_internals_ui.h index fcdf009fe..6ae1669 100644 --- a/ios/chrome/browser/ui/webui/prefs_internals_ui.h +++ b/ios/chrome/browser/ui/webui/prefs_internals_ui.h
@@ -19,10 +19,11 @@ class PrefsInternalsUI : public web::WebUIIOSController { public: explicit PrefsInternalsUI(web::WebUIIOS* web_ui, const std::string& host); - ~PrefsInternalsUI() override; - private: - DISALLOW_COPY_AND_ASSIGN(PrefsInternalsUI); + PrefsInternalsUI(const PrefsInternalsUI&) = delete; + PrefsInternalsUI& operator=(const PrefsInternalsUI&) = delete; + + ~PrefsInternalsUI() override; }; #endif // IOS_CHROME_BROWSER_UI_WEBUI_PREFS_INTERNALS_UI_H_
diff --git a/ios/chrome/browser/ui/webui/terms_ui.h b/ios/chrome/browser/ui/webui/terms_ui.h index acad35a..cfcaa9b 100644 --- a/ios/chrome/browser/ui/webui/terms_ui.h +++ b/ios/chrome/browser/ui/webui/terms_ui.h
@@ -14,10 +14,11 @@ class TermsUI : public web::WebUIIOSController { public: TermsUI(web::WebUIIOS* web_ui, const std::string& name); - ~TermsUI() override; - private: - DISALLOW_COPY_AND_ASSIGN(TermsUI); + TermsUI(const TermsUI&) = delete; + TermsUI& operator=(const TermsUI&) = delete; + + ~TermsUI() override; }; #endif // IOS_CHROME_BROWSER_UI_WEBUI_TERMS_UI_H_
diff --git a/ios/chrome/browser/ui/webui/translate_internals/translate_internals_ui.h b/ios/chrome/browser/ui/webui/translate_internals/translate_internals_ui.h index ca40465..c76939e 100644 --- a/ios/chrome/browser/ui/webui/translate_internals/translate_internals_ui.h +++ b/ios/chrome/browser/ui/webui/translate_internals/translate_internals_ui.h
@@ -18,10 +18,11 @@ class TranslateInternalsUI : public web::WebUIIOSController { public: explicit TranslateInternalsUI(web::WebUIIOS* web_ui, const std::string& host); - ~TranslateInternalsUI() override; - private: - DISALLOW_COPY_AND_ASSIGN(TranslateInternalsUI); + TranslateInternalsUI(const TranslateInternalsUI&) = delete; + TranslateInternalsUI& operator=(const TranslateInternalsUI&) = delete; + + ~TranslateInternalsUI() override; }; #endif // IOS_CHROME_BROWSER_UI_WEBUI_TRANSLATE_INTERNALS_TRANSLATE_INTERNALS_UI_H_
diff --git a/ios/chrome/browser/ui/webui/ukm_internals_ui.cc b/ios/chrome/browser/ui/webui/ukm_internals_ui.cc index 1356f4b..3d8a16d 100644 --- a/ios/chrome/browser/ui/webui/ukm_internals_ui.cc +++ b/ios/chrome/browser/ui/webui/ukm_internals_ui.cc
@@ -33,6 +33,10 @@ class UkmMessageHandler : public web::WebUIIOSMessageHandler { public: explicit UkmMessageHandler(const ukm::UkmService* ukm_service); + + UkmMessageHandler(const UkmMessageHandler&) = delete; + UkmMessageHandler& operator=(const UkmMessageHandler&) = delete; + ~UkmMessageHandler() override; // web::WebUIIOSMessageHandler implementation. @@ -42,8 +46,6 @@ void HandleRequestUkmData(const base::ListValue* args); const ukm::UkmService* ukm_service_; - - DISALLOW_COPY_AND_ASSIGN(UkmMessageHandler); }; UkmMessageHandler::UkmMessageHandler(const ukm::UkmService* ukm_service)
diff --git a/ios/chrome/browser/ui/webui/ukm_internals_ui.h b/ios/chrome/browser/ui/webui/ukm_internals_ui.h index 394aeb4..39344ea 100644 --- a/ios/chrome/browser/ui/webui/ukm_internals_ui.h +++ b/ios/chrome/browser/ui/webui/ukm_internals_ui.h
@@ -18,10 +18,11 @@ class UkmInternalsUI : public web::WebUIIOSController { public: explicit UkmInternalsUI(web::WebUIIOS* web_ui, const std::string& host); - ~UkmInternalsUI() override; - private: - DISALLOW_COPY_AND_ASSIGN(UkmInternalsUI); + UkmInternalsUI(const UkmInternalsUI&) = delete; + UkmInternalsUI& operator=(const UkmInternalsUI&) = delete; + + ~UkmInternalsUI() override; }; #endif // IOS_CHROME_BROWSER_UI_WEBUI_UKM_INTERNALS_UI_H_
diff --git a/ios/chrome/browser/ui/webui/user_actions_handler.h b/ios/chrome/browser/ui/webui/user_actions_handler.h index d0f554d..5938bbaa 100644 --- a/ios/chrome/browser/ui/webui/user_actions_handler.h +++ b/ios/chrome/browser/ui/webui/user_actions_handler.h
@@ -21,6 +21,10 @@ class UserActionsHandler : public web::WebUIIOSMessageHandler { public: UserActionsHandler(); + + UserActionsHandler(const UserActionsHandler&) = delete; + UserActionsHandler& operator=(const UserActionsHandler&) = delete; + ~UserActionsHandler() override; // WebUIIOSMessageHandler. @@ -32,8 +36,6 @@ // The callback to invoke whenever a user action is registered. base::ActionCallback action_callback_; - - DISALLOW_COPY_AND_ASSIGN(UserActionsHandler); }; #endif // IOS_CHROME_BROWSER_UI_WEBUI_USER_ACTIONS_HANDLER_H_
diff --git a/ios/chrome/browser/ui/webui/user_actions_ui.h b/ios/chrome/browser/ui/webui/user_actions_ui.h index 7d0233e..b368caf 100644 --- a/ios/chrome/browser/ui/webui/user_actions_ui.h +++ b/ios/chrome/browser/ui/webui/user_actions_ui.h
@@ -14,10 +14,11 @@ class UserActionsUI : public web::WebUIIOSController { public: explicit UserActionsUI(web::WebUIIOS* web_ui, const std::string& host); - ~UserActionsUI() override; - private: - DISALLOW_COPY_AND_ASSIGN(UserActionsUI); + UserActionsUI(const UserActionsUI&) = delete; + UserActionsUI& operator=(const UserActionsUI&) = delete; + + ~UserActionsUI() override; }; #endif // IOS_CHROME_BROWSER_UI_WEBUI_USER_ACTIONS_UI_H_
diff --git a/ios/chrome/browser/ui/webui/version_handler.h b/ios/chrome/browser/ui/webui/version_handler.h index 0fa7f849..e941af4 100644 --- a/ios/chrome/browser/ui/webui/version_handler.h +++ b/ios/chrome/browser/ui/webui/version_handler.h
@@ -16,6 +16,10 @@ class VersionHandler : public web::WebUIIOSMessageHandler { public: VersionHandler(); + + VersionHandler(const VersionHandler&) = delete; + VersionHandler& operator=(const VersionHandler&) = delete; + ~VersionHandler() override; // content::WebUIMessageHandler implementation. @@ -24,9 +28,6 @@ // Callback for the "requestVariationInfo" message. This responds immediately // with the list of variations. void HandleRequestVariationInfo(const base::ListValue* args); - - private: - DISALLOW_COPY_AND_ASSIGN(VersionHandler); }; #endif // IOS_CHROME_BROWSER_UI_WEBUI_VERSION_HANDLER_H_
diff --git a/ios/chrome/browser/ui/webui/version_ui.h b/ios/chrome/browser/ui/webui/version_ui.h index 9f4e480..989cd1ce 100644 --- a/ios/chrome/browser/ui/webui/version_ui.h +++ b/ios/chrome/browser/ui/webui/version_ui.h
@@ -14,10 +14,11 @@ class VersionUI : public web::WebUIIOSController { public: explicit VersionUI(web::WebUIIOS* web_ui, const std::string& host); - ~VersionUI() override; - private: - DISALLOW_COPY_AND_ASSIGN(VersionUI); + VersionUI(const VersionUI&) = delete; + VersionUI& operator=(const VersionUI&) = delete; + + ~VersionUI() override; }; #endif // IOS_CHROME_BROWSER_UI_WEBUI_VERSION_UI_H_
diff --git a/ios/chrome/browser/update_client/ios_chrome_update_query_params_delegate.h b/ios/chrome/browser/update_client/ios_chrome_update_query_params_delegate.h index 592e738..c6c7e4f8 100644 --- a/ios/chrome/browser/update_client/ios_chrome_update_query_params_delegate.h +++ b/ios/chrome/browser/update_client/ios_chrome_update_query_params_delegate.h
@@ -14,6 +14,12 @@ : public update_client::UpdateQueryParamsDelegate { public: IOSChromeUpdateQueryParamsDelegate(); + + IOSChromeUpdateQueryParamsDelegate( + const IOSChromeUpdateQueryParamsDelegate&) = delete; + IOSChromeUpdateQueryParamsDelegate& operator=( + const IOSChromeUpdateQueryParamsDelegate&) = delete; + ~IOSChromeUpdateQueryParamsDelegate() override; // Gets the instance for IOSChromeUpdateQueryParamsDelegate. @@ -25,9 +31,6 @@ // Returns the language for the present locale. Possible return values are // standard tags for languages, such as "en", "en-US", "de", "fr", "af", etc. static const std::string& GetLang(); - - private: - DISALLOW_COPY_AND_ASSIGN(IOSChromeUpdateQueryParamsDelegate); }; #endif // IOS_CHROME_BROWSER_UPDATE_CLIENT_IOS_CHROME_UPDATE_QUERY_PARAMS_DELEGATE_H_
diff --git a/ios/chrome/browser/upgrade/upgrade_center.mm b/ios/chrome/browser/upgrade/upgrade_center.mm index d70d160..ab88de0b 100644 --- a/ios/chrome/browser/upgrade/upgrade_center.mm +++ b/ios/chrome/browser/upgrade/upgrade_center.mm
@@ -62,6 +62,9 @@ public: UpgradeInfoBarDelegate() : trigger_upgrade_(false) {} + UpgradeInfoBarDelegate(const UpgradeInfoBarDelegate&) = delete; + UpgradeInfoBarDelegate& operator=(const UpgradeInfoBarDelegate&) = delete; + ~UpgradeInfoBarDelegate() override {} // Returns true is the infobar was closed by pressing the accept button. @@ -107,8 +110,6 @@ mutable gfx::Image icon_; bool trigger_upgrade_; - - DISALLOW_COPY_AND_ASSIGN(UpgradeInfoBarDelegate); }; // The InfoBarDelegate unfortunately is not called at all when an infoBar is @@ -121,6 +122,10 @@ UpgradeInfoBarDismissObserver() : infobar_delegate_(nullptr), dismiss_delegate_(nil) {} + UpgradeInfoBarDismissObserver(const UpgradeInfoBarDismissObserver&) = delete; + UpgradeInfoBarDismissObserver& operator=( + const UpgradeInfoBarDismissObserver&) = delete; + ~UpgradeInfoBarDismissObserver() override {} void RegisterObserver(infobars::InfoBarManager* infobar_manager, @@ -156,8 +161,6 @@ base::ScopedObservation<infobars::InfoBarManager, infobars::InfoBarManager::Observer> scoped_observation_{this}; - - DISALLOW_COPY_AND_ASSIGN(UpgradeInfoBarDismissObserver); }; } // namespace
diff --git a/ios/chrome/browser/variations/ios_chrome_variations_service_client.h b/ios/chrome/browser/variations/ios_chrome_variations_service_client.h index 2b60930..6abf068 100644 --- a/ios/chrome/browser/variations/ios_chrome_variations_service_client.h +++ b/ios/chrome/browser/variations/ios_chrome_variations_service_client.h
@@ -19,6 +19,12 @@ : public variations::VariationsServiceClient { public: IOSChromeVariationsServiceClient(); + + IOSChromeVariationsServiceClient(const IOSChromeVariationsServiceClient&) = + delete; + IOSChromeVariationsServiceClient& operator=( + const IOSChromeVariationsServiceClient&) = delete; + ~IOSChromeVariationsServiceClient() override; private: @@ -29,8 +35,6 @@ version_info::Channel GetChannel() override; bool OverridesRestrictParameter(std::string* parameter) override; bool IsEnterprise() override; - - DISALLOW_COPY_AND_ASSIGN(IOSChromeVariationsServiceClient); }; #endif // IOS_CHROME_BROWSER_VARIATIONS_IOS_CHROME_VARIATIONS_SERVICE_CLIENT_H_
diff --git a/ios/chrome/browser/voice/speech_input_locale_config_impl.h b/ios/chrome/browser/voice/speech_input_locale_config_impl.h index 09495c1..09f090bb 100644 --- a/ios/chrome/browser/voice/speech_input_locale_config_impl.h +++ b/ios/chrome/browser/voice/speech_input_locale_config_impl.h
@@ -24,6 +24,11 @@ public: SpeechInputLocaleConfigImpl(NSArray<VoiceSearchLanguage*>* languages, NSArray<SpeechInputLocaleMatch*>* locale_matches); + + SpeechInputLocaleConfigImpl(const SpeechInputLocaleConfigImpl&) = delete; + SpeechInputLocaleConfigImpl& operator=(const SpeechInputLocaleConfigImpl&) = + delete; + ~SpeechInputLocaleConfigImpl() override; // Returns the available locale that matches |locale_code|. Defaults to en-US @@ -66,8 +71,6 @@ std::map<std::string, size_t> default_locale_indices_for_languages_; // The languages available for Text To Speech search results. std::vector<std::string> text_to_speech_languages_; - - DISALLOW_COPY_AND_ASSIGN(SpeechInputLocaleConfigImpl); }; } // namespace voice
diff --git a/ios/chrome/browser/web/blocked_popup_tab_helper.h b/ios/chrome/browser/web/blocked_popup_tab_helper.h index 721c4b07..cd66c19 100644 --- a/ios/chrome/browser/web/blocked_popup_tab_helper.h +++ b/ios/chrome/browser/web/blocked_popup_tab_helper.h
@@ -31,6 +31,10 @@ public web::WebStateUserData<BlockedPopupTabHelper> { public: explicit BlockedPopupTabHelper(web::WebState* web_state); + + BlockedPopupTabHelper(const BlockedPopupTabHelper&) = delete; + BlockedPopupTabHelper& operator=(const BlockedPopupTabHelper&) = delete; + ~BlockedPopupTabHelper() override; // Returns true if popup requested by the page with the given |source_url| @@ -87,8 +91,6 @@ scoped_observation_{this}; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(BlockedPopupTabHelper); }; #endif // IOS_CHROME_BROWSER_WEB_BLOCKED_POPUP_TAB_HELPER_H_
diff --git a/ios/chrome/browser/web/chrome_web_client.h b/ios/chrome/browser/web/chrome_web_client.h index 7b307c8..5d96433 100644 --- a/ios/chrome/browser/web/chrome_web_client.h +++ b/ios/chrome/browser/web/chrome_web_client.h
@@ -16,6 +16,10 @@ class ChromeWebClient : public web::WebClient { public: ChromeWebClient(); + + ChromeWebClient(const ChromeWebClient&) = delete; + ChromeWebClient& operator=(const ChromeWebClient&) = delete; + ~ChromeWebClient() override; // WebClient implementation. @@ -59,8 +63,6 @@ private: // Reference to a view that is attached to a window. UIView* windowed_container_ = nil; - - DISALLOW_COPY_AND_ASSIGN(ChromeWebClient); }; #endif // IOS_CHROME_BROWSER_WEB_CHROME_WEB_CLIENT_H_
diff --git a/ios/chrome/browser/web/chrome_web_client_unittest.mm b/ios/chrome/browser/web/chrome_web_client_unittest.mm index 922a8e4..4262dc7 100644 --- a/ios/chrome/browser/web/chrome_web_client_unittest.mm +++ b/ios/chrome/browser/web/chrome_web_client_unittest.mm
@@ -82,6 +82,9 @@ browser_state_ = TestChromeBrowserState::Builder().Build(); } + ChromeWebClientTest(const ChromeWebClientTest&) = delete; + ChromeWebClientTest& operator=(const ChromeWebClientTest&) = delete; + ~ChromeWebClientTest() override = default; ChromeBrowserState* browser_state() { return browser_state_.get(); } @@ -89,8 +92,6 @@ private: base::test::TaskEnvironment environment_; std::unique_ptr<ChromeBrowserState> browser_state_; - - DISALLOW_COPY_AND_ASSIGN(ChromeWebClientTest); }; TEST_F(ChromeWebClientTest, UserAgent) {
diff --git a/ios/chrome/browser/web/font_size/font_size_tab_helper.h b/ios/chrome/browser/web/font_size/font_size_tab_helper.h index dd7997e..eef3b430 100644 --- a/ios/chrome/browser/web/font_size/font_size_tab_helper.h +++ b/ios/chrome/browser/web/font_size/font_size_tab_helper.h
@@ -35,6 +35,9 @@ class FontSizeTabHelper : public web::WebStateObserver, public web::WebStateUserData<FontSizeTabHelper> { public: + FontSizeTabHelper(const FontSizeTabHelper&) = delete; + FontSizeTabHelper& operator=(const FontSizeTabHelper&) = delete; + ~FontSizeTabHelper() override; // Performs a zoom in the given direction on the WebState this is attached to. @@ -119,8 +122,6 @@ bool text_zoom_ui_active_ = false; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(FontSizeTabHelper); }; #endif // IOS_CHROME_BROWSER_WEB_FONT_SIZE_FONT_SIZE_TAB_HELPER_H_
diff --git a/ios/chrome/browser/web/font_size/font_size_tab_helper_unittest.mm b/ios/chrome/browser/web/font_size/font_size_tab_helper_unittest.mm index 23fa6cdc..6923089a 100644 --- a/ios/chrome/browser/web/font_size/font_size_tab_helper_unittest.mm +++ b/ios/chrome/browser/web/font_size/font_size_tab_helper_unittest.mm
@@ -42,13 +42,17 @@ FontSizeTabHelper::CreateForWebState(&web_state_); } + + FontSizeTabHelperFakeWebStateTest(const FontSizeTabHelperFakeWebStateTest&) = + delete; + FontSizeTabHelperFakeWebStateTest& operator=( + const FontSizeTabHelperFakeWebStateTest&) = delete; + ~FontSizeTabHelperFakeWebStateTest() override {} protected: base::test::ScopedFeatureList scoped_feature_list_; web::FakeWebState web_state_; - - DISALLOW_COPY_AND_ASSIGN(FontSizeTabHelperFakeWebStateTest); }; // Tests that zoom is only enabled if the page content is html. @@ -77,6 +81,10 @@ [invocation setReturnValue:&preferred_content_size_category_]; }); } + + FontSizeTabHelperTest(const FontSizeTabHelperTest&) = delete; + FontSizeTabHelperTest& operator=(const FontSizeTabHelperTest&) = delete; + ~FontSizeTabHelperTest() override { [application_ stopMocking]; } void SetUp() override { @@ -170,8 +178,6 @@ UIContentSizeCategory preferred_content_size_category_ = UIContentSizeCategoryLarge; id application_ = nil; - - DISALLOW_COPY_AND_ASSIGN(FontSizeTabHelperTest); }; // Tests that a web page's font size is set properly in a procedure started
diff --git a/ios/chrome/browser/web/image_fetch/image_fetch_tab_helper.h b/ios/chrome/browser/web/image_fetch/image_fetch_tab_helper.h index 38a8e36e..37bd346b 100644 --- a/ios/chrome/browser/web/image_fetch/image_fetch_tab_helper.h +++ b/ios/chrome/browser/web/image_fetch/image_fetch_tab_helper.h
@@ -37,6 +37,9 @@ public web::WebStateObserver, public web::WebStateUserData<ImageFetchTabHelper> { public: + ImageFetchTabHelper(const ImageFetchTabHelper&) = delete; + ImageFetchTabHelper& operator=(const ImageFetchTabHelper&) = delete; + ~ImageFetchTabHelper() override; // Callback for GetImageData. |data| will be in binary format, or nil if @@ -106,8 +109,6 @@ base::WeakPtrFactory<ImageFetchTabHelper> weak_ptr_factory_; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(ImageFetchTabHelper); }; #endif // IOS_CHROME_BROWSER_WEB_IMAGE_FETCH_IMAGE_FETCH_TAB_HELPER_H_
diff --git a/ios/chrome/browser/web/image_fetch/image_fetch_tab_helper.mm b/ios/chrome/browser/web/image_fetch/image_fetch_tab_helper.mm index c192cf6c..f0e1830 100644 --- a/ios/chrome/browser/web/image_fetch/image_fetch_tab_helper.mm +++ b/ios/chrome/browser/web/image_fetch/image_fetch_tab_helper.mm
@@ -41,6 +41,9 @@ class ImageFetcher : public image_fetcher::IOSImageDataFetcherWrapper, public base::SupportsUserData::Data { public: + ImageFetcher(const ImageFetcher&) = delete; + ImageFetcher& operator=(const ImageFetcher&) = delete; + ~ImageFetcher() override = default; ImageFetcher( @@ -57,8 +60,6 @@ return static_cast<ImageFetcher*>( browser_state->GetUserData(&kImageFetcherKeyName)); } - - DISALLOW_COPY_AND_ASSIGN(ImageFetcher); }; }
diff --git a/ios/chrome/browser/web/load_timing_tab_helper.h b/ios/chrome/browser/web/load_timing_tab_helper.h index 5343d49c..afb27d7 100644 --- a/ios/chrome/browser/web/load_timing_tab_helper.h +++ b/ios/chrome/browser/web/load_timing_tab_helper.h
@@ -22,6 +22,10 @@ public web::WebStateObserver { public: explicit LoadTimingTabHelper(web::WebState* web_state); + + LoadTimingTabHelper(const LoadTimingTabHelper&) = delete; + LoadTimingTabHelper& operator=(const LoadTimingTabHelper&) = delete; + ~LoadTimingTabHelper() override; // Starts timer. @@ -53,8 +57,6 @@ base::TimeTicks load_start_time_; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(LoadTimingTabHelper); }; #endif // IOS_CHROME_BROWSER_WEB_LOAD_TIMING_TAB_HELPER_H_
diff --git a/ios/chrome/browser/web/page_placeholder_tab_helper.h b/ios/chrome/browser/web/page_placeholder_tab_helper.h index 9bfebde9..0ef3562 100644 --- a/ios/chrome/browser/web/page_placeholder_tab_helper.h +++ b/ios/chrome/browser/web/page_placeholder_tab_helper.h
@@ -21,6 +21,9 @@ : public web::WebStateUserData<PagePlaceholderTabHelper>, public web::WebStateObserver { public: + PagePlaceholderTabHelper(const PagePlaceholderTabHelper&) = delete; + PagePlaceholderTabHelper& operator=(const PagePlaceholderTabHelper&) = delete; + ~PagePlaceholderTabHelper() override; // Displays placeholder between DidStartNavigation and PageLoaded @@ -80,8 +83,6 @@ base::WeakPtrFactory<PagePlaceholderTabHelper> weak_factory_; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(PagePlaceholderTabHelper); }; #endif // IOS_CHROME_BROWSER_WEB_PAGE_PLACEHOLDER_TAB_HELPER_H_
diff --git a/ios/chrome/browser/web/print/print_tab_helper.h b/ios/chrome/browser/web/print/print_tab_helper.h index ec3295f..b305d05c 100644 --- a/ios/chrome/browser/web/print/print_tab_helper.h +++ b/ios/chrome/browser/web/print/print_tab_helper.h
@@ -15,6 +15,10 @@ class PrintTabHelper : public web::WebStateUserData<PrintTabHelper> { public: explicit PrintTabHelper(web::WebState* web_state); + + PrintTabHelper(const PrintTabHelper&) = delete; + PrintTabHelper& operator=(const PrintTabHelper&) = delete; + ~PrintTabHelper() override; // Sets the |printer|, which is held weakly by this object. @@ -31,8 +35,6 @@ __weak id<WebStatePrinter> printer_ = nil; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(PrintTabHelper); }; #endif // IOS_CHROME_BROWSER_WEB_PRINT_PRINT_TAB_HELPER_H_
diff --git a/ios/chrome/browser/web/repost_form_tab_helper.h b/ios/chrome/browser/web/repost_form_tab_helper.h index 0e807035..6825139 100644 --- a/ios/chrome/browser/web/repost_form_tab_helper.h +++ b/ios/chrome/browser/web/repost_form_tab_helper.h
@@ -19,6 +19,9 @@ class RepostFormTabHelper : public web::WebStateUserData<RepostFormTabHelper>, public web::WebStateObserver { public: + RepostFormTabHelper(const RepostFormTabHelper&) = delete; + RepostFormTabHelper& operator=(const RepostFormTabHelper&) = delete; + ~RepostFormTabHelper() override; // Creates TabHelper. |delegate| is not retained by TabHelper and must not be @@ -54,8 +57,6 @@ bool is_presenting_dialog_ = false; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(RepostFormTabHelper); }; #endif // IOS_CHROME_BROWSER_WEB_REPOST_FORM_TAB_HELPER_H_
diff --git a/ios/chrome/browser/web/sad_tab_tab_helper.h b/ios/chrome/browser/web/sad_tab_tab_helper.h index 282d7c7..2f97967 100644 --- a/ios/chrome/browser/web/sad_tab_tab_helper.h +++ b/ios/chrome/browser/web/sad_tab_tab_helper.h
@@ -29,6 +29,9 @@ static void CreateForWebState(web::WebState* web_state, double repeat_failure_interval); + SadTabTabHelper(const SadTabTabHelper&) = delete; + SadTabTabHelper& operator=(const SadTabTabHelper&) = delete; + ~SadTabTabHelper() override; // Sets the SadTabHelper delegate. |delegate| will be in charge of presenting @@ -125,8 +128,6 @@ __strong id<NSObject> application_did_become_active_observer_ = nil; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(SadTabTabHelper); }; #endif // IOS_CHROME_BROWSER_WEB_SAD_TAB_TAB_HELPER_H_
diff --git a/ios/chrome/browser/web/session_state/web_session_state_cache_factory.mm b/ios/chrome/browser/web/session_state/web_session_state_cache_factory.mm index 37f8c46c..7c7f5cd 100644 --- a/ios/chrome/browser/web/session_state/web_session_state_cache_factory.mm +++ b/ios/chrome/browser/web/session_state/web_session_state_cache_factory.mm
@@ -27,6 +27,11 @@ explicit WebSessionStateCacheWrapper( ChromeBrowserState* browser_state, WebSessionStateCache* web_session_state_cache); + + WebSessionStateCacheWrapper(const WebSessionStateCacheWrapper&) = delete; + WebSessionStateCacheWrapper& operator=(const WebSessionStateCacheWrapper&) = + delete; + ~WebSessionStateCacheWrapper() override; WebSessionStateCache* web_session_state_cache() { @@ -39,8 +44,6 @@ private: __strong WebSessionStateCache* web_session_state_cache_; std::unique_ptr<AllWebStateListObservationRegistrar> registrar_; - - DISALLOW_COPY_AND_ASSIGN(WebSessionStateCacheWrapper); }; WebSessionStateCacheWrapper::WebSessionStateCacheWrapper(
diff --git a/ios/chrome/browser/web/session_state/web_session_state_cache_web_state_list_observer.h b/ios/chrome/browser/web/session_state/web_session_state_cache_web_state_list_observer.h index f979063..76d33c0 100644 --- a/ios/chrome/browser/web/session_state/web_session_state_cache_web_state_list_observer.h +++ b/ios/chrome/browser/web/session_state/web_session_state_cache_web_state_list_observer.h
@@ -16,6 +16,12 @@ public: explicit WebSessionStateCacheWebStateListObserver( WebSessionStateCache* web_session_state_cache); + + WebSessionStateCacheWebStateListObserver( + const WebSessionStateCacheWebStateListObserver&) = delete; + WebSessionStateCacheWebStateListObserver& operator=( + const WebSessionStateCacheWebStateListObserver&) = delete; + ~WebSessionStateCacheWebStateListObserver() override; private: @@ -31,8 +37,6 @@ void WillBeginBatchOperation(WebStateList* web_state_list) override; void BatchOperationEnded(WebStateList* web_state_list) override; WebSessionStateCache* web_session_state_cache_; - - DISALLOW_COPY_AND_ASSIGN(WebSessionStateCacheWebStateListObserver); }; #endif // IOS_CHROME_BROWSER_WEB_SESSION_STATE_WEB_SESSION_STATE_CACHE_WEB_STATE_LIST_OBSERVER_H_
diff --git a/ios/chrome/browser/web/session_state/web_session_state_tab_helper.h b/ios/chrome/browser/web/session_state/web_session_state_tab_helper.h index d8eeac1a..b9a6367 100644 --- a/ios/chrome/browser/web/session_state/web_session_state_tab_helper.h +++ b/ios/chrome/browser/web/session_state/web_session_state_tab_helper.h
@@ -23,6 +23,9 @@ : public web::WebStateObserver, public web::WebStateUserData<WebSessionStateTabHelper> { public: + WebSessionStateTabHelper(const WebSessionStateTabHelper&) = delete; + WebSessionStateTabHelper& operator=(const WebSessionStateTabHelper&) = delete; + ~WebSessionStateTabHelper() override; static void CreateForWebState(web::WebState* web_state); @@ -72,8 +75,6 @@ web::WebState* web_state_ = nullptr; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(WebSessionStateTabHelper); }; #endif // IOS_CHROME_BROWSER_WEB_SESSION_STATE_WEB_SESSION_STATE_TAB_HELPER_H_
diff --git a/ios/chrome/browser/web/tab_id_tab_helper.h b/ios/chrome/browser/web/tab_id_tab_helper.h index dfda32e..7576fe88 100644 --- a/ios/chrome/browser/web/tab_id_tab_helper.h +++ b/ios/chrome/browser/web/tab_id_tab_helper.h
@@ -11,6 +11,9 @@ // Handles creating a unique identifier, which is stable across cold starts. class TabIdTabHelper : public web::WebStateUserData<TabIdTabHelper> { public: + TabIdTabHelper(const TabIdTabHelper&) = delete; + TabIdTabHelper& operator=(const TabIdTabHelper&) = delete; + ~TabIdTabHelper() override; // Returns a unique identifier for this tab. @@ -23,8 +26,6 @@ __strong NSString* tab_id_; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(TabIdTabHelper); }; #endif // IOS_CHROME_BROWSER_WEB_TAB_ID_TAB_HELPER_H_
diff --git a/ios/chrome/browser/web_state_list/active_web_state_observation_forwarder.h b/ios/chrome/browser/web_state_list/active_web_state_observation_forwarder.h index e379c7e..3a1a669 100644 --- a/ios/chrome/browser/web_state_list/active_web_state_observation_forwarder.h +++ b/ios/chrome/browser/web_state_list/active_web_state_observation_forwarder.h
@@ -22,6 +22,12 @@ // |web_state_list| and |observer| must both outlive this object. ActiveWebStateObservationForwarder(WebStateList* web_state_list, web::WebStateObserver* observer); + + ActiveWebStateObservationForwarder( + const ActiveWebStateObservationForwarder&) = delete; + ActiveWebStateObservationForwarder& operator=( + const ActiveWebStateObservationForwarder&) = delete; + ~ActiveWebStateObservationForwarder() override; // WebStateListObserver. @@ -36,8 +42,6 @@ web_state_list_observation_{this}; base::ScopedObservation<web::WebState, web::WebStateObserver> web_state_observation_; - - DISALLOW_COPY_AND_ASSIGN(ActiveWebStateObservationForwarder); }; #endif // IOS_CHROME_BROWSER_WEB_STATE_LIST_ACTIVE_WEB_STATE_OBSERVATION_FORWARDER_H_
diff --git a/ios/chrome/browser/web_state_list/all_web_state_observation_forwarder.h b/ios/chrome/browser/web_state_list/all_web_state_observation_forwarder.h index 1ea010d..82b7aa7 100644 --- a/ios/chrome/browser/web_state_list/all_web_state_observation_forwarder.h +++ b/ios/chrome/browser/web_state_list/all_web_state_observation_forwarder.h
@@ -23,6 +23,12 @@ // |observer| must both outlive this object. AllWebStateObservationForwarder(WebStateList* web_state_list, web::WebStateObserver* observer); + + AllWebStateObservationForwarder(const AllWebStateObservationForwarder&) = + delete; + AllWebStateObservationForwarder& operator=( + const AllWebStateObservationForwarder&) = delete; + ~AllWebStateObservationForwarder() override; // WebStateListObserver. @@ -43,8 +49,6 @@ web_state_list_observation_{this}; base::ScopedMultiSourceObservation<web::WebState, web::WebStateObserver> web_state_observations_; - - DISALLOW_COPY_AND_ASSIGN(AllWebStateObservationForwarder); }; #endif // IOS_CHROME_BROWSER_WEB_STATE_LIST_ALL_WEB_STATE_OBSERVATION_FORWARDER_H_
diff --git a/ios/chrome/browser/web_state_list/fake_web_state_list_delegate.h b/ios/chrome/browser/web_state_list/fake_web_state_list_delegate.h index fb4f578e..3aeb3122 100644 --- a/ios/chrome/browser/web_state_list/fake_web_state_list_delegate.h +++ b/ios/chrome/browser/web_state_list/fake_web_state_list_delegate.h
@@ -12,14 +12,15 @@ class FakeWebStateListDelegate : public WebStateListDelegate { public: FakeWebStateListDelegate(); + + FakeWebStateListDelegate(const FakeWebStateListDelegate&) = delete; + FakeWebStateListDelegate& operator=(const FakeWebStateListDelegate&) = delete; + ~FakeWebStateListDelegate() override; // WebStateListDelegate implementation. void WillAddWebState(web::WebState* web_state) override; void WebStateDetached(web::WebState* web_state) override; - - private: - DISALLOW_COPY_AND_ASSIGN(FakeWebStateListDelegate); }; #endif // IOS_CHROME_BROWSER_WEB_STATE_LIST_FAKE_WEB_STATE_LIST_DELEGATE_H_
diff --git a/ios/chrome/browser/web_state_list/web_state_list.h b/ios/chrome/browser/web_state_list/web_state_list.h index d75f246a..6f27193f 100644 --- a/ios/chrome/browser/web_state_list/web_state_list.h +++ b/ios/chrome/browser/web_state_list/web_state_list.h
@@ -68,6 +68,10 @@ }; explicit WebStateList(WebStateListDelegate* delegate); + + WebStateList(const WebStateList&) = delete; + WebStateList& operator=(const WebStateList&) = delete; + ~WebStateList(); // Returns whether the model is empty or not. @@ -292,8 +296,6 @@ bool batch_operation_in_progress_ = false; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(WebStateList); }; #endif // IOS_CHROME_BROWSER_WEB_STATE_LIST_WEB_STATE_LIST_H_
diff --git a/ios/chrome/browser/web_state_list/web_state_list.mm b/ios/chrome/browser/web_state_list/web_state_list.mm index c6303fe..22bcf52 100644 --- a/ios/chrome/browser/web_state_list/web_state_list.mm +++ b/ios/chrome/browser/web_state_list/web_state_list.mm
@@ -38,6 +38,10 @@ class WebStateList::WebStateWrapper { public: explicit WebStateWrapper(std::unique_ptr<web::WebState> web_state); + + WebStateWrapper(const WebStateWrapper&) = delete; + WebStateWrapper& operator=(const WebStateWrapper&) = delete; + ~WebStateWrapper(); web::WebState* web_state() const { return web_state_.get(); } @@ -71,8 +75,6 @@ std::unique_ptr<web::WebState> web_state_; WebStateOpener opener_; bool should_reset_opener_ = false; - - DISALLOW_COPY_AND_ASSIGN(WebStateWrapper); }; WebStateList::WebStateWrapper::WebStateWrapper(
diff --git a/ios/chrome/browser/web_state_list/web_state_list_delegate.h b/ios/chrome/browser/web_state_list/web_state_list_delegate.h index 99d7d1b..83fab2d 100644 --- a/ios/chrome/browser/web_state_list/web_state_list_delegate.h +++ b/ios/chrome/browser/web_state_list/web_state_list_delegate.h
@@ -18,6 +18,10 @@ class WebStateListDelegate { public: WebStateListDelegate() = default; + + WebStateListDelegate(const WebStateListDelegate&) = delete; + WebStateListDelegate& operator=(const WebStateListDelegate&) = delete; + virtual ~WebStateListDelegate() = default; // Notifies the delegate that the specified WebState will be added to the @@ -29,9 +33,6 @@ // the WebStateList (via detaching/closing/replacing existing) and allows it // to do any clean up that it deems necessary. virtual void WebStateDetached(web::WebState* web_state) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(WebStateListDelegate); }; #endif // IOS_CHROME_BROWSER_WEB_STATE_LIST_WEB_STATE_LIST_DELEGATE_H_
diff --git a/ios/chrome/browser/web_state_list/web_state_list_favicon_driver_observer.h b/ios/chrome/browser/web_state_list/web_state_list_favicon_driver_observer.h index a2cfbfab..c3bc255 100644 --- a/ios/chrome/browser/web_state_list/web_state_list_favicon_driver_observer.h +++ b/ios/chrome/browser/web_state_list/web_state_list_favicon_driver_observer.h
@@ -34,6 +34,12 @@ public: WebStateListFaviconDriverObserver(WebStateList* web_state_list, id<WebStateFaviconDriverObserver> observer); + + WebStateListFaviconDriverObserver(const WebStateListFaviconDriverObserver&) = + delete; + WebStateListFaviconDriverObserver& operator=( + const WebStateListFaviconDriverObserver&) = delete; + ~WebStateListFaviconDriverObserver() override; // WebStateListObserver implementation: @@ -72,8 +78,6 @@ base::ScopedObservation<WebStateList, WebStateListObserver> web_state_list_observation_{this}; - - DISALLOW_COPY_AND_ASSIGN(WebStateListFaviconDriverObserver); }; #endif // IOS_CHROME_BROWSER_WEB_STATE_LIST_WEB_STATE_LIST_FAVICON_DRIVER_OBSERVER_H_
diff --git a/ios/chrome/browser/web_state_list/web_state_list_favicon_driver_observer_unittest.mm b/ios/chrome/browser/web_state_list/web_state_list_favicon_driver_observer_unittest.mm index e137d47..63087762 100644 --- a/ios/chrome/browser/web_state_list/web_state_list_favicon_driver_observer_unittest.mm +++ b/ios/chrome/browser/web_state_list/web_state_list_favicon_driver_observer_unittest.mm
@@ -40,6 +40,12 @@ class WebStateListFaviconDriverObserverTest : public PlatformTest { public: WebStateListFaviconDriverObserverTest(); + + WebStateListFaviconDriverObserverTest( + const WebStateListFaviconDriverObserverTest&) = delete; + WebStateListFaviconDriverObserverTest& operator=( + const WebStateListFaviconDriverObserverTest&) = delete; + ~WebStateListFaviconDriverObserverTest() override = default; favicon::FaviconDriver* CreateAndInsertWebState(); @@ -59,8 +65,6 @@ WebStateList web_state_list_; FakeWebStateFaviconDriverObserver* favicon_observer_; WebStateListFaviconDriverObserver web_state_list_favicon_driver_observer_; - - DISALLOW_COPY_AND_ASSIGN(WebStateListFaviconDriverObserverTest); }; WebStateListFaviconDriverObserverTest::WebStateListFaviconDriverObserverTest()
diff --git a/ios/chrome/browser/web_state_list/web_state_list_metrics_browser_agent.h b/ios/chrome/browser/web_state_list/web_state_list_metrics_browser_agent.h index c01dd62..f0817fb5 100644 --- a/ios/chrome/browser/web_state_list/web_state_list_metrics_browser_agent.h +++ b/ios/chrome/browser/web_state_list/web_state_list_metrics_browser_agent.h
@@ -22,6 +22,11 @@ public web::WebStateObserver, public BrowserUserData<WebStateListMetricsBrowserAgent> { public: + WebStateListMetricsBrowserAgent(const WebStateListMetricsBrowserAgent&) = + delete; + WebStateListMetricsBrowserAgent& operator=( + const WebStateListMetricsBrowserAgent&) = delete; + ~WebStateListMetricsBrowserAgent() override; // Creates the WebStateListMetricsBrowserAgent associating it with |browser|. @@ -75,8 +80,6 @@ bool metric_collection_paused_ = false; std::unique_ptr<AllWebStateObservationForwarder> web_state_forwarder_; - - DISALLOW_COPY_AND_ASSIGN(WebStateListMetricsBrowserAgent); }; #endif // IOS_CHROME_BROWSER_WEB_STATE_LIST_WEB_STATE_LIST_METRICS_BROWSER_AGENT_H_
diff --git a/ios/chrome/browser/web_state_list/web_state_list_observer.h b/ios/chrome/browser/web_state_list/web_state_list_observer.h index d45b960..a568114 100644 --- a/ios/chrome/browser/web_state_list/web_state_list_observer.h +++ b/ios/chrome/browser/web_state_list/web_state_list_observer.h
@@ -35,6 +35,10 @@ class WebStateListObserver { public: WebStateListObserver(); + + WebStateListObserver(const WebStateListObserver&) = delete; + WebStateListObserver& operator=(const WebStateListObserver&) = delete; + virtual ~WebStateListObserver(); // Invoked after a new WebState has been added to the WebStateList at the @@ -99,9 +103,6 @@ // were performed on it during the batch (e.g. detect that all tabs were // closed at once). virtual void BatchOperationEnded(WebStateList* web_state_list); - - private: - DISALLOW_COPY_AND_ASSIGN(WebStateListObserver); }; #endif // IOS_CHROME_BROWSER_WEB_STATE_LIST_WEB_STATE_LIST_OBSERVER_H_
diff --git a/ios/chrome/browser/web_state_list/web_state_list_observer_bridge.h b/ios/chrome/browser/web_state_list/web_state_list_observer_bridge.h index 42d6e2c..8b8ed53 100644 --- a/ios/chrome/browser/web_state_list/web_state_list_observer_bridge.h +++ b/ios/chrome/browser/web_state_list/web_state_list_observer_bridge.h
@@ -85,6 +85,11 @@ class WebStateListObserverBridge final : public WebStateListObserver { public: explicit WebStateListObserverBridge(id<WebStateListObserving> observer); + + WebStateListObserverBridge(const WebStateListObserverBridge&) = delete; + WebStateListObserverBridge& operator=(const WebStateListObserverBridge&) = + delete; + ~WebStateListObserverBridge() final; private: @@ -120,8 +125,6 @@ void BatchOperationEnded(WebStateList* web_state_list) final; __weak id<WebStateListObserving> observer_ = nil; - - DISALLOW_COPY_AND_ASSIGN(WebStateListObserverBridge); }; #endif // IOS_CHROME_BROWSER_WEB_STATE_LIST_WEB_STATE_LIST_OBSERVER_BRIDGE_H_
diff --git a/ios/chrome/browser/web_state_list/web_state_list_order_controller.h b/ios/chrome/browser/web_state_list/web_state_list_order_controller.h index dbdf7e1..0f1a324 100644 --- a/ios/chrome/browser/web_state_list/web_state_list_order_controller.h +++ b/ios/chrome/browser/web_state_list/web_state_list_order_controller.h
@@ -18,6 +18,11 @@ class WebStateListOrderController { public: explicit WebStateListOrderController(WebStateList* web_state_list); + + WebStateListOrderController(const WebStateListOrderController&) = delete; + WebStateListOrderController& operator=(const WebStateListOrderController&) = + delete; + ~WebStateListOrderController(); // Determines where to place a newly opened WebState given its opener. @@ -37,8 +42,6 @@ int GetValidIndex(int index, int removing_index) const; WebStateList* web_state_list_; - - DISALLOW_COPY_AND_ASSIGN(WebStateListOrderController); }; #endif // IOS_CHROME_BROWSER_WEB_STATE_LIST_WEB_STATE_LIST_ORDER_CONTROLLER_H_
diff --git a/ios/chrome/browser/web_state_list/web_state_list_unittest.mm b/ios/chrome/browser/web_state_list/web_state_list_unittest.mm index 27399d3..aac981f 100644 --- a/ios/chrome/browser/web_state_list/web_state_list_unittest.mm +++ b/ios/chrome/browser/web_state_list/web_state_list_unittest.mm
@@ -166,6 +166,9 @@ web_state_list_.AddObserver(&observer_); } + WebStateListTest(const WebStateListTest&) = delete; + WebStateListTest& operator=(const WebStateListTest&) = delete; + ~WebStateListTest() override { web_state_list_.RemoveObserver(&observer_); } protected: @@ -196,9 +199,6 @@ WebStateList::kInvalidIndex, std::move(web_state), WebStateList::INSERT_NO_FLAGS, WebStateOpener()); } - - private: - DISALLOW_COPY_AND_ASSIGN(WebStateListTest); }; // Tests that empty() matches count() != 0.
diff --git a/ios/chrome/browser/webui/net_export_tab_helper.h b/ios/chrome/browser/webui/net_export_tab_helper.h index 7c9e176..963cad0 100644 --- a/ios/chrome/browser/webui/net_export_tab_helper.h +++ b/ios/chrome/browser/webui/net_export_tab_helper.h
@@ -13,6 +13,9 @@ // A tab helper for the Net Export WebUI page. class NetExportTabHelper : public web::WebStateUserData<NetExportTabHelper> { public: + NetExportTabHelper(const NetExportTabHelper&) = delete; + NetExportTabHelper& operator=(const NetExportTabHelper&) = delete; + ~NetExportTabHelper() override; // Creates a NetExportTabHelper and attaches it to |web_state|. The |delegate| @@ -31,8 +34,6 @@ __weak id<NetExportTabHelperDelegate> delegate_; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(NetExportTabHelper); }; #endif // IOS_CHROME_BROWSER_WEBUI_NET_EXPORT_TAB_HELPER_H_
diff --git a/ios/chrome/test/app/histogram_test_util.h b/ios/chrome/test/app/histogram_test_util.h index 93317c9..0c70a89 100644 --- a/ios/chrome/test/app/histogram_test_util.h +++ b/ios/chrome/test/app/histogram_test_util.h
@@ -36,6 +36,10 @@ // Takes a snapshot of all current histograms counts. HistogramTester(); + + HistogramTester(const HistogramTester&) = delete; + HistogramTester& operator=(const HistogramTester&) = delete; + ~HistogramTester(); // We know the exact number of samples in a bucket, and that no other bucket @@ -103,8 +107,6 @@ // when the instance is destroyed. std::map<std::string, std::unique_ptr<base::HistogramSamples>> histograms_snapshot_; - - DISALLOW_COPY_AND_ASSIGN(HistogramTester); }; struct Bucket {
diff --git a/ios/chrome/test/earl_grey/chrome_egtest_bundle_main.mm b/ios/chrome/test/earl_grey/chrome_egtest_bundle_main.mm index 2c31990..7fbeaac 100644 --- a/ios/chrome/test/earl_grey/chrome_egtest_bundle_main.mm +++ b/ios/chrome/test/earl_grey/chrome_egtest_bundle_main.mm
@@ -62,12 +62,13 @@ CHECK(!loaded_locale.empty()); } + TestMain(const TestMain&) = delete; + TestMain& operator=(const TestMain&) = delete; + ~TestMain() {} private: base::AtExitManager exit_manager_; - - DISALLOW_COPY_AND_ASSIGN(TestMain); }; }
diff --git a/ios/chrome/test/earl_grey/earl_grey_scoped_block_swizzler.h b/ios/chrome/test/earl_grey/earl_grey_scoped_block_swizzler.h index 780ae3a..3297e6b6 100644 --- a/ios/chrome/test/earl_grey/earl_grey_scoped_block_swizzler.h +++ b/ios/chrome/test/earl_grey/earl_grey_scoped_block_swizzler.h
@@ -16,6 +16,10 @@ // EarlGreyScopedBlockSwizzlerAppInterface interface. EarlGreyScopedBlockSwizzler(NSString* target, NSString* selector, id block); + EarlGreyScopedBlockSwizzler(const EarlGreyScopedBlockSwizzler&) = delete; + EarlGreyScopedBlockSwizzler& operator=(const EarlGreyScopedBlockSwizzler&) = + delete; + // Destroys the ScopedBlockSwizzler object via the // EarlGreyScopedBlockSwizzlerAppInterface interface. virtual ~EarlGreyScopedBlockSwizzler(); @@ -23,8 +27,6 @@ private: // id used to track creation and destruction of swizzled block. int unique_id_ = 0; - - DISALLOW_COPY_AND_ASSIGN(EarlGreyScopedBlockSwizzler); }; #endif // IOS_CHROME_TEST_EARL_GREY_EARL_GREY_SCOPED_BLOCK_SWIZZLER_H_
diff --git a/ios/chrome/test/earl_grey/scoped_block_popups_pref.h b/ios/chrome/test/earl_grey/scoped_block_popups_pref.h index 20d41bf..0141019 100644 --- a/ios/chrome/test/earl_grey/scoped_block_popups_pref.h +++ b/ios/chrome/test/earl_grey/scoped_block_popups_pref.h
@@ -14,14 +14,16 @@ class ScopedBlockPopupsPref { public: explicit ScopedBlockPopupsPref(ContentSetting setting); + + ScopedBlockPopupsPref(const ScopedBlockPopupsPref&) = delete; + ScopedBlockPopupsPref& operator=(const ScopedBlockPopupsPref&) = delete; + ~ScopedBlockPopupsPref(); private: // Saves the original pref setting so that it can be restored when the scoper // is destroyed. ContentSetting original_setting_; - - DISALLOW_COPY_AND_ASSIGN(ScopedBlockPopupsPref); }; #endif // IOS_CHROME_TEST_EARL_GREY_SCOPED_BLOCK_POPUPS_PREF_H_
diff --git a/ios/chrome/test/fakes/fake_language_detection_tab_helper_observer.h b/ios/chrome/test/fakes/fake_language_detection_tab_helper_observer.h index a2f8062..304cd70b 100644 --- a/ios/chrome/test/fakes/fake_language_detection_tab_helper_observer.h +++ b/ios/chrome/test/fakes/fake_language_detection_tab_helper_observer.h
@@ -20,6 +20,12 @@ : public language::IOSLanguageDetectionTabHelper::Observer { public: FakeLanguageDetectionTabHelperObserver(web::WebState* web_state); + + FakeLanguageDetectionTabHelperObserver( + const FakeLanguageDetectionTabHelperObserver&) = delete; + FakeLanguageDetectionTabHelperObserver& operator=( + const FakeLanguageDetectionTabHelperObserver&) = delete; + ~FakeLanguageDetectionTabHelperObserver() override; // language::IOSLanguageDetectionTabHelper::Observer @@ -39,8 +45,6 @@ // Stops observing the IOSLanguageDetectionTabHelper instance associated with // |web_state_| and sets |web_state_| to null. void StopObservingIOSLanguageDetectionTabHelper(); - - DISALLOW_COPY_AND_ASSIGN(FakeLanguageDetectionTabHelperObserver); }; #endif // IOS_CHROME_TEST_FAKES_FAKE_LANGUAGE_DETECTION_TAB_HELPER_OBSERVER_H_
diff --git a/ios/chrome/test/ios_chrome_scoped_testing_chrome_browser_state_manager.h b/ios/chrome/test/ios_chrome_scoped_testing_chrome_browser_state_manager.h index da1d381e..ef55ac72 100644 --- a/ios/chrome/test/ios_chrome_scoped_testing_chrome_browser_state_manager.h +++ b/ios/chrome/test/ios_chrome_scoped_testing_chrome_browser_state_manager.h
@@ -19,13 +19,17 @@ public: explicit IOSChromeScopedTestingChromeBrowserStateManager( std::unique_ptr<ios::ChromeBrowserStateManager> browser_state_manager); + + IOSChromeScopedTestingChromeBrowserStateManager( + const IOSChromeScopedTestingChromeBrowserStateManager&) = delete; + IOSChromeScopedTestingChromeBrowserStateManager& operator=( + const IOSChromeScopedTestingChromeBrowserStateManager&) = delete; + ~IOSChromeScopedTestingChromeBrowserStateManager(); private: std::unique_ptr<ios::ChromeBrowserStateManager> browser_state_manager_; ios::ChromeBrowserStateManager* saved_browser_state_manager_; - - DISALLOW_COPY_AND_ASSIGN(IOSChromeScopedTestingChromeBrowserStateManager); }; #endif // IOS_CHROME_TEST_IOS_CHROME_SCOPED_TESTING_CHROME_BROWSER_STATE_MANAGER_H_
diff --git a/ios/chrome/test/ios_chrome_scoped_testing_local_state.h b/ios/chrome/test/ios_chrome_scoped_testing_local_state.h index 77fe3167..3c3f69ca 100644 --- a/ios/chrome/test/ios_chrome_scoped_testing_local_state.h +++ b/ios/chrome/test/ios_chrome_scoped_testing_local_state.h
@@ -13,14 +13,18 @@ class IOSChromeScopedTestingLocalState { public: IOSChromeScopedTestingLocalState(); + + IOSChromeScopedTestingLocalState(const IOSChromeScopedTestingLocalState&) = + delete; + IOSChromeScopedTestingLocalState& operator=( + const IOSChromeScopedTestingLocalState&) = delete; + ~IOSChromeScopedTestingLocalState(); TestingPrefServiceSimple* Get(); private: TestingPrefServiceSimple local_state_; - - DISALLOW_COPY_AND_ASSIGN(IOSChromeScopedTestingLocalState); }; #endif // IOS_CHROME_TEST_IOS_CHROME_SCOPED_TESTING_LOCAL_STATE_H_
diff --git a/ios/chrome/test/ios_chrome_unit_test_suite.h b/ios/chrome/test/ios_chrome_unit_test_suite.h index faf545d..d32bd6bc 100644 --- a/ios/chrome/test/ios_chrome_unit_test_suite.h +++ b/ios/chrome/test/ios_chrome_unit_test_suite.h
@@ -14,6 +14,10 @@ class IOSChromeUnitTestSuite : public web::WebTestSuite { public: IOSChromeUnitTestSuite(int argc, char** argv); + + IOSChromeUnitTestSuite(const IOSChromeUnitTestSuite&) = delete; + IOSChromeUnitTestSuite& operator=(const IOSChromeUnitTestSuite&) = delete; + ~IOSChromeUnitTestSuite() override; // web::WebTestSuite overrides: @@ -21,8 +25,6 @@ private: scoped_refptr<base::SingleThreadTaskRunner> action_task_runner_; - - DISALLOW_COPY_AND_ASSIGN(IOSChromeUnitTestSuite); }; #endif // IOS_CHROME_TEST_IOS_CHROME_UNIT_TEST_SUITE_H_
diff --git a/ios/chrome/test/ios_chrome_unit_test_suite.mm b/ios/chrome/test/ios_chrome_unit_test_suite.mm index 0f8c642..cb6cdc0 100644 --- a/ios/chrome/test/ios_chrome_unit_test_suite.mm +++ b/ios/chrome/test/ios_chrome_unit_test_suite.mm
@@ -31,6 +31,12 @@ : public testing::EmptyTestEventListener { public: IOSChromeUnitTestSuiteInitializer() {} + + IOSChromeUnitTestSuiteInitializer(const IOSChromeUnitTestSuiteInitializer&) = + delete; + IOSChromeUnitTestSuiteInitializer& operator=( + const IOSChromeUnitTestSuiteInitializer&) = delete; + ~IOSChromeUnitTestSuiteInitializer() override {} void OnTestStart(const testing::TestInfo& test_info) override { @@ -56,8 +62,6 @@ private: std::unique_ptr<ios::ChromeBrowserProvider> chrome_browser_provider_; std::unique_ptr<ApplicationContext> application_context_; - - DISALLOW_COPY_AND_ASSIGN(IOSChromeUnitTestSuiteInitializer); }; } // namespace
diff --git a/ios/chrome/test/root_view_controller_test.h b/ios/chrome/test/root_view_controller_test.h index 2772002..286a689 100644 --- a/ios/chrome/test/root_view_controller_test.h +++ b/ios/chrome/test/root_view_controller_test.h
@@ -15,6 +15,10 @@ class RootViewControllerTest : public PlatformTest { public: RootViewControllerTest() = default; + + RootViewControllerTest(const RootViewControllerTest&) = delete; + RootViewControllerTest& operator=(const RootViewControllerTest&) = delete; + ~RootViewControllerTest() override = default; protected: @@ -29,8 +33,6 @@ // The key window's original root view controller, which must be restored at // the end of the test. UIViewController* original_root_view_controller_; - - DISALLOW_COPY_AND_ASSIGN(RootViewControllerTest); }; #endif // IOS_CHROME_TEST_ROOT_VIEW_CONTROLLER_TEST_H_
diff --git a/ios/chrome/test/scoped_eg_synchronization_disabler.h b/ios/chrome/test/scoped_eg_synchronization_disabler.h index 21ebc86e..7efff01 100644 --- a/ios/chrome/test/scoped_eg_synchronization_disabler.h +++ b/ios/chrome/test/scoped_eg_synchronization_disabler.h
@@ -13,6 +13,11 @@ class ScopedSynchronizationDisabler { public: ScopedSynchronizationDisabler(); + + ScopedSynchronizationDisabler(const ScopedSynchronizationDisabler&) = delete; + ScopedSynchronizationDisabler& operator=( + const ScopedSynchronizationDisabler&) = delete; + ~ScopedSynchronizationDisabler(); private: @@ -20,8 +25,6 @@ static void SetEgSynchronizationEnabled(BOOL flag); BOOL saved_eg_synchronization_enabled_value_ = NO; - - DISALLOW_COPY_AND_ASSIGN(ScopedSynchronizationDisabler); }; #endif // IOS_CHROME_TEST_SCOPED_EG_SYNCHRONIZATION_DISABLER_H_
diff --git a/ios/chrome/test/testing_application_context.h b/ios/chrome/test/testing_application_context.h index f942d31..e497a21e 100644 --- a/ios/chrome/test/testing_application_context.h +++ b/ios/chrome/test/testing_application_context.h
@@ -20,6 +20,11 @@ class TestingApplicationContext : public ApplicationContext { public: TestingApplicationContext(); + + TestingApplicationContext(const TestingApplicationContext&) = delete; + TestingApplicationContext& operator=(const TestingApplicationContext&) = + delete; + ~TestingApplicationContext() override; // Convenience method to get the current application context as a @@ -83,7 +88,6 @@ scoped_refptr<SafeBrowsingService> fake_safe_browsing_service_; std::unique_ptr<network::TestNetworkConnectionTracker> test_network_connection_tracker_; - DISALLOW_COPY_AND_ASSIGN(TestingApplicationContext); }; #endif // IOS_CHROME_TEST_TESTING_APPLICATION_CONTEXT_H_
diff --git a/ios/chrome/test/wpt/cwt_request_handler.h b/ios/chrome/test/wpt/cwt_request_handler.h index a6f70df..8ba8660 100644 --- a/ios/chrome/test/wpt/cwt_request_handler.h +++ b/ios/chrome/test/wpt/cwt_request_handler.h
@@ -45,6 +45,9 @@ // closed. CWTRequestHandler(ProceduralBlock sesssion_completion_handler); + CWTRequestHandler(const CWTRequestHandler&) = delete; + CWTRequestHandler& operator=(const CWTRequestHandler&) = delete; + ~CWTRequestHandler(); // Creates responses for HTTP requests according to the WebDriver protocol. @@ -147,8 +150,6 @@ // The instance of Chrome that's being tested. XCUIApplication* application_; - - DISALLOW_COPY_AND_ASSIGN(CWTRequestHandler); }; #endif // IOS_CHROME_TEST_WPT_CWT_REQUEST_HANDLER_H_
diff --git a/ios/components/security_interstitials/ios_blocking_page_controller_client.h b/ios/components/security_interstitials/ios_blocking_page_controller_client.h index d786def..81b09de 100644 --- a/ios/components/security_interstitials/ios_blocking_page_controller_client.h +++ b/ios/components/security_interstitials/ios_blocking_page_controller_client.h
@@ -30,6 +30,12 @@ web::WebState* web_state, std::unique_ptr<security_interstitials::MetricsHelper> metrics_helper, const std::string& app_locale); + + IOSBlockingPageControllerClient(const IOSBlockingPageControllerClient&) = + delete; + IOSBlockingPageControllerClient& operator=( + const IOSBlockingPageControllerClient&) = delete; + ~IOSBlockingPageControllerClient() override; // security_interstitials::ControllerClient implementation. @@ -67,8 +73,6 @@ const std::string app_locale_; base::WeakPtrFactory<IOSBlockingPageControllerClient> weak_factory_; - - DISALLOW_COPY_AND_ASSIGN(IOSBlockingPageControllerClient); }; } // namespace security_interstitials
diff --git a/ios/components/security_interstitials/ios_blocking_page_metrics_helper.h b/ios/components/security_interstitials/ios_blocking_page_metrics_helper.h index 58fb355..cdfd8877 100644 --- a/ios/components/security_interstitials/ios_blocking_page_metrics_helper.h +++ b/ios/components/security_interstitials/ios_blocking_page_metrics_helper.h
@@ -27,6 +27,11 @@ const GURL& request_url, const security_interstitials::MetricsHelper::ReportDetails report_details); + + IOSBlockingPageMetricsHelper(const IOSBlockingPageMetricsHelper&) = delete; + IOSBlockingPageMetricsHelper& operator=(const IOSBlockingPageMetricsHelper&) = + delete; + ~IOSBlockingPageMetricsHelper() override; protected: @@ -36,9 +41,6 @@ void RecordExtraUserInteractionMetrics( security_interstitials::MetricsHelper::Interaction interaction) override; void RecordExtraShutdownMetrics() override; - - private: - DISALLOW_COPY_AND_ASSIGN(IOSBlockingPageMetricsHelper); }; } // namespace security_interstitials
diff --git a/ios/components/security_interstitials/ios_blocking_page_tab_helper.h b/ios/components/security_interstitials/ios_blocking_page_tab_helper.h index 49e5e29..21d7026 100644 --- a/ios/components/security_interstitials/ios_blocking_page_tab_helper.h +++ b/ios/components/security_interstitials/ios_blocking_page_tab_helper.h
@@ -23,6 +23,9 @@ class IOSBlockingPageTabHelper : public web::WebStateUserData<IOSBlockingPageTabHelper> { public: + IOSBlockingPageTabHelper(const IOSBlockingPageTabHelper&) = delete; + IOSBlockingPageTabHelper& operator=(const IOSBlockingPageTabHelper&) = delete; + ~IOSBlockingPageTabHelper() override; // Associates |blocking_page| with |navigation_id|. When the last committed @@ -41,7 +44,6 @@ private: WEB_STATE_USER_DATA_KEY_DECL(); explicit IOSBlockingPageTabHelper(web::WebState* web_state); - DISALLOW_COPY_AND_ASSIGN(IOSBlockingPageTabHelper); friend class web::WebStateUserData<IOSBlockingPageTabHelper>; // Handler for "blockingPage.*" JavaScript command. Dispatch to more specific
diff --git a/ios/components/security_interstitials/ios_security_interstitial_page.h b/ios/components/security_interstitials/ios_security_interstitial_page.h index b1f1bee..6549837 100644 --- a/ios/components/security_interstitials/ios_security_interstitial_page.h +++ b/ios/components/security_interstitials/ios_security_interstitial_page.h
@@ -27,6 +27,11 @@ IOSSecurityInterstitialPage(web::WebState* web_state, const GURL& request_url, IOSBlockingPageControllerClient* client); + + IOSSecurityInterstitialPage(const IOSSecurityInterstitialPage&) = delete; + IOSSecurityInterstitialPage& operator=(const IOSSecurityInterstitialPage&) = + delete; + virtual ~IOSSecurityInterstitialPage(); // Returns the HTML that should be displayed in the page @@ -67,8 +72,6 @@ // Used to interact with the embedder. Unowned pointer; must outlive |this| // instance. IOSBlockingPageControllerClient* const client_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(IOSSecurityInterstitialPage); }; } // namespace security_interstitials
diff --git a/ios/components/security_interstitials/legacy_tls/legacy_tls_blocking_page.h b/ios/components/security_interstitials/legacy_tls/legacy_tls_blocking_page.h index ddd4a04..d8395b6 100644 --- a/ios/components/security_interstitials/legacy_tls/legacy_tls_blocking_page.h +++ b/ios/components/security_interstitials/legacy_tls/legacy_tls_blocking_page.h
@@ -15,6 +15,9 @@ class LegacyTLSBlockingPage : public security_interstitials::IOSSecurityInterstitialPage { public: + LegacyTLSBlockingPage(const LegacyTLSBlockingPage&) = delete; + LegacyTLSBlockingPage& operator=(const LegacyTLSBlockingPage&) = delete; + ~LegacyTLSBlockingPage() override; // Creates a legacy TLS blocking page. @@ -37,8 +40,6 @@ web::WebState* web_state_ = nullptr; const GURL request_url_; std::unique_ptr<LegacyTLSControllerClient> controller_; - - DISALLOW_COPY_AND_ASSIGN(LegacyTLSBlockingPage); }; #endif // IOS_COMPONENTS_SECURITY_INTERSTITIALS_LEGACY_TLS_LEGACY_TLS_BLOCKING_PAGE_H_
diff --git a/ios/components/security_interstitials/lookalikes/lookalike_url_blocking_page.h b/ios/components/security_interstitials/lookalikes/lookalike_url_blocking_page.h index 155dc24..3073736f 100644 --- a/ios/components/security_interstitials/lookalikes/lookalike_url_blocking_page.h +++ b/ios/components/security_interstitials/lookalikes/lookalike_url_blocking_page.h
@@ -17,6 +17,9 @@ class LookalikeUrlBlockingPage : public security_interstitials::IOSSecurityInterstitialPage { public: + LookalikeUrlBlockingPage(const LookalikeUrlBlockingPage&) = delete; + LookalikeUrlBlockingPage& operator=(const LookalikeUrlBlockingPage&) = delete; + ~LookalikeUrlBlockingPage() override; // Creates a lookalike URL blocking page. @@ -48,8 +51,6 @@ const GURL safe_url_; ukm::SourceId source_id_; LookalikeUrlMatchType match_type_; - - DISALLOW_COPY_AND_ASSIGN(LookalikeUrlBlockingPage); }; #endif // IOS_COMPONENTS_SECURITY_INTERSTITIALS_LOOKALIKES_LOOKALIKE_URL_BLOCKING_PAGE_H_
diff --git a/ios/components/webui/sync_internals/sync_internals_message_handler.h b/ios/components/webui/sync_internals/sync_internals_message_handler.h index d7a43d85..9a7f53b7 100644 --- a/ios/components/webui/sync_internals/sync_internals_message_handler.h +++ b/ios/components/webui/sync_internals/sync_internals_message_handler.h
@@ -26,6 +26,11 @@ public syncer::ProtocolEventObserver { public: SyncInternalsMessageHandler(); + + SyncInternalsMessageHandler(const SyncInternalsMessageHandler&) = delete; + SyncInternalsMessageHandler& operator=(const SyncInternalsMessageHandler&) = + delete; + ~SyncInternalsMessageHandler() override; void RegisterMessages() override; @@ -91,8 +96,6 @@ bool include_specifics_ = false; base::WeakPtrFactory<SyncInternalsMessageHandler> weak_ptr_factory_; - - DISALLOW_COPY_AND_ASSIGN(SyncInternalsMessageHandler); }; #endif // IOS_COMPONENTS_WEBUI_SYNC_INTERNALS_SYNC_INTERNALS_MESSAGE_HANDLER_H_
diff --git a/ios/components/webui/sync_internals/sync_internals_ui.h b/ios/components/webui/sync_internals/sync_internals_ui.h index b33b15b..7e786df 100644 --- a/ios/components/webui/sync_internals/sync_internals_ui.h +++ b/ios/components/webui/sync_internals/sync_internals_ui.h
@@ -18,10 +18,11 @@ class SyncInternalsUI : public web::WebUIIOSController { public: SyncInternalsUI(web::WebUIIOS* web_ui, const std::string& host); - ~SyncInternalsUI() override; - private: - DISALLOW_COPY_AND_ASSIGN(SyncInternalsUI); + SyncInternalsUI(const SyncInternalsUI&) = delete; + SyncInternalsUI& operator=(const SyncInternalsUI&) = delete; + + ~SyncInternalsUI() override; }; #endif // IOS_COMPONENTS_WEBUI_SYNC_INTERNALS_SYNC_INTERNALS_UI_H_
diff --git a/ios/net/chunked_data_stream_uploader.h b/ios/net/chunked_data_stream_uploader.h index 88bd19a..2a8b51c 100644 --- a/ios/net/chunked_data_stream_uploader.h +++ b/ios/net/chunked_data_stream_uploader.h
@@ -35,6 +35,11 @@ }; ChunkedDataStreamUploader(Delegate* delegate); + + ChunkedDataStreamUploader(const ChunkedDataStreamUploader&) = delete; + ChunkedDataStreamUploader& operator=(const ChunkedDataStreamUploader&) = + delete; + ~ChunkedDataStreamUploader() override; // Interface for iOS layer to try to upload data. If there already has a @@ -76,8 +81,6 @@ bool is_front_of_stream_; base::WeakPtrFactory<ChunkedDataStreamUploader> weak_factory_; - - DISALLOW_COPY_AND_ASSIGN(ChunkedDataStreamUploader); }; } // namespace net
diff --git a/ios/net/cookies/cookie_cache.h b/ios/net/cookies/cookie_cache.h index aa808b51..c662004 100644 --- a/ios/net/cookies/cookie_cache.h +++ b/ios/net/cookies/cookie_cache.h
@@ -24,6 +24,10 @@ class CookieCache { public: CookieCache(); + + CookieCache(const CookieCache&) = delete; + CookieCache& operator=(const CookieCache&) = delete; + ~CookieCache(); // Update the cookie cache with cookies named |name| that would be sent for a @@ -69,8 +73,6 @@ typedef std::map<CookieKey, CookieSet> CookieKeyPathMap; CookieKeyPathMap cache_; - - DISALLOW_COPY_AND_ASSIGN(CookieCache); }; } // namespace net
diff --git a/ios/net/cookies/cookie_store_ios.h b/ios/net/cookies/cookie_store_ios.h index f1b5739..8f5a9480 100644 --- a/ios/net/cookies/cookie_store_ios.h +++ b/ios/net/cookies/cookie_store_ios.h
@@ -68,6 +68,9 @@ // is finished. CookieStoreIOS(NSHTTPCookieStorage* ns_cookie_store, NetLog* net_log); + CookieStoreIOS(const CookieStoreIOS&) = delete; + CookieStoreIOS& operator=(const CookieStoreIOS&) = delete; + ~CookieStoreIOS() override; enum CookiePolicy { ALLOW, BLOCK }; @@ -135,20 +138,27 @@ public CookieChangeSubscription { public: explicit Subscription(base::CallbackListSubscription subscription); + + Subscription(const Subscription&) = delete; + Subscription& operator=(const Subscription&) = delete; + ~Subscription() override; void ResetSubscription(); private: base::CallbackListSubscription subscription_; - - DISALLOW_COPY_AND_ASSIGN(Subscription); }; // CookieChangeDispatcher implementation that proxies into IOSCookieStore. class CookieChangeDispatcherIOS : public CookieChangeDispatcher { public: explicit CookieChangeDispatcherIOS(CookieStoreIOS* cookie_store); + + CookieChangeDispatcherIOS(const CookieChangeDispatcherIOS&) = delete; + CookieChangeDispatcherIOS& operator=(const CookieChangeDispatcherIOS&) = + delete; + ~CookieChangeDispatcherIOS() override; // net::CookieChangeDispatcher @@ -166,8 +176,6 @@ // Instances of this class are always members of CookieStoreIOS, so // |cookie_store| is guaranteed to outlive this instance. CookieStoreIOS* const cookie_store_; - - DISALLOW_COPY_AND_ASSIGN(CookieChangeDispatcherIOS); }; // Interface only used by CookieChangeDispatcherIOS. @@ -304,8 +312,6 @@ CookieChangeDispatcherIOS change_dispatcher_; base::WeakPtrFactory<CookieStoreIOS> weak_factory_; - - DISALLOW_COPY_AND_ASSIGN(CookieStoreIOS); }; } // namespace net
diff --git a/ios/net/cookies/cookie_store_ios_client.h b/ios/net/cookies/cookie_store_ios_client.h index 9c6ff84..83c35c7 100644 --- a/ios/net/cookies/cookie_store_ios_client.h +++ b/ios/net/cookies/cookie_store_ios_client.h
@@ -22,13 +22,14 @@ class CookieStoreIOSClient { public: CookieStoreIOSClient(); + + CookieStoreIOSClient(const CookieStoreIOSClient&) = delete; + CookieStoreIOSClient& operator=(const CookieStoreIOSClient&) = delete; + virtual ~CookieStoreIOSClient(); // Returns instance of SequencedTaskRunner used for blocking file I/O. virtual scoped_refptr<base::SequencedTaskRunner> GetTaskRunner() const; - - private: - DISALLOW_COPY_AND_ASSIGN(CookieStoreIOSClient); }; } // namespace net
diff --git a/ios/net/cookies/ns_http_system_cookie_store.h b/ios/net/cookies/ns_http_system_cookie_store.h index e6fdae9..2df03456 100644 --- a/ios/net/cookies/ns_http_system_cookie_store.h +++ b/ios/net/cookies/ns_http_system_cookie_store.h
@@ -21,6 +21,9 @@ explicit NSHTTPSystemCookieStore(NSHTTPCookieStorage* cookie_store); + NSHTTPSystemCookieStore(const NSHTTPSystemCookieStore&) = delete; + NSHTTPSystemCookieStore& operator=(const NSHTTPSystemCookieStore&) = delete; + ~NSHTTPSystemCookieStore() override; // Gets cookies for URL and calls |callback| async on these cookies. @@ -67,8 +70,6 @@ void ClearStore(); NSHTTPCookieStorage* cookie_store_; - - DISALLOW_COPY_AND_ASSIGN(NSHTTPSystemCookieStore); }; } // namespace net
diff --git a/ios/net/crn_http_protocol_handler.h b/ios/net/crn_http_protocol_handler.h index 0379adf..5571406 100644 --- a/ios/net/crn_http_protocol_handler.h +++ b/ios/net/crn_http_protocol_handler.h
@@ -43,15 +43,16 @@ // the MetricsDelegate callback. struct Metrics { Metrics(); + + Metrics(const Metrics&) = delete; + Metrics& operator=(const Metrics&) = delete; + ~Metrics(); NSURLSessionTask* task; LoadTimingInfo load_timing_info; HttpResponseInfo response_info; base::Time response_end_time; - - private: - DISALLOW_COPY_AND_ASSIGN(Metrics); }; // Set the global instance of the MetricsDelegate.
diff --git a/ios/public/provider/chrome/browser/chrome_browser_provider.h b/ios/public/provider/chrome/browser/chrome_browser_provider.h index 125ab3a..92c25cd4 100644 --- a/ios/public/provider/chrome/browser/chrome_browser_provider.h +++ b/ios/public/provider/chrome/browser/chrome_browser_provider.h
@@ -61,6 +61,10 @@ class Observer { public: Observer() {} + + Observer(const Observer&) = delete; + Observer& operator=(const Observer&) = delete; + virtual ~Observer() {} // Called when a new ChromeIdentityService has been installed. @@ -69,9 +73,6 @@ // Called when the ChromeBrowserProvider will be destroyed. virtual void OnChromeBrowserProviderWillBeDestroyed() {} - - private: - DISALLOW_COPY_AND_ASSIGN(Observer); }; // The constructor is called before web startup.
diff --git a/ios/public/provider/chrome/browser/mailto/mailto_handler_provider.h b/ios/public/provider/chrome/browser/mailto/mailto_handler_provider.h index c9b1230..88d7646 100644 --- a/ios/public/provider/chrome/browser/mailto/mailto_handler_provider.h +++ b/ios/public/provider/chrome/browser/mailto/mailto_handler_provider.h
@@ -19,6 +19,10 @@ class MailtoHandlerProvider { public: MailtoHandlerProvider(); + + MailtoHandlerProvider(const MailtoHandlerProvider&) = delete; + MailtoHandlerProvider& operator=(const MailtoHandlerProvider&) = delete; + virtual ~MailtoHandlerProvider(); // Sets up mailto handling for |browser_state|. @@ -43,9 +47,6 @@ // Handles the specified mailto: URL. The provider falls back on the built-in // URL handling in case of error. virtual void HandleMailtoURL(NSURL* url) const; - - private: - DISALLOW_COPY_AND_ASSIGN(MailtoHandlerProvider); }; #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_MAILTO_MAILTO_HANDLER_PROVIDER_H_
diff --git a/ios/public/provider/chrome/browser/mailto/test_mailto_handler_provider.h b/ios/public/provider/chrome/browser/mailto/test_mailto_handler_provider.h index 69f052d..2b063ef 100644 --- a/ios/public/provider/chrome/browser/mailto/test_mailto_handler_provider.h +++ b/ios/public/provider/chrome/browser/mailto/test_mailto_handler_provider.h
@@ -11,12 +11,14 @@ class TestMailtoHandlerProvider : public MailtoHandlerProvider { public: TestMailtoHandlerProvider(); + + TestMailtoHandlerProvider(const TestMailtoHandlerProvider&) = delete; + TestMailtoHandlerProvider& operator=(const TestMailtoHandlerProvider&) = + delete; + ~TestMailtoHandlerProvider() override; NSString* MailtoHandlerSettingsTitle() const override; - - private: - DISALLOW_COPY_AND_ASSIGN(TestMailtoHandlerProvider); }; #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_MAILTO_TEST_MAILTO_HANDLER_PROVIDER_H_
diff --git a/ios/public/provider/chrome/browser/signin/chrome_identity_service.h b/ios/public/provider/chrome/browser/signin/chrome_identity_service.h index 89ab588..dbbbe1c 100644 --- a/ios/public/provider/chrome/browser/signin/chrome_identity_service.h +++ b/ios/public/provider/chrome/browser/signin/chrome_identity_service.h
@@ -99,6 +99,10 @@ class Observer { public: Observer() {} + + Observer(const Observer&) = delete; + Observer& operator=(const Observer&) = delete; + virtual ~Observer() {} // Handles identity list changed events. @@ -120,9 +124,6 @@ // Called when the ChromeIdentityService will be destroyed. virtual void OnChromeIdentityServiceWillBeDestroyed() {} - - private: - DISALLOW_COPY_AND_ASSIGN(Observer); }; // Callback invoked for each ChromeIdentity when iterating over them with @@ -131,6 +132,10 @@ base::RepeatingCallback<IdentityIteratorCallbackResult(ChromeIdentity*)>; ChromeIdentityService(); + + ChromeIdentityService(const ChromeIdentityService&) = delete; + ChromeIdentityService& operator=(const ChromeIdentityService&) = delete; + virtual ~ChromeIdentityService(); // Handles open URL authentication callback. Returns whether the URL was @@ -279,8 +284,6 @@ private: base::ObserverList<Observer, true>::Unchecked observer_list_; - - DISALLOW_COPY_AND_ASSIGN(ChromeIdentityService); }; } // namespace ios
diff --git a/ios/public/provider/chrome/browser/user_feedback/test_user_feedback_provider.h b/ios/public/provider/chrome/browser/user_feedback/test_user_feedback_provider.h index 40d5efe..155ac144 100644 --- a/ios/public/provider/chrome/browser/user_feedback/test_user_feedback_provider.h +++ b/ios/public/provider/chrome/browser/user_feedback/test_user_feedback_provider.h
@@ -12,6 +12,10 @@ class TestUserFeedbackProvider : public UserFeedbackProvider { public: TestUserFeedbackProvider(); + + TestUserFeedbackProvider(const TestUserFeedbackProvider&) = delete; + TestUserFeedbackProvider& operator=(const TestUserFeedbackProvider&) = delete; + ~TestUserFeedbackProvider() override; // UserFeedbackProvider implementation. @@ -23,8 +27,6 @@ private: bool synchronize_called_ = false; - - DISALLOW_COPY_AND_ASSIGN(TestUserFeedbackProvider); }; #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_USER_FEEDBACK_TEST_USER_FEEDBACK_PROVIDER_H_
diff --git a/ios/public/provider/chrome/browser/user_feedback/user_feedback_provider.h b/ios/public/provider/chrome/browser/user_feedback/user_feedback_provider.h index bb38f12..12ec4c6c4 100644 --- a/ios/public/provider/chrome/browser/user_feedback/user_feedback_provider.h +++ b/ios/public/provider/chrome/browser/user_feedback/user_feedback_provider.h
@@ -50,6 +50,10 @@ class UserFeedbackProvider { public: UserFeedbackProvider(); + + UserFeedbackProvider(const UserFeedbackProvider&) = delete; + UserFeedbackProvider& operator=(const UserFeedbackProvider&) = delete; + virtual ~UserFeedbackProvider(); // Returns true if user feedback is enabled. virtual bool IsUserFeedbackEnabled(); @@ -65,9 +69,6 @@ UserFeedbackSender sender); // Uploads collected feedback reports. virtual void Synchronize(); - - private: - DISALLOW_COPY_AND_ASSIGN(UserFeedbackProvider); }; #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_USER_FEEDBACK_USER_FEEDBACK_PROVIDER_H_
diff --git a/ios/testing/scoped_block_swizzler.h b/ios/testing/scoped_block_swizzler.h index ee37d76..e91e579 100644 --- a/ios/testing/scoped_block_swizzler.h +++ b/ios/testing/scoped_block_swizzler.h
@@ -28,6 +28,9 @@ // contains both method types with the same selector. ScopedBlockSwizzler(Class target, SEL selector, id block, BOOL class_method); + ScopedBlockSwizzler(const ScopedBlockSwizzler&) = delete; + ScopedBlockSwizzler& operator=(const ScopedBlockSwizzler&) = delete; + // Destroys the ScopedBlockSwizzler object, removing the swizzled method and // reinstalling the original method implementation. virtual ~ScopedBlockSwizzler(); @@ -40,8 +43,6 @@ // The original implementation of the swizzled method, saved so that it can be // reinstalled when this object goes out of scope. IMP original_imp_; - - DISALLOW_COPY_AND_ASSIGN(ScopedBlockSwizzler); }; #endif // IOS_TESTING_SCOPED_BLOCK_SWIZZLER_H_
diff --git a/ios/testing/scoped_method_swizzler.h b/ios/testing/scoped_method_swizzler.h index 5ae1be9..67e9847c 100644 --- a/ios/testing/scoped_method_swizzler.h +++ b/ios/testing/scoped_method_swizzler.h
@@ -19,6 +19,9 @@ SEL selector_to_replace, SEL replacing_selector); + ScopedMethodSwizzler(const ScopedMethodSwizzler&) = delete; + ScopedMethodSwizzler& operator=(const ScopedMethodSwizzler&) = delete; + // Destroys the ScopedMethodSwizzler object, removing the swizzled method and // reinstalling the original method implementation. virtual ~ScopedMethodSwizzler(); @@ -29,8 +32,6 @@ // The method that replaces the original method. Method replacing_method_; - - DISALLOW_COPY_AND_ASSIGN(ScopedMethodSwizzler); }; #endif // IOS_TESTING_SCOPED_METHOD_SWIZZLER_H_
diff --git a/ios/web/download/download_controller_impl.h b/ios/web/download/download_controller_impl.h index 3e245fa..e1bd1c5 100644 --- a/ios/web/download/download_controller_impl.h +++ b/ios/web/download/download_controller_impl.h
@@ -26,6 +26,10 @@ public DownloadTaskImpl::Delegate { public: DownloadControllerImpl(); + + DownloadControllerImpl(const DownloadControllerImpl&) = delete; + DownloadControllerImpl& operator=(const DownloadControllerImpl&) = delete; + ~DownloadControllerImpl() override; // DownloadController overrides: @@ -51,8 +55,6 @@ std::set<DownloadTaskImpl*> alive_tasks_; DownloadControllerDelegate* delegate_ = nullptr; SEQUENCE_CHECKER(my_sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(DownloadControllerImpl); }; } // namespace web
diff --git a/ios/web/download/download_task_impl.h b/ios/web/download/download_task_impl.h index 951bbc8..027efd2 100644 --- a/ios/web/download/download_task_impl.h +++ b/ios/web/download/download_task_impl.h
@@ -81,6 +81,10 @@ bool HasPerformedBackgroundDownload() const override; void AddObserver(DownloadTaskObserver* observer) override; void RemoveObserver(DownloadTaskObserver* observer) override; + + DownloadTaskImpl(const DownloadTaskImpl&) = delete; + DownloadTaskImpl& operator=(const DownloadTaskImpl&) = delete; + ~DownloadTaskImpl() override; private: @@ -143,8 +147,6 @@ id<NSObject> observer_ = nil; base::WeakPtrFactory<DownloadTaskImpl> weak_factory_; - - DISALLOW_COPY_AND_ASSIGN(DownloadTaskImpl); }; } // namespace web
diff --git a/ios/web/init/web_main_loop.h b/ios/web/init/web_main_loop.h index 9799bc6..99f8da1 100644 --- a/ios/web/init/web_main_loop.h +++ b/ios/web/init/web_main_loop.h
@@ -22,6 +22,10 @@ class WebMainLoop { public: explicit WebMainLoop(); + + WebMainLoop(const WebMainLoop&) = delete; + WebMainLoop& operator=(const WebMainLoop&) = delete; + virtual ~WebMainLoop(); void Init(); @@ -78,8 +82,6 @@ // Members initialized in |WebThreadsStarted()| -------------------------- std::unique_ptr<CookieNotificationBridge> cookie_notification_bridge_; - - DISALLOW_COPY_AND_ASSIGN(WebMainLoop); }; } // namespace web
diff --git a/ios/web/init/web_main_runner.mm b/ios/web/init/web_main_runner.mm index 0989471..2206aad 100644 --- a/ios/web/init/web_main_runner.mm +++ b/ios/web/init/web_main_runner.mm
@@ -29,6 +29,9 @@ completed_basic_startup_(false), delegate_(nullptr) {} + WebMainRunnerImpl(const WebMainRunnerImpl&) = delete; + WebMainRunnerImpl& operator=(const WebMainRunnerImpl&) = delete; + ~WebMainRunnerImpl() override { if (is_initialized_ && !is_shutdown_) { ShutDown(); @@ -121,8 +124,6 @@ WebClient empty_web_client_; std::unique_ptr<WebMainLoop> main_loop_; - - DISALLOW_COPY_AND_ASSIGN(WebMainRunnerImpl); }; // static
diff --git a/ios/web/js_messaging/web_frame_impl.h b/ios/web/js_messaging/web_frame_impl.h index 87b0e927..a373719 100644 --- a/ios/web/js_messaging/web_frame_impl.h +++ b/ios/web/js_messaging/web_frame_impl.h
@@ -38,6 +38,10 @@ bool is_main_frame, GURL security_origin, web::WebState* web_state); + + WebFrameImpl(const WebFrameImpl&) = delete; + WebFrameImpl& operator=(const WebFrameImpl&) = delete; + ~WebFrameImpl() override; // Sets the value to use for the next message ID. @@ -184,8 +188,6 @@ base::CallbackListSubscription subscription_; base::WeakPtrFactory<WebFrameImpl> weak_ptr_factory_; - - DISALLOW_COPY_AND_ASSIGN(WebFrameImpl); }; } // namespace web
diff --git a/ios/web/js_messaging/web_frames_manager_impl.h b/ios/web/js_messaging/web_frames_manager_impl.h index e17f2d1..1920e5fe 100644 --- a/ios/web/js_messaging/web_frames_manager_impl.h +++ b/ios/web/js_messaging/web_frames_manager_impl.h
@@ -16,6 +16,10 @@ class WebFramesManagerImpl : public WebFramesManager { public: explicit WebFramesManagerImpl(); + + WebFramesManagerImpl(const WebFramesManagerImpl&) = delete; + WebFramesManagerImpl& operator=(const WebFramesManagerImpl&) = delete; + ~WebFramesManagerImpl() override; // Adds |frame| to the list of web frames. A frame with the same frame ID must @@ -40,8 +44,6 @@ WebFrame* main_web_frame_ = nullptr; base::WeakPtrFactory<WebFramesManagerImpl> weak_factory_; - - DISALLOW_COPY_AND_ASSIGN(WebFramesManagerImpl); }; } // namespace web
diff --git a/ios/web/navigation/BUILD.gn b/ios/web/navigation/BUILD.gn index 4756ba9..be659082 100644 --- a/ios/web/navigation/BUILD.gn +++ b/ios/web/navigation/BUILD.gn
@@ -81,7 +81,6 @@ "//ios/web/common:user_agent", "//ios/web/navigation:wk_navigation_util", "//ios/web/public", - "//ios/web/public/deprecated:deprecated_navigation_util", "//ios/web/public/security", "//ios/web/web_state/ui:crw_web_view_navigation_proxy", "//ui/base", @@ -94,8 +93,6 @@ "navigation_context_impl.mm", "navigation_item_impl.h", "navigation_item_impl.mm", - "navigation_item_impl_list.h", - "navigation_item_impl_list.mm", "navigation_manager_delegate.h", "navigation_manager_impl.h", "navigation_manager_impl.mm",
diff --git a/ios/web/navigation/navigation_context_impl.h b/ios/web/navigation/navigation_context_impl.h index 35ed51c..4048be4f 100644 --- a/ios/web/navigation/navigation_context_impl.h +++ b/ios/web/navigation/navigation_context_impl.h
@@ -50,6 +50,10 @@ NSError* GetError() const override; net::HttpResponseHeaders* GetResponseHeaders() const override; bool IsRendererInitiated() const override; + + NavigationContextImpl(const NavigationContextImpl&) = delete; + NavigationContextImpl& operator=(const NavigationContextImpl&) = delete; + ~NavigationContextImpl() override; // Setters for navigation context data members. @@ -133,8 +137,6 @@ // NavigationManager if the navigated was requested, but context does not yet // exist or when navigation was aborted. std::unique_ptr<NavigationItemImpl> item_; - - DISALLOW_COPY_AND_ASSIGN(NavigationContextImpl); }; } // namespace web
diff --git a/ios/web/navigation/navigation_manager_impl.h b/ios/web/navigation/navigation_manager_impl.h index 0519ac4..a2a0461b 100644 --- a/ios/web/navigation/navigation_manager_impl.h +++ b/ios/web/navigation/navigation_manager_impl.h
@@ -14,7 +14,6 @@ #include "base/macros.h" #import "ios/web/navigation/navigation_item_impl.h" #include "ios/web/navigation/time_smoother.h" -#import "ios/web/public/deprecated/navigation_item_list.h" #import "ios/web/public/navigation/navigation_manager.h" #include "ios/web/public/navigation/reload_type.h" #include "ui/base/page_transition_types.h" @@ -249,8 +248,8 @@ void GoToIndex(int index) final; void Reload(ReloadType reload_type, bool check_for_reposts) final; void ReloadWithUserAgentType(UserAgentType user_agent_type) final; - NavigationItemList GetBackwardItems() const final; - NavigationItemList GetForwardItems() const final; + std::vector<NavigationItem*> GetBackwardItems() const final; + std::vector<NavigationItem*> GetForwardItems() const final; void Restore(int last_committed_item_index, std::vector<std::unique_ptr<NavigationItem>> items) final; bool IsRestoreSessionInProgress() const final; @@ -280,6 +279,10 @@ class WKWebViewCache { public: explicit WKWebViewCache(NavigationManagerImpl* navigation_manager); + + WKWebViewCache(const WKWebViewCache&) = delete; + WKWebViewCache& operator=(const WKWebViewCache&) = delete; + ~WKWebViewCache(); // Returns true if the navigation manager is attached to a WKWebView. @@ -329,8 +332,6 @@ std::vector<std::unique_ptr<NavigationItemImpl>> cached_items_; int cached_current_item_index_; - - DISALLOW_COPY_AND_ASSIGN(WKWebViewCache); }; // Type of the list passed to restore items.
diff --git a/ios/web/navigation/navigation_manager_impl.mm b/ios/web/navigation/navigation_manager_impl.mm index c3f53b899..2a53e6ad 100644 --- a/ios/web/navigation/navigation_manager_impl.mm +++ b/ios/web/navigation/navigation_manager_impl.mm
@@ -22,9 +22,9 @@ #include "base/timer/elapsed_timer.h" #include "ios/web/common/features.h" #import "ios/web/navigation/crw_navigation_item_holder.h" -#include "ios/web/navigation/navigation_item_impl_list.h" #import "ios/web/navigation/navigation_manager_delegate.h" #import "ios/web/navigation/wk_navigation_util.h" +#import "ios/web/public/navigation/navigation_item.h" #import "ios/web/public/web_client.h" #import "ios/web/public/web_state.h" #import "ios/web/web_state/ui/crw_web_view_navigation_proxy.h" @@ -448,7 +448,7 @@ for (size_t i = 0; i < forward_items.size(); i++) { const NavigationItemImpl* item = GetNavigationItemImplAtIndex(i + current_item_index); - forward_items[i] = std::make_unique<web::NavigationItemImpl>(*item); + forward_items[i] = std::make_unique<NavigationItemImpl>(*item); } DiscardNonCommittedItems(); @@ -920,8 +920,8 @@ LoadURLWithParams(params); } -NavigationItemList NavigationManagerImpl::GetBackwardItems() const { - NavigationItemList items; +std::vector<NavigationItem*> NavigationManagerImpl::GetBackwardItems() const { + std::vector<NavigationItem*> items; if (is_restore_session_in_progress_) return items; @@ -934,8 +934,8 @@ return items; } -NavigationItemList NavigationManagerImpl::GetForwardItems() const { - NavigationItemList items; +std::vector<NavigationItem*> NavigationManagerImpl::GetForwardItems() const { + std::vector<NavigationItem*> items; if (is_restore_session_in_progress_) return items;
diff --git a/ios/web/navigation/navigation_manager_impl_unittest.mm b/ios/web/navigation/navigation_manager_impl_unittest.mm index b59e3e9..510f3ab5 100644 --- a/ios/web/navigation/navigation_manager_impl_unittest.mm +++ b/ios/web/navigation/navigation_manager_impl_unittest.mm
@@ -17,7 +17,7 @@ #import "ios/web/navigation/navigation_manager_delegate.h" #import "ios/web/navigation/navigation_manager_impl.h" #import "ios/web/navigation/wk_navigation_util.h" -#include "ios/web/public/navigation/navigation_item.h" +#import "ios/web/public/navigation/navigation_item.h" #include "ios/web/public/navigation/reload_type.h" #include "ios/web/public/test/fakes/fake_browser_state.h" #import "ios/web/public/test/fakes/fake_navigation_manager.h" @@ -1550,7 +1550,8 @@ navigation_manager()->CommitPendingItem(); EXPECT_EQ(2, navigation_manager()->GetLastCommittedItemIndex()); - NavigationItemList back_items = navigation_manager()->GetBackwardItems(); + std::vector<NavigationItem*> back_items = + navigation_manager()->GetBackwardItems(); EXPECT_EQ(2U, back_items.size()); EXPECT_EQ("http://www.url.com/1", back_items[0]->GetURL().spec()); EXPECT_EQ("http://www.url.com/0", back_items[1]->GetURL().spec()); @@ -1561,7 +1562,8 @@ back_items = navigation_manager()->GetBackwardItems(); EXPECT_EQ(1U, back_items.size()); EXPECT_EQ("http://www.url.com/0", back_items[0]->GetURL().spec()); - NavigationItemList forward_items = navigation_manager()->GetForwardItems(); + std::vector<NavigationItem*> forward_items = + navigation_manager()->GetForwardItems(); EXPECT_EQ(1U, forward_items.size()); EXPECT_EQ("http://www.url.com/2", forward_items[0]->GetURL().spec()); } @@ -1686,7 +1688,8 @@ EXPECT_EQ(1, navigation_manager()->GetLastCommittedItemIndex()); EXPECT_TRUE(navigation_manager()->GetPendingItem()); - NavigationItemList back_items = navigation_manager()->GetBackwardItems(); + std::vector<NavigationItem*> back_items = + navigation_manager()->GetBackwardItems(); EXPECT_EQ(1U, back_items.size()); EXPECT_EQ("http://www.url.com/0", back_items[0]->GetURL().spec()); } @@ -2867,11 +2870,11 @@ EXPECT_EQ(1, manager_->GetIndexForOffset(0)); EXPECT_EQ(2, manager_->GetIndexForOffset(1)); - NavigationItemList backward_items = manager_->GetBackwardItems(); + std::vector<NavigationItem*> backward_items = manager_->GetBackwardItems(); EXPECT_EQ(1UL, backward_items.size()); EXPECT_EQ(url0_, backward_items[0]->GetURL()); - NavigationItemList forward_items = manager_->GetForwardItems(); + std::vector<NavigationItem*> forward_items = manager_->GetForwardItems(); EXPECT_EQ(1UL, forward_items.size()); EXPECT_EQ(url2_, forward_items[0]->GetURL()); }
diff --git a/ios/web/navigation/serializable_user_data_manager_impl.h b/ios/web/navigation/serializable_user_data_manager_impl.h index 448001a..340acb55 100644 --- a/ios/web/navigation/serializable_user_data_manager_impl.h +++ b/ios/web/navigation/serializable_user_data_manager_impl.h
@@ -13,6 +13,10 @@ class SerializableUserDataImpl : public SerializableUserData { public: SerializableUserDataImpl(); + + SerializableUserDataImpl(const SerializableUserDataImpl&) = delete; + SerializableUserDataImpl& operator=(const SerializableUserDataImpl&) = delete; + ~SerializableUserDataImpl() override; // Constructor taking the NSDictionary holding the serializable data. @@ -30,13 +34,17 @@ // The dictionary passed on initialization. After calling Decode(), this will // contain the data that is decoded from the NSCoder. NSDictionary<NSString*, id<NSCoding>>* data_; - - DISALLOW_COPY_AND_ASSIGN(SerializableUserDataImpl); }; class SerializableUserDataManagerImpl : public SerializableUserDataManager { public: SerializableUserDataManagerImpl(); + + SerializableUserDataManagerImpl(const SerializableUserDataManagerImpl&) = + delete; + SerializableUserDataManagerImpl& operator=( + const SerializableUserDataManagerImpl&) = delete; + ~SerializableUserDataManagerImpl(); // SerializableUserDataManager: @@ -49,8 +57,6 @@ private: // The dictionary that stores serializable user data. NSMutableDictionary<NSString*, id<NSCoding>>* data_; - - DISALLOW_COPY_AND_ASSIGN(SerializableUserDataManagerImpl); }; } // namespace web
diff --git a/ios/web/navigation/session_storage_builder.mm b/ios/web/navigation/session_storage_builder.mm index 75e846bf..6e3a61a7 100644 --- a/ios/web/navigation/session_storage_builder.mm +++ b/ios/web/navigation/session_storage_builder.mm
@@ -13,6 +13,7 @@ #import "ios/web/navigation/navigation_item_storage_builder.h" #include "ios/web/navigation/navigation_manager_impl.h" #import "ios/web/navigation/wk_navigation_util.h" +#import "ios/web/public/navigation/navigation_item.h" #import "ios/web/public/session/crw_session_storage.h" #import "ios/web/public/session/serializable_user_data_manager.h" #import "ios/web/public/web_client.h" @@ -91,7 +92,7 @@ DCHECK(storage); web_state->created_with_opener_ = storage.hasOpener; NSArray* item_storages = storage.itemStorages; - web::ScopedNavigationItemList items(item_storages.count); + std::vector<std::unique_ptr<NavigationItem>> items(item_storages.count); NavigationItemStorageBuilder item_storage_builder; for (size_t index = 0; index < item_storages.count; ++index) { std::unique_ptr<NavigationItemImpl> item_impl =
diff --git a/ios/web/navigation/wk_back_forward_list_item_holder.h b/ios/web/navigation/wk_back_forward_list_item_holder.h index 4fc84ed..9d88e13 100644 --- a/ios/web/navigation/wk_back_forward_list_item_holder.h +++ b/ios/web/navigation/wk_back_forward_list_item_holder.h
@@ -21,6 +21,10 @@ // thus needs to be preserved (e.g., WKNavigationType, MIME type). class WKBackForwardListItemHolder : public base::SupportsUserData::Data { public: + WKBackForwardListItemHolder(const WKBackForwardListItemHolder&) = delete; + WKBackForwardListItemHolder& operator=(const WKBackForwardListItemHolder&) = + delete; + ~WKBackForwardListItemHolder() override; // Returns the WKBackForwardListItemHolder for the NavigationItem |item|. @@ -65,8 +69,6 @@ // The MIME type of the page content. NSString* mime_type_; - - DISALLOW_COPY_AND_ASSIGN(WKBackForwardListItemHolder); }; } // namespace web
diff --git a/ios/web/navigation/wk_navigation_util_unittest.mm b/ios/web/navigation/wk_navigation_util_unittest.mm index 90d8ad1..774fc07 100644 --- a/ios/web/navigation/wk_navigation_util_unittest.mm +++ b/ios/web/navigation/wk_navigation_util_unittest.mm
@@ -14,6 +14,7 @@ #include "base/values.h" #include "ios/web/common/features.h" #import "ios/web/navigation/navigation_item_impl.h" +#import "ios/web/public/navigation/navigation_item.h" #include "ios/web/test/test_url_constants.h" #include "net/base/escape.h" #import "net/base/mac/url_conversions.h"
diff --git a/ios/web/net/cookie_notification_bridge.h b/ios/web/net/cookie_notification_bridge.h index 72216420..e0c65f9 100644 --- a/ios/web/net/cookie_notification_bridge.h +++ b/ios/web/net/cookie_notification_bridge.h
@@ -18,6 +18,10 @@ class CookieNotificationBridge { public: CookieNotificationBridge(); + + CookieNotificationBridge(const CookieNotificationBridge&) = delete; + CookieNotificationBridge& operator=(const CookieNotificationBridge&) = delete; + ~CookieNotificationBridge(); private: @@ -26,8 +30,6 @@ // Token returned by NSNotificationCenter upon registration. Owned by the // bridge and used to unregister from NSNotificationCenter in destructor. __strong id<NSObject> registration_; - - DISALLOW_COPY_AND_ASSIGN(CookieNotificationBridge); }; } // namespace web
diff --git a/ios/web/net/cookies/wk_http_system_cookie_store.h b/ios/web/net/cookies/wk_http_system_cookie_store.h index 7337db3a..688ddd12 100644 --- a/ios/web/net/cookies/wk_http_system_cookie_store.h +++ b/ios/web/net/cookies/wk_http_system_cookie_store.h
@@ -22,6 +22,9 @@ explicit WKHTTPSystemCookieStore( WKWebViewConfigurationProvider* config_provider); + WKHTTPSystemCookieStore(const WKHTTPSystemCookieStore&) = delete; + WKHTTPSystemCookieStore& operator=(const WKHTTPSystemCookieStore&) = delete; + ~WKHTTPSystemCookieStore() override; void GetCookiesForURLAsync( @@ -70,8 +73,6 @@ // Using CRWWKHTTPCookieStore instead of using WKHTTPCookieStore directly to // work around several bugs on WKHTTPCookieStore. CRWWKHTTPCookieStore* crw_cookie_store_ = nil; - - DISALLOW_COPY_AND_ASSIGN(WKHTTPSystemCookieStore); }; } // namespace web
diff --git a/ios/web/public/deprecated/BUILD.gn b/ios/web/public/deprecated/BUILD.gn index 4f2b480..63fa3f4c 100644 --- a/ios/web/public/deprecated/BUILD.gn +++ b/ios/web/public/deprecated/BUILD.gn
@@ -37,15 +37,6 @@ ] } -source_set("deprecated_navigation_util") { - configs += [ "//build/config/compiler:enable_arc" ] - - sources = [ - "navigation_item_list.h", - "navigation_item_list.mm", - ] -} - source_set("test_doubles") { configs += [ "//build/config/compiler:enable_arc" ]
diff --git a/ios/web/public/deprecated/navigation_item_list.h b/ios/web/public/deprecated/navigation_item_list.h deleted file mode 100644 index f691242..0000000 --- a/ios/web/public/deprecated/navigation_item_list.h +++ /dev/null
@@ -1,29 +0,0 @@ -// Copyright 2017 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_WEB_PUBLIC_DEPRECATED_NAVIGATION_ITEM_LIST_H_ -#define IOS_WEB_PUBLIC_DEPRECATED_NAVIGATION_ITEM_LIST_H_ - -#include <memory> -#include <vector> - -namespace web { - -class NavigationItem; - -// Convenience typedef for a list of raw NavigationItem pointers. -// TODO(crbug.com/689321): Clean up these typedefs. -typedef std::vector<NavigationItem*> NavigationItemList; - -// Convenience typedef for a list of scoped NavigationItem pointers. -typedef std::vector<std::unique_ptr<NavigationItem>> ScopedNavigationItemList; - -// Returns a NavigationItemList populated with raw pointer values from -// |scoped_list|. -NavigationItemList CreateRawNavigationItemList( - const ScopedNavigationItemList& scoped_list); - -} // namespace web - -#endif // IOS_WEB_PUBLIC_DEPRECATED_NAVIGATION_ITEM_LIST_H_
diff --git a/ios/web/public/deprecated/navigation_item_list.mm b/ios/web/public/deprecated/navigation_item_list.mm deleted file mode 100644 index e23be158..0000000 --- a/ios/web/public/deprecated/navigation_item_list.mm +++ /dev/null
@@ -1,21 +0,0 @@ -// Copyright 2017 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 "ios/web/public/deprecated/navigation_item_list.h" - -#if !defined(__has_feature) || !__has_feature(objc_arc) -#error "This file requires ARC support." -#endif - -namespace web { - -NavigationItemList CreateRawNavigationItemList( - const ScopedNavigationItemList& scoped_list) { - NavigationItemList list(scoped_list.size()); - for (size_t index = 0; index < scoped_list.size(); ++index) - list[index] = scoped_list[index].get(); - return list; -} - -} // namespace web
diff --git a/ios/web/public/download/download_controller.h b/ios/web/public/download/download_controller.h index da34e46..dc06e21 100644 --- a/ios/web/public/download/download_controller.h +++ b/ios/web/public/download/download_controller.h
@@ -113,10 +113,11 @@ virtual DownloadControllerDelegate* GetDelegate() const = 0; DownloadController() = default; - virtual ~DownloadController() = default; - private: - DISALLOW_COPY_AND_ASSIGN(DownloadController); + DownloadController(const DownloadController&) = delete; + DownloadController& operator=(const DownloadController&) = delete; + + virtual ~DownloadController() = default; }; } // namespace web
diff --git a/ios/web/public/download/download_controller_delegate.h b/ios/web/public/download/download_controller_delegate.h index 9cf08be2..2c4bc87 100644 --- a/ios/web/public/download/download_controller_delegate.h +++ b/ios/web/public/download/download_controller_delegate.h
@@ -41,10 +41,12 @@ DownloadController* download_controller) {} DownloadControllerDelegate() = default; - virtual ~DownloadControllerDelegate() = default; - private: - DISALLOW_COPY_AND_ASSIGN(DownloadControllerDelegate); + DownloadControllerDelegate(const DownloadControllerDelegate&) = delete; + DownloadControllerDelegate& operator=(const DownloadControllerDelegate&) = + delete; + + virtual ~DownloadControllerDelegate() = default; }; } // namespace web
diff --git a/ios/web/public/download/download_task.h b/ios/web/public/download/download_task.h index 8937a7bd..b2eabcf3 100644 --- a/ios/web/public/download/download_task.h +++ b/ios/web/public/download/download_task.h
@@ -122,9 +122,11 @@ virtual void RemoveObserver(DownloadTaskObserver* observer) = 0; DownloadTask() = default; - virtual ~DownloadTask() = default; - DISALLOW_COPY_AND_ASSIGN(DownloadTask); + DownloadTask(const DownloadTask&) = delete; + DownloadTask& operator=(const DownloadTask&) = delete; + + virtual ~DownloadTask() = default; }; } // namespace web
diff --git a/ios/web/public/download/download_task_observer.h b/ios/web/public/download/download_task_observer.h index 2110817..9e4a3baf 100644 --- a/ios/web/public/download/download_task_observer.h +++ b/ios/web/public/download/download_task_observer.h
@@ -28,10 +28,11 @@ virtual void OnDownloadDestroyed(DownloadTask* task) {} DownloadTaskObserver() = default; - virtual ~DownloadTaskObserver() = default; - private: - DISALLOW_COPY_AND_ASSIGN(DownloadTaskObserver); + DownloadTaskObserver(const DownloadTaskObserver&) = delete; + DownloadTaskObserver& operator=(const DownloadTaskObserver&) = delete; + + virtual ~DownloadTaskObserver() = default; }; } // namespace web
diff --git a/ios/web/public/find_in_page/find_in_page_manager.h b/ios/web/public/find_in_page/find_in_page_manager.h index 2340f61..e1aaec43 100644 --- a/ios/web/public/find_in_page/find_in_page_manager.h +++ b/ios/web/public/find_in_page/find_in_page_manager.h
@@ -57,14 +57,15 @@ virtual FindInPageManagerDelegate* GetDelegate() = 0; virtual void SetDelegate(FindInPageManagerDelegate* delegate) = 0; + FindInPageManager(const FindInPageManager&) = delete; + FindInPageManager& operator=(const FindInPageManager&) = delete; + ~FindInPageManager() override {} WEB_STATE_USER_DATA_KEY_DECL(); protected: FindInPageManager() {} - - DISALLOW_COPY_AND_ASSIGN(FindInPageManager); }; } // namespace web
diff --git a/ios/web/public/find_in_page/find_in_page_manager_delegate_bridge.h b/ios/web/public/find_in_page/find_in_page_manager_delegate_bridge.h index d752f1c..3469c5f 100644 --- a/ios/web/public/find_in_page/find_in_page_manager_delegate_bridge.h +++ b/ios/web/public/find_in_page/find_in_page_manager_delegate_bridge.h
@@ -51,6 +51,12 @@ public: explicit FindInPageManagerDelegateBridge( id<CRWFindInPageManagerDelegate> delegate); + + FindInPageManagerDelegateBridge(const FindInPageManagerDelegateBridge&) = + delete; + FindInPageManagerDelegateBridge& operator=( + const FindInPageManagerDelegateBridge&) = delete; + ~FindInPageManagerDelegateBridge() override; // FindInPageManagerDelegate overrides. @@ -63,7 +69,6 @@ private: __weak id<CRWFindInPageManagerDelegate> delegate_ = nil; - DISALLOW_COPY_AND_ASSIGN(FindInPageManagerDelegateBridge); }; } // namespace web
diff --git a/ios/web/public/js_messaging/web_frame.h b/ios/web/public/js_messaging/web_frame.h index 0f97c5d..2939236f 100644 --- a/ios/web/public/js_messaging/web_frame.h +++ b/ios/web/public/js_messaging/web_frame.h
@@ -74,12 +74,13 @@ // Returns the WebFrameInternal instance for this object. virtual WebFrameInternal* GetWebFrameInternal() = 0; + WebFrame(const WebFrame&) = delete; + WebFrame& operator=(const WebFrame&) = delete; + ~WebFrame() override {} protected: WebFrame() {} - - DISALLOW_COPY_AND_ASSIGN(WebFrame); }; } // namespace web
diff --git a/ios/web/public/js_messaging/web_frames_manager.h b/ios/web/public/js_messaging/web_frames_manager.h index 33482382..791b81d 100644 --- a/ios/web/public/js_messaging/web_frames_manager.h +++ b/ios/web/public/js_messaging/web_frames_manager.h
@@ -23,6 +23,9 @@ // process crashed, etc.). class WebFramesManager { public: + WebFramesManager(const WebFramesManager&) = delete; + WebFramesManager& operator=(const WebFramesManager&) = delete; + virtual ~WebFramesManager() {} // Returns a list of all the web frames associated with WebState. @@ -42,8 +45,6 @@ protected: WebFramesManager() {} - - DISALLOW_COPY_AND_ASSIGN(WebFramesManager); }; } // namespace web
diff --git a/ios/web/public/navigation/BUILD.gn b/ios/web/public/navigation/BUILD.gn index 2c6b9ea..900225b 100644 --- a/ios/web/public/navigation/BUILD.gn +++ b/ios/web/public/navigation/BUILD.gn
@@ -5,7 +5,6 @@ source_set("navigation") { deps = [ "//ios/web/common:user_agent", - "//ios/web/public/deprecated:deprecated_navigation_util", "//ios/web/public/ui", "//ui/base", "//url",
diff --git a/ios/web/public/navigation/navigation_manager.h b/ios/web/public/navigation/navigation_manager.h index 49f153e..60d37531 100644 --- a/ios/web/public/navigation/navigation_manager.h +++ b/ios/web/public/navigation/navigation_manager.h
@@ -11,7 +11,6 @@ #include "base/callback.h" #include "ios/web/common/user_agent.h" -#include "ios/web/public/deprecated/navigation_item_list.h" #include "ios/web/public/navigation/browser_url_rewriter.h" #include "ios/web/public/navigation/referrer.h" #include "ios/web/public/navigation/reload_type.h" @@ -166,8 +165,8 @@ // Returns a list of all non-redirected NavigationItems whose index precedes // or follows the current index. - virtual NavigationItemList GetBackwardItems() const = 0; - virtual NavigationItemList GetForwardItems() const = 0; + virtual std::vector<NavigationItem*> GetBackwardItems() const = 0; + virtual std::vector<NavigationItem*> GetForwardItems() const = 0; // Initializes this NavigationManager with the given saved navigations, using // |last_committed_item_index| as the currently loaded item. Before this call
diff --git a/ios/web/public/navigation/web_state_policy_decider_bridge.h b/ios/web/public/navigation/web_state_policy_decider_bridge.h index 9e8276c1..358a7fd 100644 --- a/ios/web/public/navigation/web_state_policy_decider_bridge.h +++ b/ios/web/public/navigation/web_state_policy_decider_bridge.h
@@ -41,6 +41,11 @@ public: WebStatePolicyDeciderBridge(web::WebState* web_state, id<CRWWebStatePolicyDecider> decider); + + WebStatePolicyDeciderBridge(const WebStatePolicyDeciderBridge&) = delete; + WebStatePolicyDeciderBridge& operator=(const WebStatePolicyDeciderBridge&) = + delete; + ~WebStatePolicyDeciderBridge() override; // web::WebStatePolicyDecider methods. @@ -58,8 +63,6 @@ private: // CRWWebStatePolicyDecider which receives forwarded calls. __weak id<CRWWebStatePolicyDecider> decider_ = nil; - - DISALLOW_COPY_AND_ASSIGN(WebStatePolicyDeciderBridge); }; } // web
diff --git a/ios/web/public/session/serializable_user_data_manager.h b/ios/web/public/session/serializable_user_data_manager.h index 4c46b74..b31c7ab 100644 --- a/ios/web/public/session/serializable_user_data_manager.h +++ b/ios/web/public/session/serializable_user_data_manager.h
@@ -17,6 +17,9 @@ // Class used to serialize values added to SerializableUserDataManager. class SerializableUserData { public: + SerializableUserData(const SerializableUserData&) = delete; + SerializableUserData& operator=(const SerializableUserData&) = delete; + virtual ~SerializableUserData() = default; // Factory method. @@ -30,9 +33,6 @@ protected: SerializableUserData() = default; - - private: - DISALLOW_COPY_AND_ASSIGN(SerializableUserData); }; // Class that can be used to add serializable user data to a WebState.
diff --git a/ios/web/public/test/fakes/BUILD.gn b/ios/web/public/test/fakes/BUILD.gn index eb6f58d..cb05348 100644 --- a/ios/web/public/test/fakes/BUILD.gn +++ b/ios/web/public/test/fakes/BUILD.gn
@@ -13,7 +13,6 @@ "//ios/web/js_messaging:web_frames_manager_impl_header", "//ios/web/navigation:core", "//ios/web/public/deprecated", - "//ios/web/public/deprecated:deprecated_navigation_util", "//ios/web/public/download", "//ios/web/public/find_in_page", "//ios/web/public/js_messaging",
diff --git a/ios/web/public/test/fakes/fake_download_controller_delegate.h b/ios/web/public/test/fakes/fake_download_controller_delegate.h index 9ff6670..37a7362 100644 --- a/ios/web/public/test/fakes/fake_download_controller_delegate.h +++ b/ios/web/public/test/fakes/fake_download_controller_delegate.h
@@ -20,6 +20,12 @@ class FakeDownloadControllerDelegate : public DownloadControllerDelegate { public: FakeDownloadControllerDelegate(DownloadController* controller); + + FakeDownloadControllerDelegate(const FakeDownloadControllerDelegate&) = + delete; + FakeDownloadControllerDelegate& operator=( + const FakeDownloadControllerDelegate&) = delete; + ~FakeDownloadControllerDelegate() override; using AliveDownloadTaskList = @@ -38,8 +44,6 @@ DownloadController* controller_ = nullptr; AliveDownloadTaskList alive_download_tasks_; - - DISALLOW_COPY_AND_ASSIGN(FakeDownloadControllerDelegate); }; } // namespace web
diff --git a/ios/web/public/test/fakes/fake_download_task.h b/ios/web/public/test/fakes/fake_download_task.h index a79153e..e7d4edc9 100644 --- a/ios/web/public/test/fakes/fake_download_task.h +++ b/ios/web/public/test/fakes/fake_download_task.h
@@ -18,6 +18,10 @@ class FakeDownloadTask : public DownloadTask { public: FakeDownloadTask(const GURL& original_url, const std::string& mime_type); + + FakeDownloadTask(const FakeDownloadTask&) = delete; + FakeDownloadTask& operator=(const FakeDownloadTask&) = delete; + ~FakeDownloadTask() override; // DownloadTask overrides: @@ -77,8 +81,6 @@ std::u16string suggested_file_name_; bool has_performed_background_download_ = false; __strong NSString* identifier_ = nil; - - DISALLOW_COPY_AND_ASSIGN(FakeDownloadTask); }; } // namespace web
diff --git a/ios/web/public/test/fakes/fake_find_in_page_manager_delegate.h b/ios/web/public/test/fakes/fake_find_in_page_manager_delegate.h index c17c01f..08ab3a5 100644 --- a/ios/web/public/test/fakes/fake_find_in_page_manager_delegate.h +++ b/ios/web/public/test/fakes/fake_find_in_page_manager_delegate.h
@@ -18,6 +18,11 @@ class FakeFindInPageManagerDelegate : public FindInPageManagerDelegate { public: FakeFindInPageManagerDelegate(); + + FakeFindInPageManagerDelegate(const FakeFindInPageManagerDelegate&) = delete; + FakeFindInPageManagerDelegate& operator=( + const FakeFindInPageManagerDelegate&) = delete; + ~FakeFindInPageManagerDelegate() override; // FindInPageManagerDelegate override @@ -47,7 +52,6 @@ private: std::unique_ptr<State> delegate_state_; - DISALLOW_COPY_AND_ASSIGN(FakeFindInPageManagerDelegate); }; } // namespace web
diff --git a/ios/web/public/test/fakes/fake_navigation_context.h b/ios/web/public/test/fakes/fake_navigation_context.h index 0d1cefe6..2f40d620 100644 --- a/ios/web/public/test/fakes/fake_navigation_context.h +++ b/ios/web/public/test/fakes/fake_navigation_context.h
@@ -19,6 +19,9 @@ // Tracks information related to a single navigation. class FakeNavigationContext : public NavigationContext { public: + FakeNavigationContext(const FakeNavigationContext&) = delete; + FakeNavigationContext& operator=(const FakeNavigationContext&) = delete; + ~FakeNavigationContext() override; FakeNavigationContext(); @@ -63,8 +66,6 @@ __strong NSError* error_ = nil; scoped_refptr<net::HttpResponseHeaders> response_headers_; bool renderer_initiated_ = false; - - DISALLOW_COPY_AND_ASSIGN(FakeNavigationContext); }; } // namespace web
diff --git a/ios/web/public/test/fakes/fake_navigation_manager.h b/ios/web/public/test/fakes/fake_navigation_manager.h index be7c093..be87b22 100644 --- a/ios/web/public/test/fakes/fake_navigation_manager.h +++ b/ios/web/public/test/fakes/fake_navigation_manager.h
@@ -6,7 +6,6 @@ #define IOS_WEB_PUBLIC_TEST_FAKES_FAKE_NAVIGATION_MANAGER_H_ #include "base/callback.h" -#include "ios/web/public/deprecated/navigation_item_list.h" #import "ios/web/public/navigation/navigation_item.h" #import "ios/web/public/navigation/navigation_manager.h" #include "ui/base/page_transition_types.h" @@ -42,8 +41,8 @@ void GoToIndex(int index) override; void Reload(ReloadType reload_type, bool check_for_reposts) override; void ReloadWithUserAgentType(UserAgentType user_agent_type) override; - NavigationItemList GetBackwardItems() const override; - NavigationItemList GetForwardItems() const override; + std::vector<NavigationItem*> GetBackwardItems() const override; + std::vector<NavigationItem*> GetForwardItems() const override; void Restore(int last_committed_item_index, std::vector<std::unique_ptr<NavigationItem>> items) override; bool IsRestoreSessionInProgress() const override; @@ -85,7 +84,7 @@ private: // A list of items constructed by calling AddItem(). - web::ScopedNavigationItemList items_; + std::vector<std::unique_ptr<NavigationItem>> items_; int items_index_; // Individual backing instance variables for Set* test set up methods. NavigationItem* pending_item_;
diff --git a/ios/web/public/test/fakes/fake_navigation_manager.mm b/ios/web/public/test/fakes/fake_navigation_manager.mm index 7a7e2da..f4004307 100644 --- a/ios/web/public/test/fakes/fake_navigation_manager.mm +++ b/ios/web/public/test/fakes/fake_navigation_manager.mm
@@ -3,6 +3,7 @@ // found in the LICENSE file. #import "ios/web/public/test/fakes/fake_navigation_manager.h" +#import "ios/web/public/navigation/navigation_item.h" #if !defined(__has_feature) || !__has_feature(objc_arc) #error "This file requires ARC support." @@ -143,12 +144,12 @@ NOTREACHED(); } -NavigationItemList FakeNavigationManager::GetBackwardItems() const { - return NavigationItemList(); +std::vector<NavigationItem*> FakeNavigationManager::GetBackwardItems() const { + return std::vector<NavigationItem*>(); } -NavigationItemList FakeNavigationManager::GetForwardItems() const { - return NavigationItemList(); +std::vector<NavigationItem*> FakeNavigationManager::GetForwardItems() const { + return std::vector<NavigationItem*>(); } void FakeNavigationManager::Restore(
diff --git a/ios/web/public/test/http_server/delayed_response_provider.h b/ios/web/public/test/http_server/delayed_response_provider.h index 2dc5de6..4f954d9 100644 --- a/ios/web/public/test/http_server/delayed_response_provider.h +++ b/ios/web/public/test/http_server/delayed_response_provider.h
@@ -20,6 +20,10 @@ DelayedResponseProvider( std::unique_ptr<web::ResponseProvider> delayed_provider, double delay); + + DelayedResponseProvider(const DelayedResponseProvider&) = delete; + DelayedResponseProvider& operator=(const DelayedResponseProvider&) = delete; + ~DelayedResponseProvider() override; // Forwards to |delayed_provider_|. @@ -33,8 +37,6 @@ private: std::unique_ptr<web::ResponseProvider> delayed_provider_; double delay_; - - DISALLOW_COPY_AND_ASSIGN(DelayedResponseProvider); }; } // namespace web
diff --git a/ios/web/public/test/http_server/response_provider.h b/ios/web/public/test/http_server/response_provider.h index bfaf03d..476c1c8 100644 --- a/ios/web/public/test/http_server/response_provider.h +++ b/ios/web/public/test/http_server/response_provider.h
@@ -75,10 +75,11 @@ const net::HttpStatusCode& http_status); ResponseProvider(); - virtual ~ResponseProvider() {} - private: - DISALLOW_COPY_AND_ASSIGN(ResponseProvider); + ResponseProvider(const ResponseProvider&) = delete; + ResponseProvider& operator=(const ResponseProvider&) = delete; + + virtual ~ResponseProvider() {} }; } // namspace web
diff --git a/ios/web/public/test/test_web_thread.h b/ios/web/public/test/test_web_thread.h index a9c3728..d59477b3 100644 --- a/ios/web/public/test/test_web_thread.h +++ b/ios/web/public/test/test_web_thread.h
@@ -37,6 +37,9 @@ // Constructs a TestWebThread based on |message_loop| (no |real_thread_|). TestWebThread(WebThread::ID identifier, base::MessageLoop* message_loop); + TestWebThread(const TestWebThread&) = delete; + TestWebThread& operator=(const TestWebThread&) = delete; + ~TestWebThread(); // Provides a subset of the capabilities of the Thread interface to enable @@ -68,8 +71,6 @@ // Binds |identifier_| to |message_loop| when constructor #2 is used (null // otherwise). std::unique_ptr<WebThreadImpl> fake_thread_; - - DISALLOW_COPY_AND_ASSIGN(TestWebThread); }; } // namespace web
diff --git a/ios/web/public/test/web_task_environment.h b/ios/web/public/test/web_task_environment.h index 23af2f2..1b56e46 100644 --- a/ios/web/public/test/web_task_environment.h +++ b/ios/web/public/test/web_task_environment.h
@@ -58,6 +58,9 @@ base::test::TaskEnvironment::TimeSource time_source = base::test::TaskEnvironment::TimeSource::DEFAULT); + WebTaskEnvironment(const WebTaskEnvironment&) = delete; + WebTaskEnvironment& operator=(const WebTaskEnvironment&) = delete; + ~WebTaskEnvironment() override; private: @@ -65,8 +68,6 @@ std::unique_ptr<TestWebThread> ui_thread_; std::unique_ptr<TestWebThread> io_thread_; - - DISALLOW_COPY_AND_ASSIGN(WebTaskEnvironment); }; } // namespace web
diff --git a/ios/web/public/test/web_test_suite.h b/ios/web/public/test/web_test_suite.h index 001d21f..ef46688 100644 --- a/ios/web/public/test/web_test_suite.h +++ b/ios/web/public/test/web_test_suite.h
@@ -14,6 +14,10 @@ class WebTestSuite : public base::TestSuite { public: WebTestSuite(int argc, char** argv); + + WebTestSuite(const WebTestSuite&) = delete; + WebTestSuite& operator=(const WebTestSuite&) = delete; + ~WebTestSuite() override; protected: @@ -24,8 +28,6 @@ private: // Sets web client on construction and restores the original on destruction. ScopedTestingWebClient web_client_; - - DISALLOW_COPY_AND_ASSIGN(WebTestSuite); }; } // namespace web
diff --git a/ios/web/public/web_state.h b/ios/web/public/web_state.h index 26a5a627..cc721253 100644 --- a/ios/web/public/web_state.h +++ b/ios/web/public/web_state.h
@@ -109,6 +109,10 @@ class InterfaceBinder { public: explicit InterfaceBinder(WebState* web_state); + + InterfaceBinder(const InterfaceBinder&) = delete; + InterfaceBinder& operator=(const InterfaceBinder&) = delete; + ~InterfaceBinder(); template <typename Interface> @@ -142,8 +146,6 @@ WebState* const web_state_; std::map<std::string, Callback> callbacks_; - - DISALLOW_COPY_AND_ASSIGN(InterfaceBinder); }; // Creates a new WebState.
diff --git a/ios/web/public/web_state_delegate_bridge.h b/ios/web/public/web_state_delegate_bridge.h index 0b73a09..f80000d 100644 --- a/ios/web/public/web_state_delegate_bridge.h +++ b/ios/web/public/web_state_delegate_bridge.h
@@ -102,6 +102,10 @@ class WebStateDelegateBridge : public web::WebStateDelegate { public: explicit WebStateDelegateBridge(id<CRWWebStateDelegate> delegate); + + WebStateDelegateBridge(const WebStateDelegateBridge&) = delete; + WebStateDelegateBridge& operator=(const WebStateDelegateBridge&) = delete; + ~WebStateDelegateBridge() override; // web::WebStateDelegate methods. @@ -144,7 +148,6 @@ private: // CRWWebStateDelegate which receives forwarded calls. __weak id<CRWWebStateDelegate> delegate_ = nil; - DISALLOW_COPY_AND_ASSIGN(WebStateDelegateBridge); }; } // web
diff --git a/ios/web/public/web_state_observer.h b/ios/web/public/web_state_observer.h index d8d38bc..ce1d2b67 100644 --- a/ios/web/public/web_state_observer.h +++ b/ios/web/public/web_state_observer.h
@@ -25,6 +25,9 @@ // load events from WebState. class WebStateObserver { public: + WebStateObserver(const WebStateObserver&) = delete; + WebStateObserver& operator=(const WebStateObserver&) = delete; + virtual ~WebStateObserver(); // These methods are invoked every time the WebState changes visibility. @@ -146,9 +149,6 @@ protected: WebStateObserver(); - - private: - DISALLOW_COPY_AND_ASSIGN(WebStateObserver); }; } // namespace web
diff --git a/ios/web/public/web_state_observer_bridge.h b/ios/web/public/web_state_observer_bridge.h index c8499a2..ca9238d 100644 --- a/ios/web/public/web_state_observer_bridge.h +++ b/ios/web/public/web_state_observer_bridge.h
@@ -91,6 +91,10 @@ // It it the responsibility of calling code to add/remove the instance // from the WebStates observer lists. WebStateObserverBridge(id<CRWWebStateObserver> observer); + + WebStateObserverBridge(const WebStateObserverBridge&) = delete; + WebStateObserverBridge& operator=(const WebStateObserverBridge&) = delete; + ~WebStateObserverBridge() override; // web::WebStateObserver methods. @@ -123,7 +127,6 @@ private: __weak id<CRWWebStateObserver> observer_ = nil; - DISALLOW_COPY_AND_ASSIGN(WebStateObserverBridge); }; } // namespace web
diff --git a/ios/web/session/session_certificate_policy_cache_impl.h b/ios/web/session/session_certificate_policy_cache_impl.h index 82070e75..c10b8b4e 100644 --- a/ios/web/session/session_certificate_policy_cache_impl.h +++ b/ios/web/session/session_certificate_policy_cache_impl.h
@@ -19,6 +19,12 @@ class SessionCertificatePolicyCacheImpl : public SessionCertificatePolicyCache { public: SessionCertificatePolicyCacheImpl(BrowserState* browser_state); + + SessionCertificatePolicyCacheImpl(const SessionCertificatePolicyCacheImpl&) = + delete; + SessionCertificatePolicyCacheImpl& operator=( + const SessionCertificatePolicyCacheImpl&) = delete; + ~SessionCertificatePolicyCacheImpl() override; // SessionCertificatePolicyCache: @@ -36,8 +42,6 @@ private: // An set of CRWSessionCertificateStorages representing allowed certs. NSMutableSet* allowed_certs_; - - DISALLOW_COPY_AND_ASSIGN(SessionCertificatePolicyCacheImpl); }; } // namespace web
diff --git a/ios/web/shell/shell_browser_state.h b/ios/web/shell/shell_browser_state.h index c321bf4..3254d2d 100644 --- a/ios/web/shell/shell_browser_state.h +++ b/ios/web/shell/shell_browser_state.h
@@ -19,6 +19,10 @@ class ShellBrowserState final : public BrowserState { public: ShellBrowserState(); + + ShellBrowserState(const ShellBrowserState&) = delete; + ShellBrowserState& operator=(const ShellBrowserState&) = delete; + ~ShellBrowserState() override; // BrowserState implementation. @@ -29,8 +33,6 @@ private: base::FilePath path_; scoped_refptr<ShellURLRequestContextGetter> request_context_getter_; - - DISALLOW_COPY_AND_ASSIGN(ShellBrowserState); }; } // namespace web
diff --git a/ios/web/shell/shell_web_client.h b/ios/web/shell/shell_web_client.h index d7e1566..6d0b707e 100644 --- a/ios/web/shell/shell_web_client.h +++ b/ios/web/shell/shell_web_client.h
@@ -18,6 +18,10 @@ class ShellWebClient : public WebClient { public: ShellWebClient(); + + ShellWebClient(const ShellWebClient&) = delete; + ShellWebClient& operator=(const ShellWebClient&) = delete; + ~ShellWebClient() override; // WebClient implementation. @@ -36,8 +40,6 @@ private: ShellWebMainParts* web_main_parts_; - - DISALLOW_COPY_AND_ASSIGN(ShellWebClient); }; } // namespace web
diff --git a/ios/web/web_state/ui/wk_web_view_configuration_provider.h b/ios/web/web_state/ui/wk_web_view_configuration_provider.h index 37ed8941..4e207c5f8 100644 --- a/ios/web/web_state/ui/wk_web_view_configuration_provider.h +++ b/ios/web/web_state/ui/wk_web_view_configuration_provider.h
@@ -25,6 +25,11 @@ // threadsafe. Must be used only on the main thread. class WKWebViewConfigurationProvider : public base::SupportsUserData::Data { public: + WKWebViewConfigurationProvider(const WKWebViewConfigurationProvider&) = + delete; + WKWebViewConfigurationProvider& operator=( + const WKWebViewConfigurationProvider&) = delete; + ~WKWebViewConfigurationProvider() override; // Returns a provider for the given |browser_state|. Lazily attaches one if it @@ -94,8 +99,6 @@ // will add more complixity if they are destructed on the IO thread. base::ObserverList<WKWebViewConfigurationProviderObserver, false>::Unchecked observers_; - - DISALLOW_COPY_AND_ASSIGN(WKWebViewConfigurationProvider); }; } // namespace web
diff --git a/ios/web/web_state/ui/wk_web_view_configuration_provider_observer.h b/ios/web/web_state/ui/wk_web_view_configuration_provider_observer.h index e2967e1..ad2b40c 100644 --- a/ios/web/web_state/ui/wk_web_view_configuration_provider_observer.h +++ b/ios/web/web_state/ui/wk_web_view_configuration_provider_observer.h
@@ -21,13 +21,15 @@ WKWebViewConfigurationProvider* config_provider, WKWebViewConfiguration* new_config) {} + WKWebViewConfigurationProviderObserver( + const WKWebViewConfigurationProviderObserver&) = delete; + WKWebViewConfigurationProviderObserver& operator=( + const WKWebViewConfigurationProviderObserver&) = delete; + virtual ~WKWebViewConfigurationProviderObserver() = default; protected: WKWebViewConfigurationProviderObserver() = default; - - private: - DISALLOW_COPY_AND_ASSIGN(WKWebViewConfigurationProviderObserver); }; } // namespace web
diff --git a/ios/web/web_state/web_state_impl.h b/ios/web/web_state/web_state_impl.h index b8f7518a..0de3e46b 100644 --- a/ios/web/web_state/web_state_impl.h +++ b/ios/web/web_state/web_state_impl.h
@@ -65,6 +65,10 @@ explicit WebStateImpl(const CreateParams& params); // Constructor for WebStatesImpls created for deserialized sessions WebStateImpl(const CreateParams& params, CRWSessionStorage* session_storage); + + WebStateImpl(const WebStateImpl&) = delete; + WebStateImpl& operator=(const WebStateImpl&) = delete; + ~WebStateImpl() override; // Gets/Sets the CRWWebController that backs this object. @@ -408,8 +412,6 @@ UserAgentType user_agent_type_; base::WeakPtrFactory<WebStateImpl> weak_factory_; - - DISALLOW_COPY_AND_ASSIGN(WebStateImpl); }; } // namespace web
diff --git a/ios/web/web_state/web_state_impl_unittest.mm b/ios/web/web_state/web_state_impl_unittest.mm index af0cbba..7c3b8674 100644 --- a/ios/web/web_state/web_state_impl_unittest.mm +++ b/ios/web/web_state/web_state_impl_unittest.mm
@@ -24,6 +24,7 @@ #import "ios/web/navigation/serializable_user_data_manager_impl.h" #import "ios/web/navigation/wk_navigation_util.h" #include "ios/web/public/deprecated/global_web_state_observer.h" +#import "ios/web/public/navigation/navigation_item.h" #import "ios/web/public/navigation/web_state_policy_decider.h" #import "ios/web/public/session/crw_navigation_item_storage.h" #import "ios/web/public/session/crw_session_storage.h"
diff --git a/ios/web/web_sub_thread.h b/ios/web/web_sub_thread.h index bea773c..a941fd7 100644 --- a/ios/web/web_sub_thread.h +++ b/ios/web/web_sub_thread.h
@@ -21,6 +21,10 @@ public: // Constructs a WebSubThread for |identifier|. explicit WebSubThread(WebThread::ID identifier); + + WebSubThread(const WebSubThread&) = delete; + WebSubThread& operator=(const WebSubThread&) = delete; + ~WebSubThread() override; // Registers this thread to represent |identifier_| in the web_thread.h @@ -65,8 +69,6 @@ std::unique_ptr<WebThreadImpl> web_thread_; THREAD_CHECKER(web_thread_checker_); - - DISALLOW_COPY_AND_ASSIGN(WebSubThread); }; } // namespace web
diff --git a/ios/web/webui/url_data_manager_ios.h b/ios/web/webui/url_data_manager_ios.h index c76b410..871bf6e 100644 --- a/ios/web/webui/url_data_manager_ios.h +++ b/ios/web/webui/url_data_manager_ios.h
@@ -26,6 +26,10 @@ class URLDataManagerIOS : public base::SupportsUserData::Data { public: explicit URLDataManagerIOS(BrowserState* browser_state); + + URLDataManagerIOS(const URLDataManagerIOS&) = delete; + URLDataManagerIOS& operator=(const URLDataManagerIOS&) = delete; + ~URLDataManagerIOS() override; // Adds a DataSource to the collection of data sources. This *must* be invoked @@ -78,8 +82,6 @@ // |data_sources_| that are no longer referenced and scheduled for deletion. // Protected by g_delete_lock in the .cc file. static URLDataSources* data_sources_; - - DISALLOW_COPY_AND_ASSIGN(URLDataManagerIOS); }; } // namespace web
diff --git a/ios/web/webui/url_data_manager_ios_backend.h b/ios/web/webui/url_data_manager_ios_backend.h index ff719af..0fe3222 100644 --- a/ios/web/webui/url_data_manager_ios_backend.h +++ b/ios/web/webui/url_data_manager_ios_backend.h
@@ -36,6 +36,10 @@ typedef int RequestID; URLDataManagerIOSBackend(); + + URLDataManagerIOSBackend(const URLDataManagerIOSBackend&) = delete; + URLDataManagerIOSBackend& operator=(const URLDataManagerIOSBackend&) = delete; + ~URLDataManagerIOSBackend() override; // Invoked to create the protocol handler for chrome://. |is_incognito| should @@ -92,8 +96,6 @@ // The ID we'll use for the next request we receive. RequestID next_request_id_; - - DISALLOW_COPY_AND_ASSIGN(URLDataManagerIOSBackend); }; } // namespace web
diff --git a/ios/web/webui/url_data_manager_ios_backend.mm b/ios/web/webui/url_data_manager_ios_backend.mm index 2d0cf98..56b91568 100644 --- a/ios/web/webui/url_data_manager_ios_backend.mm +++ b/ios/web/webui/url_data_manager_ios_backend.mm
@@ -112,6 +112,9 @@ BrowserState* browser_state, bool is_incognito); + URLRequestChromeJob(const URLRequestChromeJob&) = delete; + URLRequestChromeJob& operator=(const URLRequestChromeJob&) = delete; + ~URLRequestChromeJob() override; // net::URLRequestJob implementation. @@ -216,8 +219,6 @@ URLDataManagerIOSBackend* backend_; base::WeakPtrFactory<URLRequestChromeJob> weak_factory_; - - DISALLOW_COPY_AND_ASSIGN(URLRequestChromeJob); }; URLRequestChromeJob::URLRequestChromeJob(net::URLRequest* request, @@ -415,6 +416,10 @@ // |is_incognito| should be set for incognito profiles. ChromeProtocolHandler(BrowserState* browser_state, bool is_incognito) : browser_state_(browser_state), is_incognito_(is_incognito) {} + + ChromeProtocolHandler(const ChromeProtocolHandler&) = delete; + ChromeProtocolHandler& operator=(const ChromeProtocolHandler&) = delete; + ~ChromeProtocolHandler() override {} std::unique_ptr<net::URLRequestJob> CreateJob( @@ -434,8 +439,6 @@ // True when generated from an incognito profile. const bool is_incognito_; - - DISALLOW_COPY_AND_ASSIGN(ChromeProtocolHandler); }; } // namespace
diff --git a/ios/web/webui/web_ui_ios_impl.h b/ios/web/webui/web_ui_ios_impl.h index c3174a0..5aa9ec5 100644 --- a/ios/web/webui/web_ui_ios_impl.h +++ b/ios/web/webui/web_ui_ios_impl.h
@@ -26,6 +26,10 @@ public base::SupportsWeakPtr<WebUIIOSImpl> { public: explicit WebUIIOSImpl(WebState* web_state); + + WebUIIOSImpl(const WebUIIOSImpl&) = delete; + WebUIIOSImpl& operator=(const WebUIIOSImpl&) = delete; + ~WebUIIOSImpl() override; // WebUIIOS implementation: @@ -84,8 +88,6 @@ WebState* web_state_; std::unique_ptr<WebUIIOSController> controller_; - - DISALLOW_COPY_AND_ASSIGN(WebUIIOSImpl); }; } // namespace web
diff --git a/ios/web_view/internal/app/web_view_io_thread.h b/ios/web_view/internal/app/web_view_io_thread.h index deacfecb..d796f6eb 100644 --- a/ios/web_view/internal/app/web_view_io_thread.h +++ b/ios/web_view/internal/app/web_view_io_thread.h
@@ -22,15 +22,16 @@ class WebViewIOThread : public io_thread::IOSIOThread { public: WebViewIOThread(PrefService* local_state, net::NetLog* net_log); + + WebViewIOThread(const WebViewIOThread&) = delete; + WebViewIOThread& operator=(const WebViewIOThread&) = delete; + ~WebViewIOThread() override; protected: // io_thread::IOSIOThread overrides std::unique_ptr<net::NetworkDelegate> CreateSystemNetworkDelegate() override; std::string GetChannelString() const override; - - private: - DISALLOW_COPY_AND_ASSIGN(WebViewIOThread); }; } // namespace ios_web_view
diff --git a/ios/web_view/internal/autofill/cwv_credit_card_verifier_unittest.mm b/ios/web_view/internal/autofill/cwv_credit_card_verifier_unittest.mm index 9015733..e0babf6a 100644 --- a/ios/web_view/internal/autofill/cwv_credit_card_verifier_unittest.mm +++ b/ios/web_view/internal/autofill/cwv_credit_card_verifier_unittest.mm
@@ -49,6 +49,9 @@ public: FakeCardUnmaskDelegate() : weak_factory_(this) {} + FakeCardUnmaskDelegate(const FakeCardUnmaskDelegate&) = delete; + FakeCardUnmaskDelegate& operator=(const FakeCardUnmaskDelegate&) = delete; + virtual ~FakeCardUnmaskDelegate() {} // CardUnmaskDelegate implementation. @@ -86,8 +89,6 @@ UserProvidedUnmaskDetails unmask_details_; base::WeakPtrFactory<FakeCardUnmaskDelegate> weak_factory_; - - DISALLOW_COPY_AND_ASSIGN(FakeCardUnmaskDelegate); }; class CWVCreditCardVerifierTest : public PlatformTest {
diff --git a/ios/web_view/internal/autofill/web_view_autofill_client_ios.h b/ios/web_view/internal/autofill/web_view_autofill_client_ios.h index 2025461..79d6b96 100644 --- a/ios/web_view/internal/autofill/web_view_autofill_client_ios.h +++ b/ios/web_view/internal/autofill/web_view_autofill_client_ios.h
@@ -43,6 +43,10 @@ StrikeDatabase* strike_database, syncer::SyncService* sync_service, std::unique_ptr<autofill::LogManager> log_manager); + + WebViewAutofillClientIOS(const WebViewAutofillClientIOS&) = delete; + WebViewAutofillClientIOS& operator=(const WebViewAutofillClientIOS&) = delete; + ~WebViewAutofillClientIOS() override; // AutofillClient: @@ -137,8 +141,6 @@ StrikeDatabase* strike_database_; syncer::SyncService* sync_service_ = nullptr; std::unique_ptr<LogManager> log_manager_; - - DISALLOW_COPY_AND_ASSIGN(WebViewAutofillClientIOS); }; } // namespace autofill
diff --git a/ios/web_view/internal/passwords/web_view_password_feature_manager.h b/ios/web_view/internal/passwords/web_view_password_feature_manager.h index 9c38baba..a6bdfc5 100644 --- a/ios/web_view/internal/passwords/web_view_password_feature_manager.h +++ b/ios/web_view/internal/passwords/web_view_password_feature_manager.h
@@ -21,6 +21,11 @@ public: WebViewPasswordFeatureManager(PrefService* pref_service, const syncer::SyncService* sync_service); + + WebViewPasswordFeatureManager(const WebViewPasswordFeatureManager&) = delete; + WebViewPasswordFeatureManager& operator=( + const WebViewPasswordFeatureManager&) = delete; + ~WebViewPasswordFeatureManager() override = default; bool IsGenerationEnabled() const override; @@ -51,8 +56,6 @@ private: PrefService* const pref_service_; const syncer::SyncService* const sync_service_; - - DISALLOW_COPY_AND_ASSIGN(WebViewPasswordFeatureManager); }; } // namespace ios_web_view
diff --git a/ios/web_view/internal/passwords/web_view_password_manager_client.h b/ios/web_view/internal/passwords/web_view_password_manager_client.h index fe6e8f7..b99f0fdf 100644 --- a/ios/web_view/internal/passwords/web_view_password_manager_client.h +++ b/ios/web_view/internal/passwords/web_view_password_manager_client.h
@@ -51,6 +51,10 @@ password_manager::PasswordReuseManager* reuse_manager, password_manager::PasswordRequirementsService* requirements_service); + WebViewPasswordManagerClient(const WebViewPasswordManagerClient&) = delete; + WebViewPasswordManagerClient& operator=(const WebViewPasswordManagerClient&) = + delete; + ~WebViewPasswordManagerClient() override; // password_manager::PasswordManagerClient implementation. @@ -163,8 +167,6 @@ // Helper for performing logic that is common between // ChromePasswordManagerClient and IOSChromePasswordManagerClient. password_manager::PasswordManagerClientHelper helper_; - - DISALLOW_COPY_AND_ASSIGN(WebViewPasswordManagerClient); }; } // namespace ios_web_view
diff --git a/ios/web_view/internal/passwords/web_view_password_manager_driver.h b/ios/web_view/internal/passwords/web_view_password_manager_driver.h index ca862d57..69dbcc4e 100644 --- a/ios/web_view/internal/passwords/web_view_password_manager_driver.h +++ b/ios/web_view/internal/passwords/web_view_password_manager_driver.h
@@ -23,6 +23,11 @@ public: explicit WebViewPasswordManagerDriver( password_manager::PasswordManager* password_manager); + + WebViewPasswordManagerDriver(const WebViewPasswordManagerDriver&) = delete; + WebViewPasswordManagerDriver& operator=(const WebViewPasswordManagerDriver&) = + delete; + ~WebViewPasswordManagerDriver() override; // password_manager::PasswordManagerDriver implementation. @@ -55,8 +60,6 @@ __weak id<PasswordManagerDriverBridge> bridge_; password_manager::PasswordManager* password_manager_; - - DISALLOW_COPY_AND_ASSIGN(WebViewPasswordManagerDriver); }; } // namespace ios_web_view
diff --git a/ios/web_view/internal/signin/ios_web_view_signin_client.h b/ios/web_view/internal/signin/ios_web_view_signin_client.h index 0f4eeaa3..25574e0 100644 --- a/ios/web_view/internal/signin/ios_web_view_signin_client.h +++ b/ios/web_view/internal/signin/ios_web_view_signin_client.h
@@ -22,6 +22,9 @@ IOSWebViewSigninClient(PrefService* pref_service, ios_web_view::WebViewBrowserState* browser_state); + IOSWebViewSigninClient(const IOSWebViewSigninClient&) = delete; + IOSWebViewSigninClient& operator=(const IOSWebViewSigninClient&) = delete; + ~IOSWebViewSigninClient() override; // KeyedService implementation. @@ -53,8 +56,6 @@ PrefService* pref_service_; // The browser_state_ associated with this service. ios_web_view::WebViewBrowserState* browser_state_; - - DISALLOW_COPY_AND_ASSIGN(IOSWebViewSigninClient); }; #endif // IOS_WEB_VIEW_INTERNAL_SIGNIN_IOS_WEB_VIEW_SIGNIN_CLIENT_H_
diff --git a/ios/web_view/internal/signin/web_view_device_accounts_provider_impl.h b/ios/web_view/internal/signin/web_view_device_accounts_provider_impl.h index 0285539..dc70c67 100644 --- a/ios/web_view/internal/signin/web_view_device_accounts_provider_impl.h +++ b/ios/web_view/internal/signin/web_view_device_accounts_provider_impl.h
@@ -16,6 +16,12 @@ class WebViewDeviceAccountsProviderImpl : public DeviceAccountsProvider { public: WebViewDeviceAccountsProviderImpl(); + + WebViewDeviceAccountsProviderImpl(const WebViewDeviceAccountsProviderImpl&) = + delete; + WebViewDeviceAccountsProviderImpl& operator=( + const WebViewDeviceAccountsProviderImpl&) = delete; + ~WebViewDeviceAccountsProviderImpl() override; // ios::DeviceAccountsProvider @@ -27,9 +33,6 @@ AuthenticationErrorCategory GetAuthenticationErrorCategory( const std::string& gaia_id, NSError* error) const override; - - private: - DISALLOW_COPY_AND_ASSIGN(WebViewDeviceAccountsProviderImpl); }; #endif // IOS_WEB_VIEW_INTERNAL_SIGNIN_WEB_VIEW_DEVICE_ACCOUNTS_PROVIDER_IMPL_H_
diff --git a/ios/web_view/internal/sync/web_view_sync_client.h b/ios/web_view/internal/sync/web_view_sync_client.h index ead85ed..8d9c558 100644 --- a/ios/web_view/internal/sync/web_view_sync_client.h +++ b/ios/web_view/internal/sync/web_view_sync_client.h
@@ -34,6 +34,10 @@ syncer::DeviceInfoSyncService* device_info_sync_service, invalidation::InvalidationService* invalidation_service, syncer::SyncInvalidationsService* sync_invalidations_service); + + WebViewSyncClient(const WebViewSyncClient&) = delete; + WebViewSyncClient& operator=(const WebViewSyncClient&) = delete; + ~WebViewSyncClient() override; // BrowserSyncClient implementation. @@ -76,8 +80,6 @@ std::unique_ptr<browser_sync::ProfileSyncComponentsFactoryImpl> component_factory_; - - DISALLOW_COPY_AND_ASSIGN(WebViewSyncClient); }; } // namespace ios_web_view
diff --git a/ios/web_view/internal/translate/web_view_translate_accept_languages_factory.mm b/ios/web_view/internal/translate/web_view_translate_accept_languages_factory.mm index a36a003..8d8d6d5 100644 --- a/ios/web_view/internal/translate/web_view_translate_accept_languages_factory.mm +++ b/ios/web_view/internal/translate/web_view_translate_accept_languages_factory.mm
@@ -23,6 +23,12 @@ class TranslateAcceptLanguagesService : public KeyedService { public: explicit TranslateAcceptLanguagesService(PrefService* prefs); + + TranslateAcceptLanguagesService(const TranslateAcceptLanguagesService&) = + delete; + TranslateAcceptLanguagesService& operator=( + const TranslateAcceptLanguagesService&) = delete; + ~TranslateAcceptLanguagesService() override; // Returns the associated TranslateAcceptLanguages. @@ -32,8 +38,6 @@ private: translate::TranslateAcceptLanguages accept_languages_; - - DISALLOW_COPY_AND_ASSIGN(TranslateAcceptLanguagesService); }; TranslateAcceptLanguagesService::TranslateAcceptLanguagesService(
diff --git a/ios/web_view/internal/translate/web_view_translate_client.h b/ios/web_view/internal/translate/web_view_translate_client.h index ffb6f7c..cb34866c 100644 --- a/ios/web_view/internal/translate/web_view_translate_client.h +++ b/ios/web_view/internal/translate/web_view_translate_client.h
@@ -36,6 +36,10 @@ language::LanguageModel* language_model, web::WebState* web_state, translate::TranslateAcceptLanguages* accept_languages); + + WebViewTranslateClient(const WebViewTranslateClient&) = delete; + WebViewTranslateClient& operator=(const WebViewTranslateClient&) = delete; + ~WebViewTranslateClient() override; // This |controller| is assumed to outlive this WebViewTranslateClient. @@ -84,8 +88,6 @@ // ObjC class that wraps this class. __weak CWVTranslationController* translation_controller_ = nil; - - DISALLOW_COPY_AND_ASSIGN(WebViewTranslateClient); }; } // namespace ios_web_view
diff --git a/ios/web_view/internal/translate/web_view_translate_service.h b/ios/web_view/internal/translate/web_view_translate_service.h index 033557e..cae3843 100644 --- a/ios/web_view/internal/translate/web_view_translate_service.h +++ b/ios/web_view/internal/translate/web_view_translate_service.h
@@ -34,6 +34,12 @@ : public web_resource::ResourceRequestAllowedNotifier::Observer { public: TranslateRequestsAllowedListener(); + + TranslateRequestsAllowedListener(const TranslateRequestsAllowedListener&) = + delete; + TranslateRequestsAllowedListener& operator=( + const TranslateRequestsAllowedListener&) = delete; + ~TranslateRequestsAllowedListener() override; // ResourceRequestAllowedNotifier::Observer methods. @@ -43,8 +49,6 @@ // Notifier class to know if it's allowed to make network resource requests. web_resource::ResourceRequestAllowedNotifier resource_request_allowed_notifier_; - - DISALLOW_COPY_AND_ASSIGN(TranslateRequestsAllowedListener); }; WebViewTranslateService();
diff --git a/ios/web_view/internal/web_view_browser_state.h b/ios/web_view/internal/web_view_browser_state.h index b032cda..9ca4e27 100644 --- a/ios/web_view/internal/web_view_browser_state.h +++ b/ios/web_view/internal/web_view_browser_state.h
@@ -33,6 +33,10 @@ explicit WebViewBrowserState( bool off_the_record, WebViewBrowserState* recording_browser_state = nullptr); + + WebViewBrowserState(const WebViewBrowserState&) = delete; + WebViewBrowserState& operator=(const WebViewBrowserState&) = delete; + ~WebViewBrowserState() override; // web::BrowserState implementation. @@ -74,8 +78,6 @@ // Handles browser downloads. std::unique_ptr<WebViewDownloadManager> download_manager_; - - DISALLOW_COPY_AND_ASSIGN(WebViewBrowserState); }; } // namespace ios_web_view
diff --git a/ios/web_view/internal/web_view_early_page_script_provider.h b/ios/web_view/internal/web_view_early_page_script_provider.h index 3e077f4b..13c8c25 100644 --- a/ios/web_view/internal/web_view_early_page_script_provider.h +++ b/ios/web_view/internal/web_view_early_page_script_provider.h
@@ -23,6 +23,11 @@ // Not threadsafe. Must be used only on the main thread. class WebViewEarlyPageScriptProvider : public base::SupportsUserData::Data { public: + WebViewEarlyPageScriptProvider(const WebViewEarlyPageScriptProvider&) = + delete; + WebViewEarlyPageScriptProvider& operator=( + const WebViewEarlyPageScriptProvider&) = delete; + ~WebViewEarlyPageScriptProvider() override; // Returns a provider for the given |browser_state|. Lazily attaches one if it @@ -42,8 +47,6 @@ // The JavaScript source code. NSString* _Nonnull script_; - - DISALLOW_COPY_AND_ASSIGN(WebViewEarlyPageScriptProvider); }; } // namespace ios_web_view
diff --git a/ios/web_view/internal/web_view_java_script_dialog_presenter.h b/ios/web_view/internal/web_view_java_script_dialog_presenter.h index a79fbdc2..ec1ce95 100644 --- a/ios/web_view/internal/web_view_java_script_dialog_presenter.h +++ b/ios/web_view/internal/web_view_java_script_dialog_presenter.h
@@ -19,6 +19,12 @@ public: WebViewJavaScriptDialogPresenter(CWVWebView* web_view, id<CWVUIDelegate> ui_delegate); + + WebViewJavaScriptDialogPresenter(const WebViewJavaScriptDialogPresenter&) = + delete; + WebViewJavaScriptDialogPresenter& operator=( + const WebViewJavaScriptDialogPresenter&) = delete; + ~WebViewJavaScriptDialogPresenter() override; void SetUIDelegate(id<CWVUIDelegate> ui_delegate); @@ -53,8 +59,6 @@ __weak id<CWVUIDelegate> ui_delegate_ = nil; // The web view which originated the dialogs. __weak CWVWebView* web_view_ = nil; - - DISALLOW_COPY_AND_ASSIGN(WebViewJavaScriptDialogPresenter); }; } // namespace ios_web_view
diff --git a/ios/web_view/internal/web_view_web_client.h b/ios/web_view/internal/web_view_web_client.h index 1a6b4d323..6dec7d68 100644 --- a/ios/web_view/internal/web_view_web_client.h +++ b/ios/web_view/internal/web_view_web_client.h
@@ -16,6 +16,10 @@ class WebViewWebClient : public web::WebClient { public: WebViewWebClient(); + + WebViewWebClient(const WebViewWebClient&) = delete; + WebViewWebClient& operator=(const WebViewWebClient&) = delete; + ~WebViewWebClient() override; // WebClient implementation. @@ -43,9 +47,6 @@ int64_t navigation_id, base::OnceCallback<void(NSString*)> callback) override; bool EnableLongPressUIContextMenu() const override; - - private: - DISALLOW_COPY_AND_ASSIGN(WebViewWebClient); }; } // namespace ios_web_view
diff --git a/ios/web_view/internal/web_view_web_client_unittest.mm b/ios/web_view/internal/web_view_web_client_unittest.mm index 9082d897..6792a9b 100644 --- a/ios/web_view/internal/web_view_web_client_unittest.mm +++ b/ios/web_view/internal/web_view_web_client_unittest.mm
@@ -29,6 +29,10 @@ l10n_util::GetLocaleOverride(), /*delegate=*/nullptr, ui::ResourceBundle::DO_NOT_LOAD_COMMON_RESOURCES); } + + WebViewWebClientTest(const WebViewWebClientTest&) = delete; + WebViewWebClientTest& operator=(const WebViewWebClientTest&) = delete; + ~WebViewWebClientTest() override { ui::ResourceBundle::CleanupSharedInstance(); } @@ -42,9 +46,6 @@ web::WebTest::TearDown(); CWVWebView.customUserAgent = nil; } - - private: - DISALLOW_COPY_AND_ASSIGN(WebViewWebClientTest); }; // Tests that WebViewWebClientTest's GetUserAgent is configured by CWVWebView.
diff --git a/ios/web_view/internal/web_view_web_main_delegate.h b/ios/web_view/internal/web_view_web_main_delegate.h index 7afe0535..d899af1 100644 --- a/ios/web_view/internal/web_view_web_main_delegate.h +++ b/ios/web_view/internal/web_view_web_main_delegate.h
@@ -15,13 +15,14 @@ class WebViewWebMainDelegate : public web::WebMainDelegate { public: WebViewWebMainDelegate(); + + WebViewWebMainDelegate(const WebViewWebMainDelegate&) = delete; + WebViewWebMainDelegate& operator=(const WebViewWebMainDelegate&) = delete; + ~WebViewWebMainDelegate() override; // WebMainDelegate implementation. void BasicStartupComplete() override; - - private: - DISALLOW_COPY_AND_ASSIGN(WebViewWebMainDelegate); }; } // namespace ios_web_view
diff --git a/ios/web_view/internal/web_view_web_main_parts.h b/ios/web_view/internal/web_view_web_main_parts.h index 6b3ab7c..ad57027a 100644 --- a/ios/web_view/internal/web_view_web_main_parts.h +++ b/ios/web_view/internal/web_view_web_main_parts.h
@@ -16,6 +16,10 @@ class WebViewWebMainParts : public web::WebMainParts { public: WebViewWebMainParts(); + + WebViewWebMainParts(const WebViewWebMainParts&) = delete; + WebViewWebMainParts& operator=(const WebViewWebMainParts&) = delete; + ~WebViewWebMainParts() override; private: @@ -34,8 +38,6 @@ // Dummy FieldTrialList instance for code that consumes variations data, // although ios WebView does not support variations. base::FieldTrialList field_trial_list_; - - DISALLOW_COPY_AND_ASSIGN(WebViewWebMainParts); }; } // namespace ios_web_view
diff --git a/ios/web_view/internal/webui/web_view_sync_internals_ui.h b/ios/web_view/internal/webui/web_view_sync_internals_ui.h index b95a22b..f338cd23 100644 --- a/ios/web_view/internal/webui/web_view_sync_internals_ui.h +++ b/ios/web_view/internal/webui/web_view_sync_internals_ui.h
@@ -20,13 +20,14 @@ class WebViewSyncInternalsUI : public SyncInternalsUI { public: WebViewSyncInternalsUI(web::WebUIIOS* web_ui, const std::string& host); + + WebViewSyncInternalsUI(const WebViewSyncInternalsUI&) = delete; + WebViewSyncInternalsUI& operator=(const WebViewSyncInternalsUI&) = delete; + ~WebViewSyncInternalsUI() override; bool OverrideHandleWebUIIOSMessage(const GURL& source_url, const std::string& message, const base::Value& args) override; - - private: - DISALLOW_COPY_AND_ASSIGN(WebViewSyncInternalsUI); }; } // namespace ios_web_view
diff --git a/media/capture/video/fuchsia/video_capture_device_factory_fuchsia.cc b/media/capture/video/fuchsia/video_capture_device_factory_fuchsia.cc index e87c3c8..ab3f4fe 100644 --- a/media/capture/video/fuchsia/video_capture_device_factory_fuchsia.cc +++ b/media/capture/video/fuchsia/video_capture_device_factory_fuchsia.cc
@@ -12,6 +12,7 @@ #include "base/location.h" #include "base/logging.h" #include "base/strings/string_number_conversions.h" +#include "base/system/system_monitor.h" #include "base/threading/thread_task_runner_handle.h" #include "base/time/time.h" #include "media/capture/video/fuchsia/video_capture_device_fuchsia.h" @@ -286,6 +287,14 @@ if (num_pending_device_info_requests_ > 0) return; + // Notify system monitor if devices have changed. This will indirectly update + // media device manager and the web app eventually. + auto* system_monitor = base::SystemMonitor::Get(); + if (system_monitor) { + system_monitor->ProcessDevicesChanged( + base::SystemMonitor::DEVTYPE_VIDEO_CAPTURE); + } + std::vector<GetDevicesInfoCallback> callbacks; callbacks.swap(pending_devices_info_requests_);
diff --git a/mojo/core/channel_posix.cc b/mojo/core/channel_posix.cc index 782d4f0..e2b3868 100644 --- a/mojo/core/channel_posix.cc +++ b/mojo/core/channel_posix.cc
@@ -132,8 +132,8 @@ } ChannelPosix::~ChannelPosix() { - DCHECK(!read_watcher_); - DCHECK(!write_watcher_); + CHECK(!read_watcher_); + CHECK(!write_watcher_); } void ChannelPosix::Start() { @@ -158,7 +158,6 @@ message->NumHandlesForTransit()); bool write_error = false; - bool queued = false; { base::AutoLock lock(write_lock_); if (reject_writes_) @@ -169,7 +168,6 @@ } else { outgoing_messages_.emplace_back(std::move(message), 0); } - queued = !outgoing_messages_.empty(); } if (write_error) { // Invoke OnWriteError() asynchronously on the IO thread, in case Write() @@ -178,7 +176,6 @@ base::BindOnce(&ChannelPosix::OnWriteError, this, Error::kDisconnected)); } - UMA_HISTOGRAM_BOOLEAN("Mojo.Channel.WriteQueued", queued); } void ChannelPosix::LeakHandle() {
diff --git a/net/cert/caching_cert_verifier.h b/net/cert/caching_cert_verifier.h index 3c31f73..72a46fc6 100644 --- a/net/cert/caching_cert_verifier.h +++ b/net/cert/caching_cert_verifier.h
@@ -41,6 +41,9 @@ // item has expired. explicit CachingCertVerifier(std::unique_ptr<CertVerifier> verifier); + CachingCertVerifier(const CachingCertVerifier&) = delete; + CachingCertVerifier& operator=(const CachingCertVerifier&) = delete; + ~CachingCertVerifier() override; // CertVerifier implementation: @@ -130,8 +133,6 @@ uint64_t requests_; uint64_t cache_hits_; - - DISALLOW_COPY_AND_ASSIGN(CachingCertVerifier); }; } // namespace net
diff --git a/net/cert/cert_database.h b/net/cert/cert_database.h index 6a06a39..53c339b 100644 --- a/net/cert/cert_database.h +++ b/net/cert/cert_database.h
@@ -37,6 +37,9 @@ // CertDatabase::RemoveObserver. class NET_EXPORT Observer { public: + Observer(const Observer&) = delete; + Observer& operator=(const Observer&) = delete; + virtual ~Observer() {} // Called whenever the Cert Database is known to have changed. @@ -47,9 +50,6 @@ protected: Observer() {} - - private: - DISALLOW_COPY_AND_ASSIGN(Observer); }; // Returns the CertDatabase singleton.
diff --git a/net/cert/cert_verifier.h b/net/cert/cert_verifier.h index 510b727..170a964 100644 --- a/net/cert/cert_verifier.h +++ b/net/cert/cert_verifier.h
@@ -77,11 +77,11 @@ public: Request() {} + Request(const Request&) = delete; + Request& operator=(const Request&) = delete; + // Destruction of the Request cancels it. virtual ~Request() {} - - private: - DISALLOW_COPY_AND_ASSIGN(Request); }; enum VerifyFlags {
diff --git a/net/cert/client_cert_verifier.h b/net/cert/client_cert_verifier.h index 5109f54f..ccb60f12 100644 --- a/net/cert/client_cert_verifier.h +++ b/net/cert/client_cert_verifier.h
@@ -22,11 +22,11 @@ public: Request() {} + Request(const Request&) = delete; + Request& operator=(const Request&) = delete; + // Destruction of the Request cancels it. virtual ~Request() {} - - private: - DISALLOW_COPY_AND_ASSIGN(Request); }; virtual ~ClientCertVerifier() {}
diff --git a/net/cert/coalescing_cert_verifier.h b/net/cert/coalescing_cert_verifier.h index 60b4682..07f1df6b 100644 --- a/net/cert/coalescing_cert_verifier.h +++ b/net/cert/coalescing_cert_verifier.h
@@ -34,6 +34,9 @@ // any in-flight, not-yet-completed calls to Verify(). explicit CoalescingCertVerifier(std::unique_ptr<CertVerifier> verifier); + CoalescingCertVerifier(const CoalescingCertVerifier&) = delete; + CoalescingCertVerifier& operator=(const CoalescingCertVerifier&) = delete; + ~CoalescingCertVerifier() override; // CertVerifier implementation: @@ -71,8 +74,6 @@ uint32_t config_id_; uint64_t requests_; uint64_t inflight_joins_; - - DISALLOW_COPY_AND_ASSIGN(CoalescingCertVerifier); }; } // namespace net
diff --git a/net/cert/do_nothing_ct_verifier.h b/net/cert/do_nothing_ct_verifier.h index 64eacf32..a9da0d8a 100644 --- a/net/cert/do_nothing_ct_verifier.h +++ b/net/cert/do_nothing_ct_verifier.h
@@ -48,6 +48,10 @@ class NET_EXPORT DoNothingCTVerifier : public CTVerifier { public: DoNothingCTVerifier(); + + DoNothingCTVerifier(const DoNothingCTVerifier&) = delete; + DoNothingCTVerifier& operator=(const DoNothingCTVerifier&) = delete; + ~DoNothingCTVerifier() override; void Verify(base::StringPiece hostname, @@ -56,9 +60,6 @@ base::StringPiece sct_list_from_tls_extension, SignedCertificateTimestampAndStatusList* output_scts, const NetLogWithSource& net_log) override; - - private: - DISALLOW_COPY_AND_ASSIGN(DoNothingCTVerifier); }; } // namespace net
diff --git a/net/cert/internal/cert_error_params.h b/net/cert/internal/cert_error_params.h index f2defece..f3f4bf8 100644 --- a/net/cert/internal/cert_error_params.h +++ b/net/cert/internal/cert_error_params.h
@@ -26,14 +26,15 @@ class NET_EXPORT CertErrorParams { public: CertErrorParams(); + + CertErrorParams(const CertErrorParams&) = delete; + CertErrorParams& operator=(const CertErrorParams&) = delete; + virtual ~CertErrorParams(); // Creates a representation of this parameter as a string, which may be // used for pretty printing the error. virtual std::string ToDebugString() const = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(CertErrorParams); }; // Creates a parameter object that holds a copy of |der|, and names it |name|
diff --git a/net/cert/internal/cert_issuer_source.h b/net/cert/internal/cert_issuer_source.h index c38b61d2..8127203 100644 --- a/net/cert/internal/cert_issuer_source.h +++ b/net/cert/internal/cert_issuer_source.h
@@ -25,6 +25,10 @@ class NET_EXPORT Request { public: Request() = default; + + Request(const Request&) = delete; + Request& operator=(const Request&) = delete; + // Destruction of the Request cancels it. virtual ~Request() = default; @@ -36,9 +40,6 @@ // indicates that the issuers have been exhausted and GetNext() should // not be called again. virtual void GetNext(ParsedCertificateList* issuers) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(Request); }; virtual ~CertIssuerSource() = default;
diff --git a/net/cert/internal/cert_issuer_source_aia.cc b/net/cert/internal/cert_issuer_source_aia.cc index 7892006f..559329c 100644 --- a/net/cert/internal/cert_issuer_source_aia.cc +++ b/net/cert/internal/cert_issuer_source_aia.cc
@@ -55,6 +55,10 @@ class AiaRequest : public CertIssuerSource::Request { public: AiaRequest() = default; + + AiaRequest(const AiaRequest&) = delete; + AiaRequest& operator=(const AiaRequest&) = delete; + ~AiaRequest() override; // CertIssuerSource::Request implementation. @@ -70,8 +74,6 @@ private: std::vector<std::unique_ptr<CertNetFetcher::Request>> cert_fetcher_requests_; size_t current_request_ = 0; - - DISALLOW_COPY_AND_ASSIGN(AiaRequest); }; AiaRequest::~AiaRequest() = default;
diff --git a/net/cert/internal/cert_issuer_source_aia.h b/net/cert/internal/cert_issuer_source_aia.h index 3e62c95..1503d43 100644 --- a/net/cert/internal/cert_issuer_source_aia.h +++ b/net/cert/internal/cert_issuer_source_aia.h
@@ -20,6 +20,10 @@ // used only on a single thread, which is the thread |cert_fetcher| will be // operated from. explicit CertIssuerSourceAia(scoped_refptr<CertNetFetcher> cert_fetcher); + + CertIssuerSourceAia(const CertIssuerSourceAia&) = delete; + CertIssuerSourceAia& operator=(const CertIssuerSourceAia&) = delete; + ~CertIssuerSourceAia() override; // CertIssuerSource implementation: @@ -30,8 +34,6 @@ private: scoped_refptr<CertNetFetcher> cert_fetcher_; - - DISALLOW_COPY_AND_ASSIGN(CertIssuerSourceAia); }; } // namespace net
diff --git a/net/cert/internal/cert_issuer_source_static.h b/net/cert/internal/cert_issuer_source_static.h index 4f9240b6..39d3187 100644 --- a/net/cert/internal/cert_issuer_source_static.h +++ b/net/cert/internal/cert_issuer_source_static.h
@@ -17,6 +17,10 @@ class NET_EXPORT CertIssuerSourceStatic : public CertIssuerSource { public: CertIssuerSourceStatic(); + + CertIssuerSourceStatic(const CertIssuerSourceStatic&) = delete; + CertIssuerSourceStatic& operator=(const CertIssuerSourceStatic&) = delete; + ~CertIssuerSourceStatic() override; // Adds |cert| to the set of certificates that this CertIssuerSource will @@ -36,8 +40,6 @@ scoped_refptr<ParsedCertificate>, base::StringPieceHash> intermediates_; - - DISALLOW_COPY_AND_ASSIGN(CertIssuerSourceStatic); }; } // namespace net
diff --git a/net/cert/internal/path_builder.h b/net/cert/internal/path_builder.h index e4463fd..945ca1a 100644 --- a/net/cert/internal/path_builder.h +++ b/net/cert/internal/path_builder.h
@@ -110,6 +110,10 @@ struct NET_EXPORT Result : public base::SupportsUserData { Result(); Result(Result&&); + + Result(const Result&) = delete; + Result& operator=(const Result&) = delete; + ~Result() override; Result& operator=(Result&&); @@ -141,9 +145,6 @@ // True if the search stopped because it exceeded the deadline configured // with |SetDeadline|. bool exceeded_deadline = false; - - private: - DISALLOW_COPY_AND_ASSIGN(Result); }; // Creates a CertPathBuilder that attempts to find a path from |cert| to a @@ -168,6 +169,10 @@ const std::set<der::Input>& user_initial_policy_set, InitialPolicyMappingInhibit initial_policy_mapping_inhibit, InitialAnyPolicyInhibit initial_any_policy_inhibit); + + CertPathBuilder(const CertPathBuilder&) = delete; + CertPathBuilder& operator=(const CertPathBuilder&) = delete; + ~CertPathBuilder(); // Adds a CertIssuerSource to provide intermediates for use in path building. @@ -223,8 +228,6 @@ uint32_t max_iteration_count_ = 0; base::TimeTicks deadline_; bool explore_all_paths_ = false; - - DISALLOW_COPY_AND_ASSIGN(CertPathBuilder); }; } // namespace net
diff --git a/net/cert/internal/path_builder_unittest.cc b/net/cert/internal/path_builder_unittest.cc index 03237b4..d2181e2 100644 --- a/net/cert/internal/path_builder_unittest.cc +++ b/net/cert/internal/path_builder_unittest.cc
@@ -56,6 +56,10 @@ issuers_.swap(issuers); issuers_iter_ = issuers_.begin(); } + + StaticAsyncRequest(const StaticAsyncRequest&) = delete; + StaticAsyncRequest& operator=(const StaticAsyncRequest&) = delete; + ~StaticAsyncRequest() override = default; void GetNext(ParsedCertificateList* out_certs) override { @@ -65,8 +69,6 @@ ParsedCertificateList issuers_; ParsedCertificateList::iterator issuers_iter_; - - DISALLOW_COPY_AND_ASSIGN(StaticAsyncRequest); }; ~AsyncCertIssuerSourceStatic() override = default;
diff --git a/net/cert/internal/signature_algorithm.h b/net/cert/internal/signature_algorithm.h index 5892d8a..bb06ec5 100644 --- a/net/cert/internal/signature_algorithm.h +++ b/net/cert/internal/signature_algorithm.h
@@ -60,10 +60,12 @@ class NET_EXPORT SignatureAlgorithmParameters { public: SignatureAlgorithmParameters() {} - virtual ~SignatureAlgorithmParameters() {} - private: - DISALLOW_COPY_AND_ASSIGN(SignatureAlgorithmParameters); + SignatureAlgorithmParameters(const SignatureAlgorithmParameters&) = delete; + SignatureAlgorithmParameters& operator=(const SignatureAlgorithmParameters&) = + delete; + + virtual ~SignatureAlgorithmParameters() {} }; // Parameters for an RSASSA-PSS signature algorithm. @@ -87,6 +89,9 @@ // corresponds to "AlgorithmIdentifier" from RFC 5280. class NET_EXPORT SignatureAlgorithm { public: + SignatureAlgorithm(const SignatureAlgorithm&) = delete; + SignatureAlgorithm& operator=(const SignatureAlgorithm&) = delete; + ~SignatureAlgorithm(); SignatureAlgorithmId algorithm() const { return algorithm_; } @@ -135,8 +140,6 @@ const SignatureAlgorithmId algorithm_; const DigestAlgorithm digest_; const std::unique_ptr<SignatureAlgorithmParameters> params_; - - DISALLOW_COPY_AND_ASSIGN(SignatureAlgorithm); }; } // namespace net
diff --git a/net/cert/internal/system_trust_store_nss_unittest.cc b/net/cert/internal/system_trust_store_nss_unittest.cc index 67839a32..460adef 100644 --- a/net/cert/internal/system_trust_store_nss_unittest.cc +++ b/net/cert/internal/system_trust_store_nss_unittest.cc
@@ -49,6 +49,10 @@ class SystemTrustStoreNSSTest : public ::testing::Test { public: SystemTrustStoreNSSTest() : test_root_certs_(TestRootCerts::GetInstance()) {} + + SystemTrustStoreNSSTest(const SystemTrustStoreNSSTest&) = delete; + SystemTrustStoreNSSTest& operator=(const SystemTrustStoreNSSTest&) = delete; + ~SystemTrustStoreNSSTest() override = default; void SetUp() override { @@ -91,9 +95,6 @@ scoped_refptr<X509Certificate> root_cert_; scoped_refptr<ParsedCertificate> parsed_root_cert_; ScopedCERTCertificate nss_root_cert_; - - private: - DISALLOW_COPY_AND_ASSIGN(SystemTrustStoreNSSTest); }; // Tests that SystemTrustStore created for NSS with a user-slot restriction
diff --git a/net/cert/internal/trust_store_collection.h b/net/cert/internal/trust_store_collection.h index 68d467e..f16f28e 100644 --- a/net/cert/internal/trust_store_collection.h +++ b/net/cert/internal/trust_store_collection.h
@@ -19,6 +19,10 @@ class NET_EXPORT TrustStoreCollection : public TrustStore { public: TrustStoreCollection(); + + TrustStoreCollection(const TrustStoreCollection&) = delete; + TrustStoreCollection& operator=(const TrustStoreCollection&) = delete; + ~TrustStoreCollection() override; // Includes results from |store| in the combined output. |store| must @@ -33,8 +37,6 @@ private: std::vector<TrustStore*> stores_; - - DISALLOW_COPY_AND_ASSIGN(TrustStoreCollection); }; } // namespace net
diff --git a/net/cert/internal/trust_store_in_memory.h b/net/cert/internal/trust_store_in_memory.h index 39e244f2..9aa4330 100644 --- a/net/cert/internal/trust_store_in_memory.h +++ b/net/cert/internal/trust_store_in_memory.h
@@ -19,6 +19,10 @@ class NET_EXPORT TrustStoreInMemory : public TrustStore { public: TrustStoreInMemory(); + + TrustStoreInMemory(const TrustStoreInMemory&) = delete; + TrustStoreInMemory& operator=(const TrustStoreInMemory&) = delete; + ~TrustStoreInMemory() override; // Returns whether the TrustStore is in the initial empty state. @@ -72,8 +76,6 @@ // distrusted certificates require a full DER match. void AddCertificate(scoped_refptr<ParsedCertificate> cert, const CertificateTrust& trust); - - DISALLOW_COPY_AND_ASSIGN(TrustStoreInMemory); }; } // namespace net
diff --git a/net/cert/internal/trust_store_mac.cc b/net/cert/internal/trust_store_mac.cc index 8236c4a..50f94d875 100644 --- a/net/cert/internal/trust_store_mac.cc +++ b/net/cert/internal/trust_store_mac.cc
@@ -509,6 +509,9 @@ base::Unretained(this))); } + KeychainTrustObserver(const KeychainTrustObserver&) = delete; + KeychainTrustObserver& operator=(const KeychainTrustObserver&) = delete; + // Destroying the observer unregisters the callback. Must be destroyed on the // notification thread in order to safely release |subscription_|. ~KeychainTrustObserver() { @@ -533,8 +536,6 @@ base::CallbackListSubscription subscription_; base::subtle::Atomic64 iteration_ = 0; - - DISALLOW_COPY_AND_ASSIGN(KeychainTrustObserver); }; } // namespace @@ -598,6 +599,9 @@ keychain_observer_ = std::make_unique<KeychainTrustObserver>(); } + TrustImplDomainCache(const TrustImplDomainCache&) = delete; + TrustImplDomainCache& operator=(const TrustImplDomainCache&) = delete; + ~TrustImplDomainCache() override { GetNetworkNotificationThreadMac()->DeleteSoon( FROM_HERE, std::move(keychain_observer_)); @@ -671,8 +675,6 @@ TrustDomainCache system_domain_cache_; TrustDomainCache admin_domain_cache_; TrustDomainCache user_domain_cache_; - - DISALLOW_COPY_AND_ASSIGN(TrustImplDomainCache); }; // TrustImplNoCache is the simplest approach which calls @@ -681,6 +683,9 @@ public: explicit TrustImplNoCache(CFStringRef policy_oid) : policy_oid_(policy_oid) {} + TrustImplNoCache(const TrustImplNoCache&) = delete; + TrustImplNoCache& operator=(const TrustImplNoCache&) = delete; + ~TrustImplNoCache() override = default; // Returns true if |cert| is present in kSecTrustSettingsDomainSystem. @@ -707,8 +712,6 @@ private: const CFStringRef policy_oid_; - - DISALLOW_COPY_AND_ASSIGN(TrustImplNoCache); }; // TrustImplMRUCache is calls SecTrustSettingsCopyTrustSettings on every cert @@ -721,6 +724,9 @@ keychain_observer_ = std::make_unique<KeychainTrustObserver>(); } + TrustImplMRUCache(const TrustImplMRUCache&) = delete; + TrustImplMRUCache& operator=(const TrustImplMRUCache&) = delete; + ~TrustImplMRUCache() override { GetNetworkNotificationThreadMac()->DeleteSoon( FROM_HERE, std::move(keychain_observer_)); @@ -843,8 +849,6 @@ // not cache their results, as it isn't clear whether the calculated result // applies to the new or old trust settings. int64_t iteration_ = -1; - - DISALLOW_COPY_AND_ASSIGN(TrustImplMRUCache); }; TrustStoreMac::TrustStoreMac(CFStringRef policy_oid,
diff --git a/net/cert/internal/trust_store_nss.h b/net/cert/internal/trust_store_nss.h index fca64b26..794fedc 100644 --- a/net/cert/internal/trust_store_nss.h +++ b/net/cert/internal/trust_store_nss.h
@@ -58,6 +58,9 @@ TrustStoreNSS(SECTrustType trust_type, IgnoreSystemTrustSettings ignore_system_trust_settings); + TrustStoreNSS(const TrustStoreNSS&) = delete; + TrustStoreNSS& operator=(const TrustStoreNSS&) = delete; + ~TrustStoreNSS() override; // CertIssuerSource implementation: @@ -99,8 +102,6 @@ // (*) are stored on |user_slot_|. const bool filter_trusted_certs_by_slot_; crypto::ScopedPK11Slot user_slot_; - - DISALLOW_COPY_AND_ASSIGN(TrustStoreNSS); }; } // namespace net
diff --git a/net/cert/multi_threaded_cert_verifier.h b/net/cert/multi_threaded_cert_verifier.h index 05c5463..ed9be2b 100644 --- a/net/cert/multi_threaded_cert_verifier.h +++ b/net/cert/multi_threaded_cert_verifier.h
@@ -32,6 +32,10 @@ public: explicit MultiThreadedCertVerifier(scoped_refptr<CertVerifyProc> verify_proc); + MultiThreadedCertVerifier(const MultiThreadedCertVerifier&) = delete; + MultiThreadedCertVerifier& operator=(const MultiThreadedCertVerifier&) = + delete; + // When the verifier is destroyed, all certificate verifications requests are // canceled, and their completion callbacks will not be called. ~MultiThreadedCertVerifier() override; @@ -65,8 +69,6 @@ #endif THREAD_CHECKER(thread_checker_); - - DISALLOW_COPY_AND_ASSIGN(MultiThreadedCertVerifier); }; } // namespace net
diff --git a/net/cert/nss_cert_database.cc b/net/cert/nss_cert_database.cc index c71c61e..08c1ab8 100644 --- a/net/cert/nss_cert_database.cc +++ b/net/cert/nss_cert_database.cc
@@ -57,14 +57,16 @@ explicit CertNotificationForwarder(CertDatabase* cert_db) : cert_db_(cert_db) {} + CertNotificationForwarder(const CertNotificationForwarder&) = delete; + CertNotificationForwarder& operator=(const CertNotificationForwarder&) = + delete; + ~CertNotificationForwarder() override = default; void OnCertDBChanged() override { cert_db_->NotifyObserversCertDBChanged(); } private: CertDatabase* cert_db_; - - DISALLOW_COPY_AND_ASSIGN(CertNotificationForwarder); }; } // namespace
diff --git a/net/cert/nss_cert_database.h b/net/cert/nss_cert_database.h index dbb37b8..d39248a00 100644 --- a/net/cert/nss_cert_database.h +++ b/net/cert/nss_cert_database.h
@@ -37,6 +37,9 @@ public: class NET_EXPORT Observer { public: + Observer(const Observer&) = delete; + Observer& operator=(const Observer&) = delete; + virtual ~Observer() {} // Will be called when a certificate is added, removed, or trust settings @@ -45,9 +48,6 @@ protected: Observer() {} - - private: - DISALLOW_COPY_AND_ASSIGN(Observer); }; // Holds an NSS certificate along with additional information. @@ -137,6 +137,10 @@ // be identical. NSSCertDatabase(crypto::ScopedPK11Slot public_slot, crypto::ScopedPK11Slot private_slot); + + NSSCertDatabase(const NSSCertDatabase&) = delete; + NSSCertDatabase& operator=(const NSSCertDatabase&) = delete; + virtual ~NSSCertDatabase(); // Asynchronously get a list of unique certificates in the certificate @@ -331,8 +335,6 @@ const scoped_refptr<base::ObserverListThreadSafe<Observer>> observer_list_; base::WeakPtrFactory<NSSCertDatabase> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(NSSCertDatabase); }; } // namespace net
diff --git a/net/cert/nss_cert_database_chromeos.h b/net/cert/nss_cert_database_chromeos.h index 2c00afe..1ad325ad 100644 --- a/net/cert/nss_cert_database_chromeos.h +++ b/net/cert/nss_cert_database_chromeos.h
@@ -19,6 +19,10 @@ public: NSSCertDatabaseChromeOS(crypto::ScopedPK11Slot public_slot, crypto::ScopedPK11Slot private_slot); + + NSSCertDatabaseChromeOS(const NSSCertDatabaseChromeOS&) = delete; + NSSCertDatabaseChromeOS& operator=(const NSSCertDatabaseChromeOS&) = delete; + ~NSSCertDatabaseChromeOS() override; // |system_slot| is the system TPM slot, which is only enabled for certain @@ -64,8 +68,6 @@ NSSProfileFilterChromeOS profile_filter_; crypto::ScopedPK11Slot system_slot_; - - DISALLOW_COPY_AND_ASSIGN(NSSCertDatabaseChromeOS); }; } // namespace net
diff --git a/net/cert/pem.h b/net/cert/pem.h index c964b1b..dff7e02 100644 --- a/net/cert/pem.h +++ b/net/cert/pem.h
@@ -27,6 +27,10 @@ // |str| must remain valid for the duration of the PEMTokenizer. PEMTokenizer(const base::StringPiece& str, const std::vector<std::string>& allowed_block_types); + + PEMTokenizer(const PEMTokenizer&) = delete; + PEMTokenizer& operator=(const PEMTokenizer&) = delete; + ~PEMTokenizer(); // Attempts to decode the next PEM block in the string. Returns false if no @@ -71,8 +75,6 @@ // The raw (Base64-decoded) data of the last successfully decoded block. std::string data_; - - DISALLOW_COPY_AND_ASSIGN(PEMTokenizer); }; // Encodes |data| in the encapsulated message format described in RFC 1421,
diff --git a/net/cert/test_root_certs.h b/net/cert/test_root_certs.h index afac81c..16ae5bc 100644 --- a/net/cert/test_root_certs.h +++ b/net/cert/test_root_certs.h
@@ -111,6 +111,10 @@ // TestRootCerts store (if there were existing roots they are // cleared). explicit ScopedTestRoot(CertificateList certs); + + ScopedTestRoot(const ScopedTestRoot&) = delete; + ScopedTestRoot& operator=(const ScopedTestRoot&) = delete; + ~ScopedTestRoot(); // Assigns |certs| to be the new test root certs. If |certs| is empty, undoes @@ -122,8 +126,6 @@ private: CertificateList certs_; - - DISALLOW_COPY_AND_ASSIGN(ScopedTestRoot); }; } // namespace net
diff --git a/net/cert/trial_comparison_cert_verifier.cc b/net/cert/trial_comparison_cert_verifier.cc index a8a4236..fdbf820 100644 --- a/net/cert/trial_comparison_cert_verifier.cc +++ b/net/cert/trial_comparison_cert_verifier.cc
@@ -138,6 +138,10 @@ const CertVerifier::RequestParams& params, const NetLogWithSource& source_net_log, TrialComparisonCertVerifier* parent); + + Job(const Job&) = delete; + Job& operator=(const Job&) = delete; + ~Job(); // Start the Job, attempting first to verify with the parent's primary @@ -221,8 +225,6 @@ std::unique_ptr<CertVerifier::Request> reverification_request_; base::WeakPtrFactory<Job> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(Job); }; // The Request is vended to the TrialComparisonCertVerifier::Verify() callers, @@ -238,6 +240,10 @@ Request(TrialComparisonCertVerifier::Job* parent, CertVerifyResult* client_result, CompletionOnceCallback client_callback); + + Request(const Request&) = delete; + Request& operator=(const Request&) = delete; + ~Request() override; // Called when the Job has completed, and used to invoke the client @@ -254,8 +260,6 @@ TrialComparisonCertVerifier::Job* parent_; CertVerifyResult* client_result_; CompletionOnceCallback client_callback_; - - DISALLOW_COPY_AND_ASSIGN(Request); }; TrialComparisonCertVerifier::Job::Job(const CertVerifier::Config& config,
diff --git a/net/cert/trial_comparison_cert_verifier.h b/net/cert/trial_comparison_cert_verifier.h index e200b8f6..a3c6383 100644 --- a/net/cert/trial_comparison_cert_verifier.h +++ b/net/cert/trial_comparison_cert_verifier.h
@@ -87,6 +87,10 @@ scoped_refptr<CertVerifyProc> trial_verify_proc, ReportCallback report_callback); + TrialComparisonCertVerifier(const TrialComparisonCertVerifier&) = delete; + TrialComparisonCertVerifier& operator=(const TrialComparisonCertVerifier&) = + delete; + ~TrialComparisonCertVerifier() override; void set_trial_allowed(bool allowed) { allowed_ = allowed; } @@ -130,8 +134,6 @@ std::set<std::unique_ptr<Job>, base::UniquePtrComparator> jobs_; THREAD_CHECKER(thread_checker_); - - DISALLOW_COPY_AND_ASSIGN(TrialComparisonCertVerifier); }; } // namespace net
diff --git a/net/cert/x509_util_mac.h b/net/cert/x509_util_mac.h index eb9721c0..c04ec95 100644 --- a/net/cert/x509_util_mac.h +++ b/net/cert/x509_util_mac.h
@@ -109,6 +109,10 @@ CSSMFieldValue(CSSM_CL_HANDLE cl_handle, const CSSM_OID* oid, CSSM_DATA_PTR field); + + CSSMFieldValue(const CSSMFieldValue&) = delete; + CSSMFieldValue& operator=(const CSSMFieldValue&) = delete; + ~CSSMFieldValue(); CSSM_OID_PTR oid() const { return oid_; } @@ -133,8 +137,6 @@ CSSM_CL_HANDLE cl_handle_; CSSM_OID_PTR oid_; CSSM_DATA_PTR field_; - - DISALLOW_COPY_AND_ASSIGN(CSSMFieldValue); }; // CSSMCachedCertificate is a container class that is used to wrap the
diff --git a/net/cert_net/cert_net_fetcher_url_request.cc b/net/cert_net/cert_net_fetcher_url_request.cc index 5579b3e..50f98e68 100644 --- a/net/cert_net/cert_net_fetcher_url_request.cc +++ b/net/cert_net/cert_net_fetcher_url_request.cc
@@ -132,6 +132,10 @@ // Shutdown() is called or the AsyncCertNetFetcherURLRequest is destroyed. explicit AsyncCertNetFetcherURLRequest(URLRequestContext* context); + AsyncCertNetFetcherURLRequest(const AsyncCertNetFetcherURLRequest&) = delete; + AsyncCertNetFetcherURLRequest& operator=( + const AsyncCertNetFetcherURLRequest&) = delete; + // The AsyncCertNetFetcherURLRequest is expected to be kept alive until all // requests have completed or Shutdown() is called. ~AsyncCertNetFetcherURLRequest(); @@ -162,8 +166,6 @@ URLRequestContext* context_ = nullptr; THREAD_CHECKER(thread_checker_); - - DISALLOW_COPY_AND_ASSIGN(AsyncCertNetFetcherURLRequest); }; namespace { @@ -318,6 +320,10 @@ public: Job(std::unique_ptr<CertNetFetcherURLRequest::RequestParams> request_params, CertNetFetcherURLRequest::AsyncCertNetFetcherURLRequest* parent); + + Job(const Job&) = delete; + Job& operator=(const Job&) = delete; + ~Job() override; const CertNetFetcherURLRequest::RequestParams& request_params() const { @@ -397,8 +403,6 @@ // Non-owned pointer to the AsyncCertNetFetcherURLRequest that created this // job. CertNetFetcherURLRequest::AsyncCertNetFetcherURLRequest* parent_; - - DISALLOW_COPY_AND_ASSIGN(Job); }; } // namespace
diff --git a/net/cookies/cookie_access_delegate.h b/net/cookies/cookie_access_delegate.h index 2c5715e..0dfba9e 100644 --- a/net/cookies/cookie_access_delegate.h +++ b/net/cookies/cookie_access_delegate.h
@@ -21,6 +21,10 @@ class NET_EXPORT CookieAccessDelegate { public: CookieAccessDelegate(); + + CookieAccessDelegate(const CookieAccessDelegate&) = delete; + CookieAccessDelegate& operator=(const CookieAccessDelegate&) = delete; + virtual ~CookieAccessDelegate(); // Returns true if the passed in |url| should be permitted to access secure @@ -60,9 +64,6 @@ // Returns the First-Party Sets. virtual base::flat_map<net::SchemefulSite, std::set<net::SchemefulSite>> RetrieveFirstPartySets() const = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(CookieAccessDelegate); }; } // namespace net
diff --git a/net/cookies/cookie_change_dispatcher.h b/net/cookies/cookie_change_dispatcher.h index ffa9a00..21d2d94 100644 --- a/net/cookies/cookie_change_dispatcher.h +++ b/net/cookies/cookie_change_dispatcher.h
@@ -98,10 +98,11 @@ class CookieChangeSubscription { public: CookieChangeSubscription() = default; - virtual ~CookieChangeSubscription() = default; - private: - DISALLOW_COPY_AND_ASSIGN(CookieChangeSubscription); + CookieChangeSubscription(const CookieChangeSubscription&) = delete; + CookieChangeSubscription& operator=(const CookieChangeSubscription&) = delete; + + virtual ~CookieChangeSubscription() = default; }; // Exposes changes to a CookieStore's contents. @@ -122,6 +123,10 @@ class CookieChangeDispatcher { public: CookieChangeDispatcher() = default; + + CookieChangeDispatcher(const CookieChangeDispatcher&) = delete; + CookieChangeDispatcher& operator=(const CookieChangeDispatcher&) = delete; + virtual ~CookieChangeDispatcher() = default; // Observe changes to all cookies named |name| that would be sent in a @@ -142,9 +147,6 @@ // See kChangeCauseMapping in cookie_monster.cc for details. virtual std::unique_ptr<CookieChangeSubscription> AddCallbackForAllChanges( CookieChangeCallback callback) WARN_UNUSED_RESULT = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(CookieChangeDispatcher); }; } // namespace net
diff --git a/net/cookies/cookie_monster.h b/net/cookies/cookie_monster.h index 348b42aa..a1918c8 100644 --- a/net/cookies/cookie_monster.h +++ b/net/cookies/cookie_monster.h
@@ -163,6 +163,9 @@ base::TimeDelta last_access_threshold, NetLog* net_log); + CookieMonster(const CookieMonster&) = delete; + CookieMonster& operator=(const CookieMonster&) = delete; + ~CookieMonster() override; // Writes all the cookies in |list| into the store, replacing all cookies @@ -754,8 +757,6 @@ base::ThreadChecker thread_checker_; base::WeakPtrFactory<CookieMonster> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(CookieMonster); }; typedef base::RefCountedThreadSafe<CookieMonster::PersistentCookieStore>
diff --git a/net/cookies/cookie_monster_change_dispatcher.h b/net/cookies/cookie_monster_change_dispatcher.h index c769efe9..c147120d 100644 --- a/net/cookies/cookie_monster_change_dispatcher.h +++ b/net/cookies/cookie_monster_change_dispatcher.h
@@ -33,6 +33,11 @@ // Expects |cookie_monster| to outlive this. explicit CookieMonsterChangeDispatcher(const CookieMonster* cookie_monster); + + CookieMonsterChangeDispatcher(const CookieMonsterChangeDispatcher&) = delete; + CookieMonsterChangeDispatcher& operator=( + const CookieMonsterChangeDispatcher&) = delete; + ~CookieMonsterChangeDispatcher() override; // The key in CookieNameMap for a cookie name. @@ -71,6 +76,9 @@ GURL url, net::CookieChangeCallback callback); + Subscription(const Subscription&) = delete; + Subscription& operator=(const Subscription&) = delete; + ~Subscription() override; // The lookup key used in the domain subscription map. @@ -103,8 +111,6 @@ // Used to cancel delayed calls to DoDispatchChange() when the subscription // gets destroyed. base::WeakPtrFactory<Subscription> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(Subscription); }; // The last level of the subscription data structures. @@ -147,8 +153,6 @@ // Vends weak pointers to subscriptions. base::WeakPtrFactory<CookieMonsterChangeDispatcher> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(CookieMonsterChangeDispatcher); }; } // namespace net
diff --git a/net/cookies/cookie_store_test_helpers.h b/net/cookies/cookie_store_test_helpers.h index 69fa31e..424f28ee 100644 --- a/net/cookies/cookie_store_test_helpers.h +++ b/net/cookies/cookie_store_test_helpers.h
@@ -24,6 +24,12 @@ class DelayedCookieMonsterChangeDispatcher : public CookieChangeDispatcher { public: DelayedCookieMonsterChangeDispatcher(); + + DelayedCookieMonsterChangeDispatcher( + const DelayedCookieMonsterChangeDispatcher&) = delete; + DelayedCookieMonsterChangeDispatcher& operator=( + const DelayedCookieMonsterChangeDispatcher&) = delete; + ~DelayedCookieMonsterChangeDispatcher() override; // net::CookieChangeDispatcher @@ -36,15 +42,15 @@ CookieChangeCallback callback) override WARN_UNUSED_RESULT; std::unique_ptr<CookieChangeSubscription> AddCallbackForAllChanges( CookieChangeCallback callback) override WARN_UNUSED_RESULT; - - private: - DISALLOW_COPY_AND_ASSIGN(DelayedCookieMonsterChangeDispatcher); }; class DelayedCookieMonster : public CookieStore { public: DelayedCookieMonster(); + DelayedCookieMonster(const DelayedCookieMonster&) = delete; + DelayedCookieMonster& operator=(const DelayedCookieMonster&) = delete; + ~DelayedCookieMonster() override; // Call the asynchronous CookieMonster function, expect it to immediately @@ -113,8 +119,6 @@ std::string cookie_line_; CookieAccessResultList cookie_access_result_list_; CookieList cookie_list_; - - DISALLOW_COPY_AND_ASSIGN(DelayedCookieMonster); }; class CookieURLHelper {
diff --git a/net/cookies/parsed_cookie.h b/net/cookies/parsed_cookie.h index 26c4b5cd..86038f73 100644 --- a/net/cookies/parsed_cookie.h +++ b/net/cookies/parsed_cookie.h
@@ -43,6 +43,10 @@ // is valid. explicit ParsedCookie(const std::string& cookie_line, CookieInclusionStatus* status_out = nullptr); + + ParsedCookie(const ParsedCookie&) = delete; + ParsedCookie& operator=(const ParsedCookie&) = delete; + ~ParsedCookie(); // You should not call any other methods except for SetName/SetValue on the @@ -219,8 +223,6 @@ // For metrics on cookie name/value truncation. See usage at the bottom of // `ParseTokenValuePairs()` for more details. bool truncated_name_or_value_ = false; - - DISALLOW_COPY_AND_ASSIGN(ParsedCookie); }; } // namespace net
diff --git a/net/cookies/test_cookie_access_delegate.h b/net/cookies/test_cookie_access_delegate.h index 8a0320e..d04e9e6a 100644 --- a/net/cookies/test_cookie_access_delegate.h +++ b/net/cookies/test_cookie_access_delegate.h
@@ -22,6 +22,10 @@ class TestCookieAccessDelegate : public CookieAccessDelegate { public: TestCookieAccessDelegate(); + + TestCookieAccessDelegate(const TestCookieAccessDelegate&) = delete; + TestCookieAccessDelegate& operator=(const TestCookieAccessDelegate&) = delete; + ~TestCookieAccessDelegate() override; // CookieAccessDelegate implementation: @@ -68,8 +72,6 @@ std::map<std::string, bool> ignore_samesite_restrictions_schemes_; base::flat_map<net::SchemefulSite, std::set<net::SchemefulSite>> first_party_sets_; - - DISALLOW_COPY_AND_ASSIGN(TestCookieAccessDelegate); }; } // namespace net
diff --git a/net/disk_cache/blockfile/backend_impl.h b/net/disk_cache/blockfile/backend_impl.h index e89264a1..2e4f908 100644 --- a/net/disk_cache/blockfile/backend_impl.h +++ b/net/disk_cache/blockfile/backend_impl.h
@@ -67,6 +67,9 @@ net::CacheType cache_type, net::NetLog* net_log); + BackendImpl(const BackendImpl&) = delete; + BackendImpl& operator=(const BackendImpl&) = delete; + ~BackendImpl() override; // Performs general initialization for this current instance of the cache. @@ -424,8 +427,6 @@ Stats stats_; // Usage statistics. std::unique_ptr<base::RepeatingTimer> timer_; // Usage timer. base::WeakPtrFactory<BackendImpl> ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(BackendImpl); }; } // namespace disk_cache
diff --git a/net/disk_cache/blockfile/bitmap.h b/net/disk_cache/blockfile/bitmap.h index bc9af80..980bfe1 100644 --- a/net/disk_cache/blockfile/bitmap.h +++ b/net/disk_cache/blockfile/bitmap.h
@@ -27,6 +27,9 @@ // bits in the bitmap, and |num_words| is the size of |map| in 32-bit words. Bitmap(uint32_t* map, int num_bits, int num_words); + Bitmap(const Bitmap&) = delete; + Bitmap& operator=(const Bitmap&) = delete; + ~Bitmap(); // Resizes the bitmap. @@ -130,8 +133,6 @@ int num_bits_; // The upper bound of the bitmap. int array_size_; // The physical size (in uint32s) of the bitmap. bool alloc_; // Whether or not we allocated the memory. - - DISALLOW_COPY_AND_ASSIGN(Bitmap); }; } // namespace disk_cache
diff --git a/net/disk_cache/blockfile/block_files.h b/net/disk_cache/blockfile/block_files.h index 944d55e2..a804216 100644 --- a/net/disk_cache/blockfile/block_files.h +++ b/net/disk_cache/blockfile/block_files.h
@@ -94,6 +94,10 @@ class NET_EXPORT_PRIVATE BlockFiles { public: explicit BlockFiles(const base::FilePath& path); + + BlockFiles(const BlockFiles&) = delete; + BlockFiles& operator=(const BlockFiles&) = delete; + ~BlockFiles(); // Performs the object initialization. create_files indicates if the backing @@ -157,8 +161,6 @@ FRIEND_TEST_ALL_PREFIXES(DiskCacheTest, BlockFiles_TruncatedFile); FRIEND_TEST_ALL_PREFIXES(DiskCacheTest, BlockFiles_InvalidFile); FRIEND_TEST_ALL_PREFIXES(DiskCacheTest, BlockFiles_Stats); - - DISALLOW_COPY_AND_ASSIGN(BlockFiles); }; } // namespace disk_cache
diff --git a/net/disk_cache/blockfile/entry_impl.cc b/net/disk_cache/blockfile/entry_impl.cc index 1dc20bb..f35b1fa 100644 --- a/net/disk_cache/blockfile/entry_impl.cc +++ b/net/disk_cache/blockfile/entry_impl.cc
@@ -53,6 +53,10 @@ end_event_type_(end_event_type) { entry_->IncrementIoCount(); } + + SyncCallback(const SyncCallback&) = delete; + SyncCallback& operator=(const SyncCallback&) = delete; + ~SyncCallback() override = default; void OnFileIOComplete(int bytes_copied) override; @@ -64,8 +68,6 @@ scoped_refptr<net::IOBuffer> buf_; TimeTicks start_; const net::NetLogEventType end_event_type_; - - DISALLOW_COPY_AND_ASSIGN(SyncCallback); }; void SyncCallback::OnFileIOComplete(int bytes_copied) { @@ -106,6 +108,10 @@ : backend_(backend->GetWeakPtr()), offset_(0), grow_allowed_(true) { buffer_.reserve(kMaxBlockSize); } + + UserBuffer(const UserBuffer&) = delete; + UserBuffer& operator=(const UserBuffer&) = delete; + ~UserBuffer() { if (backend_.get()) backend_->BufferDeleted(capacity() - kMaxBlockSize); @@ -145,7 +151,6 @@ int offset_; std::vector<char> buffer_; bool grow_allowed_; - DISALLOW_COPY_AND_ASSIGN(UserBuffer); }; bool EntryImpl::UserBuffer::PreWrite(int offset, int len) {
diff --git a/net/disk_cache/blockfile/eviction.h b/net/disk_cache/blockfile/eviction.h index 283463f..c4a5af1 100644 --- a/net/disk_cache/blockfile/eviction.h +++ b/net/disk_cache/blockfile/eviction.h
@@ -20,6 +20,10 @@ class Eviction { public: Eviction(); + + Eviction(const Eviction&) = delete; + Eviction& operator=(const Eviction&) = delete; + ~Eviction(); void Init(BackendImpl* backend); @@ -82,8 +86,6 @@ bool init_; bool test_mode_; base::WeakPtrFactory<Eviction> ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(Eviction); }; } // namespace disk_cache
diff --git a/net/disk_cache/blockfile/file_ios.cc b/net/disk_cache/blockfile/file_ios.cc index c6f81c3f..d287d86a 100644 --- a/net/disk_cache/blockfile/file_ios.cc +++ b/net/disk_cache/blockfile/file_ios.cc
@@ -72,6 +72,10 @@ class FileInFlightIO : public disk_cache::InFlightIO { public: FileInFlightIO() {} + + FileInFlightIO(const FileInFlightIO&) = delete; + FileInFlightIO& operator=(const FileInFlightIO&) = delete; + ~FileInFlightIO() override {} // These methods start an asynchronous operation. The arguments have the same @@ -89,9 +93,6 @@ // the one performing the call. void OnOperationComplete(disk_cache::BackgroundIO* operation, bool cancel) override; - - private: - DISALLOW_COPY_AND_ASSIGN(FileInFlightIO); }; // ---------------------------------------------------------------------------
diff --git a/net/disk_cache/blockfile/in_flight_backend_io.h b/net/disk_cache/blockfile/in_flight_backend_io.h index a84a2e3e..ea107a1 100644 --- a/net/disk_cache/blockfile/in_flight_backend_io.h +++ b/net/disk_cache/blockfile/in_flight_backend_io.h
@@ -190,6 +190,10 @@ InFlightBackendIO( BackendImpl* backend, const scoped_refptr<base::SingleThreadTaskRunner>& background_thread); + + InFlightBackendIO(const InFlightBackendIO&) = delete; + InFlightBackendIO& operator=(const InFlightBackendIO&) = delete; + ~InFlightBackendIO() override; // Proxied operations. @@ -265,8 +269,6 @@ BackendImpl* backend_; scoped_refptr<base::SingleThreadTaskRunner> background_thread_; base::WeakPtrFactory<InFlightBackendIO> ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(InFlightBackendIO); }; } // namespace disk_cache
diff --git a/net/disk_cache/blockfile/in_flight_io.h b/net/disk_cache/blockfile/in_flight_io.h index 9ab2176..26c4e32f 100644 --- a/net/disk_cache/blockfile/in_flight_io.h +++ b/net/disk_cache/blockfile/in_flight_io.h
@@ -96,6 +96,10 @@ class InFlightIO { public: InFlightIO(); + + InFlightIO(const InFlightIO&) = delete; + InFlightIO& operator=(const InFlightIO&) = delete; + virtual ~InFlightIO(); // Blocks the current thread until all IO operations tracked by this object @@ -135,8 +139,6 @@ #if DCHECK_IS_ON() bool single_thread_ = false; // True if we only have one thread. #endif - - DISALLOW_COPY_AND_ASSIGN(InFlightIO); }; } // namespace disk_cache
diff --git a/net/disk_cache/blockfile/rankings.cc b/net/disk_cache/blockfile/rankings.cc index b4feb03dd..79e3c88 100644 --- a/net/disk_cache/blockfile/rankings.cc +++ b/net/disk_cache/blockfile/rankings.cc
@@ -55,10 +55,13 @@ // volatile is not enough for that, but it should be a good hint. Transaction(volatile disk_cache::LruData* data, disk_cache::Addr addr, Operation op, int list); + + Transaction(const Transaction&) = delete; + Transaction& operator=(const Transaction&) = delete; + ~Transaction(); private: volatile disk_cache::LruData* data_; - DISALLOW_COPY_AND_ASSIGN(Transaction); }; Transaction::Transaction(volatile disk_cache::LruData* data,
diff --git a/net/disk_cache/blockfile/rankings.h b/net/disk_cache/blockfile/rankings.h index d64f921f..53fa611 100644 --- a/net/disk_cache/blockfile/rankings.h +++ b/net/disk_cache/blockfile/rankings.h
@@ -72,6 +72,9 @@ explicit ScopedRankingsBlock(Rankings* rankings); ScopedRankingsBlock(Rankings* rankings, CacheRankingsBlock* node); + ScopedRankingsBlock(const ScopedRankingsBlock&) = delete; + ScopedRankingsBlock& operator=(const ScopedRankingsBlock&) = delete; + ~ScopedRankingsBlock() { rankings_->FreeRankingsBlock(get()); } @@ -89,7 +92,6 @@ private: Rankings* rankings_; - DISALLOW_COPY_AND_ASSIGN(ScopedRankingsBlock); }; // If we have multiple lists, we have to iterate through all at the same time.
diff --git a/net/disk_cache/blockfile/sparse_control.h b/net/disk_cache/blockfile/sparse_control.h index ebd6c91..b2355b926 100644 --- a/net/disk_cache/blockfile/sparse_control.h +++ b/net/disk_cache/blockfile/sparse_control.h
@@ -44,6 +44,10 @@ }; explicit SparseControl(EntryImpl* entry); + + SparseControl(const SparseControl&) = delete; + SparseControl& operator=(const SparseControl&) = delete; + ~SparseControl(); // Initializes the object for the current entry. If this entry already stores @@ -173,8 +177,6 @@ int child_offset_; // Offset to use for the current child. int child_len_; // Bytes to read or write for this child. int result_; - - DISALLOW_COPY_AND_ASSIGN(SparseControl); }; } // namespace disk_cache
diff --git a/net/disk_cache/blockfile/stats.h b/net/disk_cache/blockfile/stats.h index c469b26..78fb150 100644 --- a/net/disk_cache/blockfile/stats.h +++ b/net/disk_cache/blockfile/stats.h
@@ -49,6 +49,10 @@ }; Stats(); + + Stats(const Stats&) = delete; + Stats& operator=(const Stats&) = delete; + ~Stats(); // Initializes this object with |data| from disk. @@ -89,8 +93,6 @@ Addr storage_addr_; int data_sizes_[kDataSizesLength]; int64_t counters_[MAX_COUNTER]; - - DISALLOW_COPY_AND_ASSIGN(Stats); }; } // namespace disk_cache
diff --git a/net/disk_cache/blockfile/storage_block.h b/net/disk_cache/blockfile/storage_block.h index 661a21e2..679eb883 100644 --- a/net/disk_cache/blockfile/storage_block.h +++ b/net/disk_cache/blockfile/storage_block.h
@@ -35,6 +35,10 @@ class StorageBlock : public FileBlock { public: StorageBlock(MappedFile* file, Addr address); + + StorageBlock(const StorageBlock&) = delete; + StorageBlock& operator=(const StorageBlock&) = delete; + virtual ~StorageBlock(); // Deeps copies from another block. Neither this nor |other| should be @@ -96,8 +100,6 @@ bool modified_; bool own_data_; // Is data_ owned by this object or shared with someone else. bool extended_; // Used to store an entry of more than one block. - - DISALLOW_COPY_AND_ASSIGN(StorageBlock); }; } // namespace disk_cache
diff --git a/net/disk_cache/disk_cache_test_util.h b/net/disk_cache/disk_cache_test_util.h index f7e2fa7..8428cb7eb 100644 --- a/net/disk_cache/disk_cache_test_util.h +++ b/net/disk_cache/disk_cache_test_util.h
@@ -54,12 +54,15 @@ : public TestEntryResultCompletionCallbackBase { public: TestEntryResultCompletionCallback(); + + TestEntryResultCompletionCallback(const TestEntryResultCompletionCallback&) = + delete; + TestEntryResultCompletionCallback& operator=( + const TestEntryResultCompletionCallback&) = delete; + ~TestEntryResultCompletionCallback() override; disk_cache::Backend::EntryResultCallback callback(); - - private: - DISALLOW_COPY_AND_ASSIGN(TestEntryResultCompletionCallback); }; // Like net::TestCompletionCallback, but for RangeResultCallback. @@ -91,6 +94,10 @@ class MessageLoopHelper { public: MessageLoopHelper(); + + MessageLoopHelper(const MessageLoopHelper&) = delete; + MessageLoopHelper& operator=(const MessageLoopHelper&) = delete; + ~MessageLoopHelper(); // Run the message loop and wait for num_callbacks before returning. Returns @@ -130,8 +137,6 @@ // True if a callback was called/reused more than expected. bool callback_reused_error_; int callbacks_called_; - - DISALLOW_COPY_AND_ASSIGN(MessageLoopHelper); }; // ----------------------------------------------------------------------- @@ -145,6 +150,10 @@ // once, or if |reuse| is true and a callback is called more than twice, an // error will be reported to |helper|. CallbackTest(MessageLoopHelper* helper, bool reuse); + + CallbackTest(const CallbackTest&) = delete; + CallbackTest& operator=(const CallbackTest&) = delete; + ~CallbackTest(); void Run(int result); @@ -160,7 +169,6 @@ int reuse_; int last_result_; disk_cache::EntryResult last_entry_result_; - DISALLOW_COPY_AND_ASSIGN(CallbackTest); }; #endif // NET_DISK_CACHE_DISK_CACHE_TEST_UTIL_H_
diff --git a/net/disk_cache/memory/mem_backend_impl.h b/net/disk_cache/memory/mem_backend_impl.h index b5bb3164..d4dc597 100644 --- a/net/disk_cache/memory/mem_backend_impl.h +++ b/net/disk_cache/memory/mem_backend_impl.h
@@ -39,6 +39,10 @@ class NET_EXPORT_PRIVATE MemBackendImpl final : public Backend { public: explicit MemBackendImpl(net::NetLog* net_log); + + MemBackendImpl(const MemBackendImpl&) = delete; + MemBackendImpl& operator=(const MemBackendImpl&) = delete; + ~MemBackendImpl() override; // Returns an instance of a Backend implemented only in memory. The returned @@ -153,8 +157,6 @@ base::MemoryPressureListener memory_pressure_listener_; base::WeakPtrFactory<MemBackendImpl> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(MemBackendImpl); }; } // namespace disk_cache
diff --git a/net/disk_cache/simple/simple_file_tracker.h b/net/disk_cache/simple/simple_file_tracker.h index d47ab03..a54e42f 100644 --- a/net/disk_cache/simple/simple_file_tracker.h +++ b/net/disk_cache/simple/simple_file_tracker.h
@@ -46,6 +46,10 @@ public: FileHandle(); FileHandle(FileHandle&& other); + + FileHandle(const FileHandle&) = delete; + FileHandle& operator=(const FileHandle&) = delete; + ~FileHandle(); FileHandle& operator=(FileHandle&& other); base::File* operator->() const; @@ -67,7 +71,6 @@ const SimpleSynchronousEntry* entry_ = nullptr; SimpleFileTracker::SubFile subfile_; base::File* file_ = nullptr; - DISALLOW_COPY_AND_ASSIGN(FileHandle); }; struct EntryFileKey {
diff --git a/net/dns/address_info.h b/net/dns/address_info.h index 93de572..f5a0124 100644 --- a/net/dns/address_info.h +++ b/net/dns/address_info.h
@@ -84,14 +84,16 @@ class NET_EXPORT_PRIVATE AddrInfoGetter { public: AddrInfoGetter(); + + AddrInfoGetter(const AddrInfoGetter&) = delete; + AddrInfoGetter& operator=(const AddrInfoGetter&) = delete; + // Virtual for tests. virtual ~AddrInfoGetter(); virtual addrinfo* getaddrinfo(const std::string& host, const addrinfo* hints, int* out_os_error); virtual void freeaddrinfo(addrinfo* ai); - - DISALLOW_COPY_AND_ASSIGN(AddrInfoGetter); }; } // namespace net
diff --git a/net/dns/address_sorter.h b/net/dns/address_sorter.h index 2af2ee2..95fe5e1 100644 --- a/net/dns/address_sorter.h +++ b/net/dns/address_sorter.h
@@ -24,6 +24,9 @@ using CallbackType = base::OnceCallback<void(bool success, const AddressList& list)>; + AddressSorter(const AddressSorter&) = delete; + AddressSorter& operator=(const AddressSorter&) = delete; + virtual ~AddressSorter() {} // Sorts |list|, which must include at least one IPv6 address. @@ -36,9 +39,6 @@ protected: AddressSorter() {} - - private: - DISALLOW_COPY_AND_ASSIGN(AddressSorter); }; } // namespace net
diff --git a/net/dns/address_sorter_posix.h b/net/dns/address_sorter_posix.h index 81420f3..61a59bd6 100644 --- a/net/dns/address_sorter_posix.h +++ b/net/dns/address_sorter_posix.h
@@ -60,6 +60,10 @@ typedef std::map<IPAddress, SourceAddressInfo> SourceAddressMap; explicit AddressSorterPosix(ClientSocketFactory* socket_factory); + + AddressSorterPosix(const AddressSorterPosix&) = delete; + AddressSorterPosix& operator=(const AddressSorterPosix&) = delete; + ~AddressSorterPosix() override; // AddressSorter: @@ -84,8 +88,6 @@ PolicyTable ipv4_scope_table_; THREAD_CHECKER(thread_checker_); - - DISALLOW_COPY_AND_ASSIGN(AddressSorterPosix); }; } // namespace net
diff --git a/net/dns/address_sorter_posix_unittest.cc b/net/dns/address_sorter_posix_unittest.cc index a96abce2..95139f6 100644 --- a/net/dns/address_sorter_posix_unittest.cc +++ b/net/dns/address_sorter_posix_unittest.cc
@@ -42,6 +42,9 @@ explicit TestUDPClientSocket(const AddressMapping* mapping) : mapping_(mapping), connected_(false) {} + TestUDPClientSocket(const TestUDPClientSocket&) = delete; + TestUDPClientSocket& operator=(const TestUDPClientSocket&) = delete; + ~TestUDPClientSocket() override = default; int Read(IOBuffer*, int, CompletionOnceCallback) override { @@ -135,14 +138,16 @@ const AddressMapping* mapping_; bool connected_; IPEndPoint local_endpoint_; - - DISALLOW_COPY_AND_ASSIGN(TestUDPClientSocket); }; // Creates TestUDPClientSockets and maintains an AddressMapping. class TestSocketFactory : public ClientSocketFactory { public: TestSocketFactory() = default; + + TestSocketFactory(const TestSocketFactory&) = delete; + TestSocketFactory& operator=(const TestSocketFactory&) = delete; + ~TestSocketFactory() override = default; std::unique_ptr<DatagramClientSocket> CreateDatagramClientSocket( @@ -189,8 +194,6 @@ private: AddressMapping mapping_; - - DISALLOW_COPY_AND_ASSIGN(TestSocketFactory); }; void OnSortComplete(AddressList* result_buf,
diff --git a/net/dns/address_sorter_win.cc b/net/dns/address_sorter_win.cc index df64706b..524ba713 100644 --- a/net/dns/address_sorter_win.cc +++ b/net/dns/address_sorter_win.cc
@@ -30,6 +30,9 @@ EnsureWinsockInit(); } + AddressSorterWin(const AddressSorterWin&) = delete; + AddressSorterWin& operator=(const AddressSorterWin&) = delete; + ~AddressSorterWin() override {} // AddressSorter: @@ -137,8 +140,6 @@ DISALLOW_COPY_AND_ASSIGN(Job); }; - - DISALLOW_COPY_AND_ASSIGN(AddressSorterWin); }; } // namespace
diff --git a/net/dns/context_host_resolver.h b/net/dns/context_host_resolver.h index eed4048..e7f9082b 100644 --- a/net/dns/context_host_resolver.h +++ b/net/dns/context_host_resolver.h
@@ -44,6 +44,10 @@ // Same except the created resolver will own its own HostResolverManager. ContextHostResolver(std::unique_ptr<HostResolverManager> owned_manager, std::unique_ptr<ResolveContext> resolve_context); + + ContextHostResolver(const ContextHostResolver&) = delete; + ContextHostResolver& operator=(const ContextHostResolver&) = delete; + ~ContextHostResolver() override; // HostResolver methods: @@ -103,8 +107,6 @@ bool shutting_down_ = false; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(ContextHostResolver); }; } // namespace net
diff --git a/net/dns/dns_client.cc b/net/dns/dns_client.cc index 486581f1..519b162 100644 --- a/net/dns/dns_client.cc +++ b/net/dns/dns_client.cc
@@ -92,6 +92,9 @@ socket_factory_(socket_factory), rand_int_callback_(rand_int_callback) {} + DnsClientImpl(const DnsClientImpl&) = delete; + DnsClientImpl& operator=(const DnsClientImpl&) = delete; + ~DnsClientImpl() override = default; bool CanUseSecureDnsTransactions() const override { @@ -281,8 +284,6 @@ ClientSocketFactory* socket_factory_; const RandIntCallback rand_int_callback_; - - DISALLOW_COPY_AND_ASSIGN(DnsClientImpl); }; } // namespace
diff --git a/net/dns/dns_config_service.h b/net/dns/dns_config_service.h index e0103146..54b3efd 100644 --- a/net/dns/dns_config_service.h +++ b/net/dns/dns_config_service.h
@@ -51,6 +51,10 @@ base::FilePath::StringPieceType hosts_file_path, absl::optional<base::TimeDelta> config_change_delay = base::TimeDelta::FromMilliseconds(50)); + + DnsConfigService(const DnsConfigService&) = delete; + DnsConfigService& operator=(const DnsConfigService&) = delete; + virtual ~DnsConfigService(); // Attempts to read the configuration. Will run |callback| when succeeded. @@ -209,8 +213,6 @@ base::OneShotTimer timer_; base::WeakPtrFactory<DnsConfigService> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DnsConfigService); }; } // namespace net
diff --git a/net/dns/dns_config_service_fuchsia.h b/net/dns/dns_config_service_fuchsia.h index 69b5ed3..7b99d3a4 100644 --- a/net/dns/dns_config_service_fuchsia.h +++ b/net/dns/dns_config_service_fuchsia.h
@@ -17,6 +17,10 @@ class NET_EXPORT_PRIVATE DnsConfigServiceFuchsia : public DnsConfigService { public: DnsConfigServiceFuchsia(); + + DnsConfigServiceFuchsia(const DnsConfigServiceFuchsia&) = delete; + DnsConfigServiceFuchsia& operator=(const DnsConfigServiceFuchsia&) = delete; + ~DnsConfigServiceFuchsia() override; protected: @@ -24,9 +28,6 @@ void ReadConfigNow() override; void ReadHostsNow() override; bool StartWatching() override; - - private: - DISALLOW_COPY_AND_ASSIGN(DnsConfigServiceFuchsia); }; } // namespace internal
diff --git a/net/dns/dns_config_service_posix.cc b/net/dns/dns_config_service_posix.cc index 2de1457..b18f1232 100644 --- a/net/dns/dns_config_service_posix.cc +++ b/net/dns/dns_config_service_posix.cc
@@ -132,6 +132,10 @@ public: explicit Watcher(DnsConfigServicePosix& service) : DnsConfigService::Watcher(service) {} + + Watcher(const Watcher&) = delete; + Watcher& operator=(const Watcher&) = delete; + ~Watcher() override = default; bool Watch() override { @@ -168,8 +172,6 @@ #if !defined(OS_IOS) base::FilePathWatcher hosts_watcher_; #endif // !defined(OS_IOS) - - DISALLOW_COPY_AND_ASSIGN(Watcher); }; // A SerialWorker that uses libresolv to initialize res_state and converts
diff --git a/net/dns/dns_config_service_posix.h b/net/dns/dns_config_service_posix.h index d59134e..cf13593 100644 --- a/net/dns/dns_config_service_posix.h +++ b/net/dns/dns_config_service_posix.h
@@ -33,6 +33,10 @@ class NET_EXPORT_PRIVATE DnsConfigServicePosix : public DnsConfigService { public: DnsConfigServicePosix(); + + DnsConfigServicePosix(const DnsConfigServicePosix&) = delete; + DnsConfigServicePosix& operator=(const DnsConfigServicePosix&) = delete; + ~DnsConfigServicePosix() override; void RefreshConfig() override; @@ -53,8 +57,6 @@ std::unique_ptr<Watcher> watcher_; scoped_refptr<ConfigReader> config_reader_; - - DISALLOW_COPY_AND_ASSIGN(DnsConfigServicePosix); }; // Returns nullopt iff a valid config could not be determined.
diff --git a/net/dns/dns_config_service_win.cc b/net/dns/dns_config_service_win.cc index b6f751bb..6f15a9a 100644 --- a/net/dns/dns_config_service_win.cc +++ b/net/dns/dns_config_service_win.cc
@@ -79,6 +79,9 @@ key_.Open(HKEY_LOCAL_MACHINE, key, KEY_QUERY_VALUE); } + RegistryReader(const RegistryReader&) = delete; + RegistryReader& operator=(const RegistryReader&) = delete; + ~RegistryReader() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); } absl::optional<DnsSystemSettings::RegString> ReadString( @@ -127,8 +130,6 @@ base::win::RegKey key_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(RegistryReader); }; // Wrapper for GetAdaptersAddresses. Returns NULL if failed. @@ -321,6 +322,9 @@ typedef base::RepeatingCallback<void(bool succeeded)> CallbackType; RegistryWatcher() {} + RegistryWatcher(const RegistryWatcher&) = delete; + RegistryWatcher& operator=(const RegistryWatcher&) = delete; + ~RegistryWatcher() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); } bool Watch(const wchar_t key[], const CallbackType& callback) { @@ -352,8 +356,6 @@ base::win::RegKey key_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(RegistryWatcher); }; // Returns true iff |address| is DNS address from IPv6 stateless discovery, @@ -626,6 +628,10 @@ public: explicit Watcher(DnsConfigServiceWin& service) : DnsConfigService::Watcher(service) {} + + Watcher(const Watcher&) = delete; + Watcher& operator=(const Watcher&) = delete; + ~Watcher() override { NetworkChangeNotifier::RemoveIPAddressObserver(this); } bool Watch() override { @@ -685,8 +691,6 @@ RegistryWatcher dnscache_watcher_; RegistryWatcher policy_watcher_; base::FilePathWatcher hosts_watcher_; - - DISALLOW_COPY_AND_ASSIGN(Watcher); }; // Reads config from registry and IpHelper. All work performed in ThreadPool.
diff --git a/net/dns/dns_config_service_win.h b/net/dns/dns_config_service_win.h index 566f7e4..ce7a542 100644 --- a/net/dns/dns_config_service_win.h +++ b/net/dns/dns_config_service_win.h
@@ -128,6 +128,10 @@ class NET_EXPORT_PRIVATE DnsConfigServiceWin : public DnsConfigService { public: DnsConfigServiceWin(); + + DnsConfigServiceWin(const DnsConfigServiceWin&) = delete; + DnsConfigServiceWin& operator=(const DnsConfigServiceWin&) = delete; + ~DnsConfigServiceWin() override; private: @@ -143,8 +147,6 @@ std::unique_ptr<Watcher> watcher_; scoped_refptr<ConfigReader> config_reader_; scoped_refptr<HostsReader> hosts_reader_; - - DISALLOW_COPY_AND_ASSIGN(DnsConfigServiceWin); }; } // namespace internal
diff --git a/net/dns/dns_transaction.cc b/net/dns/dns_transaction.cc index 160f945f..2515881 100644 --- a/net/dns/dns_transaction.cc +++ b/net/dns/dns_transaction.cc
@@ -139,6 +139,9 @@ public: explicit DnsAttempt(size_t server_index) : server_index_(server_index) {} + DnsAttempt(const DnsAttempt&) = delete; + DnsAttempt& operator=(const DnsAttempt&) = delete; + virtual ~DnsAttempt() = default; // Starts the attempt. Returns ERR_IO_PENDING if cannot complete synchronously // and calls |callback| upon completion. @@ -188,8 +191,6 @@ private: const size_t server_index_; - - DISALLOW_COPY_AND_ASSIGN(DnsAttempt); }; class DnsUDPAttempt : public DnsAttempt { @@ -1105,6 +1106,9 @@ DCHECK(!IsIPLiteral(hostname_)); } + DnsTransactionImpl(const DnsTransactionImpl&) = delete; + DnsTransactionImpl& operator=(const DnsTransactionImpl&) = delete; + ~DnsTransactionImpl() override { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); if (!callback_.is_null()) { @@ -1671,8 +1675,6 @@ RequestPriority request_priority_; THREAD_CHECKER(thread_checker_); - - DISALLOW_COPY_AND_ASSIGN(DnsTransactionImpl); }; // ----------------------------------------------------------------------------
diff --git a/net/dns/dns_transaction_unittest.cc b/net/dns/dns_transaction_unittest.cc index 1dc6a71..26752aa 100644 --- a/net/dns/dns_transaction_unittest.cc +++ b/net/dns/dns_transaction_unittest.cc
@@ -126,6 +126,10 @@ query_->io_buffer()->size(), num_reads_and_writes())); } + + DnsSocketData(const DnsSocketData&) = delete; + DnsSocketData& operator=(const DnsSocketData&) = delete; + ~DnsSocketData() = default; // All responses must be added before GetProvider. @@ -222,8 +226,6 @@ std::vector<MockWrite> writes_; std::vector<MockRead> reads_; std::unique_ptr<SequencedSocketData> provider_; - - DISALLOW_COPY_AND_ASSIGN(DnsSocketData); }; class TestSocketFactory; @@ -233,13 +235,14 @@ public: FailingUDPClientSocket(SocketDataProvider* data, net::NetLog* net_log) : MockUDPClientSocket(data, net_log) {} + + FailingUDPClientSocket(const FailingUDPClientSocket&) = delete; + FailingUDPClientSocket& operator=(const FailingUDPClientSocket&) = delete; + ~FailingUDPClientSocket() override = default; int Connect(const IPEndPoint& endpoint) override { return ERR_CONNECTION_REFUSED; } - - private: - DISALLOW_COPY_AND_ASSIGN(FailingUDPClientSocket); }; // A variant of MockUDPClientSocket which notifies the factory OnConnect. @@ -249,13 +252,15 @@ SocketDataProvider* data, net::NetLog* net_log) : MockUDPClientSocket(data, net_log), factory_(factory) {} + + TestUDPClientSocket(const TestUDPClientSocket&) = delete; + TestUDPClientSocket& operator=(const TestUDPClientSocket&) = delete; + ~TestUDPClientSocket() override = default; int Connect(const IPEndPoint& endpoint) override; private: TestSocketFactory* factory_; - - DISALLOW_COPY_AND_ASSIGN(TestUDPClientSocket); }; // Creates TestUDPClientSockets and keeps endpoints reported via OnConnect. @@ -497,6 +502,9 @@ weak_factory_.GetWeakPtr())); } + URLRequestMockDohJob(const URLRequestMockDohJob&) = delete; + URLRequestMockDohJob& operator=(const URLRequestMockDohJob&) = delete; + ~URLRequestMockDohJob() override { if (data_provider_) data_provider_->DetachSocket(); @@ -586,8 +594,6 @@ int pending_buf_size_; base::WeakPtrFactory<URLRequestMockDohJob> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(URLRequestMockDohJob); }; class DnsTransactionTestBase : public testing::Test { @@ -861,6 +867,10 @@ class DohJobInterceptor : public URLRequestInterceptor { public: explicit DohJobInterceptor(DnsTransactionTestBase* test) : test_(test) {} + + DohJobInterceptor(const DohJobInterceptor&) = delete; + DohJobInterceptor& operator=(const DohJobInterceptor&) = delete; + ~DohJobInterceptor() override {} // URLRequestInterceptor implementation: @@ -871,8 +881,6 @@ private: DnsTransactionTestBase* test_; - - DISALLOW_COPY_AND_ASSIGN(DohJobInterceptor); }; void SetResponseModifierCallback(ResponseModifierCallback response_modifier) {
diff --git a/net/dns/fuzzed_host_resolver_util.cc b/net/dns/fuzzed_host_resolver_util.cc index 18a797d6..8a8328b 100644 --- a/net/dns/fuzzed_host_resolver_util.cc +++ b/net/dns/fuzzed_host_resolver_util.cc
@@ -393,6 +393,10 @@ HostResolverManager::SetDnsClientForTesting(std::move(dns_client)); } + FuzzedHostResolverManager(const FuzzedHostResolverManager&) = delete; + FuzzedHostResolverManager& operator=(const FuzzedHostResolverManager&) = + delete; + ~FuzzedHostResolverManager() override = default; void SetDnsClientForTesting(std::unique_ptr<DnsClient> dns_client) { @@ -424,8 +428,6 @@ NetLog* const net_log_; base::WeakPtrFactory<FuzzedDataProvider> data_provider_weak_factory_; - - DISALLOW_COPY_AND_ASSIGN(FuzzedHostResolverManager); }; } // namespace
diff --git a/net/dns/host_cache.h b/net/dns/host_cache.h index f4f8ba9..410b23a 100644 --- a/net/dns/host_cache.h +++ b/net/dns/host_cache.h
@@ -321,6 +321,9 @@ // Constructs a HostCache that stores up to |max_entries|. explicit HostCache(size_t max_entries); + HostCache(const HostCache&) = delete; + HostCache& operator=(const HostCache&) = delete; + ~HostCache(); // Returns a pointer to the matching (key, entry) pair, which is valid at time @@ -452,8 +455,6 @@ const base::TickClock* tick_clock_; THREAD_CHECKER(thread_checker_); - - DISALLOW_COPY_AND_ASSIGN(HostCache); }; } // namespace net
diff --git a/net/dns/host_resolver.cc b/net/dns/host_resolver.cc index 6f5be0a..537e3183 100644 --- a/net/dns/host_resolver.cc +++ b/net/dns/host_resolver.cc
@@ -35,6 +35,10 @@ public HostResolver::ProbeRequest { public: explicit FailingRequestImpl(int error) : error_(error) {} + + FailingRequestImpl(const FailingRequestImpl&) = delete; + FailingRequestImpl& operator=(const FailingRequestImpl&) = delete; + ~FailingRequestImpl() override = default; int Start(CompletionOnceCallback callback) override { return error_; } @@ -78,8 +82,6 @@ private: const int error_; - - DISALLOW_COPY_AND_ASSIGN(FailingRequestImpl); }; } // namespace
diff --git a/net/dns/host_resolver.h b/net/dns/host_resolver.h index 339182f..4eb2504 100644 --- a/net/dns/host_resolver.h +++ b/net/dns/host_resolver.h
@@ -310,6 +310,9 @@ virtual int Start(Delegate* delegate) = 0; }; + HostResolver(const HostResolver&) = delete; + HostResolver& operator=(const HostResolver&) = delete; + // If any completion callbacks are pending when the resolver is destroyed, // the host resolutions are cancelled, and the completion callbacks will not // be called. @@ -406,9 +409,6 @@ // immediately on start. static std::unique_ptr<ResolveHostRequest> CreateFailingRequest(int error); static std::unique_ptr<ProbeRequest> CreateFailingProbeRequest(int error); - - private: - DISALLOW_COPY_AND_ASSIGN(HostResolver); }; } // namespace net
diff --git a/net/dns/host_resolver_manager.cc b/net/dns/host_resolver_manager.cc index dbfcc7151..05a769b3 100644 --- a/net/dns/host_resolver_manager.cc +++ b/net/dns/host_resolver_manager.cc
@@ -666,6 +666,9 @@ complete_(false), tick_clock_(tick_clock) {} + RequestImpl(const RequestImpl&) = delete; + RequestImpl& operator=(const RequestImpl&) = delete; + ~RequestImpl() override { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); Cancel(); @@ -925,8 +928,6 @@ base::TimeTicks request_time_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(RequestImpl); }; class HostResolverManager::ProbeRequestImpl @@ -1045,6 +1046,9 @@ params_.resolver_proc = new SystemHostResolverProc(); } + ProcTask(const ProcTask&) = delete; + ProcTask& operator=(const ProcTask&) = delete; + // Cancels this ProcTask. Any outstanding resolve attempts running on worker // thread will continue running, but they will post back to the network thread // before checking their WeakPtrs to find that this task is cancelled. @@ -1220,8 +1224,6 @@ // delayed retry tasks. Invalidate WeakPtrs on completion and cancellation to // cancel handling of such posted tasks. base::WeakPtrFactory<ProcTask> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ProcTask); }; //-----------------------------------------------------------------------------
diff --git a/net/dns/host_resolver_manager.h b/net/dns/host_resolver_manager.h index ac4e6827..1af6e660 100644 --- a/net/dns/host_resolver_manager.h +++ b/net/dns/host_resolver_manager.h
@@ -139,6 +139,9 @@ SystemDnsConfigChangeNotifier* system_dns_config_notifier, NetLog* net_log); + HostResolverManager(const HostResolverManager&) = delete; + HostResolverManager& operator=(const HostResolverManager&) = delete; + // If any completion callbacks are pending when the resolver is destroyed, // the host resolutions are cancelled, and the completion callbacks will not // be called. @@ -497,8 +500,6 @@ base::WeakPtrFactory<HostResolverManager> weak_ptr_factory_{this}; base::WeakPtrFactory<HostResolverManager> probe_weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(HostResolverManager); }; // Resolves a local hostname (such as "localhost" or "vhost.localhost") into
diff --git a/net/dns/host_resolver_manager_fuzzer.cc b/net/dns/host_resolver_manager_fuzzer.cc index c06d47e..7c0ed59 100644 --- a/net/dns/host_resolver_manager_fuzzer.cc +++ b/net/dns/host_resolver_manager_fuzzer.cc
@@ -43,6 +43,9 @@ data_provider_(data_provider), dns_requests_(dns_requests) {} + DnsRequest(const DnsRequest&) = delete; + DnsRequest& operator=(const DnsRequest&) = delete; + ~DnsRequest() = default; // Creates and starts a DNS request using fuzzed parameters. If the request @@ -219,8 +222,6 @@ net::AddressList address_list_; std::unique_ptr<base::RunLoop> run_loop_; - - DISALLOW_COPY_AND_ASSIGN(DnsRequest); }; } // namespace
diff --git a/net/dns/host_resolver_mdns_task.h b/net/dns/host_resolver_mdns_task.h index b91e77bd..ce8020e 100644 --- a/net/dns/host_resolver_mdns_task.h +++ b/net/dns/host_resolver_mdns_task.h
@@ -32,6 +32,10 @@ HostResolverMdnsTask(MDnsClient* mdns_client, std::string hostname, const std::vector<DnsQueryType>& query_types); + + HostResolverMdnsTask(const HostResolverMdnsTask&) = delete; + HostResolverMdnsTask& operator=(const HostResolverMdnsTask&) = delete; + ~HostResolverMdnsTask(); // Starts the task. |completion_closure| will be called asynchronously. @@ -64,8 +68,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<HostResolverMdnsTask> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(HostResolverMdnsTask); }; } // namespace net
diff --git a/net/dns/mdns_client_impl.h b/net/dns/mdns_client_impl.h index b5d1ab3..8fcec6fd 100644 --- a/net/dns/mdns_client_impl.h +++ b/net/dns/mdns_client_impl.h
@@ -40,6 +40,10 @@ public: MDnsSocketFactoryImpl() : net_log_(nullptr) {} explicit MDnsSocketFactoryImpl(NetLog* net_log) : net_log_(net_log) {} + + MDnsSocketFactoryImpl(const MDnsSocketFactoryImpl&) = delete; + MDnsSocketFactoryImpl& operator=(const MDnsSocketFactoryImpl&) = delete; + ~MDnsSocketFactoryImpl() override {} void CreateSockets( @@ -47,8 +51,6 @@ private: NetLog* const net_log_; - - DISALLOW_COPY_AND_ASSIGN(MDnsSocketFactoryImpl); }; // A connection to the network for multicast DNS clients. It reads data into @@ -64,6 +66,10 @@ }; explicit MDnsConnection(MDnsConnection::Delegate* delegate); + + MDnsConnection(const MDnsConnection&) = delete; + MDnsConnection& operator=(const MDnsConnection&) = delete; + virtual ~MDnsConnection(); // Succeeds if at least one of the socket handlers succeeded. @@ -75,6 +81,10 @@ public: SocketHandler(std::unique_ptr<DatagramServerSocket> socket, MDnsConnection* connection); + + SocketHandler(const SocketHandler&) = delete; + SocketHandler& operator=(const SocketHandler&) = delete; + ~SocketHandler(); int Start(); @@ -94,8 +104,6 @@ IPEndPoint multicast_addr_; bool send_in_progress_; base::queue<std::pair<scoped_refptr<IOBuffer>, unsigned>> send_queue_; - - DISALLOW_COPY_AND_ASSIGN(SocketHandler); }; // Callback for handling a datagram being received on either ipv4 or ipv6. @@ -112,8 +120,6 @@ Delegate* delegate_; base::WeakPtrFactory<MDnsConnection> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(MDnsConnection); }; class MDnsListenerImpl; @@ -127,6 +133,10 @@ class Core : public base::SupportsWeakPtr<Core>, MDnsConnection::Delegate { public: Core(base::Clock* clock, base::OneShotTimer* timer); + + Core(const Core&) = delete; + Core& operator=(const Core&) = delete; + ~Core() override; // Initialize the core. @@ -199,8 +209,6 @@ base::Time scheduled_cleanup_; std::unique_ptr<MDnsConnection> connection_; - - DISALLOW_COPY_AND_ASSIGN(Core); }; MDnsClientImpl(); @@ -247,6 +255,9 @@ MDnsListener::Delegate* delegate, MDnsClientImpl* client); + MDnsListenerImpl(const MDnsListenerImpl&) = delete; + MDnsListenerImpl& operator=(const MDnsListenerImpl&) = delete; + ~MDnsListenerImpl() override; // MDnsListener implementation: @@ -284,7 +295,6 @@ bool active_refresh_; base::CancelableRepeatingClosure next_refresh_; - DISALLOW_COPY_AND_ASSIGN(MDnsListenerImpl); }; class MDnsTransactionImpl : public base::SupportsWeakPtr<MDnsTransactionImpl>, @@ -296,6 +306,10 @@ int flags, const MDnsTransaction::ResultCallback& callback, MDnsClientImpl* client); + + MDnsTransactionImpl(const MDnsTransactionImpl&) = delete; + MDnsTransactionImpl& operator=(const MDnsTransactionImpl&) = delete; + ~MDnsTransactionImpl() override; // MDnsTransaction implementation: @@ -346,8 +360,6 @@ bool started_; int flags_; - - DISALLOW_COPY_AND_ASSIGN(MDnsTransactionImpl); }; } // namespace net
diff --git a/net/dns/mdns_client_unittest.cc b/net/dns/mdns_client_unittest.cc index f432500a..261ee99 100644 --- a/net/dns/mdns_client_unittest.cc +++ b/net/dns/mdns_client_unittest.cc
@@ -419,17 +419,22 @@ class MockClock : public base::Clock { public: MockClock() = default; + + MockClock(const MockClock&) = delete; + MockClock& operator=(const MockClock&) = delete; + ~MockClock() override = default; MOCK_CONST_METHOD0(Now, base::Time()); - - private: - DISALLOW_COPY_AND_ASSIGN(MockClock); }; class MockTimer : public base::MockOneShotTimer { public: MockTimer() {} + + MockTimer(const MockTimer&) = delete; + MockTimer& operator=(const MockTimer&) = delete; + ~MockTimer() override = default; void Start(const base::Location& posted_from, @@ -443,9 +448,6 @@ // Does not replace the behavior of MockTimer::Start(). MOCK_METHOD2(StartObserver, void(const base::Location& posted_from, base::TimeDelta delay)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockTimer); }; } // namespace
diff --git a/net/dns/mock_host_resolver.cc b/net/dns/mock_host_resolver.cc index fb76ff471..496b6b6 100644 --- a/net/dns/mock_host_resolver.cc +++ b/net/dns/mock_host_resolver.cc
@@ -103,6 +103,9 @@ resolver_(resolver), complete_(false) {} + RequestImpl(const RequestImpl&) = delete; + RequestImpl& operator=(const RequestImpl&) = delete; + ~RequestImpl() override { if (id_ > 0) { if (resolver_) @@ -261,8 +264,6 @@ // outstanding request objects. base::WeakPtr<MockHostResolverBase> resolver_; bool complete_; - - DISALLOW_COPY_AND_ASSIGN(RequestImpl); }; class MockHostResolverBase::ProbeRequestImpl @@ -1083,6 +1084,9 @@ explicit RequestImpl(base::WeakPtr<HangingHostResolver> resolver) : resolver_(resolver) {} + RequestImpl(const RequestImpl&) = delete; + RequestImpl& operator=(const RequestImpl&) = delete; + ~RequestImpl() override { if (is_running_ && resolver_) resolver_->num_cancellations_++; @@ -1131,8 +1135,6 @@ // outstanding request objects. base::WeakPtr<HangingHostResolver> resolver_; bool is_running_ = false; - - DISALLOW_COPY_AND_ASSIGN(RequestImpl); }; HangingHostResolver::HangingHostResolver() = default;
diff --git a/net/dns/mock_host_resolver.h b/net/dns/mock_host_resolver.h index f62d7fdd..247b005 100644 --- a/net/dns/mock_host_resolver.h +++ b/net/dns/mock_host_resolver.h
@@ -97,6 +97,9 @@ class MdnsListenerImpl; public: + MockHostResolverBase(const MockHostResolverBase&) = delete; + MockHostResolverBase& operator=(const MockHostResolverBase&) = delete; + ~MockHostResolverBase() override; RuleBasedHostResolverProc* rules() { @@ -311,8 +314,6 @@ const base::TickClock* tick_clock_; THREAD_CHECKER(thread_checker_); - - DISALLOW_COPY_AND_ASSIGN(MockHostResolverBase); }; class MockHostResolver : public MockHostResolverBase { @@ -354,6 +355,10 @@ scoped_refptr<RuleBasedHostResolverProc> rules = nullptr, bool use_caching = false, int cache_invalidation_num = 0); + + MockHostResolverFactory(const MockHostResolverFactory&) = delete; + MockHostResolverFactory& operator=(const MockHostResolverFactory&) = delete; + ~MockHostResolverFactory() override; std::unique_ptr<HostResolver> CreateResolver( @@ -370,8 +375,6 @@ const scoped_refptr<RuleBasedHostResolverProc> rules_; const bool use_caching_; const int cache_invalidation_num_; - - DISALLOW_COPY_AND_ASSIGN(MockHostResolverFactory); }; // RuleBasedHostResolverProc applies a set of rules to map a host string to
diff --git a/net/dns/notify_watcher_mac.h b/net/dns/notify_watcher_mac.h index ed01246..79063c4 100644 --- a/net/dns/notify_watcher_mac.h +++ b/net/dns/notify_watcher_mac.h
@@ -22,6 +22,9 @@ NotifyWatcherMac(); + NotifyWatcherMac(const NotifyWatcherMac&) = delete; + NotifyWatcherMac& operator=(const NotifyWatcherMac&) = delete; + // When deleted, automatically cancels. virtual ~NotifyWatcherMac(); @@ -40,8 +43,6 @@ int notify_token_; CallbackType callback_; std::unique_ptr<base::FileDescriptorWatcher::Controller> watcher_; - - DISALLOW_COPY_AND_ASSIGN(NotifyWatcherMac); }; } // namespace net
diff --git a/net/dns/record_rdata.h b/net/dns/record_rdata.h index c862389d0..8479857 100644 --- a/net/dns/record_rdata.h +++ b/net/dns/record_rdata.h
@@ -50,6 +50,9 @@ public: static const uint16_t kType = dns_protocol::kTypeSRV; + SrvRecordRdata(const SrvRecordRdata&) = delete; + SrvRecordRdata& operator=(const SrvRecordRdata&) = delete; + ~SrvRecordRdata() override; static std::unique_ptr<SrvRecordRdata> Create(const base::StringPiece& data, const DnsRecordParser& parser); @@ -71,8 +74,6 @@ uint16_t port_; std::string target_; - - DISALLOW_COPY_AND_ASSIGN(SrvRecordRdata); }; // A Record format (http://www.ietf.org/rfc/rfc1035.txt): @@ -81,6 +82,9 @@ public: static const uint16_t kType = dns_protocol::kTypeA; + ARecordRdata(const ARecordRdata&) = delete; + ARecordRdata& operator=(const ARecordRdata&) = delete; + ~ARecordRdata() override; static std::unique_ptr<ARecordRdata> Create(const base::StringPiece& data, const DnsRecordParser& parser); @@ -93,8 +97,6 @@ ARecordRdata(); IPAddress address_; - - DISALLOW_COPY_AND_ASSIGN(ARecordRdata); }; // AAAA Record format (http://www.ietf.org/rfc/rfc1035.txt): @@ -103,6 +105,9 @@ public: static const uint16_t kType = dns_protocol::kTypeAAAA; + AAAARecordRdata(const AAAARecordRdata&) = delete; + AAAARecordRdata& operator=(const AAAARecordRdata&) = delete; + ~AAAARecordRdata() override; static std::unique_ptr<AAAARecordRdata> Create(const base::StringPiece& data, const DnsRecordParser& parser); @@ -115,8 +120,6 @@ AAAARecordRdata(); IPAddress address_; - - DISALLOW_COPY_AND_ASSIGN(AAAARecordRdata); }; // CNAME record format (http://www.ietf.org/rfc/rfc1035.txt): @@ -125,6 +128,9 @@ public: static const uint16_t kType = dns_protocol::kTypeCNAME; + CnameRecordRdata(const CnameRecordRdata&) = delete; + CnameRecordRdata& operator=(const CnameRecordRdata&) = delete; + ~CnameRecordRdata() override; static std::unique_ptr<CnameRecordRdata> Create( const base::StringPiece& data, @@ -138,8 +144,6 @@ CnameRecordRdata(); std::string cname_; - - DISALLOW_COPY_AND_ASSIGN(CnameRecordRdata); }; // PTR record format (http://www.ietf.org/rfc/rfc1035.txt): @@ -148,6 +152,9 @@ public: static const uint16_t kType = dns_protocol::kTypePTR; + PtrRecordRdata(const PtrRecordRdata&) = delete; + PtrRecordRdata& operator=(const PtrRecordRdata&) = delete; + ~PtrRecordRdata() override; static std::unique_ptr<PtrRecordRdata> Create(const base::StringPiece& data, const DnsRecordParser& parser); @@ -160,8 +167,6 @@ PtrRecordRdata(); std::string ptrdomain_; - - DISALLOW_COPY_AND_ASSIGN(PtrRecordRdata); }; // TXT record format (http://www.ietf.org/rfc/rfc1035.txt): @@ -171,6 +176,9 @@ public: static const uint16_t kType = dns_protocol::kTypeTXT; + TxtRecordRdata(const TxtRecordRdata&) = delete; + TxtRecordRdata& operator=(const TxtRecordRdata&) = delete; + ~TxtRecordRdata() override; static std::unique_ptr<TxtRecordRdata> Create(const base::StringPiece& data, const DnsRecordParser& parser); @@ -183,8 +191,6 @@ TxtRecordRdata(); std::vector<std::string> texts_; - - DISALLOW_COPY_AND_ASSIGN(TxtRecordRdata); }; // Only the subset of the NSEC record format required by mDNS is supported. @@ -195,6 +201,9 @@ public: static const uint16_t kType = dns_protocol::kTypeNSEC; + NsecRecordRdata(const NsecRecordRdata&) = delete; + NsecRecordRdata& operator=(const NsecRecordRdata&) = delete; + ~NsecRecordRdata() override; static std::unique_ptr<NsecRecordRdata> Create(const base::StringPiece& data, const DnsRecordParser& parser); @@ -217,8 +226,6 @@ NsecRecordRdata(); std::vector<uint8_t> bitmap_; - - DISALLOW_COPY_AND_ASSIGN(NsecRecordRdata); }; // OPT record format (https://tools.ietf.org/html/rfc6891):
diff --git a/net/dns/system_dns_config_change_notifier.cc b/net/dns/system_dns_config_change_notifier.cc index 68472cf..c01fee0 100644 --- a/net/dns/system_dns_config_change_notifier.cc +++ b/net/dns/system_dns_config_change_notifier.cc
@@ -32,6 +32,9 @@ : task_runner_(base::SequencedTaskRunnerHandle::Get()), observer_(observer) {} + WrappedObserver(const WrappedObserver&) = delete; + WrappedObserver& operator=(const WrappedObserver&) = delete; + ~WrappedObserver() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); } void OnNotifyThreadsafe(absl::optional<DnsConfig> config) { @@ -54,8 +57,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<WrappedObserver> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(WrappedObserver); }; } // namespace @@ -78,6 +79,9 @@ std::move(dns_config_service))); } + Core(const Core&) = delete; + Core& operator=(const Core&) = delete; + ~Core() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK(wrapped_observers_.empty()); @@ -181,8 +185,6 @@ SEQUENCE_CHECKER(sequence_checker_); std::unique_ptr<DnsConfigService> dns_config_service_; base::WeakPtrFactory<Core> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(Core); }; SystemDnsConfigChangeNotifier::SystemDnsConfigChangeNotifier()
diff --git a/net/dns/system_dns_config_change_notifier.h b/net/dns/system_dns_config_change_notifier.h index 6ba0654c..472a740 100644 --- a/net/dns/system_dns_config_change_notifier.h +++ b/net/dns/system_dns_config_change_notifier.h
@@ -52,6 +52,11 @@ SystemDnsConfigChangeNotifier( scoped_refptr<base::SequencedTaskRunner> task_runner, std::unique_ptr<DnsConfigService> dns_config_service); + + SystemDnsConfigChangeNotifier(const SystemDnsConfigChangeNotifier&) = delete; + SystemDnsConfigChangeNotifier& operator=( + const SystemDnsConfigChangeNotifier&) = delete; + ~SystemDnsConfigChangeNotifier(); // An added Observer will receive notifications on the sequence where @@ -77,8 +82,6 @@ class Core; std::unique_ptr<Core, base::OnTaskRunnerDeleter> core_; - - DISALLOW_COPY_AND_ASSIGN(SystemDnsConfigChangeNotifier); }; } // namespace net
diff --git a/net/extras/sqlite/sqlite_persistent_cookie_store.cc b/net/extras/sqlite/sqlite_persistent_cookie_store.cc index f84d686..86f89e0 100644 --- a/net/extras/sqlite/sqlite_persistent_cookie_store.cc +++ b/net/extras/sqlite/sqlite_persistent_cookie_store.cc
@@ -540,6 +540,9 @@ explicit IncrementTimeDelta(base::TimeDelta* delta) : delta_(delta), original_value_(*delta), start_(base::Time::Now()) {} + IncrementTimeDelta(const IncrementTimeDelta&) = delete; + IncrementTimeDelta& operator=(const IncrementTimeDelta&) = delete; + ~IncrementTimeDelta() { *delta_ = original_value_ + base::Time::Now() - start_; } @@ -548,8 +551,6 @@ base::TimeDelta* delta_; base::TimeDelta original_value_; base::Time start_; - - DISALLOW_COPY_AND_ASSIGN(IncrementTimeDelta); }; // Initializes the cookies table, returning true on success.
diff --git a/net/extras/sqlite/sqlite_persistent_reporting_and_nel_store.h b/net/extras/sqlite/sqlite_persistent_reporting_and_nel_store.h index 06dbb955..9c2a3e6f 100644 --- a/net/extras/sqlite/sqlite_persistent_reporting_and_nel_store.h +++ b/net/extras/sqlite/sqlite_persistent_reporting_and_nel_store.h
@@ -35,6 +35,11 @@ const scoped_refptr<base::SequencedTaskRunner>& client_task_runner, const scoped_refptr<base::SequencedTaskRunner>& background_task_runner); + SQLitePersistentReportingAndNelStore( + const SQLitePersistentReportingAndNelStore&) = delete; + SQLitePersistentReportingAndNelStore& operator=( + const SQLitePersistentReportingAndNelStore&) = delete; + ~SQLitePersistentReportingAndNelStore() override; // NetworkErrorLoggingService::PersistentNelStore implementation @@ -84,8 +89,6 @@ base::WeakPtrFactory<SQLitePersistentReportingAndNelStore> weak_factory_{ this}; - - DISALLOW_COPY_AND_ASSIGN(SQLitePersistentReportingAndNelStore); }; } // namespace net
diff --git a/net/filter/brotli_source_stream.cc b/net/filter/brotli_source_stream.cc index 662eb26..c1f396a 100644 --- a/net/filter/brotli_source_stream.cc +++ b/net/filter/brotli_source_stream.cc
@@ -34,6 +34,9 @@ CHECK(brotli_state_); } + BrotliSourceStream(const BrotliSourceStream&) = delete; + BrotliSourceStream& operator=(const BrotliSourceStream&) = delete; + ~BrotliSourceStream() override { BrotliDecoderErrorCode error_code = BrotliDecoderGetErrorCode(brotli_state_); @@ -172,8 +175,6 @@ size_t used_memory_maximum_; size_t consumed_bytes_; size_t produced_bytes_; - - DISALLOW_COPY_AND_ASSIGN(BrotliSourceStream); }; } // namespace
diff --git a/net/filter/filter_source_stream.h b/net/filter/filter_source_stream.h index dadc8cc..99c4cf0 100644 --- a/net/filter/filter_source_stream.h +++ b/net/filter/filter_source_stream.h
@@ -30,6 +30,9 @@ // |upstream| cannot be null. FilterSourceStream(SourceType type, std::unique_ptr<SourceStream> upstream); + FilterSourceStream(const FilterSourceStream&) = delete; + FilterSourceStream& operator=(const FilterSourceStream&) = delete; + ~FilterSourceStream() override; // SourceStream implementation. @@ -113,8 +116,6 @@ // Reading from |upstream_| has returned 0 byte or an error code. bool upstream_end_reached_; - - DISALLOW_COPY_AND_ASSIGN(FilterSourceStream); }; } // namespace net
diff --git a/net/filter/filter_source_stream_unittest.cc b/net/filter/filter_source_stream_unittest.cc index 3be056f3..9bf5218 100644 --- a/net/filter/filter_source_stream_unittest.cc +++ b/net/filter/filter_source_stream_unittest.cc
@@ -27,6 +27,11 @@ public: TestFilterSourceStreamBase(std::unique_ptr<SourceStream> upstream) : FilterSourceStream(SourceStream::TYPE_NONE, std::move(upstream)) {} + + TestFilterSourceStreamBase(const TestFilterSourceStreamBase&) = delete; + TestFilterSourceStreamBase& operator=(const TestFilterSourceStreamBase&) = + delete; + ~TestFilterSourceStreamBase() override { DCHECK(buffer_.empty()); } std::string GetTypeAsString() const override { return type_string_; } @@ -52,8 +57,6 @@ private: std::string type_string_; - - DISALLOW_COPY_AND_ASSIGN(TestFilterSourceStreamBase); }; // A FilterSourceStream that needs all input data before it can return non-zero
diff --git a/net/filter/fuzzed_source_stream.h b/net/filter/fuzzed_source_stream.h index e87c56f..105790e 100644 --- a/net/filter/fuzzed_source_stream.h +++ b/net/filter/fuzzed_source_stream.h
@@ -25,6 +25,10 @@ // |data_provider| is used to determine behavior of the FuzzedSourceStream. // It must remain valid until after the FuzzedSocket is destroyed. explicit FuzzedSourceStream(FuzzedDataProvider* data_provider); + + FuzzedSourceStream(const FuzzedSourceStream&) = delete; + FuzzedSourceStream& operator=(const FuzzedSourceStream&) = delete; + ~FuzzedSourceStream() override; // SourceStream implementation @@ -47,8 +51,6 @@ // Last result returned by Read() is an error or 0. bool end_returned_; - - DISALLOW_COPY_AND_ASSIGN(FuzzedSourceStream); }; } // namespace net
diff --git a/net/filter/gzip_header.h b/net/filter/gzip_header.h index e9ecd04..275f208c 100644 --- a/net/filter/gzip_header.h +++ b/net/filter/gzip_header.h
@@ -31,6 +31,10 @@ }; GZipHeader(); + + GZipHeader(const GZipHeader&) = delete; + GZipHeader& operator=(const GZipHeader&) = delete; + ~GZipHeader(); // Wipe the slate clean and start from scratch. @@ -88,8 +92,6 @@ int state_; // our current State in the parsing FSM: an int so we can ++ uint8_t flags_; // the flags byte of the header ("FLG" in the RFC) uint16_t extra_length_; // how much of the "extra field" we have yet to read - - DISALLOW_COPY_AND_ASSIGN(GZipHeader); }; } // namespace net
diff --git a/net/filter/gzip_source_stream.h b/net/filter/gzip_source_stream.h index ab554fa..77ff3c0 100644 --- a/net/filter/gzip_source_stream.h +++ b/net/filter/gzip_source_stream.h
@@ -28,6 +28,9 @@ // class NET_EXPORT_PRIVATE GzipSourceStream : public FilterSourceStream { public: + GzipSourceStream(const GzipSourceStream&) = delete; + GzipSourceStream& operator=(const GzipSourceStream&) = delete; + ~GzipSourceStream() override; // Creates a GzipSourceStream. Return nullptr if initialization fails. @@ -107,8 +110,6 @@ // Used when replaying data. InputState replay_state_; - - DISALLOW_COPY_AND_ASSIGN(GzipSourceStream); }; } // namespace net
diff --git a/net/filter/mock_source_stream.h b/net/filter/mock_source_stream.h index 2f6135f..9151012 100644 --- a/net/filter/mock_source_stream.h +++ b/net/filter/mock_source_stream.h
@@ -27,6 +27,10 @@ ASYNC, }; MockSourceStream(); + + MockSourceStream(const MockSourceStream&) = delete; + MockSourceStream& operator=(const MockSourceStream&) = delete; + // The destructor will crash in debug build if there is any pending read. ~MockSourceStream() override; @@ -80,8 +84,6 @@ scoped_refptr<IOBuffer> dest_buffer_; CompletionOnceCallback callback_; int dest_buffer_size_ = 0; - - DISALLOW_COPY_AND_ASSIGN(MockSourceStream); }; } // namespace net
diff --git a/net/filter/source_stream.h b/net/filter/source_stream.h index 5337397..c9253c7 100644 --- a/net/filter/source_stream.h +++ b/net/filter/source_stream.h
@@ -32,6 +32,9 @@ // |type| is the type of the SourceStream. explicit SourceStream(SourceType type); + SourceStream(const SourceStream&) = delete; + SourceStream& operator=(const SourceStream&) = delete; + virtual ~SourceStream(); // Initiaties a read from the stream. @@ -64,8 +67,6 @@ private: SourceType type_; - - DISALLOW_COPY_AND_ASSIGN(SourceStream); }; } // namespace net
diff --git a/net/http/bidirectional_stream_unittest.cc b/net/http/bidirectional_stream_unittest.cc index 48e31ad9..d6874be 100644 --- a/net/http/bidirectional_stream_unittest.cc +++ b/net/http/bidirectional_stream_unittest.cc
@@ -115,6 +115,9 @@ run_until_completion_(false), not_expect_callback_(false) {} + TestDelegateBase(const TestDelegateBase&) = delete; + TestDelegateBase& operator=(const TestDelegateBase&) = delete; + ~TestDelegateBase() override = default; void OnStreamReady(bool request_headers_sent) override { @@ -308,7 +311,6 @@ bool not_expect_callback_; CompletionOnceCallback callback_; - DISALLOW_COPY_AND_ASSIGN(TestDelegateBase); }; // A delegate that deletes the stream in a particular callback. @@ -324,6 +326,10 @@ DeleteStreamDelegate(IOBuffer* buf, int buf_len, Phase phase) : TestDelegateBase(buf, buf_len), phase_(phase) {} + + DeleteStreamDelegate(const DeleteStreamDelegate&) = delete; + DeleteStreamDelegate& operator=(const DeleteStreamDelegate&) = delete; + ~DeleteStreamDelegate() override = default; void OnHeadersReceived( @@ -375,14 +381,16 @@ // Indicates in which callback the delegate should cancel or delete the // stream. Phase phase_; - - DISALLOW_COPY_AND_ASSIGN(DeleteStreamDelegate); }; // A Timer that does not start a delayed task unless the timer is fired. class MockTimer : public base::MockOneShotTimer { public: MockTimer() {} + + MockTimer(const MockTimer&) = delete; + MockTimer& operator=(const MockTimer&) = delete; + ~MockTimer() override = default; void Start(const base::Location& posted_from, @@ -393,9 +401,6 @@ base::MockOneShotTimer::Start(posted_from, infinite_delay, std::move(user_task)); } - - private: - DISALLOW_COPY_AND_ASSIGN(MockTimer); }; } // namespace
diff --git a/net/http/http_auth_filter.h b/net/http/http_auth_filter.h index 45515fc..cf94570 100644 --- a/net/http/http_auth_filter.h +++ b/net/http/http_auth_filter.h
@@ -36,6 +36,10 @@ class NET_EXPORT HttpAuthFilterAllowlist : public HttpAuthFilter { public: explicit HttpAuthFilterAllowlist(const std::string& server_allowlist); + + HttpAuthFilterAllowlist(const HttpAuthFilterAllowlist&) = delete; + HttpAuthFilterAllowlist& operator=(const HttpAuthFilterAllowlist&) = delete; + ~HttpAuthFilterAllowlist() override; // Adds an individual URL |filter| to the list, of the specified |target|. @@ -54,8 +58,6 @@ // We are using ProxyBypassRules because they have the functionality that we // want, but we are not using it for proxy bypass. ProxyBypassRules rules_; - - DISALLOW_COPY_AND_ASSIGN(HttpAuthFilterAllowlist); }; } // namespace net
diff --git a/net/http/http_auth_gssapi_posix.cc b/net/http/http_auth_gssapi_posix.cc index 8c3defbf..5855682 100644 --- a/net/http/http_auth_gssapi_posix.cc +++ b/net/http/http_auth_gssapi_posix.cc
@@ -62,6 +62,9 @@ DCHECK(gssapi_lib_); } + ScopedBuffer(const ScopedBuffer&) = delete; + ScopedBuffer& operator=(const ScopedBuffer&) = delete; + ~ScopedBuffer() { if (buffer_ != GSS_C_NO_BUFFER) { OM_uint32 minor_status = 0; @@ -77,8 +80,6 @@ private: gss_buffer_t buffer_; GSSAPILibrary* gssapi_lib_; - - DISALLOW_COPY_AND_ASSIGN(ScopedBuffer); }; // ScopedName releases a gss_name_t when it goes out of scope. @@ -89,6 +90,9 @@ DCHECK(gssapi_lib_); } + ScopedName(const ScopedName&) = delete; + ScopedName& operator=(const ScopedName&) = delete; + ~ScopedName() { if (name_ != GSS_C_NO_NAME) { OM_uint32 minor_status = 0; @@ -106,8 +110,6 @@ private: gss_name_t name_; GSSAPILibrary* gssapi_lib_; - - DISALLOW_COPY_AND_ASSIGN(ScopedName); }; bool OidEquals(const gss_OID left, const gss_OID right) {
diff --git a/net/http/http_auth_gssapi_posix.h b/net/http/http_auth_gssapi_posix.h index 05b70ff..f0a44dd6 100644 --- a/net/http/http_auth_gssapi_posix.h +++ b/net/http/http_auth_gssapi_posix.h
@@ -203,6 +203,10 @@ class ScopedSecurityContext { public: explicit ScopedSecurityContext(GSSAPILibrary* gssapi_lib); + + ScopedSecurityContext(const ScopedSecurityContext&) = delete; + ScopedSecurityContext& operator=(const ScopedSecurityContext&) = delete; + ~ScopedSecurityContext(); gss_ctx_id_t get() const { return security_context_; } @@ -211,8 +215,6 @@ private: gss_ctx_id_t security_context_ = GSS_C_NO_CONTEXT; GSSAPILibrary* gssapi_lib_; - - DISALLOW_COPY_AND_ASSIGN(ScopedSecurityContext); };
diff --git a/net/http/http_auth_handler.h b/net/http/http_auth_handler.h index 1a17af7..f63f697 100644 --- a/net/http/http_auth_handler.h +++ b/net/http/http_auth_handler.h
@@ -34,6 +34,10 @@ class NET_EXPORT_PRIVATE HttpAuthHandler { public: HttpAuthHandler(); + + HttpAuthHandler(const HttpAuthHandler&) = delete; + HttpAuthHandler& operator=(const HttpAuthHandler&) = delete; + virtual ~HttpAuthHandler(); // Initializes the handler using a challenge issued by a server. @@ -236,8 +240,6 @@ NetLogWithSource net_log_; CompletionOnceCallback callback_; - - DISALLOW_COPY_AND_ASSIGN(HttpAuthHandler); }; } // namespace net
diff --git a/net/http/http_auth_handler_digest.h b/net/http/http_auth_handler_digest.h index b8688ce..e60fa739 100644 --- a/net/http/http_auth_handler_digest.h +++ b/net/http/http_auth_handler_digest.h
@@ -27,12 +27,14 @@ class NET_EXPORT_PRIVATE NonceGenerator { public: NonceGenerator(); + + NonceGenerator(const NonceGenerator&) = delete; + NonceGenerator& operator=(const NonceGenerator&) = delete; + virtual ~NonceGenerator(); // Generates a client nonce. virtual std::string GenerateNonce() const = 0; - private: - DISALLOW_COPY_AND_ASSIGN(NonceGenerator); }; // DynamicNonceGenerator does a random shuffle of 16
diff --git a/net/http/http_auth_handler_factory.h b/net/http/http_auth_handler_factory.h index aeba0b84..f74e7ef 100644 --- a/net/http/http_auth_handler_factory.h +++ b/net/http/http_auth_handler_factory.h
@@ -41,6 +41,10 @@ }; HttpAuthHandlerFactory() : http_auth_preferences_(nullptr) {} + + HttpAuthHandlerFactory(const HttpAuthHandlerFactory&) = delete; + HttpAuthHandlerFactory& operator=(const HttpAuthHandlerFactory&) = delete; + virtual ~HttpAuthHandlerFactory() {} // Sets the source of the HTTP authentication preferences. @@ -155,8 +159,6 @@ private: // The preferences for HTTP authentication. const HttpAuthPreferences* http_auth_preferences_; - - DISALLOW_COPY_AND_ASSIGN(HttpAuthHandlerFactory); }; // The HttpAuthHandlerRegistryFactory dispatches create requests out @@ -165,6 +167,12 @@ : public HttpAuthHandlerFactory { public: HttpAuthHandlerRegistryFactory(); + + HttpAuthHandlerRegistryFactory(const HttpAuthHandlerRegistryFactory&) = + delete; + HttpAuthHandlerRegistryFactory& operator=( + const HttpAuthHandlerRegistryFactory&) = delete; + ~HttpAuthHandlerRegistryFactory() override; // Sets the preferences into the factory associated with |scheme|. @@ -238,7 +246,6 @@ std::map<std::string, std::unique_ptr<HttpAuthHandlerFactory>>; FactoryMap factory_map_; - DISALLOW_COPY_AND_ASSIGN(HttpAuthHandlerRegistryFactory); }; } // namespace net
diff --git a/net/http/http_auth_handler_ntlm.h b/net/http/http_auth_handler_ntlm.h index ab83e61..f8ae2a1 100644 --- a/net/http/http_auth_handler_ntlm.h +++ b/net/http/http_auth_handler_ntlm.h
@@ -44,6 +44,10 @@ class Factory : public HttpAuthHandlerFactory { public: Factory(); + + Factory(const Factory&) = delete; + Factory& operator=(const Factory&) = delete; + ~Factory() override; int CreateAuthHandler(HttpAuthChallengeTokenizer* challenge, @@ -70,8 +74,6 @@ #if defined(NTLM_SSPI) std::unique_ptr<SSPILibrary> sspi_library_; #endif // defined(NTLM_SSPI) - - DISALLOW_COPY_AND_ASSIGN(Factory); }; #if defined(NTLM_PORTABLE)
diff --git a/net/http/http_auth_preferences.h b/net/http/http_auth_preferences.h index 2e941cd..9bf18da 100644 --- a/net/http/http_auth_preferences.h +++ b/net/http/http_auth_preferences.h
@@ -33,6 +33,10 @@ }; HttpAuthPreferences(); + + HttpAuthPreferences(const HttpAuthPreferences&) = delete; + HttpAuthPreferences& operator=(const HttpAuthPreferences&) = delete; + virtual ~HttpAuthPreferences(); virtual bool NegotiateDisableCnameLookup() const; @@ -118,7 +122,6 @@ #endif std::unique_ptr<URLSecurityManager> security_manager_; - DISALLOW_COPY_AND_ASSIGN(HttpAuthPreferences); }; } // namespace net
diff --git a/net/http/http_basic_state.h b/net/http/http_basic_state.h index 06c46df..cc98f7d 100644 --- a/net/http/http_basic_state.h +++ b/net/http/http_basic_state.h
@@ -31,6 +31,10 @@ public: HttpBasicState(std::unique_ptr<ClientSocketHandle> connection, bool using_proxy); + + HttpBasicState(const HttpBasicState&) = delete; + HttpBasicState& operator=(const HttpBasicState&) = delete; + ~HttpBasicState(); // Initialize() must be called before using any of the other methods. @@ -85,8 +89,6 @@ std::string request_method_; MutableNetworkTrafficAnnotationTag traffic_annotation_; - - DISALLOW_COPY_AND_ASSIGN(HttpBasicState); }; } // namespace net
diff --git a/net/http/http_basic_stream.h b/net/http/http_basic_stream.h index eeea674..85e049db 100644 --- a/net/http/http_basic_stream.h +++ b/net/http/http_basic_stream.h
@@ -39,6 +39,10 @@ // initialize it correctly. HttpBasicStream(std::unique_ptr<ClientSocketHandle> connection, bool using_proxy); + + HttpBasicStream(const HttpBasicStream&) = delete; + HttpBasicStream& operator=(const HttpBasicStream&) = delete; + ~HttpBasicStream() override; // HttpStream methods: @@ -105,8 +109,6 @@ HttpBasicState state_; base::TimeTicks confirm_handshake_end_; RequestHeadersCallback request_headers_callback_; - - DISALLOW_COPY_AND_ASSIGN(HttpBasicStream); }; } // namespace net
diff --git a/net/http/http_cache_transaction.h b/net/http/http_cache_transaction.h index 75c0f83..de6c169 100644 --- a/net/http/http_cache_transaction.h +++ b/net/http/http_cache_transaction.h
@@ -87,6 +87,10 @@ Transaction(RequestPriority priority, HttpCache* cache); + + Transaction(const Transaction&) = delete; + Transaction& operator=(const Transaction&) = delete; + ~Transaction() override; // Virtual so it can be extended for testing. @@ -680,8 +684,6 @@ bool in_do_loop_; base::WeakPtrFactory<Transaction> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(Transaction); }; } // namespace net
diff --git a/net/http/http_cache_unittest.cc b/net/http/http_cache_unittest.cc index eabfe1a..d10f70f0 100644 --- a/net/http/http_cache_unittest.cc +++ b/net/http/http_cache_unittest.cc
@@ -352,6 +352,10 @@ FastTransactionServer() { no_store = false; } + + FastTransactionServer(const FastTransactionServer&) = delete; + FastTransactionServer& operator=(const FastTransactionServer&) = delete; + ~FastTransactionServer() = default; void set_no_store(bool value) { no_store = value; } @@ -366,7 +370,6 @@ private: static bool no_store; - DISALLOW_COPY_AND_ASSIGN(FastTransactionServer); }; bool FastTransactionServer::no_store; @@ -402,6 +405,10 @@ redirect_ = false; length_ = 80; } + + RangeTransactionServer(const RangeTransactionServer&) = delete; + RangeTransactionServer& operator=(const RangeTransactionServer&) = delete; + ~RangeTransactionServer() { not_modified_ = false; modified_ = false; @@ -443,7 +450,6 @@ static bool bad_200_; static bool redirect_; static int64_t length_; - DISALLOW_COPY_AND_ASSIGN(RangeTransactionServer); }; bool RangeTransactionServer::not_modified_ = false; bool RangeTransactionServer::modified_ = false;
diff --git a/net/http/http_cache_writers.h b/net/http/http_cache_writers.h index e77e98c4..14701bf 100644 --- a/net/http/http_cache_writers.h +++ b/net/http/http_cache_writers.h
@@ -55,6 +55,10 @@ // |cache| and |entry| must outlive this object. Writers(HttpCache* cache, HttpCache::ActiveEntry* entry); + + Writers(const Writers&) = delete; + Writers& operator=(const Writers&) = delete; + ~Writers(); // Retrieves data from the network transaction associated with the Writers @@ -288,7 +292,6 @@ base::OnceClosure cache_callback_; // Callback for cache_. base::WeakPtrFactory<Writers> weak_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(Writers); }; } // namespace net
diff --git a/net/http/http_content_disposition.h b/net/http/http_content_disposition.h index 7ae1bee..499293c 100644 --- a/net/http/http_content_disposition.h +++ b/net/http/http_content_disposition.h
@@ -54,6 +54,10 @@ HttpContentDisposition(const std::string& header, const std::string& referrer_charset); + + HttpContentDisposition(const HttpContentDisposition&) = delete; + HttpContentDisposition& operator=(const HttpContentDisposition&) = delete; + ~HttpContentDisposition(); bool is_attachment() const { return type() == ATTACHMENT; } @@ -72,8 +76,6 @@ Type type_; std::string filename_; int parse_result_flags_; - - DISALLOW_COPY_AND_ASSIGN(HttpContentDisposition); }; } // namespace net
diff --git a/net/http/http_network_layer.h b/net/http/http_network_layer.h index 49ec2247..94fcdf8 100644 --- a/net/http/http_network_layer.h +++ b/net/http/http_network_layer.h
@@ -26,6 +26,10 @@ // contains a valid ProxyResolutionService. The HttpNetworkLayer must be // destroyed before |session|. explicit HttpNetworkLayer(HttpNetworkSession* session); + + HttpNetworkLayer(const HttpNetworkLayer&) = delete; + HttpNetworkLayer& operator=(const HttpNetworkLayer&) = delete; + ~HttpNetworkLayer() override; // HttpTransactionFactory methods: @@ -43,8 +47,6 @@ bool suspended_; THREAD_CHECKER(thread_checker_); - - DISALLOW_COPY_AND_ASSIGN(HttpNetworkLayer); }; } // namespace net
diff --git a/net/http/http_network_session_peer.h b/net/http/http_network_session_peer.h index f70223f..c0ea9a7 100644 --- a/net/http/http_network_session_peer.h +++ b/net/http/http_network_session_peer.h
@@ -22,6 +22,10 @@ public: // |session| should outlive the HttpNetworkSessionPeer. explicit HttpNetworkSessionPeer(HttpNetworkSession* session); + + HttpNetworkSessionPeer(const HttpNetworkSessionPeer&) = delete; + HttpNetworkSessionPeer& operator=(const HttpNetworkSessionPeer&) = delete; + ~HttpNetworkSessionPeer(); void SetClientSocketPoolManager( @@ -34,8 +38,6 @@ private: HttpNetworkSession* const session_; - - DISALLOW_COPY_AND_ASSIGN(HttpNetworkSessionPeer); }; } // namespace net
diff --git a/net/http/http_network_transaction.h b/net/http/http_network_transaction.h index 947322b..f9963465 100644 --- a/net/http/http_network_transaction.h +++ b/net/http/http_network_transaction.h
@@ -53,6 +53,9 @@ HttpNetworkTransaction(RequestPriority priority, HttpNetworkSession* session); + HttpNetworkTransaction(const HttpNetworkTransaction&) = delete; + HttpNetworkTransaction& operator=(const HttpNetworkTransaction&) = delete; + ~HttpNetworkTransaction() override; // HttpTransaction methods: @@ -443,8 +446,6 @@ size_t num_restarts_; bool close_connection_on_destruction_ = false; - - DISALLOW_COPY_AND_ASSIGN(HttpNetworkTransaction); }; } // namespace net
diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc index 080b8cc..a68f217b 100644 --- a/net/http/http_network_transaction_unittest.cc +++ b/net/http/http_network_transaction_unittest.cc
@@ -300,6 +300,10 @@ CapturingProxyResolver() : proxy_server_(ProxyServer::SCHEME_HTTP, HostPortPair("myproxy", 80)) {} + + CapturingProxyResolver(const CapturingProxyResolver&) = delete; + CapturingProxyResolver& operator=(const CapturingProxyResolver&) = delete; + ~CapturingProxyResolver() override = default; int GetProxyForURL(const GURL& url, @@ -325,8 +329,6 @@ std::vector<LookupInfo> lookup_info_; ProxyServer proxy_server_; - - DISALLOW_COPY_AND_ASSIGN(CapturingProxyResolver); }; class CapturingProxyResolverFactory : public ProxyResolverFactory { @@ -5875,6 +5877,12 @@ class SameProxyWithDifferentSchemesProxyResolver : public ProxyResolver { public: SameProxyWithDifferentSchemesProxyResolver() {} + + SameProxyWithDifferentSchemesProxyResolver( + const SameProxyWithDifferentSchemesProxyResolver&) = delete; + SameProxyWithDifferentSchemesProxyResolver& operator=( + const SameProxyWithDifferentSchemesProxyResolver&) = delete; + ~SameProxyWithDifferentSchemesProxyResolver() override {} static constexpr uint16_t kProxyPort = 10000; @@ -5916,9 +5924,6 @@ NOTREACHED(); return ERR_NOT_IMPLEMENTED; } - - private: - DISALLOW_COPY_AND_ASSIGN(SameProxyWithDifferentSchemesProxyResolver); }; class SameProxyWithDifferentSchemesProxyResolverFactory
diff --git a/net/http/http_proxy_client_socket.h b/net/http/http_proxy_client_socket.h index 457b6f0..f205b4d 100644 --- a/net/http/http_proxy_client_socket.h +++ b/net/http/http_proxy_client_socket.h
@@ -50,6 +50,9 @@ ProxyDelegate* proxy_delegate, const NetworkTrafficAnnotationTag& traffic_annotation); + HttpProxyClientSocket(const HttpProxyClientSocket&) = delete; + HttpProxyClientSocket& operator=(const HttpProxyClientSocket&) = delete; + // On destruction Disconnect() is called. ~HttpProxyClientSocket() override; @@ -172,8 +175,6 @@ const NetworkTrafficAnnotationTag traffic_annotation_; const NetLogWithSource net_log_; - - DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocket); }; } // namespace net
diff --git a/net/http/http_proxy_connect_job.h b/net/http/http_proxy_connect_job.h index e8e50014..5df9ed9 100644 --- a/net/http/http_proxy_connect_job.h +++ b/net/http/http_proxy_connect_job.h
@@ -108,6 +108,10 @@ scoped_refptr<HttpProxySocketParams> params, ConnectJob::Delegate* delegate, const NetLogWithSource* net_log); + + HttpProxyConnectJob(const HttpProxyConnectJob&) = delete; + HttpProxyConnectJob& operator=(const HttpProxyConnectJob&) = delete; + ~HttpProxyConnectJob() override; // A single priority is used for tunnels over H2 and QUIC, which can be shared @@ -254,8 +258,6 @@ base::TimeTicks connect_start_time_; base::WeakPtrFactory<HttpProxyConnectJob> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(HttpProxyConnectJob); }; } // namespace net
diff --git a/net/http/http_raw_request_headers.h b/net/http/http_raw_request_headers.h index a1e48c1..9a0ac6df 100644 --- a/net/http/http_raw_request_headers.h +++ b/net/http/http_raw_request_headers.h
@@ -32,6 +32,10 @@ HttpRawRequestHeaders(); HttpRawRequestHeaders(HttpRawRequestHeaders&&); HttpRawRequestHeaders& operator=(HttpRawRequestHeaders&&); + + HttpRawRequestHeaders(const HttpRawRequestHeaders&) = delete; + HttpRawRequestHeaders& operator=(const HttpRawRequestHeaders&) = delete; + ~HttpRawRequestHeaders(); void Assign(HttpRawRequestHeaders other) { *this = std::move(other); } @@ -48,8 +52,6 @@ private: HeaderVector headers_; std::string request_line_; - - DISALLOW_COPY_AND_ASSIGN(HttpRawRequestHeaders); }; // A callback of this type can be passed to
diff --git a/net/http/http_request_headers.h b/net/http/http_request_headers.h index 51fc9bd..06f3ddb 100644 --- a/net/http/http_request_headers.h +++ b/net/http/http_request_headers.h
@@ -41,6 +41,10 @@ class NET_EXPORT Iterator { public: explicit Iterator(const HttpRequestHeaders& headers); + + Iterator(const Iterator&) = delete; + Iterator& operator=(const Iterator&) = delete; + ~Iterator(); // Advances the iterator to the next header, if any. Returns true if there @@ -56,8 +60,6 @@ bool started_; HttpRequestHeaders::HeaderVector::const_iterator curr_; const HttpRequestHeaders::HeaderVector::const_iterator end_; - - DISALLOW_COPY_AND_ASSIGN(Iterator); }; static const char kConnectMethod[];
diff --git a/net/http/http_response_body_drainer_unittest.cc b/net/http/http_response_body_drainer_unittest.cc index 9dc7f480..9456a04 100644 --- a/net/http/http_response_body_drainer_unittest.cc +++ b/net/http/http_response_body_drainer_unittest.cc
@@ -88,6 +88,10 @@ is_last_chunk_zero_size_(false), is_complete_(false), can_reuse_connection_(true) {} + + MockHttpStream(const MockHttpStream&) = delete; + MockHttpStream& operator=(const MockHttpStream&) = delete; + ~MockHttpStream() override = default; // HttpStream implementation. @@ -186,8 +190,6 @@ bool can_reuse_connection_; base::WeakPtrFactory<MockHttpStream> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(MockHttpStream); }; int MockHttpStream::ReadResponseBody(IOBuffer* buf,
diff --git a/net/http/http_server_properties_manager.h b/net/http/http_server_properties_manager.h index 404c8972..2b35d89b 100644 --- a/net/http/http_server_properties_manager.h +++ b/net/http/http_server_properties_manager.h
@@ -69,6 +69,10 @@ NetLog* net_log, const base::TickClock* clock = nullptr); + HttpServerPropertiesManager(const HttpServerPropertiesManager&) = delete; + HttpServerPropertiesManager& operator=(const HttpServerPropertiesManager&) = + delete; + ~HttpServerPropertiesManager(); // Populates passed in objects with data from preferences. If pref data is not @@ -211,8 +215,6 @@ base::WeakPtrFactory<HttpServerPropertiesManager> pref_load_weak_ptr_factory_{ this}; - - DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesManager); }; } // namespace net
diff --git a/net/http/http_server_properties_manager_unittest.cc b/net/http/http_server_properties_manager_unittest.cc index 5db0412..6257fcc 100644 --- a/net/http/http_server_properties_manager_unittest.cc +++ b/net/http/http_server_properties_manager_unittest.cc
@@ -71,6 +71,10 @@ class MockPrefDelegate : public net::HttpServerProperties::PrefDelegate { public: MockPrefDelegate() = default; + + MockPrefDelegate(const MockPrefDelegate&) = delete; + MockPrefDelegate& operator=(const MockPrefDelegate&) = delete; + ~MockPrefDelegate() override = default; // HttpServerProperties::PrefDelegate implementation. @@ -125,8 +129,6 @@ int num_pref_updates_ = 0; base::OnceClosure set_properties_callback_; - - DISALLOW_COPY_AND_ASSIGN(MockPrefDelegate); }; // Converts |server_info_map| to a base::Value by running it through an
diff --git a/net/http/http_stream.h b/net/http/http_stream.h index 559e18a..e645362 100644 --- a/net/http/http_stream.h +++ b/net/http/http_stream.h
@@ -43,6 +43,10 @@ class NET_EXPORT_PRIVATE HttpStream { public: HttpStream() {} + + HttpStream(const HttpStream&) = delete; + HttpStream& operator=(const HttpStream&) = delete; + virtual ~HttpStream() {} // Initialize stream. Must be called before calling SendRequest(). @@ -202,9 +206,6 @@ // Accept-CH header fields received in HTTP responses, this value is available // before any requests are made. virtual base::StringPiece GetAcceptChViaAlps() const = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(HttpStream); }; } // namespace net
diff --git a/net/http/http_stream_factory.h b/net/http/http_stream_factory.h index 28776979..e05f9da 100644 --- a/net/http/http_stream_factory.h +++ b/net/http/http_stream_factory.h
@@ -53,6 +53,10 @@ }; explicit HttpStreamFactory(HttpNetworkSession* session); + + HttpStreamFactory(const HttpStreamFactory&) = delete; + HttpStreamFactory& operator=(const HttpStreamFactory&) = delete; + virtual ~HttpStreamFactory(); void ProcessAlternativeServices( @@ -164,8 +168,6 @@ // Factory used by job controllers for creating jobs. std::unique_ptr<JobFactory> job_factory_; - - DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); }; } // namespace net
diff --git a/net/http/http_stream_factory_job.h b/net/http/http_stream_factory_job.h index d99a12c..874d239 100644 --- a/net/http/http_stream_factory_job.h +++ b/net/http/http_stream_factory_job.h
@@ -164,6 +164,10 @@ bool is_websocket, bool enable_ip_based_pooling, NetLog* net_log); + + Job(const Job&) = delete; + Job& operator=(const Job&) = delete; + ~Job() override; // Start initiates the process of creating a new HttpStream. @@ -458,8 +462,6 @@ std::unique_ptr<SpdySessionPool::SpdySessionRequest> spdy_session_request_; base::WeakPtrFactory<Job> ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(Job); }; // Factory for creating Jobs.
diff --git a/net/http/http_stream_factory_job_controller_unittest.cc b/net/http/http_stream_factory_job_controller_unittest.cc index 5f24135..f6e4bdc9 100644 --- a/net/http/http_stream_factory_job_controller_unittest.cc +++ b/net/http/http_stream_factory_job_controller_unittest.cc
@@ -110,6 +110,10 @@ class MockPrefDelegate : public HttpServerProperties::PrefDelegate { public: MockPrefDelegate() = default; + + MockPrefDelegate(const MockPrefDelegate&) = delete; + MockPrefDelegate& operator=(const MockPrefDelegate&) = delete; + ~MockPrefDelegate() override = default; // HttpServerProperties::PrefDelegate implementation: @@ -117,9 +121,6 @@ void SetServerProperties(const base::Value& value, base::OnceClosure callback) override {} void WaitForPrefLoad(base::OnceClosure pref_loaded_callback) override {} - - private: - DISALLOW_COPY_AND_ASSIGN(MockPrefDelegate); }; } // anonymous namespace @@ -262,6 +263,11 @@ return test_proxy_delegate_.get(); } + HttpStreamFactoryJobControllerTest( + const HttpStreamFactoryJobControllerTest&) = delete; + HttpStreamFactoryJobControllerTest& operator=( + const HttpStreamFactoryJobControllerTest&) = delete; + ~HttpStreamFactoryJobControllerTest() override { if (quic_data_) { EXPECT_TRUE(quic_data_->AllReadDataConsumed()); @@ -352,8 +358,6 @@ private: std::unique_ptr<TestProxyDelegate> test_proxy_delegate_; bool create_job_controller_ = true; - - DISALLOW_COPY_AND_ASSIGN(HttpStreamFactoryJobControllerTest); }; TEST_F(HttpStreamFactoryJobControllerTest, ProxyResolutionFailsSync) {
diff --git a/net/http/http_stream_factory_test_util.h b/net/http/http_stream_factory_test_util.h index d94b2420..708a749 100644 --- a/net/http/http_stream_factory_test_util.h +++ b/net/http/http_stream_factory_test_util.h
@@ -46,6 +46,10 @@ public: MockHttpStreamRequestDelegate(); + MockHttpStreamRequestDelegate(const MockHttpStreamRequestDelegate&) = delete; + MockHttpStreamRequestDelegate& operator=( + const MockHttpStreamRequestDelegate&) = delete; + ~MockHttpStreamRequestDelegate() override; // std::unique_ptr is not copyable and therefore cannot be mocked. @@ -95,9 +99,6 @@ SSLCertRequestInfo* cert_info)); MOCK_METHOD0(OnQuicBroken, void()); - - private: - DISALLOW_COPY_AND_ASSIGN(MockHttpStreamRequestDelegate); }; class MockHttpStreamFactoryJob : public HttpStreamFactory::Job {
diff --git a/net/http/http_stream_parser.h b/net/http/http_stream_parser.h index 0a415338..6141af9 100644 --- a/net/http/http_stream_parser.h +++ b/net/http/http_stream_parser.h
@@ -55,6 +55,10 @@ const HttpRequestInfo* request, GrowableIOBuffer* read_buffer, const NetLogWithSource& net_log); + + HttpStreamParser(const HttpStreamParser&) = delete; + HttpStreamParser& operator=(const HttpStreamParser&) = delete; + virtual ~HttpStreamParser(); // These functions implement the interface described in HttpStream with @@ -315,8 +319,6 @@ MutableNetworkTrafficAnnotationTag traffic_annotation_; base::WeakPtrFactory<HttpStreamParser> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(HttpStreamParser); }; } // namespace net
diff --git a/net/http/http_stream_request.h b/net/http/http_stream_request.h index 8175d8d0..778590a 100644 --- a/net/http/http_stream_request.h +++ b/net/http/http_stream_request.h
@@ -163,6 +163,9 @@ const NetLogWithSource& net_log, StreamType stream_type); + HttpStreamRequest(const HttpStreamRequest&) = delete; + HttpStreamRequest& operator=(const HttpStreamRequest&) = delete; + ~HttpStreamRequest(); // When a HttpStream creation process is stalled due to necessity @@ -230,8 +233,6 @@ bool using_spdy_; ConnectionAttempts connection_attempts_; const StreamType stream_type_; - - DISALLOW_COPY_AND_ASSIGN(HttpStreamRequest); }; } // namespace net
diff --git a/net/http/mock_allow_http_auth_preferences.h b/net/http/mock_allow_http_auth_preferences.h index c00a8d2..144b516 100644 --- a/net/http/mock_allow_http_auth_preferences.h +++ b/net/http/mock_allow_http_auth_preferences.h
@@ -15,14 +15,16 @@ class MockAllowHttpAuthPreferences : public HttpAuthPreferences { public: MockAllowHttpAuthPreferences(); + + MockAllowHttpAuthPreferences(const MockAllowHttpAuthPreferences&) = delete; + MockAllowHttpAuthPreferences& operator=(const MockAllowHttpAuthPreferences&) = + delete; + ~MockAllowHttpAuthPreferences() override; bool CanUseDefaultCredentials(const GURL& auth_origin) const override; HttpAuth::DelegationType GetDelegationType( const GURL& auth_origin) const override; - - private: - DISALLOW_COPY_AND_ASSIGN(MockAllowHttpAuthPreferences); }; } // namespace net
diff --git a/net/http/partial_data.h b/net/http/partial_data.h index 134c32e..b6f2ab8 100644 --- a/net/http/partial_data.h +++ b/net/http/partial_data.h
@@ -32,6 +32,10 @@ class PartialData { public: PartialData(); + + PartialData(const PartialData&) = delete; + PartialData& operator=(const PartialData&) = delete; + ~PartialData(); // Performs initialization of the object by examining the request |headers| @@ -159,8 +163,6 @@ bool initial_validation_; // Only used for truncated entries. CompletionOnceCallback callback_; base::WeakPtrFactory<PartialData> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PartialData); }; } // namespace net
diff --git a/net/http/proxy_client_socket.h b/net/http/proxy_client_socket.h index 943126e..d20e906 100644 --- a/net/http/proxy_client_socket.h +++ b/net/http/proxy_client_socket.h
@@ -27,6 +27,10 @@ class NET_EXPORT_PRIVATE ProxyClientSocket : public StreamSocket { public: ProxyClientSocket() {} + + ProxyClientSocket(const ProxyClientSocket&) = delete; + ProxyClientSocket& operator=(const ProxyClientSocket&) = delete; + ~ProxyClientSocket() override {} // Returns the HttpResponseInfo (including HTTP Headers) from @@ -77,9 +81,6 @@ // construction, this method should be called to strip everything // but the auth header from the redirect response. static void SanitizeProxyAuth(HttpResponseInfo& response); - - private: - DISALLOW_COPY_AND_ASSIGN(ProxyClientSocket); }; } // namespace net
diff --git a/net/http/transport_security_persister.h b/net/http/transport_security_persister.h index 7a5c5a3..130d25e 100644 --- a/net/http/transport_security_persister.h +++ b/net/http/transport_security_persister.h
@@ -65,6 +65,11 @@ TransportSecurityState* state, const scoped_refptr<base::SequencedTaskRunner>& background_runner, const base::FilePath& data_path); + + TransportSecurityPersister(const TransportSecurityPersister&) = delete; + TransportSecurityPersister& operator=(const TransportSecurityPersister&) = + delete; + ~TransportSecurityPersister() override; // Called by the TransportSecurityState when it changes its state. @@ -128,8 +133,6 @@ scoped_refptr<base::SequencedTaskRunner> background_runner_; base::WeakPtrFactory<TransportSecurityPersister> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(TransportSecurityPersister); }; } // namespace net
diff --git a/net/http/transport_security_state_test_util.h b/net/http/transport_security_state_test_util.h index 50f2b73..674ea0f 100644 --- a/net/http/transport_security_state_test_util.h +++ b/net/http/transport_security_state_test_util.h
@@ -24,6 +24,11 @@ // port number of |reporting_port|. explicit ScopedTransportSecurityStateSource(uint16_t reporting_port); + ScopedTransportSecurityStateSource( + const ScopedTransportSecurityStateSource&) = delete; + ScopedTransportSecurityStateSource& operator=( + const ScopedTransportSecurityStateSource&) = delete; + ~ScopedTransportSecurityStateSource(); private: @@ -35,8 +40,6 @@ std::vector<TransportSecurityStateSource::Pinset> pinsets_; std::vector<std::string> expect_ct_report_uri_strings_; std::vector<const char*> expect_ct_report_uris_; - - DISALLOW_COPY_AND_ASSIGN(ScopedTransportSecurityStateSource); }; } // namespace net
diff --git a/net/http/url_security_manager.h b/net/http/url_security_manager.h index 83fc5e1..2a79a5df 100644 --- a/net/http/url_security_manager.h +++ b/net/http/url_security_manager.h
@@ -21,6 +21,10 @@ class NET_EXPORT_PRIVATE URLSecurityManager { public: URLSecurityManager() {} + + URLSecurityManager(const URLSecurityManager&) = delete; + URLSecurityManager& operator=(const URLSecurityManager&) = delete; + virtual ~URLSecurityManager() {} // Creates a platform-dependent instance of URLSecurityManager. @@ -55,14 +59,16 @@ std::unique_ptr<HttpAuthFilter> allowlist_default) = 0; virtual void SetDelegateAllowlist( std::unique_ptr<HttpAuthFilter> allowlist_delegate) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(URLSecurityManager); }; class URLSecurityManagerAllowlist : public URLSecurityManager { public: URLSecurityManagerAllowlist(); + + URLSecurityManagerAllowlist(const URLSecurityManagerAllowlist&) = delete; + URLSecurityManagerAllowlist& operator=(const URLSecurityManagerAllowlist&) = + delete; + ~URLSecurityManagerAllowlist() override; // URLSecurityManager methods. @@ -79,8 +85,6 @@ private: std::unique_ptr<const HttpAuthFilter> allowlist_default_; std::unique_ptr<const HttpAuthFilter> allowlist_delegate_; - - DISALLOW_COPY_AND_ASSIGN(URLSecurityManagerAllowlist); }; } // namespace net
diff --git a/net/http/url_security_manager_win.cc b/net/http/url_security_manager_win.cc index 9a61f13..75ac62e8 100644 --- a/net/http/url_security_manager_win.cc +++ b/net/http/url_security_manager_win.cc
@@ -31,6 +31,10 @@ class URLSecurityManagerWin : public URLSecurityManagerAllowlist { public: URLSecurityManagerWin(); + + URLSecurityManagerWin(const URLSecurityManagerWin&) = delete; + URLSecurityManagerWin& operator=(const URLSecurityManagerWin&) = delete; + ~URLSecurityManagerWin() override; // URLSecurityManager methods: @@ -40,8 +44,6 @@ bool EnsureSystemSecurityManager(); Microsoft::WRL::ComPtr<IInternetSecurityManager> security_manager_; - - DISALLOW_COPY_AND_ASSIGN(URLSecurityManagerWin); }; URLSecurityManagerWin::URLSecurityManagerWin() {}
diff --git a/net/log/file_net_log_observer.cc b/net/log/file_net_log_observer.cc index cc8ed173..7aca11e9 100644 --- a/net/log/file_net_log_observer.cc +++ b/net/log/file_net_log_observer.cc
@@ -206,6 +206,9 @@ size_t total_num_event_files, scoped_refptr<base::SequencedTaskRunner> task_runner); + FileWriter(const FileWriter&) = delete; + FileWriter& operator=(const FileWriter&) = delete; + ~FileWriter(); // Writes |constants_value| to disk and opens the events array (closed in @@ -326,8 +329,6 @@ // Task runner for doing file operations. const scoped_refptr<base::SequencedTaskRunner> task_runner_; - - DISALLOW_COPY_AND_ASSIGN(FileWriter); }; std::unique_ptr<FileNetLogObserver> FileNetLogObserver::CreateBounded(
diff --git a/net/log/file_net_log_observer.h b/net/log/file_net_log_observer.h index a7a641f..f498aba1 100644 --- a/net/log/file_net_log_observer.h +++ b/net/log/file_net_log_observer.h
@@ -85,6 +85,9 @@ NetLogCaptureMode capture_mode, std::unique_ptr<base::Value> constants); + FileNetLogObserver(const FileNetLogObserver&) = delete; + FileNetLogObserver& operator=(const FileNetLogObserver&) = delete; + ~FileNetLogObserver() override; // Attaches this observer to |net_log| and begins observing events. @@ -157,8 +160,6 @@ std::unique_ptr<FileWriter> file_writer_; const NetLogCaptureMode capture_mode_; - - DISALLOW_COPY_AND_ASSIGN(FileNetLogObserver); }; // Serializes |value| to a JSON string used when writing to a file.
diff --git a/net/log/net_log_unittest.cc b/net/log/net_log_unittest.cc index 2d028b3..008b0ac6 100644 --- a/net/log/net_log_unittest.cc +++ b/net/log/net_log_unittest.cc
@@ -272,6 +272,10 @@ class AddEventsTestThread : public NetLogTestThread { public: AddEventsTestThread() = default; + + AddEventsTestThread(const AddEventsTestThread&) = delete; + AddEventsTestThread& operator=(const AddEventsTestThread&) = delete; + ~AddEventsTestThread() override = default; private: @@ -279,8 +283,6 @@ for (int i = 0; i < kEvents; ++i) AddEvent(net_log_); } - - DISALLOW_COPY_AND_ASSIGN(AddEventsTestThread); }; // A thread that adds and removes an observer from the NetLog repeatedly. @@ -288,6 +290,10 @@ public: AddRemoveObserverTestThread() = default; + AddRemoveObserverTestThread(const AddRemoveObserverTestThread&) = delete; + AddRemoveObserverTestThread& operator=(const AddRemoveObserverTestThread&) = + delete; + ~AddRemoveObserverTestThread() override { EXPECT_TRUE(!observer_.net_log()); } private: @@ -305,8 +311,6 @@ } CountingObserver observer_; - - DISALLOW_COPY_AND_ASSIGN(AddRemoveObserverTestThread); }; // Creates |kThreads| threads of type |ThreadType| and then runs them all
diff --git a/net/log/test_net_log.h b/net/log/test_net_log.h index f59e23a..bdccd39 100644 --- a/net/log/test_net_log.h +++ b/net/log/test_net_log.h
@@ -35,6 +35,9 @@ // Observe the specified |net_log| object with |capture_mode|. RecordingNetLogObserver(NetLog* net_log, NetLogCaptureMode capture_mode); + RecordingNetLogObserver(const RecordingNetLogObserver&) = delete; + RecordingNetLogObserver& operator=(const RecordingNetLogObserver&) = delete; + ~RecordingNetLogObserver() override; // Change the |capture_mode|. @@ -72,8 +75,6 @@ std::vector<NetLogEntry> entry_list_; NetLog* const net_log_; base::RepeatingClosure add_entry_callback_; - - DISALLOW_COPY_AND_ASSIGN(RecordingNetLogObserver); }; // NetLog subclass that follows normal lifetime rules (has a public @@ -84,10 +85,11 @@ class TestNetLog : public NetLog { public: TestNetLog(); - ~TestNetLog() override; - private: - DISALLOW_COPY_AND_ASSIGN(TestNetLog); + TestNetLog(const TestNetLog&) = delete; + TestNetLog& operator=(const TestNetLog&) = delete; + + ~TestNetLog() override; }; // NetLog subclass that attaches a single observer (this) to record NetLog @@ -100,6 +102,10 @@ class RecordingTestNetLog : public TestNetLog { public: RecordingTestNetLog(); + + RecordingTestNetLog(const RecordingTestNetLog&) = delete; + RecordingTestNetLog& operator=(const RecordingTestNetLog&) = delete; + ~RecordingTestNetLog() override; // These methods all delegate to the underlying RecordingNetLogObserver, @@ -122,8 +128,6 @@ private: RecordingNetLogObserver observer_; - - DISALLOW_COPY_AND_ASSIGN(RecordingTestNetLog); }; // Helper class that exposes a similar API as NetLogWithSource, but uses a @@ -134,6 +138,10 @@ class RecordingBoundTestNetLog { public: RecordingBoundTestNetLog(); + + RecordingBoundTestNetLog(const RecordingBoundTestNetLog&) = delete; + RecordingBoundTestNetLog& operator=(const RecordingBoundTestNetLog&) = delete; + ~RecordingBoundTestNetLog(); // The returned NetLogWithSource is only valid while |this| is alive. @@ -155,8 +163,6 @@ private: RecordingTestNetLog test_net_log_; const NetLogWithSource net_log_; - - DISALLOW_COPY_AND_ASSIGN(RecordingBoundTestNetLog); }; } // namespace net
diff --git a/net/log/trace_net_log_observer.h b/net/log/trace_net_log_observer.h index eea49c8..dfa2b5dd 100644 --- a/net/log/trace_net_log_observer.h +++ b/net/log/trace_net_log_observer.h
@@ -20,6 +20,10 @@ public base::trace_event::TraceLog::AsyncEnabledStateObserver { public: TraceNetLogObserver(); + + TraceNetLogObserver(const TraceNetLogObserver&) = delete; + TraceNetLogObserver& operator=(const TraceNetLogObserver&) = delete; + ~TraceNetLogObserver() override; // net::NetLog::ThreadSafeObserver implementation: @@ -42,8 +46,6 @@ private: NetLog* net_log_to_watch_; base::WeakPtrFactory<TraceNetLogObserver> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(TraceNetLogObserver); }; } // namespace net
diff --git a/net/network_error_logging/mock_persistent_nel_store.h b/net/network_error_logging/mock_persistent_nel_store.h index 15af5fa..45e2047 100644 --- a/net/network_error_logging/mock_persistent_nel_store.h +++ b/net/network_error_logging/mock_persistent_nel_store.h
@@ -59,6 +59,10 @@ using CommandList = std::vector<Command>; MockPersistentNelStore(); + + MockPersistentNelStore(const MockPersistentNelStore&) = delete; + MockPersistentNelStore& operator=(const MockPersistentNelStore&) = delete; + ~MockPersistentNelStore() override; // PersistentNelStore implementation: @@ -110,8 +114,6 @@ // Simulates the delta to be added to |policy_count_| the next time Flush() is // called. Reset to 0 when Flush() is called. int queued_policy_count_delta_; - - DISALLOW_COPY_AND_ASSIGN(MockPersistentNelStore); }; bool operator==(const MockPersistentNelStore::Command& lhs,
diff --git a/net/network_error_logging/network_error_logging_service.h b/net/network_error_logging/network_error_logging_service.h index 9d560d5..77b5bfb 100644 --- a/net/network_error_logging/network_error_logging_service.h +++ b/net/network_error_logging/network_error_logging_service.h
@@ -219,6 +219,10 @@ static std::unique_ptr<NetworkErrorLoggingService> Create( PersistentNelStore* store); + NetworkErrorLoggingService(const NetworkErrorLoggingService&) = delete; + NetworkErrorLoggingService& operator=(const NetworkErrorLoggingService&) = + delete; + virtual ~NetworkErrorLoggingService(); // Ingests a "NEL:" header received for |network_isolation_key| and |origin| @@ -289,9 +293,6 @@ const base::Clock* clock_; ReportingService* reporting_service_; bool shut_down_; - - private: - DISALLOW_COPY_AND_ASSIGN(NetworkErrorLoggingService); }; // Persistent storage for NEL policies. @@ -301,6 +302,10 @@ base::OnceCallback<void(std::vector<NelPolicy>)>; PersistentNelStore() = default; + + PersistentNelStore(const PersistentNelStore&) = delete; + PersistentNelStore& operator=(const PersistentNelStore&) = delete; + virtual ~PersistentNelStore() = default; // Initializes the store and retrieves stored NEL policies. This will be @@ -318,9 +323,6 @@ // Flushes the store. virtual void Flush() = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(PersistentNelStore); }; } // namespace net
diff --git a/net/network_error_logging/network_error_logging_test_util.h b/net/network_error_logging/network_error_logging_test_util.h index df9c422d..bad38116 100644 --- a/net/network_error_logging/network_error_logging_test_util.h +++ b/net/network_error_logging/network_error_logging_test_util.h
@@ -39,6 +39,12 @@ }; TestNetworkErrorLoggingService(); + + TestNetworkErrorLoggingService(const TestNetworkErrorLoggingService&) = + delete; + TestNetworkErrorLoggingService& operator=( + const TestNetworkErrorLoggingService&) = delete; + ~TestNetworkErrorLoggingService() override; const std::vector<Header>& headers() { return headers_; } @@ -58,8 +64,6 @@ private: std::vector<Header> headers_; std::vector<RequestDetails> errors_; - - DISALLOW_COPY_AND_ASSIGN(TestNetworkErrorLoggingService); }; } // namespace net
diff --git a/net/nqe/event_creator.h b/net/nqe/event_creator.h index 74f6ae50..b71c0d5 100644 --- a/net/nqe/event_creator.h +++ b/net/nqe/event_creator.h
@@ -26,6 +26,10 @@ class NET_EXPORT_PRIVATE EventCreator { public: explicit EventCreator(NetLogWithSource net_log); + + EventCreator(const EventCreator&) = delete; + EventCreator& operator=(const EventCreator&) = delete; + ~EventCreator(); // May add network quality changed event to the net-internals log if there @@ -47,8 +51,6 @@ NetworkQuality past_network_quality_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(EventCreator); }; } // namespace internal
diff --git a/net/nqe/network_qualities_prefs_manager.h b/net/nqe/network_qualities_prefs_manager.h index adc2073f..dcdef8f 100644 --- a/net/nqe/network_qualities_prefs_manager.h +++ b/net/nqe/network_qualities_prefs_manager.h
@@ -45,6 +45,11 @@ // |pref_delegate| is taken by this class. explicit NetworkQualitiesPrefsManager( std::unique_ptr<PrefDelegate> pref_delegate); + + NetworkQualitiesPrefsManager(const NetworkQualitiesPrefsManager&) = delete; + NetworkQualitiesPrefsManager& operator=(const NetworkQualitiesPrefsManager&) = + delete; + ~NetworkQualitiesPrefsManager() override; // Initialize on the Network thread. Must be called after pref service has @@ -82,8 +87,6 @@ ParsedPrefs read_prefs_startup_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(NetworkQualitiesPrefsManager); }; } // namespace net
diff --git a/net/nqe/network_qualities_prefs_manager_unittest.cc b/net/nqe/network_qualities_prefs_manager_unittest.cc index 873e9360..6f6d8e0 100644 --- a/net/nqe/network_qualities_prefs_manager_unittest.cc +++ b/net/nqe/network_qualities_prefs_manager_unittest.cc
@@ -31,6 +31,9 @@ TestPrefDelegate() : write_count_(0), read_count_(0), value_(new base::DictionaryValue) {} + TestPrefDelegate(const TestPrefDelegate&) = delete; + TestPrefDelegate& operator=(const TestPrefDelegate&) = delete; + ~TestPrefDelegate() override { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); value_->Clear(); @@ -71,8 +74,6 @@ std::unique_ptr<base::DictionaryValue> value_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(TestPrefDelegate); }; using NetworkQualitiesPrefManager = TestWithTaskEnvironment;
diff --git a/net/nqe/network_quality_estimator_params.h b/net/nqe/network_quality_estimator_params.h index dc830f8..9d0bd894 100644 --- a/net/nqe/network_quality_estimator_params.h +++ b/net/nqe/network_quality_estimator_params.h
@@ -36,6 +36,10 @@ explicit NetworkQualityEstimatorParams( const std::map<std::string, std::string>& params); + NetworkQualityEstimatorParams(const NetworkQualityEstimatorParams&) = delete; + NetworkQualityEstimatorParams& operator=( + const NetworkQualityEstimatorParams&) = delete; + ~NetworkQualityEstimatorParams(); // Returns the default observation for connection |type|. The default @@ -303,8 +307,6 @@ [EffectiveConnectionType::EFFECTIVE_CONNECTION_TYPE_LAST]; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimatorParams); }; } // namespace net
diff --git a/net/nqe/network_quality_estimator_test_util.h b/net/nqe/network_quality_estimator_test_util.h index dae3df73..60615c5 100644 --- a/net/nqe/network_quality_estimator_test_util.h +++ b/net/nqe/network_quality_estimator_test_util.h
@@ -52,6 +52,10 @@ explicit TestNetworkQualityEstimator( std::unique_ptr<NetworkQualityEstimatorParams> params); + TestNetworkQualityEstimator(const TestNetworkQualityEstimator&) = delete; + TestNetworkQualityEstimator& operator=(const TestNetworkQualityEstimator&) = + delete; + ~TestNetworkQualityEstimator() override; // Runs one URL request to completion. @@ -286,8 +290,6 @@ size_t ping_rtt_received_count_ = 0; absl::optional<size_t> transport_rtt_observation_count_last_ect_computation_; - - DISALLOW_COPY_AND_ASSIGN(TestNetworkQualityEstimator); }; } // namespace net
diff --git a/net/nqe/network_quality_estimator_unittest.cc b/net/nqe/network_quality_estimator_unittest.cc index e87a9f4..c664408 100644 --- a/net/nqe/network_quality_estimator_unittest.cc +++ b/net/nqe/network_quality_estimator_unittest.cc
@@ -2187,6 +2187,12 @@ std::string(), INT32_MIN), notification_received_(0) {} + + TestNetworkQualitiesCacheObserver(const TestNetworkQualitiesCacheObserver&) = + delete; + TestNetworkQualitiesCacheObserver& operator=( + const TestNetworkQualitiesCacheObserver&) = delete; + ~TestNetworkQualitiesCacheObserver() override = default; void OnChangeInCachedNetworkQuality( @@ -2208,7 +2214,6 @@ private: nqe::internal::NetworkID network_id_; size_t notification_received_; - DISALLOW_COPY_AND_ASSIGN(TestNetworkQualitiesCacheObserver); }; TEST_F(NetworkQualityEstimatorTest, CacheObserver) {
diff --git a/net/nqe/rtt_throughput_estimates_observer.h b/net/nqe/rtt_throughput_estimates_observer.h index 27f9043..ecd93efb 100644 --- a/net/nqe/rtt_throughput_estimates_observer.h +++ b/net/nqe/rtt_throughput_estimates_observer.h
@@ -34,13 +34,15 @@ base::TimeDelta transport_rtt, int32_t downstream_throughput_kbps) = 0; + RTTAndThroughputEstimatesObserver(const RTTAndThroughputEstimatesObserver&) = + delete; + RTTAndThroughputEstimatesObserver& operator=( + const RTTAndThroughputEstimatesObserver&) = delete; + virtual ~RTTAndThroughputEstimatesObserver() {} protected: RTTAndThroughputEstimatesObserver() {} - - private: - DISALLOW_COPY_AND_ASSIGN(RTTAndThroughputEstimatesObserver); }; } // namespace net
diff --git a/net/nqe/socket_watcher.h b/net/nqe/socket_watcher.h index 07abb55..fc6e92b 100644 --- a/net/nqe/socket_watcher.h +++ b/net/nqe/socket_watcher.h
@@ -66,6 +66,9 @@ ShouldNotifyRTTCallback should_notify_rtt_callback, const base::TickClock* tick_clock); + SocketWatcher(const SocketWatcher&) = delete; + SocketWatcher& operator=(const SocketWatcher&) = delete; + ~SocketWatcher() override; // SocketPerformanceWatcher implementation: @@ -106,8 +109,6 @@ // A unique identifier for the remote host that this socket connects to. const absl::optional<IPHash> host_; - - DISALLOW_COPY_AND_ASSIGN(SocketWatcher); }; } // namespace internal
diff --git a/net/nqe/socket_watcher_factory.h b/net/nqe/socket_watcher_factory.h index 88c5bbaf..68818bd 100644 --- a/net/nqe/socket_watcher_factory.h +++ b/net/nqe/socket_watcher_factory.h
@@ -60,6 +60,9 @@ ShouldNotifyRTTCallback should_notify_rtt_callback, const base::TickClock* tick_clock); + SocketWatcherFactory(const SocketWatcherFactory&) = delete; + SocketWatcherFactory& operator=(const SocketWatcherFactory&) = delete; + ~SocketWatcherFactory() override; // SocketPerformanceWatcherFactory implementation: @@ -93,8 +96,6 @@ ShouldNotifyRTTCallback should_notify_rtt_callback_; const base::TickClock* tick_clock_; - - DISALLOW_COPY_AND_ASSIGN(SocketWatcherFactory); }; } // namespace internal
diff --git a/net/nqe/throughput_analyzer.h b/net/nqe/throughput_analyzer.h index c6ec2438e..cde4d56 100644 --- a/net/nqe/throughput_analyzer.h +++ b/net/nqe/throughput_analyzer.h
@@ -67,6 +67,10 @@ ThroughputObservationCallback throughput_observation_callback, const base::TickClock* tick_clock, const NetLogWithSource& net_log); + + ThroughputAnalyzer(const ThroughputAnalyzer&) = delete; + ThroughputAnalyzer& operator=(const ThroughputAnalyzer&) = delete; + virtual ~ThroughputAnalyzer(); // Notifies |this| that the headers of |request| are about to be sent. @@ -247,8 +251,6 @@ SEQUENCE_CHECKER(sequence_checker_); NetLogWithSource net_log_; - - DISALLOW_COPY_AND_ASSIGN(ThroughputAnalyzer); }; } // namespace internal
diff --git a/net/nqe/throughput_analyzer_unittest.cc b/net/nqe/throughput_analyzer_unittest.cc index 758a4910..3684215 100644 --- a/net/nqe/throughput_analyzer_unittest.cc +++ b/net/nqe/throughput_analyzer_unittest.cc
@@ -67,6 +67,9 @@ throughput_observations_received_(0), bits_received_(0) {} + TestThroughputAnalyzer(const TestThroughputAnalyzer&) = delete; + TestThroughputAnalyzer& operator=(const TestThroughputAnalyzer&) = delete; + ~TestThroughputAnalyzer() override = default; int32_t throughput_observations_received() const { @@ -112,8 +115,6 @@ int64_t bits_received_; MockCachingHostResolver mock_host_resolver_; - - DISALLOW_COPY_AND_ASSIGN(TestThroughputAnalyzer); }; using ThroughputAnalyzerTest = TestWithTaskEnvironment;
diff --git a/net/ntlm/ntlm_buffer_writer.h b/net/ntlm/ntlm_buffer_writer.h index f4535e63..9818bb7 100644 --- a/net/ntlm/ntlm_buffer_writer.h +++ b/net/ntlm/ntlm_buffer_writer.h
@@ -44,6 +44,10 @@ class NET_EXPORT_PRIVATE NtlmBufferWriter { public: explicit NtlmBufferWriter(size_t buffer_len); + + NtlmBufferWriter(const NtlmBufferWriter&) = delete; + NtlmBufferWriter& operator=(const NtlmBufferWriter&) = delete; + ~NtlmBufferWriter(); size_t GetLength() const { return buffer_.size(); } @@ -186,8 +190,6 @@ std::vector<uint8_t> buffer_; size_t cursor_; - - DISALLOW_COPY_AND_ASSIGN(NtlmBufferWriter); }; } // namespace ntlm
diff --git a/net/ntlm/ntlm_client.h b/net/ntlm/ntlm_client.h index 27b00bb..c295efd 100644 --- a/net/ntlm/ntlm_client.h +++ b/net/ntlm/ntlm_client.h
@@ -42,6 +42,9 @@ // Integrity Check (MIC). explicit NtlmClient(NtlmFeatures features); + NtlmClient(const NtlmClient&) = delete; + NtlmClient& operator=(const NtlmClient&) = delete; + ~NtlmClient(); bool IsNtlmV2() const { return features_.enable_NTLMv2; } @@ -150,8 +153,6 @@ const NtlmFeatures features_; NegotiateFlags negotiate_flags_; std::vector<uint8_t> negotiate_message_; - - DISALLOW_COPY_AND_ASSIGN(NtlmClient); }; } // namespace ntlm
diff --git a/net/proxy_resolution/configured_proxy_resolution_service.cc b/net/proxy_resolution/configured_proxy_resolution_service.cc index 7eeec29..e1c2293 100644 --- a/net/proxy_resolution/configured_proxy_resolution_service.cc +++ b/net/proxy_resolution/configured_proxy_resolution_service.cc
@@ -415,6 +415,9 @@ next_state_(State::kNone), quick_check_enabled_(true) {} + InitProxyResolver(const InitProxyResolver&) = delete; + InitProxyResolver& operator=(const InitProxyResolver&) = delete; + // Note that the destruction of PacFileDecider will automatically cancel // any outstanding work. ~InitProxyResolver() = default; @@ -597,8 +600,6 @@ CompletionOnceCallback callback_; State next_state_; bool quick_check_enabled_; - - DISALLOW_COPY_AND_ASSIGN(InitProxyResolver); }; // ConfiguredProxyResolutionService::PacFileDeciderPoller
diff --git a/net/proxy_resolution/configured_proxy_resolution_service.h b/net/proxy_resolution/configured_proxy_resolution_service.h index 1174be73..693da97 100644 --- a/net/proxy_resolution/configured_proxy_resolution_service.h +++ b/net/proxy_resolution/configured_proxy_resolution_service.h
@@ -108,6 +108,11 @@ NetLog* net_log, bool quick_check_enabled); + ConfiguredProxyResolutionService(const ConfiguredProxyResolutionService&) = + delete; + ConfiguredProxyResolutionService& operator=( + const ConfiguredProxyResolutionService&) = delete; + ~ConfiguredProxyResolutionService() override; // ProxyResolutionService @@ -415,8 +420,6 @@ // synchronous callback. base::WeakPtrFactory<ConfiguredProxyResolutionService> weak_ptr_factory_{ this}; - - DISALLOW_COPY_AND_ASSIGN(ConfiguredProxyResolutionService); }; } // namespace net
diff --git a/net/proxy_resolution/configured_proxy_resolution_service_unittest.cc b/net/proxy_resolution/configured_proxy_resolution_service_unittest.cc index 409b26d..8cc1a6d 100644 --- a/net/proxy_resolution/configured_proxy_resolution_service_unittest.cc +++ b/net/proxy_resolution/configured_proxy_resolution_service_unittest.cc
@@ -514,6 +514,10 @@ class DeletingCallback : public TestCompletionCallbackBase { public: explicit DeletingCallback(std::unique_ptr<T>* deletee); + + DeletingCallback(const DeletingCallback&) = delete; + DeletingCallback& operator=(const DeletingCallback&) = delete; + ~DeletingCallback() override; CompletionOnceCallback callback() { @@ -528,8 +532,6 @@ } std::unique_ptr<T>* deletee_; - - DISALLOW_COPY_AND_ASSIGN(DeletingCallback); }; template <typename T>
diff --git a/net/proxy_resolution/dhcp_pac_file_fetcher.h b/net/proxy_resolution/dhcp_pac_file_fetcher.h index d3abf1e..68273b99 100644 --- a/net/proxy_resolution/dhcp_pac_file_fetcher.h +++ b/net/proxy_resolution/dhcp_pac_file_fetcher.h
@@ -29,6 +29,9 @@ // which PAC script to use if one or more are available. class NET_EXPORT_PRIVATE DhcpPacFileFetcher { public: + DhcpPacFileFetcher(const DhcpPacFileFetcher&) = delete; + DhcpPacFileFetcher& operator=(const DhcpPacFileFetcher&) = delete; + // Destruction should cancel any outstanding requests. virtual ~DhcpPacFileFetcher(); @@ -84,9 +87,6 @@ protected: DhcpPacFileFetcher(); - - private: - DISALLOW_COPY_AND_ASSIGN(DhcpPacFileFetcher); }; // A do-nothing retriever, always returns synchronously with @@ -95,6 +95,11 @@ : public DhcpPacFileFetcher { public: DoNothingDhcpPacFileFetcher(); + + DoNothingDhcpPacFileFetcher(const DoNothingDhcpPacFileFetcher&) = delete; + DoNothingDhcpPacFileFetcher& operator=(const DoNothingDhcpPacFileFetcher&) = + delete; + ~DoNothingDhcpPacFileFetcher() override; int Fetch(std::u16string* utf16_text, @@ -108,7 +113,6 @@ private: GURL gurl_; - DISALLOW_COPY_AND_ASSIGN(DoNothingDhcpPacFileFetcher); }; } // namespace net
diff --git a/net/proxy_resolution/multi_threaded_proxy_resolver_unittest.cc b/net/proxy_resolution/multi_threaded_proxy_resolver_unittest.cc index 0c36dad0..98cdd8d6 100644 --- a/net/proxy_resolution/multi_threaded_proxy_resolver_unittest.cc +++ b/net/proxy_resolution/multi_threaded_proxy_resolver_unittest.cc
@@ -111,6 +111,9 @@ BlockableProxyResolver() : state_(State::NONE), condition_(&lock_) {} + BlockableProxyResolver(const BlockableProxyResolver&) = delete; + BlockableProxyResolver& operator=(const BlockableProxyResolver&) = delete; + ~BlockableProxyResolver() override { base::AutoLock lock(lock_); EXPECT_NE(State::BLOCKED, state_); @@ -170,8 +173,6 @@ State state_; base::Lock lock_; base::ConditionVariable condition_; - - DISALLOW_COPY_AND_ASSIGN(BlockableProxyResolver); }; // This factory returns new instances of BlockableProxyResolver.
diff --git a/net/proxy_resolution/network_delegate_error_observer.h b/net/proxy_resolution/network_delegate_error_observer.h index 67534c31..7bd3f0a5 100644 --- a/net/proxy_resolution/network_delegate_error_observer.h +++ b/net/proxy_resolution/network_delegate_error_observer.h
@@ -28,6 +28,11 @@ public: NetworkDelegateErrorObserver(NetworkDelegate* network_delegate, base::SingleThreadTaskRunner* origin_runner); + + NetworkDelegateErrorObserver(const NetworkDelegateErrorObserver&) = delete; + NetworkDelegateErrorObserver& operator=(const NetworkDelegateErrorObserver&) = + delete; + ~NetworkDelegateErrorObserver() override; static std::unique_ptr<ProxyResolverErrorObserver> Create( @@ -41,8 +46,6 @@ class Core; scoped_refptr<Core> core_; - - DISALLOW_COPY_AND_ASSIGN(NetworkDelegateErrorObserver); }; } // namespace net
diff --git a/net/proxy_resolution/pac_file_decider.h b/net/proxy_resolution/pac_file_decider.h index 570ca92..220c71d 100644 --- a/net/proxy_resolution/pac_file_decider.h +++ b/net/proxy_resolution/pac_file_decider.h
@@ -79,6 +79,9 @@ DhcpPacFileFetcher* dhcp_pac_file_fetcher, NetLog* net_log); + PacFileDecider(const PacFileDecider&) = delete; + PacFileDecider& operator=(const PacFileDecider&) = delete; + // Aborts any in-progress request. ~PacFileDecider(); @@ -217,8 +220,6 @@ std::unique_ptr<HostResolver::ResolveHostRequest> resolve_request_; base::OneShotTimer quick_check_timer_; - - DISALLOW_COPY_AND_ASSIGN(PacFileDecider); }; } // namespace net
diff --git a/net/proxy_resolution/pac_file_decider_unittest.cc b/net/proxy_resolution/pac_file_decider_unittest.cc index 621ebfa7..bfbc8331 100644 --- a/net/proxy_resolution/pac_file_decider_unittest.cc +++ b/net/proxy_resolution/pac_file_decider_unittest.cc
@@ -137,6 +137,10 @@ class MockDhcpPacFileFetcher : public DhcpPacFileFetcher { public: MockDhcpPacFileFetcher(); + + MockDhcpPacFileFetcher(const MockDhcpPacFileFetcher&) = delete; + MockDhcpPacFileFetcher& operator=(const MockDhcpPacFileFetcher&) = delete; + ~MockDhcpPacFileFetcher() override; int Fetch(std::u16string* utf16_text, @@ -155,7 +159,6 @@ CompletionOnceCallback callback_; std::u16string* utf16_text_; GURL gurl_; - DISALLOW_COPY_AND_ASSIGN(MockDhcpPacFileFetcher); }; MockDhcpPacFileFetcher::MockDhcpPacFileFetcher() = default;
diff --git a/net/proxy_resolution/pac_file_fetcher_impl.h b/net/proxy_resolution/pac_file_fetcher_impl.h index f11c4af2..74b1b8a 100644 --- a/net/proxy_resolution/pac_file_fetcher_impl.h +++ b/net/proxy_resolution/pac_file_fetcher_impl.h
@@ -49,6 +49,9 @@ static std::unique_ptr<PacFileFetcherImpl> Create( URLRequestContext* url_request_context); + PacFileFetcherImpl(const PacFileFetcherImpl&) = delete; + PacFileFetcherImpl& operator=(const PacFileFetcherImpl&) = delete; + ~PacFileFetcherImpl() override; // Used by unit-tests to modify the default limits. @@ -151,8 +154,6 @@ // Factory for creating the time-out task. This takes care of revoking // outstanding tasks when |this| is deleted. base::WeakPtrFactory<PacFileFetcherImpl> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PacFileFetcherImpl); }; } // namespace net
diff --git a/net/proxy_resolution/pac_file_fetcher_impl_unittest.cc b/net/proxy_resolution/pac_file_fetcher_impl_unittest.cc index 6576325..4c33a92 100644 --- a/net/proxy_resolution/pac_file_fetcher_impl_unittest.cc +++ b/net/proxy_resolution/pac_file_fetcher_impl_unittest.cc
@@ -135,6 +135,10 @@ class BasicNetworkDelegate : public NetworkDelegateImpl { public: BasicNetworkDelegate() = default; + + BasicNetworkDelegate(const BasicNetworkDelegate&) = delete; + BasicNetworkDelegate& operator=(const BasicNetworkDelegate&) = delete; + ~BasicNetworkDelegate() override = default; private: @@ -144,8 +148,6 @@ EXPECT_TRUE(request->load_flags() & LOAD_DISABLE_CERT_NETWORK_FETCHES); return OK; } - - DISALLOW_COPY_AND_ASSIGN(BasicNetworkDelegate); }; class PacFileFetcherImplTest : public PlatformTest, public WithTaskEnvironment {
diff --git a/net/proxy_resolution/proxy_config_service_android.h b/net/proxy_resolution/proxy_config_service_android.h index 6bb0ad2..d20cfa7 100644 --- a/net/proxy_resolution/proxy_config_service_android.h +++ b/net/proxy_resolution/proxy_config_service_android.h
@@ -62,6 +62,10 @@ const scoped_refptr<base::SequencedTaskRunner>& main_task_runner, const scoped_refptr<base::SequencedTaskRunner>& jni_task_runner); + ProxyConfigServiceAndroid(const ProxyConfigServiceAndroid&) = delete; + ProxyConfigServiceAndroid& operator=(const ProxyConfigServiceAndroid&) = + delete; + ~ProxyConfigServiceAndroid() override; // Android provides a local HTTP proxy that does PAC resolution. When this @@ -127,8 +131,6 @@ const std::vector<std::string>& exclusion_list); scoped_refptr<Delegate> delegate_; - - DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceAndroid); }; } // namespace net
diff --git a/net/proxy_resolution/proxy_config_service_ios.h b/net/proxy_resolution/proxy_config_service_ios.h index a56054b..bbb1c4075 100644 --- a/net/proxy_resolution/proxy_config_service_ios.h +++ b/net/proxy_resolution/proxy_config_service_ios.h
@@ -15,10 +15,11 @@ // Constructs a ProxyConfigService that watches the iOS system proxy settings. explicit ProxyConfigServiceIOS( const NetworkTrafficAnnotationTag& traffic_annotation); - ~ProxyConfigServiceIOS() override; - private: - DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceIOS); + ProxyConfigServiceIOS(const ProxyConfigServiceIOS&) = delete; + ProxyConfigServiceIOS& operator=(const ProxyConfigServiceIOS&) = delete; + + ~ProxyConfigServiceIOS() override; }; } // namespace net
diff --git a/net/proxy_resolution/proxy_config_service_linux.cc b/net/proxy_resolution/proxy_config_service_linux.cc index afa3eb0..7b74e4f 100644 --- a/net/proxy_resolution/proxy_config_service_linux.cc +++ b/net/proxy_resolution/proxy_config_service_linux.cc
@@ -245,6 +245,10 @@ notify_delegate_(nullptr), debounce_timer_(new base::OneShotTimer()) {} + SettingGetterImplGSettings(const SettingGetterImplGSettings&) = delete; + SettingGetterImplGSettings& operator=(const SettingGetterImplGSettings&) = + delete; + ~SettingGetterImplGSettings() override { // client_ should have been released before now, from // Delegate::OnDestroy(), while running on the UI thread. However @@ -479,8 +483,6 @@ // be the UI thread and all our methods should be called on this // thread. Only for assertions. scoped_refptr<base::SequencedTaskRunner> task_runner_; - - DISALLOW_COPY_AND_ASSIGN(SettingGetterImplGSettings); }; bool SettingGetterImplGSettings::CheckVersion( @@ -586,6 +588,9 @@ } } + SettingGetterImplKDE(const SettingGetterImplKDE&) = delete; + SettingGetterImplKDE& operator=(const SettingGetterImplKDE&) = delete; + ~SettingGetterImplKDE() override { // inotify_fd_ should have been closed before now, from // Delegate::OnDestroy(), while running on the file thread. However @@ -1001,8 +1006,6 @@ // Task runner for doing blocking file IO on, as well as handling inotify // events on. scoped_refptr<base::SequencedTaskRunner> file_task_runner_; - - DISALLOW_COPY_AND_ASSIGN(SettingGetterImplKDE); }; } // namespace
diff --git a/net/proxy_resolution/proxy_config_service_linux.h b/net/proxy_resolution/proxy_config_service_linux.h index fbaa70be..5ecbc3c 100644 --- a/net/proxy_resolution/proxy_config_service_linux.h +++ b/net/proxy_resolution/proxy_config_service_linux.h
@@ -42,6 +42,10 @@ static const size_t BUFFER_SIZE = 512; SettingGetter() {} + + SettingGetter(const SettingGetter&) = delete; + SettingGetter& operator=(const SettingGetter&) = delete; + virtual ~SettingGetter() {} // Initializes the class: obtains a gconf/gsettings client, or simulates @@ -137,9 +141,6 @@ // considered a match for "google.com", even though the bypass rule does not // include a wildcard, and the matched host is not a subdomain. virtual bool UseSuffixMatching() = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(SettingGetter); }; // ProxyConfigServiceLinux is created on the glib thread, and
diff --git a/net/proxy_resolution/proxy_config_service_mac.h b/net/proxy_resolution/proxy_config_service_mac.h index 8c6d0552..610a32a 100644 --- a/net/proxy_resolution/proxy_config_service_mac.h +++ b/net/proxy_resolution/proxy_config_service_mac.h
@@ -29,6 +29,10 @@ explicit ProxyConfigServiceMac( const scoped_refptr<base::SequencedTaskRunner>& sequenced_task_runner, const NetworkTrafficAnnotationTag& traffic_annotation); + + ProxyConfigServiceMac(const ProxyConfigServiceMac&) = delete; + ProxyConfigServiceMac& operator=(const ProxyConfigServiceMac&) = delete; + ~ProxyConfigServiceMac() override; public: @@ -80,8 +84,6 @@ const scoped_refptr<base::SequencedTaskRunner> sequenced_task_runner_; const NetworkTrafficAnnotationTag traffic_annotation_; - - DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceMac); }; } // namespace net
diff --git a/net/proxy_resolution/proxy_resolver.h b/net/proxy_resolution/proxy_resolver.h index 7b54e57..84e85b0 100644 --- a/net/proxy_resolution/proxy_resolver.h +++ b/net/proxy_resolution/proxy_resolver.h
@@ -34,6 +34,9 @@ ProxyResolver() {} + ProxyResolver(const ProxyResolver&) = delete; + ProxyResolver& operator=(const ProxyResolver&) = delete; + virtual ~ProxyResolver() {} // Gets a list of proxy servers to use for |url|. If the request will @@ -52,9 +55,6 @@ CompletionOnceCallback callback, std::unique_ptr<Request>* request, const NetLogWithSource& net_log) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(ProxyResolver); }; } // namespace net
diff --git a/net/proxy_resolution/proxy_resolver_error_observer.h b/net/proxy_resolution/proxy_resolver_error_observer.h index ea1dbc7..bf69b7a 100644 --- a/net/proxy_resolution/proxy_resolver_error_observer.h +++ b/net/proxy_resolution/proxy_resolver_error_observer.h
@@ -16,6 +16,11 @@ class NET_EXPORT_PRIVATE ProxyResolverErrorObserver { public: ProxyResolverErrorObserver() {} + + ProxyResolverErrorObserver(const ProxyResolverErrorObserver&) = delete; + ProxyResolverErrorObserver& operator=(const ProxyResolverErrorObserver&) = + delete; + virtual ~ProxyResolverErrorObserver() {} // Handler for when an error is encountered. |line_number| may be -1 @@ -28,9 +33,6 @@ // thread than the proxy resolver's origin thread. virtual void OnPACScriptError(int line_number, const std::u16string& error) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(ProxyResolverErrorObserver); }; } // namespace net
diff --git a/net/proxy_resolution/proxy_resolver_factory.h b/net/proxy_resolution/proxy_resolver_factory.h index 25ae651..c295962 100644 --- a/net/proxy_resolution/proxy_resolver_factory.h +++ b/net/proxy_resolution/proxy_resolver_factory.h
@@ -30,6 +30,9 @@ // See |expects_pac_bytes()| for the meaning of |expects_pac_bytes|. explicit ProxyResolverFactory(bool expects_pac_bytes); + ProxyResolverFactory(const ProxyResolverFactory&) = delete; + ProxyResolverFactory& operator=(const ProxyResolverFactory&) = delete; + virtual ~ProxyResolverFactory(); // Creates a new ProxyResolver. If the request will complete asynchronously, @@ -51,8 +54,6 @@ private: bool expects_pac_bytes_; - - DISALLOW_COPY_AND_ASSIGN(ProxyResolverFactory); }; } // namespace net
diff --git a/net/proxy_resolution/proxy_resolver_mac.cc b/net/proxy_resolution/proxy_resolver_mac.cc index 7ef110e8..9b32cc6d 100644 --- a/net/proxy_resolution/proxy_resolver_mac.cc +++ b/net/proxy_resolution/proxy_resolver_mac.cc
@@ -100,6 +100,11 @@ // Creates the instance of an observer that will synchronize the sources // using a given |lock|. SynchronizedRunLoopObserver(base::Lock& lock); + + SynchronizedRunLoopObserver(const SynchronizedRunLoopObserver&) = delete; + SynchronizedRunLoopObserver& operator=(const SynchronizedRunLoopObserver&) = + delete; + // Destructor. ~SynchronizedRunLoopObserver(); // Adds the observer to the current run loop for a given run loop mode. @@ -122,7 +127,6 @@ base::ScopedCFTypeRef<CFRunLoopObserverRef> observer_; // Validates that all methods of this class are executed on the same thread. base::ThreadChecker thread_checker_; - DISALLOW_COPY_AND_ASSIGN(SynchronizedRunLoopObserver); }; SynchronizedRunLoopObserver::SynchronizedRunLoopObserver(base::Lock& lock)
diff --git a/net/proxy_resolution/win/proxy_resolver_winhttp.cc b/net/proxy_resolution/win/proxy_resolver_winhttp.cc index cd9462c..7fd7ef4e 100644 --- a/net/proxy_resolution/win/proxy_resolver_winhttp.cc +++ b/net/proxy_resolution/win/proxy_resolver_winhttp.cc
@@ -55,6 +55,10 @@ class ProxyResolverWinHttp : public ProxyResolver { public: ProxyResolverWinHttp(const scoped_refptr<PacFileData>& script_data); + + ProxyResolverWinHttp(const ProxyResolverWinHttp&) = delete; + ProxyResolverWinHttp& operator=(const ProxyResolverWinHttp&) = delete; + ~ProxyResolverWinHttp() override; // ProxyResolver implementation: @@ -73,8 +77,6 @@ HINTERNET session_handle_; const GURL pac_url_; - - DISALLOW_COPY_AND_ASSIGN(ProxyResolverWinHttp); }; ProxyResolverWinHttp::ProxyResolverWinHttp(
diff --git a/net/quic/bidirectional_stream_quic_impl.h b/net/quic/bidirectional_stream_quic_impl.h index 7622b63..dd064cc3 100644 --- a/net/quic/bidirectional_stream_quic_impl.h +++ b/net/quic/bidirectional_stream_quic_impl.h
@@ -34,6 +34,10 @@ explicit BidirectionalStreamQuicImpl( std::unique_ptr<QuicChromiumClientSession::Handle> session); + BidirectionalStreamQuicImpl(const BidirectionalStreamQuicImpl&) = delete; + BidirectionalStreamQuicImpl& operator=(const BidirectionalStreamQuicImpl&) = + delete; + ~BidirectionalStreamQuicImpl() override; // BidirectionalStreamImpl implementation: @@ -129,8 +133,6 @@ bool may_invoke_callbacks_; base::WeakPtrFactory<BidirectionalStreamQuicImpl> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(BidirectionalStreamQuicImpl); }; } // namespace net
diff --git a/net/quic/bidirectional_stream_quic_impl_unittest.cc b/net/quic/bidirectional_stream_quic_impl_unittest.cc index 83cedfda..7c95157 100644 --- a/net/quic/bidirectional_stream_quic_impl_unittest.cc +++ b/net/quic/bidirectional_stream_quic_impl_unittest.cc
@@ -140,6 +140,9 @@ loop_ = std::make_unique<base::RunLoop>(); } + TestDelegateBase(const TestDelegateBase&) = delete; + TestDelegateBase& operator=(const TestDelegateBase&) = delete; + ~TestDelegateBase() override {} void OnStreamReady(bool request_headers_sent) override { @@ -351,8 +354,6 @@ bool is_ready_; bool trailers_expected_; bool trailers_received_; - - DISALLOW_COPY_AND_ASSIGN(TestDelegateBase); }; // A delegate that deletes the stream in a particular callback. @@ -369,6 +370,10 @@ DeleteStreamDelegate(IOBuffer* buf, int buf_len, Phase phase) : TestDelegateBase(buf, buf_len), phase_(phase) {} + + DeleteStreamDelegate(const DeleteStreamDelegate&) = delete; + DeleteStreamDelegate& operator=(const DeleteStreamDelegate&) = delete; + ~DeleteStreamDelegate() override {} void OnStreamReady(bool request_headers_sent) override { @@ -417,8 +422,6 @@ // Indicates in which callback the delegate should cancel or delete the // stream. Phase phase_; - - DISALLOW_COPY_AND_ASSIGN(DeleteStreamDelegate); }; } // namespace
diff --git a/net/quic/crypto/proof_source_chromium.h b/net/quic/crypto/proof_source_chromium.h index ee8ecd4..1ed4473 100644 --- a/net/quic/crypto/proof_source_chromium.h +++ b/net/quic/crypto/proof_source_chromium.h
@@ -23,6 +23,10 @@ class NET_EXPORT_PRIVATE ProofSourceChromium : public quic::ProofSource { public: ProofSourceChromium(); + + ProofSourceChromium(const ProofSourceChromium&) = delete; + ProofSourceChromium& operator=(const ProofSourceChromium&) = delete; + ~ProofSourceChromium() override; // Initializes this object based on the certificate chain in |cert_path|, @@ -76,8 +80,6 @@ quic::QuicReferenceCountedPointer<quic::ProofSource::Chain> chain_; std::string signed_certificate_timestamp_; std::unique_ptr<TicketCrypter> ticket_crypter_; - - DISALLOW_COPY_AND_ASSIGN(ProofSourceChromium); }; } // namespace net
diff --git a/net/quic/crypto/proof_verifier_chromium.cc b/net/quic/crypto/proof_verifier_chromium.cc index d12dcf8..3547d72 100644 --- a/net/quic/crypto/proof_verifier_chromium.cc +++ b/net/quic/crypto/proof_verifier_chromium.cc
@@ -58,6 +58,10 @@ SCTAuditingDelegate* sct_auditing_delegate, int cert_verify_flags, const NetLogWithSource& net_log); + + Job(const Job&) = delete; + Job& operator=(const Job&) = delete; + ~Job(); // Starts the proof verification. If |quic::QUIC_PENDING| is returned, then @@ -164,8 +168,6 @@ base::TimeTicks start_time_; NetLogWithSource net_log_; - - DISALLOW_COPY_AND_ASSIGN(Job); }; ProofVerifierChromium::Job::Job(
diff --git a/net/quic/crypto/proof_verifier_chromium.h b/net/quic/crypto/proof_verifier_chromium.h index 2257541e..02c25594 100644 --- a/net/quic/crypto/proof_verifier_chromium.h +++ b/net/quic/crypto/proof_verifier_chromium.h
@@ -75,6 +75,10 @@ SCTAuditingDelegate* sct_auditing_delegate, std::set<std::string> hostnames_to_allow_unknown_roots, const NetworkIsolationKey& network_isolation_key); + + ProofVerifierChromium(const ProofVerifierChromium&) = delete; + ProofVerifierChromium& operator=(const ProofVerifierChromium&) = delete; + ~ProofVerifierChromium() override; // quic::ProofVerifier interface @@ -123,8 +127,6 @@ std::set<std::string> hostnames_to_allow_unknown_roots_; const NetworkIsolationKey network_isolation_key_; - - DISALLOW_COPY_AND_ASSIGN(ProofVerifierChromium); }; } // namespace net
diff --git a/net/quic/mock_crypto_client_stream.h b/net/quic/mock_crypto_client_stream.h index 68e5ad9..bce173321 100644 --- a/net/quic/mock_crypto_client_stream.h +++ b/net/quic/mock_crypto_client_stream.h
@@ -56,6 +56,10 @@ HandshakeMode handshake_mode, const net::ProofVerifyDetailsChromium* proof_verify_details_, bool use_mock_crypter); + + MockCryptoClientStream(const MockCryptoClientStream&) = delete; + MockCryptoClientStream& operator=(const MockCryptoClientStream&) = delete; + ~MockCryptoClientStream() override; // CryptoFramerVisitorInterface implementation. @@ -105,8 +109,6 @@ const quic::QuicServerId server_id_; const net::ProofVerifyDetailsChromium* proof_verify_details_; const quic::QuicConfig config_; - - DISALLOW_COPY_AND_ASSIGN(MockCryptoClientStream); }; } // namespace net
diff --git a/net/quic/mock_crypto_client_stream_factory.h b/net/quic/mock_crypto_client_stream_factory.h index b0f8193e6..e80a933 100644 --- a/net/quic/mock_crypto_client_stream_factory.h +++ b/net/quic/mock_crypto_client_stream_factory.h
@@ -22,6 +22,11 @@ class MockCryptoClientStreamFactory : public QuicCryptoClientStreamFactory { public: MockCryptoClientStreamFactory(); + + MockCryptoClientStreamFactory(const MockCryptoClientStreamFactory&) = delete; + MockCryptoClientStreamFactory& operator=( + const MockCryptoClientStreamFactory&) = delete; + ~MockCryptoClientStreamFactory() override; quic::QuicCryptoClientStream* CreateQuicCryptoClientStream( @@ -56,8 +61,6 @@ base::queue<const ProofVerifyDetailsChromium*> proof_verify_details_queue_; std::unique_ptr<quic::QuicConfig> config_; bool use_mock_crypter_; - - DISALLOW_COPY_AND_ASSIGN(MockCryptoClientStreamFactory); }; } // namespace net
diff --git a/net/quic/mock_decrypter.h b/net/quic/mock_decrypter.h index 77a9d49..dceb437 100644 --- a/net/quic/mock_decrypter.h +++ b/net/quic/mock_decrypter.h
@@ -23,6 +23,10 @@ class MockDecrypter : public quic::QuicDecrypter { public: explicit MockDecrypter(quic::Perspective perspective); + + MockDecrypter(const MockDecrypter&) = delete; + MockDecrypter& operator=(const MockDecrypter&) = delete; + ~MockDecrypter() override {} // QuicCrypter implementation @@ -50,9 +54,6 @@ quic::QuicPacketCount GetIntegrityLimit() const override; absl::string_view GetKey() const override; absl::string_view GetNoncePrefix() const override; - - private: - DISALLOW_COPY_AND_ASSIGN(MockDecrypter); }; } // namespace net
diff --git a/net/quic/mock_encrypter.h b/net/quic/mock_encrypter.h index 4cea586..9f6af7cd 100644 --- a/net/quic/mock_encrypter.h +++ b/net/quic/mock_encrypter.h
@@ -22,6 +22,10 @@ class MockEncrypter : public quic::QuicEncrypter { public: explicit MockEncrypter(quic::Perspective perspective); + + MockEncrypter(const MockEncrypter&) = delete; + MockEncrypter& operator=(const MockEncrypter&) = delete; + ~MockEncrypter() override {} // QuicEncrypter implementation @@ -44,9 +48,6 @@ quic::QuicPacketCount GetConfidentialityLimit() const override; absl::string_view GetKey() const override; absl::string_view GetNoncePrefix() const override; - - private: - DISALLOW_COPY_AND_ASSIGN(MockEncrypter); }; } // namespace net
diff --git a/net/quic/network_connection.h b/net/quic/network_connection.h index b804c20c..f2177326 100644 --- a/net/quic/network_connection.h +++ b/net/quic/network_connection.h
@@ -18,6 +18,10 @@ public NetworkChangeNotifier::ConnectionTypeObserver { public: NetworkConnection(); + + NetworkConnection(const NetworkConnection&) = delete; + NetworkConnection& operator=(const NetworkConnection&) = delete; + ~NetworkConnection() override; // Returns the underlying connection type. @@ -50,8 +54,6 @@ // Cache the connection description string to avoid calling the expensive // GetWifiPHYLayerProtocol() function. const char* connection_description_; - - DISALLOW_COPY_AND_ASSIGN(NetworkConnection); }; } // namespace net
diff --git a/net/quic/platform/impl/quic_chromium_clock.h b/net/quic/platform/impl/quic_chromium_clock.h index 29012d49..48582d3 100644 --- a/net/quic/platform/impl/quic_chromium_clock.h +++ b/net/quic/platform/impl/quic_chromium_clock.h
@@ -19,6 +19,10 @@ static QuicChromiumClock* GetInstance(); QuicChromiumClock(); + + QuicChromiumClock(const QuicChromiumClock&) = delete; + QuicChromiumClock& operator=(const QuicChromiumClock&) = delete; + ~QuicChromiumClock() override; // QuicClock implementation: @@ -29,9 +33,6 @@ // Converts a QuicTime returned by QuicChromiumClock to base::TimeTicks. // Helper functions to safely convert between QuicTime and TimeTicks. static base::TimeTicks QuicTimeToTimeTicks(QuicTime quic_time); - - private: - DISALLOW_COPY_AND_ASSIGN(QuicChromiumClock); }; } // namespace quic
diff --git a/net/quic/platform/impl/quic_epoll_clock.h b/net/quic/platform/impl/quic_epoll_clock.h index 7bcf2b91..19361900 100644 --- a/net/quic/platform/impl/quic_epoll_clock.h +++ b/net/quic/platform/impl/quic_epoll_clock.h
@@ -23,6 +23,10 @@ class QuicEpollClock : public QuicClock { public: explicit QuicEpollClock(epoll_server::SimpleEpollServer* epoll_server); + + QuicEpollClock(const QuicEpollClock&) = delete; + QuicEpollClock& operator=(const QuicEpollClock&) = delete; + ~QuicEpollClock() override; // Returns the approximate current time as a QuicTime object. @@ -45,9 +49,6 @@ epoll_server::SimpleEpollServer* epoll_server_; // Largest time returned from Now() so far. mutable QuicTime largest_time_; - - private: - DISALLOW_COPY_AND_ASSIGN(QuicEpollClock); }; } // namespace quic
diff --git a/net/quic/properties_based_quic_server_info.h b/net/quic/properties_based_quic_server_info.h index 945f45b5..b04c18e 100644 --- a/net/quic/properties_based_quic_server_info.h +++ b/net/quic/properties_based_quic_server_info.h
@@ -25,6 +25,11 @@ const quic::QuicServerId& server_id, const NetworkIsolationKey& network_isolation_key, HttpServerProperties* http_server_properties); + + PropertiesBasedQuicServerInfo(const PropertiesBasedQuicServerInfo&) = delete; + PropertiesBasedQuicServerInfo& operator=( + const PropertiesBasedQuicServerInfo&) = delete; + ~PropertiesBasedQuicServerInfo() override; // QuicServerInfo implementation. @@ -34,8 +39,6 @@ private: const NetworkIsolationKey network_isolation_key_; HttpServerProperties* const http_server_properties_; - - DISALLOW_COPY_AND_ASSIGN(PropertiesBasedQuicServerInfo); }; } // namespace net
diff --git a/net/quic/quic_chromium_alarm_factory.h b/net/quic/quic_chromium_alarm_factory.h index 6082aff..2df53db8 100644 --- a/net/quic/quic_chromium_alarm_factory.h +++ b/net/quic/quic_chromium_alarm_factory.h
@@ -26,6 +26,10 @@ public: QuicChromiumAlarmFactory(base::SequencedTaskRunner* task_runner, const quic::QuicClock* clock); + + QuicChromiumAlarmFactory(const QuicChromiumAlarmFactory&) = delete; + QuicChromiumAlarmFactory& operator=(const QuicChromiumAlarmFactory&) = delete; + ~QuicChromiumAlarmFactory() override; // quic::QuicAlarmFactory @@ -37,8 +41,6 @@ private: base::SequencedTaskRunner* task_runner_; const quic::QuicClock* const clock_; - - DISALLOW_COPY_AND_ASSIGN(QuicChromiumAlarmFactory); }; } // namespace net
diff --git a/net/quic/quic_chromium_client_session.h b/net/quic/quic_chromium_client_session.h index d4299a5e..c73f8d3a 100644 --- a/net/quic/quic_chromium_client_session.h +++ b/net/quic/quic_chromium_client_session.h
@@ -355,6 +355,9 @@ // A helper class used to manage a request to create a stream. class NET_EXPORT_PRIVATE StreamRequest { public: + StreamRequest(const StreamRequest&) = delete; + StreamRequest& operator=(const StreamRequest&) = delete; + // Cancels any pending stream creation request and resets |stream_| if // it has not yet been released. ~StreamRequest(); @@ -418,8 +421,6 @@ const NetworkTrafficAnnotationTag traffic_annotation_; base::WeakPtrFactory<StreamRequest> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(StreamRequest); }; // This class contains all the context needed for path validation and @@ -496,6 +497,12 @@ QuicChromiumPathValidationWriterDelegate( QuicChromiumClientSession* session, base::SequencedTaskRunner* task_runner); + + QuicChromiumPathValidationWriterDelegate( + const QuicChromiumPathValidationWriterDelegate&) = delete; + QuicChromiumPathValidationWriterDelegate& operator=( + const QuicChromiumPathValidationWriterDelegate&) = delete; + ~QuicChromiumPathValidationWriterDelegate(); // QuicChromiumPacketWriter::Delegate interface. @@ -521,7 +528,6 @@ quic::QuicSocketAddress peer_address_; base::WeakPtrFactory<QuicChromiumPathValidationWriterDelegate> weak_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(QuicChromiumPathValidationWriterDelegate); }; // Constructs a new session which will own |connection|, but not
diff --git a/net/quic/quic_chromium_client_stream.h b/net/quic/quic_chromium_client_stream.h index 3e7fa3b..06ad95b7 100644 --- a/net/quic/quic_chromium_client_stream.h +++ b/net/quic/quic_chromium_client_stream.h
@@ -42,6 +42,9 @@ // Wrapper for interacting with the session in a restricted fashion. class NET_EXPORT_PRIVATE Handle { public: + Handle(const Handle&) = delete; + Handle& operator=(const Handle&) = delete; + ~Handle(); // Returns true if the stream is still connected. @@ -211,8 +214,6 @@ base::TimeTicks first_early_hints_time_; base::WeakPtrFactory<Handle> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(Handle); }; QuicChromiumClientStream(
diff --git a/net/quic/quic_chromium_client_stream_test.cc b/net/quic/quic_chromium_client_stream_test.cc index dd035c0..4d5cc610 100644 --- a/net/quic/quic_chromium_client_stream_test.cc +++ b/net/quic/quic_chromium_client_stream_test.cc
@@ -42,6 +42,11 @@ public: explicit MockQuicClientSessionBase(quic::QuicConnection* connection, quic::QuicClientPushPromiseIndex* index); + + MockQuicClientSessionBase(const MockQuicClientSessionBase&) = delete; + MockQuicClientSessionBase& operator=(const MockQuicClientSessionBase&) = + delete; + ~MockQuicClientSessionBase() override; const quic::QuicCryptoStream* GetCryptoStream() const override { @@ -138,8 +143,6 @@ private: std::unique_ptr<quic::QuicCryptoStream> crypto_stream_; - - DISALLOW_COPY_AND_ASSIGN(MockQuicClientSessionBase); }; MockQuicClientSessionBase::MockQuicClientSessionBase(
diff --git a/net/quic/quic_chromium_connection_helper.h b/net/quic/quic_chromium_connection_helper.h index e3b4460..6285fde 100644 --- a/net/quic/quic_chromium_connection_helper.h +++ b/net/quic/quic_chromium_connection_helper.h
@@ -29,6 +29,11 @@ public: QuicChromiumConnectionHelper(const quic::QuicClock* clock, quic::QuicRandom* random_generator); + + QuicChromiumConnectionHelper(const QuicChromiumConnectionHelper&) = delete; + QuicChromiumConnectionHelper& operator=(const QuicChromiumConnectionHelper&) = + delete; + ~QuicChromiumConnectionHelper() override; // quic::QuicConnectionHelperInterface @@ -39,8 +44,6 @@ private: const quic::QuicClock* clock_; quic::QuicRandom* random_generator_; - - DISALLOW_COPY_AND_ASSIGN(QuicChromiumConnectionHelper); }; } // namespace net
diff --git a/net/quic/quic_chromium_packet_reader.h b/net/quic/quic_chromium_packet_reader.h index ca3d5876..faf420e3 100644 --- a/net/quic/quic_chromium_packet_reader.h +++ b/net/quic/quic_chromium_packet_reader.h
@@ -46,6 +46,10 @@ int yield_after_packets, quic::QuicTime::Delta yield_after_duration, const NetLogWithSource& net_log); + + QuicChromiumPacketReader(const QuicChromiumPacketReader&) = delete; + QuicChromiumPacketReader& operator=(const QuicChromiumPacketReader&) = delete; + virtual ~QuicChromiumPacketReader(); // Causes the QuicConnectionHelper to start reading from the socket @@ -71,8 +75,6 @@ NetLogWithSource net_log_; base::WeakPtrFactory<QuicChromiumPacketReader> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(QuicChromiumPacketReader); }; } // namespace net
diff --git a/net/quic/quic_chromium_packet_writer.h b/net/quic/quic_chromium_packet_writer.h index 2f03d39..b67a5b3 100644 --- a/net/quic/quic_chromium_packet_writer.h +++ b/net/quic/quic_chromium_packet_writer.h
@@ -69,6 +69,10 @@ // |socket| and |task_runner| must outlive writer. QuicChromiumPacketWriter(DatagramClientSocket* socket, base::SequencedTaskRunner* task_runner); + + QuicChromiumPacketWriter(const QuicChromiumPacketWriter&) = delete; + QuicChromiumPacketWriter& operator=(const QuicChromiumPacketWriter&) = delete; + ~QuicChromiumPacketWriter() override; // |delegate| must outlive writer. @@ -127,8 +131,6 @@ CompletionRepeatingCallback write_callback_; base::WeakPtrFactory<QuicChromiumPacketWriter> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(QuicChromiumPacketWriter); }; } // namespace net
diff --git a/net/quic/quic_connection_logger.h b/net/quic/quic_connection_logger.h index 6e41cb2..837e1d78 100644 --- a/net/quic/quic_connection_logger.h +++ b/net/quic/quic_connection_logger.h
@@ -39,6 +39,9 @@ std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher, const NetLogWithSource& net_log); + QuicConnectionLogger(const QuicConnectionLogger&) = delete; + QuicConnectionLogger& operator=(const QuicConnectionLogger&) = delete; + ~QuicConnectionLogger() override; // quic::QuicPacketCreator::DebugDelegateInterface @@ -210,8 +213,6 @@ const std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher_; QuicEventLogger event_logger_; - - DISALLOW_COPY_AND_ASSIGN(QuicConnectionLogger); }; } // namespace net
diff --git a/net/quic/quic_connectivity_monitor.h b/net/quic/quic_connectivity_monitor.h index 4d0aabc..5be9fd5d 100644 --- a/net/quic/quic_connectivity_monitor.h +++ b/net/quic/quic_connectivity_monitor.h
@@ -25,6 +25,9 @@ explicit QuicConnectivityMonitor( NetworkChangeNotifier::NetworkHandle default_network); + QuicConnectivityMonitor(const QuicConnectivityMonitor&) = delete; + QuicConnectivityMonitor& operator=(const QuicConnectivityMonitor&) = delete; + ~QuicConnectivityMonitor() override; // Records connectivity related stats to histograms. @@ -119,7 +122,6 @@ QuicErrorCodeMap quic_error_map_; base::WeakPtrFactory<QuicConnectivityMonitor> weak_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(QuicConnectivityMonitor); }; } // namespace net
diff --git a/net/quic/quic_connectivity_probing_manager.h b/net/quic/quic_connectivity_probing_manager.h index d7e0a9c..8b86522f 100644 --- a/net/quic/quic_connectivity_probing_manager.h +++ b/net/quic/quic_connectivity_probing_manager.h
@@ -52,6 +52,12 @@ QuicConnectivityProbingManager(Delegate* delegate, base::SequencedTaskRunner* task_runner); + + QuicConnectivityProbingManager(const QuicConnectivityProbingManager&) = + delete; + QuicConnectivityProbingManager& operator=( + const QuicConnectivityProbingManager&) = delete; + ~QuicConnectivityProbingManager(); // QuicChromiumPacketWriter::Delegate interface. @@ -143,7 +149,6 @@ bool stateless_reset_received_; base::WeakPtrFactory<QuicConnectivityProbingManager> weak_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(QuicConnectivityProbingManager); }; } // namespace net
diff --git a/net/quic/quic_connectivity_probing_manager_test.cc b/net/quic/quic_connectivity_probing_manager_test.cc index 307fef0..ae75d9d 100644 --- a/net/quic/quic_connectivity_probing_manager_test.cc +++ b/net/quic/quic_connectivity_probing_manager_test.cc
@@ -43,6 +43,11 @@ MockQuicChromiumClientSession() : probed_network_(NetworkChangeNotifier::kInvalidNetworkHandle), is_successfully_probed_(false) {} + + MockQuicChromiumClientSession(const MockQuicChromiumClientSession&) = delete; + MockQuicChromiumClientSession& operator=( + const MockQuicChromiumClientSession&) = delete; + ~MockQuicChromiumClientSession() override {} // QuicChromiumPacketReader::Visitor interface. @@ -100,8 +105,6 @@ quic::QuicSocketAddress probed_peer_address_; quic::QuicSocketAddress probed_self_address_; bool is_successfully_probed_; - - DISALLOW_COPY_AND_ASSIGN(MockQuicChromiumClientSession); }; class QuicConnectivityProbingManagerTest : public ::testing::Test {
diff --git a/net/quic/quic_http3_logger.h b/net/quic/quic_http3_logger.h index c22fc79f..aee0f1be 100644 --- a/net/quic/quic_http3_logger.h +++ b/net/quic/quic_http3_logger.h
@@ -20,6 +20,9 @@ public: explicit QuicHttp3Logger(const NetLogWithSource& net_log); + QuicHttp3Logger(const QuicHttp3Logger&) = delete; + QuicHttp3Logger& operator=(const QuicHttp3Logger&) = delete; + ~QuicHttp3Logger() override; // Implementation of Http3DebugVisitor. @@ -62,8 +65,6 @@ private: NetLogWithSource net_log_; - - DISALLOW_COPY_AND_ASSIGN(QuicHttp3Logger); }; } // namespace net
diff --git a/net/quic/quic_http_stream.h b/net/quic/quic_http_stream.h index 3854386..84ce10c 100644 --- a/net/quic/quic_http_stream.h +++ b/net/quic/quic_http_stream.h
@@ -45,6 +45,9 @@ std::unique_ptr<QuicChromiumClientSession::Handle> session, std::vector<std::string> dns_aliases); + QuicHttpStream(const QuicHttpStream&) = delete; + QuicHttpStream& operator=(const QuicHttpStream&) = delete; + ~QuicHttpStream() override; // HttpStream implementation. @@ -232,8 +235,6 @@ std::vector<std::string> dns_aliases_; base::WeakPtrFactory<QuicHttpStream> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(QuicHttpStream); }; } // namespace net
diff --git a/net/quic/quic_http_stream_test.cc b/net/quic/quic_http_stream_test.cc index 5bbcfc1..3b8d346f 100644 --- a/net/quic/quic_http_stream_test.cc +++ b/net/quic/quic_http_stream_test.cc
@@ -188,6 +188,11 @@ explicit ReadErrorUploadDataStream(FailureMode mode) : UploadDataStream(true, 0), async_(mode) {} + + ReadErrorUploadDataStream(const ReadErrorUploadDataStream&) = delete; + ReadErrorUploadDataStream& operator=(const ReadErrorUploadDataStream&) = + delete; + ~ReadErrorUploadDataStream() override {} private: @@ -211,8 +216,6 @@ const FailureMode async_; base::WeakPtrFactory<ReadErrorUploadDataStream> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ReadErrorUploadDataStream); }; // A helper class that will delete |stream| when the callback is invoked.
diff --git a/net/quic/quic_network_transaction_unittest.cc b/net/quic/quic_network_transaction_unittest.cc index 6af20335..17054f1e 100644 --- a/net/quic/quic_network_transaction_unittest.cc +++ b/net/quic/quic_network_transaction_unittest.cc
@@ -229,6 +229,11 @@ bool* rtt_notification_received) : should_notify_updated_rtt_(should_notify_updated_rtt), rtt_notification_received_(rtt_notification_received) {} + + TestSocketPerformanceWatcher(const TestSocketPerformanceWatcher&) = delete; + TestSocketPerformanceWatcher& operator=(const TestSocketPerformanceWatcher&) = + delete; + ~TestSocketPerformanceWatcher() override {} bool ShouldNotifyUpdatedRTT() const override { @@ -244,8 +249,6 @@ private: bool* should_notify_updated_rtt_; bool* rtt_notification_received_; - - DISALLOW_COPY_AND_ASSIGN(TestSocketPerformanceWatcher); }; class TestSocketPerformanceWatcherFactory @@ -255,6 +258,12 @@ : watcher_count_(0u), should_notify_updated_rtt_(true), rtt_notification_received_(false) {} + + TestSocketPerformanceWatcherFactory( + const TestSocketPerformanceWatcherFactory&) = delete; + TestSocketPerformanceWatcherFactory& operator=( + const TestSocketPerformanceWatcherFactory&) = delete; + ~TestSocketPerformanceWatcherFactory() override {} // SocketPerformanceWatcherFactory implementation: @@ -282,8 +291,6 @@ size_t watcher_count_; bool should_notify_updated_rtt_; bool rtt_notification_received_; - - DISALLOW_COPY_AND_ASSIGN(TestSocketPerformanceWatcherFactory); }; class QuicNetworkTransactionTest
diff --git a/net/quic/quic_proxy_client_socket.h b/net/quic/quic_proxy_client_socket.h index 070ef37..00700d9 100644 --- a/net/quic/quic_proxy_client_socket.h +++ b/net/quic/quic_proxy_client_socket.h
@@ -40,6 +40,9 @@ HttpAuthController* auth_controller, ProxyDelegate* proxy_delegate); + QuicProxyClientSocket(const QuicProxyClientSocket&) = delete; + QuicProxyClientSocket& operator=(const QuicProxyClientSocket&) = delete; + // On destruction Disconnect() is called. ~QuicProxyClientSocket() override; @@ -149,8 +152,6 @@ // The default weak pointer factory. base::WeakPtrFactory<QuicProxyClientSocket> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(QuicProxyClientSocket); }; } // namespace net
diff --git a/net/quic/quic_proxy_client_socket_unittest.cc b/net/quic/quic_proxy_client_socket_unittest.cc index b232fff4..2a03f72 100644 --- a/net/quic/quic_proxy_client_socket_unittest.cc +++ b/net/quic/quic_proxy_client_socket_unittest.cc
@@ -1991,6 +1991,9 @@ explicit DeleteSockCallback(std::unique_ptr<QuicProxyClientSocket>* sock) : sock_(sock) {} + DeleteSockCallback(const DeleteSockCallback&) = delete; + DeleteSockCallback& operator=(const DeleteSockCallback&) = delete; + ~DeleteSockCallback() override {} CompletionOnceCallback callback() { @@ -2005,8 +2008,6 @@ } std::unique_ptr<QuicProxyClientSocket>* sock_; - - DISALLOW_COPY_AND_ASSIGN(DeleteSockCallback); }; // If the socket is reset when both a read and write are pending, and the
diff --git a/net/quic/quic_server_info.h b/net/quic/quic_server_info.h index 2100fd0..c068f4bd 100644 --- a/net/quic/quic_server_info.h +++ b/net/quic/quic_server_info.h
@@ -41,6 +41,10 @@ }; explicit QuicServerInfo(const quic::QuicServerId& server_id); + + QuicServerInfo(const QuicServerInfo&) = delete; + QuicServerInfo& operator=(const QuicServerInfo&) = delete; + virtual ~QuicServerInfo(); // Fetches the server config from the backing store, and returns true @@ -52,6 +56,10 @@ struct State { State(); + + State(const State&) = delete; + State& operator=(const State&) = delete; + ~State(); void Clear(); @@ -64,9 +72,6 @@ std::vector<std::string> certs; // A list of certificates in leaf-first // order. std::string server_config_sig; // A signature of |server_config_|. - - private: - DISALLOW_COPY_AND_ASSIGN(State); }; // Once the data is ready, it can be read using the following members. These @@ -93,8 +98,6 @@ // SerializeInner is a helper function for Serialize. std::string SerializeInner() const; - - DISALLOW_COPY_AND_ASSIGN(QuicServerInfo); }; } // namespace net
diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc index d138043..ffc0514 100644 --- a/net/quic/quic_stream_factory.cc +++ b/net/quic/quic_stream_factory.cc
@@ -239,6 +239,10 @@ DCHECK(quic_stream_factory_); } + QuicCryptoClientConfigOwner(const QuicCryptoClientConfigOwner&) = delete; + QuicCryptoClientConfigOwner& operator=(const QuicCryptoClientConfigOwner&) = + delete; + ~QuicCryptoClientConfigOwner() { DCHECK_EQ(num_refs_, 0); } quic::QuicCryptoClientConfig* config() { return &config_; } @@ -265,8 +269,6 @@ int num_refs_ = 0; quic::QuicCryptoClientConfig config_; QuicStreamFactory* const quic_stream_factory_; - - DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientConfigOwner); }; // Class that owns a reference to a QuicCryptoClientConfigOwner. Handles @@ -323,6 +325,9 @@ int cert_verify_flags, const NetLogWithSource& net_log); + Job(const Job&) = delete; + Job& operator=(const Job&) = delete; + ~Job(); int Run(CompletionOnceCallback callback); @@ -478,8 +483,6 @@ base::TimeTicks quic_connection_start_time_; std::set<QuicStreamRequest*> stream_requests_; base::WeakPtrFactory<Job> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(Job); }; QuicStreamFactory::Job::Job(
diff --git a/net/quic/quic_stream_factory.h b/net/quic/quic_stream_factory.h index 60ce305..bb4206a0 100644 --- a/net/quic/quic_stream_factory.h +++ b/net/quic/quic_stream_factory.h
@@ -110,6 +110,10 @@ class NET_EXPORT_PRIVATE QuicStreamRequest { public: explicit QuicStreamRequest(QuicStreamFactory* factory); + + QuicStreamRequest(const QuicStreamRequest&) = delete; + QuicStreamRequest& operator=(const QuicStreamRequest&) = delete; + ~QuicStreamRequest(); // |cert_verify_flags| is bitwise OR'd of CertVerifier::VerifyFlags and it is @@ -193,8 +197,6 @@ bool expect_on_host_resolution_; // Callback passed to WaitForHostResolution(). CompletionOnceCallback host_resolution_callback_; - - DISALLOW_COPY_AND_ASSIGN(QuicStreamRequest); }; // A factory for fetching QuicChromiumClientSessions.
diff --git a/net/quic/quic_stream_factory_test.cc b/net/quic/quic_stream_factory_test.cc index 9ae30f1..28a99e4 100644 --- a/net/quic/quic_stream_factory_test.cc +++ b/net/quic/quic_stream_factory_test.cc
@@ -149,6 +149,12 @@ class TestConnectionMigrationSocketFactory : public MockClientSocketFactory { public: TestConnectionMigrationSocketFactory() : next_source_host_num_(1u) {} + + TestConnectionMigrationSocketFactory( + const TestConnectionMigrationSocketFactory&) = delete; + TestConnectionMigrationSocketFactory& operator=( + const TestConnectionMigrationSocketFactory&) = delete; + ~TestConnectionMigrationSocketFactory() override = default; std::unique_ptr<DatagramClientSocket> CreateDatagramClientSocket( @@ -164,8 +170,6 @@ private: uint8_t next_source_host_num_; - - DISALLOW_COPY_AND_ASSIGN(TestConnectionMigrationSocketFactory); }; // TestPortMigrationSocketFactory will vend sockets with incremental port @@ -173,6 +177,12 @@ class TestPortMigrationSocketFactory : public MockClientSocketFactory { public: TestPortMigrationSocketFactory() : next_source_port_num_(1u) {} + + TestPortMigrationSocketFactory(const TestPortMigrationSocketFactory&) = + delete; + TestPortMigrationSocketFactory& operator=( + const TestPortMigrationSocketFactory&) = delete; + ~TestPortMigrationSocketFactory() override = default; std::unique_ptr<DatagramClientSocket> CreateDatagramClientSocket( @@ -188,8 +198,6 @@ private: uint16_t next_source_port_num_; - - DISALLOW_COPY_AND_ASSIGN(TestPortMigrationSocketFactory); }; class QuicStreamFactoryTestBase : public WithTaskEnvironment {
diff --git a/net/quic/quic_test_packet_maker.h b/net/quic/quic_test_packet_maker.h index b020d02..9e89255 100644 --- a/net/quic/quic_test_packet_maker.h +++ b/net/quic/quic_test_packet_maker.h
@@ -52,6 +52,10 @@ const std::string& host, quic::Perspective perspective, bool client_headers_include_h2_stream_dependency); + + QuicTestPacketMaker(const QuicTestPacketMaker&) = delete; + QuicTestPacketMaker& operator=(const QuicTestPacketMaker&) = delete; + ~QuicTestPacketMaker(); void set_hostname(const std::string& host); @@ -617,8 +621,6 @@ quic::QuicPacketHeader header_; quic::QuicFrames frames_; std::unique_ptr<quic::test::SimpleDataProducer> data_producer_; - - DISALLOW_COPY_AND_ASSIGN(QuicTestPacketMaker); }; } // namespace test
diff --git a/net/reporting/mock_persistent_reporting_store.h b/net/reporting/mock_persistent_reporting_store.h index b53e397..85c53f4e9 100644 --- a/net/reporting/mock_persistent_reporting_store.h +++ b/net/reporting/mock_persistent_reporting_store.h
@@ -81,6 +81,11 @@ using CommandList = std::vector<Command>; MockPersistentReportingStore(); + + MockPersistentReportingStore(const MockPersistentReportingStore&) = delete; + MockPersistentReportingStore& operator=(const MockPersistentReportingStore&) = + delete; + ~MockPersistentReportingStore() override; // PersistentReportingStore implementation: @@ -150,8 +155,6 @@ // called. Reset to 0 when Flush() is called. int queued_endpoint_count_delta_; int queued_endpoint_group_count_delta_; - - DISALLOW_COPY_AND_ASSIGN(MockPersistentReportingStore); }; bool operator==(const MockPersistentReportingStore::Command& lhs,
diff --git a/net/reporting/reporting_cache.h b/net/reporting/reporting_cache.h index 6a44455..39b4421 100644 --- a/net/reporting/reporting_cache.h +++ b/net/reporting/reporting_cache.h
@@ -321,6 +321,10 @@ std::vector<CachedReportingEndpointGroup>)>; PersistentReportingStore() = default; + + PersistentReportingStore(const PersistentReportingStore&) = delete; + PersistentReportingStore& operator=(const PersistentReportingStore&) = delete; + virtual ~PersistentReportingStore() = default; // Initializes the store and retrieves stored endpoints and endpoint groups. @@ -355,9 +359,6 @@ // Flushes the store. virtual void Flush() = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(PersistentReportingStore); }; } // namespace net
diff --git a/net/reporting/reporting_cache_impl.h b/net/reporting/reporting_cache_impl.h index 627a0e1f..ee886b9 100644 --- a/net/reporting/reporting_cache_impl.h +++ b/net/reporting/reporting_cache_impl.h
@@ -35,6 +35,9 @@ public: ReportingCacheImpl(ReportingContext* context); + ReportingCacheImpl(const ReportingCacheImpl&) = delete; + ReportingCacheImpl& operator=(const ReportingCacheImpl&) = delete; + ~ReportingCacheImpl() override; // ReportingCache implementation @@ -379,8 +382,6 @@ base::flat_set<base::UnguessableToken> expired_sources_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(ReportingCacheImpl); }; } // namespace net
diff --git a/net/reporting/reporting_context.h b/net/reporting/reporting_context.h index 6732664..6e5ba24 100644 --- a/net/reporting/reporting_context.h +++ b/net/reporting/reporting_context.h
@@ -39,6 +39,9 @@ URLRequestContext* request_context, ReportingCache::PersistentReportingStore* store); + ReportingContext(const ReportingContext&) = delete; + ReportingContext& operator=(const ReportingContext&) = delete; + ~ReportingContext(); const ReportingPolicy& policy() const { return policy_; } @@ -104,8 +107,6 @@ // |network_change_observer_| must come after |cache_|. std::unique_ptr<ReportingNetworkChangeObserver> network_change_observer_; - - DISALLOW_COPY_AND_ASSIGN(ReportingContext); }; } // namespace net
diff --git a/net/reporting/reporting_delivery_agent.cc b/net/reporting/reporting_delivery_agent.cc index b9731ab..4161ab9 100644 --- a/net/reporting/reporting_delivery_agent.cc +++ b/net/reporting/reporting_delivery_agent.cc
@@ -192,6 +192,10 @@ context_->AddCacheObserver(this); } + ReportingDeliveryAgentImpl(const ReportingDeliveryAgentImpl&) = delete; + ReportingDeliveryAgentImpl& operator=(const ReportingDeliveryAgentImpl&) = + delete; + // ReportingDeliveryAgent implementation: ~ReportingDeliveryAgentImpl() override { @@ -380,8 +384,6 @@ std::unique_ptr<ReportingEndpointManager> endpoint_manager_; base::WeakPtrFactory<ReportingDeliveryAgentImpl> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ReportingDeliveryAgentImpl); }; } // namespace
diff --git a/net/reporting/reporting_endpoint_manager.cc b/net/reporting/reporting_endpoint_manager.cc index 645ab993..b55c20cb 100644 --- a/net/reporting/reporting_endpoint_manager.cc +++ b/net/reporting/reporting_endpoint_manager.cc
@@ -49,6 +49,10 @@ DCHECK(cache); } + ReportingEndpointManagerImpl(const ReportingEndpointManagerImpl&) = delete; + ReportingEndpointManagerImpl& operator=(const ReportingEndpointManagerImpl&) = + delete; + ~ReportingEndpointManagerImpl() override = default; const ReportingEndpoint FindEndpointForDelivery( @@ -153,8 +157,6 @@ // growth of this map. base::MRUCache<EndpointBackoffKey, std::unique_ptr<net::BackoffEntry>> endpoint_backoff_; - - DISALLOW_COPY_AND_ASSIGN(ReportingEndpointManagerImpl); }; } // namespace
diff --git a/net/reporting/reporting_endpoint_manager_unittest.cc b/net/reporting/reporting_endpoint_manager_unittest.cc index 1f2da2d..6a1d27f 100644 --- a/net/reporting/reporting_endpoint_manager_unittest.cc +++ b/net/reporting/reporting_endpoint_manager_unittest.cc
@@ -33,6 +33,10 @@ TestReportingCache(const url::Origin& expected_origin, const std::string& expected_group) : expected_origin_(expected_origin), expected_group_(expected_group) {} + + TestReportingCache(const TestReportingCache&) = delete; + TestReportingCache& operator=(const TestReportingCache&) = delete; + ~TestReportingCache() override = default; void SetEndpoint(const ReportingEndpoint& reporting_endpoint) { @@ -231,8 +235,6 @@ std::map<NetworkIsolationKey, std::vector<ReportingEndpoint>> reporting_endpoints_; base::flat_set<base::UnguessableToken> expired_sources_; - - DISALLOW_COPY_AND_ASSIGN(TestReportingCache); }; class ReportingEndpointManagerTest : public testing::Test {
diff --git a/net/reporting/reporting_network_change_observer.cc b/net/reporting/reporting_network_change_observer.cc index 4e1d20ea..5fc0cfe 100644 --- a/net/reporting/reporting_network_change_observer.cc +++ b/net/reporting/reporting_network_change_observer.cc
@@ -24,6 +24,11 @@ NetworkChangeNotifier::AddNetworkChangeObserver(this); } + ReportingNetworkChangeObserverImpl( + const ReportingNetworkChangeObserverImpl&) = delete; + ReportingNetworkChangeObserverImpl& operator=( + const ReportingNetworkChangeObserverImpl&) = delete; + // ReportingNetworkChangeObserver implementation: ~ReportingNetworkChangeObserverImpl() override { NetworkChangeNotifier::RemoveNetworkChangeObserver(this); @@ -47,8 +52,6 @@ private: ReportingContext* context_; - - DISALLOW_COPY_AND_ASSIGN(ReportingNetworkChangeObserverImpl); }; } // namespace
diff --git a/net/reporting/reporting_service.cc b/net/reporting/reporting_service.cc index 3e6fde53..58dea43 100644 --- a/net/reporting/reporting_service.cc +++ b/net/reporting/reporting_service.cc
@@ -49,6 +49,9 @@ initialized_ = true; } + ReportingServiceImpl(const ReportingServiceImpl&) = delete; + ReportingServiceImpl& operator=(const ReportingServiceImpl&) = delete; + // ReportingService implementation: ~ReportingServiceImpl() override { @@ -303,8 +306,6 @@ NetworkIsolationKey empty_nik_; base::WeakPtrFactory<ReportingServiceImpl> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ReportingServiceImpl); }; } // namespace
diff --git a/net/reporting/reporting_service.h b/net/reporting/reporting_service.h index 94ac0158..8643e16 100644 --- a/net/reporting/reporting_service.h +++ b/net/reporting/reporting_service.h
@@ -34,6 +34,9 @@ // and also other parts of //net. class NET_EXPORT ReportingService { public: + ReportingService(const ReportingService&) = delete; + ReportingService& operator=(const ReportingService&) = delete; + virtual ~ReportingService(); // Creates a ReportingService. |policy| will be copied. |request_context| must @@ -131,9 +134,6 @@ protected: ReportingService() {} - - private: - DISALLOW_COPY_AND_ASSIGN(ReportingService); }; } // namespace net
diff --git a/net/reporting/reporting_test_util.h b/net/reporting/reporting_test_util.h index 0efcbf6..2554020 100644 --- a/net/reporting/reporting_test_util.h +++ b/net/reporting/reporting_test_util.h
@@ -107,6 +107,9 @@ public: TestReportingDelegate(); + TestReportingDelegate(const TestReportingDelegate&) = delete; + TestReportingDelegate& operator=(const TestReportingDelegate&) = delete; + // ReportingDelegate implementation: ~TestReportingDelegate() override; @@ -141,8 +144,6 @@ mutable std::set<url::Origin> saved_origins_; mutable base::OnceCallback<void(std::set<url::Origin>)> permissions_check_callback_; - - DISALLOW_COPY_AND_ASSIGN(TestReportingDelegate); }; // A test implementation of ReportingContext that uses test versions of @@ -154,6 +155,10 @@ const base::TickClock* tick_clock, const ReportingPolicy& policy, ReportingCache::PersistentReportingStore* store = nullptr); + + TestReportingContext(const TestReportingContext&) = delete; + TestReportingContext& operator=(const TestReportingContext&) = delete; + ~TestReportingContext(); base::MockOneShotTimer* test_delivery_timer() { return delivery_timer_; } @@ -173,8 +178,6 @@ base::MockOneShotTimer* delivery_timer_; base::MockOneShotTimer* garbage_collection_timer_; - - DISALLOW_COPY_AND_ASSIGN(TestReportingContext); }; // A unit test base class that provides a TestReportingContext and shorthand
diff --git a/net/server/http_server.h b/net/server/http_server.h index cb70b57..f8664223 100644 --- a/net/server/http_server.h +++ b/net/server/http_server.h
@@ -50,6 +50,10 @@ // callbacks yet. HttpServer(std::unique_ptr<ServerSocket> server_socket, HttpServer::Delegate* delegate); + + HttpServer(const HttpServer&) = delete; + HttpServer& operator=(const HttpServer&) = delete; + ~HttpServer(); void AcceptWebSocket(int connection_id, @@ -132,8 +136,6 @@ std::map<int, std::unique_ptr<HttpConnection>> id_to_connection_; base::WeakPtrFactory<HttpServer> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(HttpServer); }; } // namespace net
diff --git a/net/server/web_socket.h b/net/server/web_socket.h index 3d72f9e..d5c91e0 100644 --- a/net/server/web_socket.h +++ b/net/server/web_socket.h
@@ -42,6 +42,10 @@ void Send(base::StringPiece message, WebSocketFrameHeader::OpCodeEnum op_code, const NetworkTrafficAnnotationTag traffic_annotation); + + WebSocket(const WebSocket&) = delete; + WebSocket& operator=(const WebSocket&) = delete; + ~WebSocket(); private: @@ -54,8 +58,6 @@ std::unique_ptr<WebSocketEncoder> encoder_; bool closed_; std::unique_ptr<NetworkTrafficAnnotationTag> traffic_annotation_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(WebSocket); }; } // namespace net
diff --git a/net/server/web_socket_encoder.h b/net/server/web_socket_encoder.h index b1e76242..3f18f000 100644 --- a/net/server/web_socket_encoder.h +++ b/net/server/web_socket_encoder.h
@@ -23,6 +23,9 @@ public: static const char kClientExtensions[]; + WebSocketEncoder(const WebSocketEncoder&) = delete; + WebSocketEncoder& operator=(const WebSocketEncoder&) = delete; + ~WebSocketEncoder(); // Creates and returns an encoder for a server without extensions. @@ -67,8 +70,6 @@ Type type_; std::unique_ptr<WebSocketDeflater> deflater_; std::unique_ptr<WebSocketInflater> inflater_; - - DISALLOW_COPY_AND_ASSIGN(WebSocketEncoder); }; } // namespace net
diff --git a/net/socket/client_socket_handle.h b/net/socket/client_socket_handle.h index 49846e4c..61ab4a8 100644 --- a/net/socket/client_socket_handle.h +++ b/net/socket/client_socket_handle.h
@@ -50,6 +50,10 @@ }; ClientSocketHandle(); + + ClientSocketHandle(const ClientSocketHandle&) = delete; + ClientSocketHandle& operator=(const ClientSocketHandle&) = delete; + ~ClientSocketHandle(); // Initializes a ClientSocketHandle object, which involves talking to the @@ -245,8 +249,6 @@ // Timing information is set when a connection is successfully established. LoadTimingInfo::ConnectTiming connect_timing_; - - DISALLOW_COPY_AND_ASSIGN(ClientSocketHandle); }; } // namespace net
diff --git a/net/socket/client_socket_pool_base_unittest.cc b/net/socket/client_socket_pool_base_unittest.cc index d8fea66..4201c684 100644 --- a/net/socket/client_socket_pool_base_unittest.cc +++ b/net/socket/client_socket_pool_base_unittest.cc
@@ -546,6 +546,9 @@ explicit TestConnectJobFactory(MockClientSocketFactory* client_socket_factory) : client_socket_factory_(client_socket_factory) {} + TestConnectJobFactory(const TestConnectJobFactory&) = delete; + TestConnectJobFactory& operator=(const TestConnectJobFactory&) = delete; + ~TestConnectJobFactory() override = default; void set_job_type(TestConnectJob::JobType job_type) { job_type_ = job_type; } @@ -592,8 +595,6 @@ std::list<TestConnectJob::JobType>* job_types_ = nullptr; base::TimeDelta timeout_duration_; MockClientSocketFactory* const client_socket_factory_; - - DISALLOW_COPY_AND_ASSIGN(TestConnectJobFactory); }; } // namespace @@ -3022,6 +3023,9 @@ TransportClientSocketPool* pool) : group_id_(group_id), params_(params), pool_(pool) {} + ConnectWithinCallback(const ConnectWithinCallback&) = delete; + ConnectWithinCallback& operator=(const ConnectWithinCallback&) = delete; + ~ConnectWithinCallback() override = default; int WaitForNestedResult() { @@ -3050,8 +3054,6 @@ TransportClientSocketPool* const pool_; ClientSocketHandle handle_; TestCompletionCallback nested_callback_; - - DISALLOW_COPY_AND_ASSIGN(ConnectWithinCallback); }; TEST_F(ClientSocketPoolBaseTest, AbortAllRequestsOnFlush) { @@ -5153,6 +5155,10 @@ class TestAuthHelper { public: TestAuthHelper() = default; + + TestAuthHelper(const TestAuthHelper&) = delete; + TestAuthHelper& operator=(const TestAuthHelper&) = delete; + ~TestAuthHelper() = default; void InitHandle( @@ -5242,8 +5248,6 @@ ClientSocketHandle handle_; int auth_count_ = 0; TestCompletionCallback callback_; - - DISALLOW_COPY_AND_ASSIGN(TestAuthHelper); }; TEST_F(ClientSocketPoolBaseTest, ProxyAuthOnce) {
diff --git a/net/socket/client_socket_pool_manager_impl.h b/net/socket/client_socket_pool_manager_impl.h index 474966e..f70679a 100644 --- a/net/socket/client_socket_pool_manager_impl.h +++ b/net/socket/client_socket_pool_manager_impl.h
@@ -34,6 +34,11 @@ const CommonConnectJobParams& common_connect_job_params, const CommonConnectJobParams& websocket_common_connect_job_params, HttpNetworkSession::SocketPoolType pool_type); + + ClientSocketPoolManagerImpl(const ClientSocketPoolManagerImpl&) = delete; + ClientSocketPoolManagerImpl& operator=(const ClientSocketPoolManagerImpl&) = + delete; + ~ClientSocketPoolManagerImpl() override; void FlushSocketPoolsWithError(int net_error, @@ -58,8 +63,6 @@ SocketPoolMap socket_pools_; THREAD_CHECKER(thread_checker_); - - DISALLOW_COPY_AND_ASSIGN(ClientSocketPoolManagerImpl); }; } // namespace net
diff --git a/net/socket/connect_job.h b/net/socket/connect_job.h index a662e0e..a5df43c 100644 --- a/net/socket/connect_job.h +++ b/net/socket/connect_job.h
@@ -126,6 +126,10 @@ class NET_EXPORT_PRIVATE Delegate { public: Delegate() {} + + Delegate(const Delegate&) = delete; + Delegate& operator=(const Delegate&) = delete; + virtual ~Delegate() {} // Alerts the delegate that the connection completed. |job| must be @@ -147,9 +151,6 @@ HttpAuthController* auth_controller, base::OnceClosure restart_with_auth_callback, ConnectJob* job) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(Delegate); }; // A |timeout_duration| of 0 corresponds to no timeout. @@ -167,6 +168,10 @@ const NetLogWithSource* net_log, NetLogSourceType net_log_source_type, NetLogEventType net_log_connect_event_type); + + ConnectJob(const ConnectJob&) = delete; + ConnectJob& operator=(const ConnectJob&) = delete; + virtual ~ConnectJob(); // Accessors @@ -308,8 +313,6 @@ const bool top_level_job_; NetLogWithSource net_log_; const NetLogEventType net_log_connect_event_type_; - - DISALLOW_COPY_AND_ASSIGN(ConnectJob); }; } // namespace net
diff --git a/net/socket/connect_job_test_util.h b/net/socket/connect_job_test_util.h index d6cc9f9..68a4da6e 100644 --- a/net/socket/connect_job_test_util.h +++ b/net/socket/connect_job_test_util.h
@@ -31,6 +31,10 @@ explicit TestConnectJobDelegate( SocketExpected socket_expected = SocketExpected::ON_SUCCESS_ONLY); + + TestConnectJobDelegate(const TestConnectJobDelegate&) = delete; + TestConnectJobDelegate& operator=(const TestConnectJobDelegate&) = delete; + ~TestConnectJobDelegate() override; // ConnectJob::Delegate implementation. @@ -84,8 +88,6 @@ base::RunLoop run_loop_; std::unique_ptr<base::RunLoop> auth_challenge_run_loop_; - - DISALLOW_COPY_AND_ASSIGN(TestConnectJobDelegate); }; } // namespace net
diff --git a/net/socket/fuzzed_datagram_client_socket.h b/net/socket/fuzzed_datagram_client_socket.h index f53eaec..d13b2e49e 100644 --- a/net/socket/fuzzed_datagram_client_socket.h +++ b/net/socket/fuzzed_datagram_client_socket.h
@@ -29,6 +29,11 @@ public: // |data_provider| must outlive the created socket. explicit FuzzedDatagramClientSocket(FuzzedDataProvider* data_provider); + + FuzzedDatagramClientSocket(const FuzzedDatagramClientSocket&) = delete; + FuzzedDatagramClientSocket& operator=(const FuzzedDatagramClientSocket&) = + delete; + ~FuzzedDatagramClientSocket() override; // DatagramClientSocket implementation: @@ -92,8 +97,6 @@ IPEndPoint remote_address_; base::WeakPtrFactory<FuzzedDatagramClientSocket> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FuzzedDatagramClientSocket); }; } // namespace net
diff --git a/net/socket/fuzzed_server_socket.h b/net/socket/fuzzed_server_socket.h index 7d8dc80..cdcc339 100644 --- a/net/socket/fuzzed_server_socket.h +++ b/net/socket/fuzzed_server_socket.h
@@ -32,6 +32,10 @@ // must remain valid until after both this object and the StreamSocket // produced by Accept are destroyed. FuzzedServerSocket(FuzzedDataProvider* data_provider, net::NetLog* net_log); + + FuzzedServerSocket(const FuzzedServerSocket&) = delete; + FuzzedServerSocket& operator=(const FuzzedServerSocket&) = delete; + ~FuzzedServerSocket() override; int Listen(const IPEndPoint& address, int backlog) override; @@ -52,7 +56,6 @@ bool listen_called_; base::WeakPtrFactory<FuzzedServerSocket> weak_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(FuzzedServerSocket); }; } // namespace net
diff --git a/net/socket/fuzzed_socket.h b/net/socket/fuzzed_socket.h index 8e420c1..3cfc6238 100644 --- a/net/socket/fuzzed_socket.h +++ b/net/socket/fuzzed_socket.h
@@ -42,6 +42,10 @@ // |data_provider| is used as to determine behavior of the FuzzedSocket. It // must remain valid until after the FuzzedSocket is destroyed. FuzzedSocket(FuzzedDataProvider* data_provider, net::NetLog* net_log); + + FuzzedSocket(const FuzzedSocket&) = delete; + FuzzedSocket& operator=(const FuzzedSocket&) = delete; + ~FuzzedSocket() override; // If set to true, the socket will fuzz the result of the Connect() call. @@ -132,8 +136,6 @@ IPEndPoint remote_address_; base::WeakPtrFactory<FuzzedSocket> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FuzzedSocket); }; } // namespace net
diff --git a/net/socket/fuzzed_socket_factory.cc b/net/socket/fuzzed_socket_factory.cc index fc7da365..2c77be9 100644 --- a/net/socket/fuzzed_socket_factory.cc +++ b/net/socket/fuzzed_socket_factory.cc
@@ -28,6 +28,10 @@ class FailingSSLClientSocket : public SSLClientSocket { public: FailingSSLClientSocket() = default; + + FailingSSLClientSocket(const FailingSSLClientSocket&) = delete; + FailingSSLClientSocket& operator=(const FailingSSLClientSocket&) = delete; + ~FailingSSLClientSocket() override = default; // Socket implementation: @@ -100,8 +104,6 @@ private: NetLogWithSource net_log_; - - DISALLOW_COPY_AND_ASSIGN(FailingSSLClientSocket); }; } // namespace
diff --git a/net/socket/fuzzed_socket_factory.h b/net/socket/fuzzed_socket_factory.h index 5d1940a..3ecd386c 100644 --- a/net/socket/fuzzed_socket_factory.h +++ b/net/socket/fuzzed_socket_factory.h
@@ -32,6 +32,10 @@ // long as their calls into it are made on the CLientSocketFactory's thread // and the calls are deterministic. explicit FuzzedSocketFactory(FuzzedDataProvider* data_provider); + + FuzzedSocketFactory(const FuzzedSocketFactory&) = delete; + FuzzedSocketFactory& operator=(const FuzzedSocketFactory&) = delete; + ~FuzzedSocketFactory() override; std::unique_ptr<DatagramClientSocket> CreateDatagramClientSocket( @@ -71,8 +75,6 @@ private: FuzzedDataProvider* data_provider_; bool fuzz_connect_result_; - - DISALLOW_COPY_AND_ASSIGN(FuzzedSocketFactory); }; } // namespace net
diff --git a/net/socket/mock_client_socket_pool_manager.h b/net/socket/mock_client_socket_pool_manager.h index 9d29aa8..ea1891c 100644 --- a/net/socket/mock_client_socket_pool_manager.h +++ b/net/socket/mock_client_socket_pool_manager.h
@@ -21,6 +21,11 @@ class MockClientSocketPoolManager : public ClientSocketPoolManager { public: MockClientSocketPoolManager(); + + MockClientSocketPoolManager(const MockClientSocketPoolManager&) = delete; + MockClientSocketPoolManager& operator=(const MockClientSocketPoolManager&) = + delete; + ~MockClientSocketPoolManager() override; // Sets socket pool that gets used for the specified ProxyServer. @@ -39,8 +44,6 @@ std::map<ProxyServer, std::unique_ptr<ClientSocketPool>>; ClientSocketPoolMap socket_pools_; - - DISALLOW_COPY_AND_ASSIGN(MockClientSocketPoolManager); }; } // namespace net
diff --git a/net/socket/server_socket.h b/net/socket/server_socket.h index 210e47f..9575c748 100644 --- a/net/socket/server_socket.h +++ b/net/socket/server_socket.h
@@ -22,6 +22,10 @@ class NET_EXPORT ServerSocket { public: ServerSocket(); + + ServerSocket(const ServerSocket&) = delete; + ServerSocket& operator=(const ServerSocket&) = delete; + virtual ~ServerSocket(); // Binds the socket and starts listening. Destroys the socket to stop @@ -48,9 +52,6 @@ virtual int Accept(std::unique_ptr<StreamSocket>* socket, CompletionOnceCallback callback, IPEndPoint* peer_address); - - private: - DISALLOW_COPY_AND_ASSIGN(ServerSocket); }; } // namespace net
diff --git a/net/socket/socket_performance_watcher_factory.h b/net/socket/socket_performance_watcher_factory.h index bb78a56..4925332 100644 --- a/net/socket/socket_performance_watcher_factory.h +++ b/net/socket/socket_performance_watcher_factory.h
@@ -23,6 +23,11 @@ // |SocketPerformanceWatcherFactory|. enum Protocol { PROTOCOL_TCP, PROTOCOL_QUIC }; + SocketPerformanceWatcherFactory(const SocketPerformanceWatcherFactory&) = + delete; + SocketPerformanceWatcherFactory& operator=( + const SocketPerformanceWatcherFactory&) = delete; + virtual ~SocketPerformanceWatcherFactory() {} // Creates a socket performance watcher that will record statistics for a @@ -37,9 +42,6 @@ protected: SocketPerformanceWatcherFactory() {} - - private: - DISALLOW_COPY_AND_ASSIGN(SocketPerformanceWatcherFactory); }; } // namespace net
diff --git a/net/socket/socket_posix.h b/net/socket/socket_posix.h index dc3f210..23259b3 100644 --- a/net/socket/socket_posix.h +++ b/net/socket/socket_posix.h
@@ -28,6 +28,10 @@ : public base::MessagePumpForIO::FdWatcher { public: SocketPosix(); + + SocketPosix(const SocketPosix&) = delete; + SocketPosix& operator=(const SocketPosix&) = delete; + ~SocketPosix() override; // Opens a socket and returns net::OK if |address_family| is AF_INET, AF_INET6 @@ -152,8 +156,6 @@ std::unique_ptr<SockaddrStorage> peer_address_; base::ThreadChecker thread_checker_; - - DISALLOW_COPY_AND_ASSIGN(SocketPosix); }; } // namespace net
diff --git a/net/socket/socket_test_util.h b/net/socket/socket_test_util.h index a9438a4..a14c6bd0 100644 --- a/net/socket/socket_test_util.h +++ b/net/socket/socket_test_util.h
@@ -223,6 +223,10 @@ class SocketDataProvider { public: SocketDataProvider(); + + SocketDataProvider(const SocketDataProvider&) = delete; + SocketDataProvider& operator=(const SocketDataProvider&) = delete; + virtual ~SocketDataProvider(); // Returns the buffer and result code for the next simulated read. @@ -326,8 +330,6 @@ int set_send_buffer_size_result_ = net::OK; bool set_no_delay_result_ = true; bool set_keep_alive_result_ = true; - - DISALLOW_COPY_AND_ASSIGN(SocketDataProvider); }; // The AsyncSocket is an interface used by the SocketDataProvider to @@ -368,6 +370,10 @@ public: StaticSocketDataHelper(base::span<const MockRead> reads, base::span<const MockWrite> writes); + + StaticSocketDataHelper(const StaticSocketDataHelper&) = delete; + StaticSocketDataHelper& operator=(const StaticSocketDataHelper&) = delete; + ~StaticSocketDataHelper(); // These functions get access to the next available read and write data. They @@ -404,8 +410,6 @@ size_t read_index_; const base::span<const MockWrite> writes_; size_t write_index_; - - DISALLOW_COPY_AND_ASSIGN(StaticSocketDataHelper); }; // SocketDataProvider which responds based on static tables of mock reads and @@ -415,6 +419,10 @@ StaticSocketDataProvider(); StaticSocketDataProvider(base::span<const MockRead> reads, base::span<const MockWrite> writes); + + StaticSocketDataProvider(const StaticSocketDataProvider&) = delete; + StaticSocketDataProvider& operator=(const StaticSocketDataProvider&) = delete; + ~StaticSocketDataProvider() override; // Pause/resume reads from this provider. @@ -441,8 +449,6 @@ StaticSocketDataHelper helper_; SocketDataPrinter* printer_ = nullptr; bool paused_ = false; - - DISALLOW_COPY_AND_ASSIGN(StaticSocketDataProvider); }; // ProxyClientSocketDataProvider only need to keep track of the return code from @@ -530,6 +536,9 @@ base::span<const MockRead> reads, base::span<const MockWrite> writes); + SequencedSocketData(const SequencedSocketData&) = delete; + SequencedSocketData& operator=(const SequencedSocketData&) = delete; + ~SequencedSocketData() override; // From SocketDataProvider: @@ -598,8 +607,6 @@ std::unique_ptr<base::RunLoop> run_until_paused_run_loop_; base::WeakPtrFactory<SequencedSocketData> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SequencedSocketData); }; // Holds an array of SocketDataProvider elements. As Mock{TCP,SSL}StreamSocket @@ -655,6 +662,10 @@ class MockClientSocketFactory : public ClientSocketFactory { public: MockClientSocketFactory(); + + MockClientSocketFactory(const MockClientSocketFactory&) = delete; + MockClientSocketFactory& operator=(const MockClientSocketFactory&) = delete; + ~MockClientSocketFactory() override; // Adds a SocketDataProvider that can be used to served either TCP or UDP @@ -725,8 +736,6 @@ // ERR_READ_IF_READY_NOT_IMPLEMENTED. bool enable_read_if_ready_; bool use_mock_proxy_client_sockets_ = false; - - DISALLOW_COPY_AND_ASSIGN(MockClientSocketFactory); }; class MockClientSocket : public TransportClientSocket { @@ -792,6 +801,10 @@ MockTCPClientSocket(const AddressList& addresses, net::NetLog* net_log, SocketDataProvider* socket); + + MockTCPClientSocket(const MockTCPClientSocket&) = delete; + MockTCPClientSocket& operator=(const MockTCPClientSocket&) = delete; + ~MockTCPClientSocket() override; const AddressList& addresses() const { return addresses_; } @@ -879,8 +892,6 @@ BeforeConnectCallback before_connect_callback_; ConnectionAttempts connection_attempts_; - - DISALLOW_COPY_AND_ASSIGN(MockTCPClientSocket); }; class MockProxyClientSocket : public AsyncSocket, public ProxyClientSocket { @@ -888,6 +899,10 @@ MockProxyClientSocket(std::unique_ptr<StreamSocket> socket, HttpAuthController* auth_controller, ProxyClientSocketDataProvider* data); + + MockProxyClientSocket(const MockProxyClientSocket&) = delete; + MockProxyClientSocket& operator=(const MockProxyClientSocket&) = delete; + ~MockProxyClientSocket() override; // ProxyClientSocket implementation. const HttpResponseInfo* GetConnectResponseInfo() const override; @@ -944,8 +959,6 @@ scoped_refptr<HttpAuthController> auth_controller_; base::WeakPtrFactory<MockProxyClientSocket> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(MockProxyClientSocket); }; class MockSSLClientSocket : public AsyncSocket, public SSLClientSocket { @@ -954,6 +967,10 @@ const HostPortPair& host_and_port, const SSLConfig& ssl_config, SSLSocketDataProvider* socket); + + MockSSLClientSocket(const MockSSLClientSocket&) = delete; + MockSSLClientSocket& operator=(const MockSSLClientSocket&) = delete; + ~MockSSLClientSocket() override; // Socket implementation. @@ -1028,14 +1045,16 @@ IPEndPoint peer_addr_; base::WeakPtrFactory<MockSSLClientSocket> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(MockSSLClientSocket); }; class MockUDPClientSocket : public DatagramClientSocket, public AsyncSocket { public: MockUDPClientSocket(SocketDataProvider* data = nullptr, net::NetLog* net_log = nullptr); + + MockUDPClientSocket(const MockUDPClientSocket&) = delete; + MockUDPClientSocket& operator=(const MockUDPClientSocket&) = delete; + ~MockUDPClientSocket() override; // Socket implementation. @@ -1139,14 +1158,16 @@ bool tagged_before_data_transferred_ = true; base::WeakPtrFactory<MockUDPClientSocket> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(MockUDPClientSocket); }; class TestSocketRequest : public TestCompletionCallbackBase { public: TestSocketRequest(std::vector<TestSocketRequest*>* request_order, size_t* completion_count); + + TestSocketRequest(const TestSocketRequest&) = delete; + TestSocketRequest& operator=(const TestSocketRequest&) = delete; + ~TestSocketRequest() override; ClientSocketHandle* handle() { return &handle_; } @@ -1162,8 +1183,6 @@ ClientSocketHandle handle_; std::vector<TestSocketRequest*>* request_order_; size_t* completion_count_; - - DISALLOW_COPY_AND_ASSIGN(TestSocketRequest); }; class ClientSocketPoolTest { @@ -1179,6 +1198,10 @@ static const int kRequestNotFound; ClientSocketPoolTest(); + + ClientSocketPoolTest(const ClientSocketPoolTest&) = delete; + ClientSocketPoolTest& operator=(const ClientSocketPoolTest&) = delete; + ~ClientSocketPoolTest(); template <typename PoolType> @@ -1228,8 +1251,6 @@ std::vector<std::unique_ptr<TestSocketRequest>> requests_; std::vector<TestSocketRequest*> request_order_; size_t completion_count_; - - DISALLOW_COPY_AND_ASSIGN(ClientSocketPoolTest); }; class MockTransportSocketParams @@ -1250,6 +1271,10 @@ const SocketTag& socket_tag, CompletionOnceCallback callback, RequestPriority priority); + + MockConnectJob(const MockConnectJob&) = delete; + MockConnectJob& operator=(const MockConnectJob&) = delete; + ~MockConnectJob(); int Connect(); @@ -1268,8 +1293,6 @@ const SocketTag socket_tag_; CompletionOnceCallback user_callback_; RequestPriority priority_; - - DISALLOW_COPY_AND_ASSIGN(MockConnectJob); }; MockTransportClientSocketPool( @@ -1376,6 +1399,10 @@ public: explicit MockTaggingStreamSocket(std::unique_ptr<StreamSocket> transport) : WrappedStreamSocket(std::move(transport)) {} + + MockTaggingStreamSocket(const MockTaggingStreamSocket&) = delete; + MockTaggingStreamSocket& operator=(const MockTaggingStreamSocket&) = delete; + ~MockTaggingStreamSocket() override {} // StreamSocket implementation. @@ -1393,8 +1420,6 @@ bool connected_ = false; bool tagged_before_connected_ = true; SocketTag tag_; - - DISALLOW_COPY_AND_ASSIGN(MockTaggingStreamSocket); }; // Extend MockClientSocketFactory to return MockTaggingStreamSockets and
diff --git a/net/socket/socks5_client_socket.h b/net/socket/socks5_client_socket.h index 58f3d128..55b5afcf 100644 --- a/net/socket/socks5_client_socket.h +++ b/net/socket/socks5_client_socket.h
@@ -40,6 +40,9 @@ const HostPortPair& destination, const NetworkTrafficAnnotationTag& traffic_annotation); + SOCKS5ClientSocket(const SOCKS5ClientSocket&) = delete; + SOCKS5ClientSocket& operator=(const SOCKS5ClientSocket&) = delete; + // On destruction Disconnect() is called. ~SOCKS5ClientSocket() override; @@ -158,8 +161,6 @@ // Traffic annotation for socket control. NetworkTrafficAnnotationTag traffic_annotation_; - - DISALLOW_COPY_AND_ASSIGN(SOCKS5ClientSocket); }; } // namespace net
diff --git a/net/socket/socks_client_socket.h b/net/socket/socks_client_socket.h index 9005b12..0788522 100644 --- a/net/socket/socks_client_socket.h +++ b/net/socket/socks_client_socket.h
@@ -42,6 +42,9 @@ SecureDnsPolicy secure_dns_policy, const NetworkTrafficAnnotationTag& traffic_annotation); + SOCKSClientSocket(const SOCKSClientSocket&) = delete; + SOCKSClientSocket& operator=(const SOCKSClientSocket&) = delete; + // On destruction Disconnect() is called. ~SOCKSClientSocket() override; @@ -155,8 +158,6 @@ // Traffic annotation for socket control. NetworkTrafficAnnotationTag traffic_annotation_; - - DISALLOW_COPY_AND_ASSIGN(SOCKSClientSocket); }; } // namespace net
diff --git a/net/socket/socks_connect_job.h b/net/socket/socks_connect_job.h index 9603328..4123642d 100644 --- a/net/socket/socks_connect_job.h +++ b/net/socket/socks_connect_job.h
@@ -89,6 +89,10 @@ scoped_refptr<SOCKSSocketParams> socks_params, ConnectJob::Delegate* delegate, const NetLogWithSource* net_log); + + SOCKSConnectJob(const SOCKSConnectJob&) = delete; + SOCKSConnectJob& operator=(const SOCKSConnectJob&) = delete; + ~SOCKSConnectJob() override; // ConnectJob methods. @@ -140,8 +144,6 @@ SOCKSClientSocket* socks_socket_ptr_; ResolveErrorInfo resolve_error_info_; - - DISALLOW_COPY_AND_ASSIGN(SOCKSConnectJob); }; } // namespace net
diff --git a/net/socket/ssl_client_socket.h b/net/socket/ssl_client_socket.h index 8d5753c..c1e41ed 100644 --- a/net/socket/ssl_client_socket.h +++ b/net/socket/ssl_client_socket.h
@@ -105,6 +105,10 @@ CTPolicyEnforcer* ct_policy_enforcer, SSLClientSessionCache* ssl_client_session_cache, SCTAuditingDelegate* sct_auditing_delegate); + + SSLClientContext(const SSLClientContext&) = delete; + SSLClientContext& operator=(const SSLClientContext&) = delete; + ~SSLClientContext() override; const SSLContextConfig& config() { return config_; } @@ -188,8 +192,6 @@ SSLClientAuthCache ssl_client_auth_cache_; base::ObserverList<Observer, true /* check_empty */> observers_; - - DISALLOW_COPY_AND_ASSIGN(SSLClientContext); }; } // namespace net
diff --git a/net/socket/ssl_client_socket_impl.h b/net/socket/ssl_client_socket_impl.h index 68e8c79a..85ac408 100644 --- a/net/socket/ssl_client_socket_impl.h +++ b/net/socket/ssl_client_socket_impl.h
@@ -59,6 +59,10 @@ std::unique_ptr<StreamSocket> stream_socket, const HostPortPair& host_and_port, const SSLConfig& ssl_config); + + SSLClientSocketImpl(const SSLClientSocketImpl&) = delete; + SSLClientSocketImpl& operator=(const SSLClientSocketImpl&) = delete; + ~SSLClientSocketImpl() override; const HostPortPair& host_and_port() const { return host_and_port_; } @@ -301,8 +305,6 @@ NetLogWithSource net_log_; base::WeakPtrFactory<SSLClientSocketImpl> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SSLClientSocketImpl); }; } // namespace net
diff --git a/net/socket/ssl_client_socket_unittest.cc b/net/socket/ssl_client_socket_unittest.cc index ff695d7..d34fe85 100644 --- a/net/socket/ssl_client_socket_unittest.cc +++ b/net/socket/ssl_client_socket_unittest.cc
@@ -143,6 +143,11 @@ public: explicit SynchronousErrorStreamSocket(std::unique_ptr<StreamSocket> transport) : WrappedStreamSocket(std::move(transport)) {} + + SynchronousErrorStreamSocket(const SynchronousErrorStreamSocket&) = delete; + SynchronousErrorStreamSocket& operator=(const SynchronousErrorStreamSocket&) = + delete; + ~SynchronousErrorStreamSocket() override = default; // Socket implementation: @@ -183,8 +188,6 @@ bool have_write_error_ = false; int pending_write_error_ = OK; - - DISALLOW_COPY_AND_ASSIGN(SynchronousErrorStreamSocket); }; int SynchronousErrorStreamSocket::Read(IOBuffer* buf, @@ -560,6 +563,10 @@ class DeleteSocketCallback : public TestCompletionCallbackBase { public: explicit DeleteSocketCallback(StreamSocket* socket) : socket_(socket) {} + + DeleteSocketCallback(const DeleteSocketCallback&) = delete; + DeleteSocketCallback& operator=(const DeleteSocketCallback&) = delete; + ~DeleteSocketCallback() override = default; CompletionOnceCallback callback() { @@ -579,8 +586,6 @@ } StreamSocket* socket_; - - DISALLOW_COPY_AND_ASSIGN(DeleteSocketCallback); }; // A mock ExpectCTReporter that remembers the latest violation that was @@ -1328,6 +1333,10 @@ class ZeroRTTResponse : public test_server::HttpResponse { public: ZeroRTTResponse(bool zero_rtt) : zero_rtt_(zero_rtt) {} + + ZeroRTTResponse(const ZeroRTTResponse&) = delete; + ZeroRTTResponse& operator=(const ZeroRTTResponse&) = delete; + ~ZeroRTTResponse() override {} void SendResponse(const test_server::SendBytesCallback& send, @@ -1347,8 +1356,6 @@ private: bool zero_rtt_; - - DISALLOW_COPY_AND_ASSIGN(ZeroRTTResponse); }; std::unique_ptr<test_server::HttpResponse> HandleZeroRTTRequest(
diff --git a/net/socket/ssl_connect_job.h b/net/socket/ssl_connect_job.h index 40cd4d85..d32744d 100644 --- a/net/socket/ssl_connect_job.h +++ b/net/socket/ssl_connect_job.h
@@ -109,6 +109,10 @@ scoped_refptr<SSLSocketParams> params, ConnectJob::Delegate* delegate, const NetLogWithSource* net_log); + + SSLConnectJob(const SSLConnectJob&) = delete; + SSLConnectJob& operator=(const SSLConnectJob&) = delete; + ~SSLConnectJob() override; // ConnectJob methods. @@ -201,8 +205,6 @@ // limited lifetime and the aliases can no longer be retrieved from there by // by the time that the aliases are needed to be passed in SetSocket. std::vector<std::string> dns_aliases_; - - DISALLOW_COPY_AND_ASSIGN(SSLConnectJob); }; } // namespace net
diff --git a/net/socket/ssl_server_socket_impl.cc b/net/socket/ssl_server_socket_impl.cc index fefeef4..4bed18d 100644 --- a/net/socket/ssl_server_socket_impl.cc +++ b/net/socket/ssl_server_socket_impl.cc
@@ -71,6 +71,10 @@ public: SocketImpl(SSLServerContextImpl* context, std::unique_ptr<StreamSocket> socket); + + SocketImpl(const SocketImpl&) = delete; + SocketImpl& operator=(const SocketImpl&) = delete; + ~SocketImpl() override; // SSLServerSocket interface. @@ -220,8 +224,6 @@ NextProto negotiated_protocol_; base::WeakPtrFactory<SocketImpl> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SocketImpl); }; SSLServerContextImpl::SocketImpl::SocketImpl(
diff --git a/net/socket/ssl_server_socket_unittest.cc b/net/socket/ssl_server_socket_unittest.cc index f527d36..d98f8f5 100644 --- a/net/socket/ssl_server_socket_unittest.cc +++ b/net/socket/ssl_server_socket_unittest.cc
@@ -225,6 +225,9 @@ FakeDataChannel* outgoing_channel) : incoming_(incoming_channel), outgoing_(outgoing_channel) {} + FakeSocket(const FakeSocket&) = delete; + FakeSocket& operator=(const FakeSocket&) = delete; + ~FakeSocket() override = default; int Read(IOBuffer* buf, @@ -299,8 +302,6 @@ NetLogWithSource net_log_; FakeDataChannel* incoming_; FakeDataChannel* outgoing_; - - DISALLOW_COPY_AND_ASSIGN(FakeSocket); }; } // namespace
diff --git a/net/socket/tcp_client_socket.h b/net/socket/tcp_client_socket.h index c3888a9..fbcb7e9 100644 --- a/net/socket/tcp_client_socket.h +++ b/net/socket/tcp_client_socket.h
@@ -72,6 +72,9 @@ const IPEndPoint& bound_address, NetworkQualityEstimator* network_quality_estimator); + TCPClientSocket(const TCPClientSocket&) = delete; + TCPClientSocket& operator=(const TCPClientSocket&) = delete; + ~TCPClientSocket() override; // TransportClientSocket implementation. @@ -233,8 +236,6 @@ base::OneShotTimer connect_attempt_timer_; base::WeakPtrFactory<TCPClientSocket> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(TCPClientSocket); }; } // namespace net
diff --git a/net/socket/tcp_client_socket_unittest.cc b/net/socket/tcp_client_socket_unittest.cc index 06a4e94..5444c7f5 100644 --- a/net/socket/tcp_client_socket_unittest.cc +++ b/net/socket/tcp_client_socket_unittest.cc
@@ -295,6 +295,11 @@ class TestSocketPerformanceWatcher : public SocketPerformanceWatcher { public: TestSocketPerformanceWatcher() : connection_changed_count_(0u) {} + + TestSocketPerformanceWatcher(const TestSocketPerformanceWatcher&) = delete; + TestSocketPerformanceWatcher& operator=(const TestSocketPerformanceWatcher&) = + delete; + ~TestSocketPerformanceWatcher() override = default; bool ShouldNotifyUpdatedRTT() const override { return true; } @@ -307,8 +312,6 @@ private: size_t connection_changed_count_; - - DISALLOW_COPY_AND_ASSIGN(TestSocketPerformanceWatcher); }; // TestSocketPerformanceWatcher requires kernel support for tcp_info struct, and
diff --git a/net/socket/tcp_server_socket.h b/net/socket/tcp_server_socket.h index 8e5c9e5f..9c2b856 100644 --- a/net/socket/tcp_server_socket.h +++ b/net/socket/tcp_server_socket.h
@@ -28,6 +28,9 @@ // Adopts the provided socket, which must not be a connected socket. explicit TCPServerSocket(std::unique_ptr<TCPSocket> socket); + TCPServerSocket(const TCPServerSocket&) = delete; + TCPServerSocket& operator=(const TCPServerSocket&) = delete; + ~TCPServerSocket() override; // Takes ownership of |socket|, which has been opened, but may or may not be @@ -70,8 +73,6 @@ std::unique_ptr<TCPSocket> accepted_socket_; IPEndPoint accepted_address_; bool pending_accept_; - - DISALLOW_COPY_AND_ASSIGN(TCPServerSocket); }; } // namespace net
diff --git a/net/socket/tcp_socket_posix.h b/net/socket/tcp_socket_posix.h index 31430b61..32cf724 100644 --- a/net/socket/tcp_socket_posix.h +++ b/net/socket/tcp_socket_posix.h
@@ -43,6 +43,10 @@ std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher, NetLog* net_log, const NetLogSource& source); + + TCPSocketPosix(const TCPSocketPosix&) = delete; + TCPSocketPosix& operator=(const TCPSocketPosix&) = delete; + virtual ~TCPSocketPosix(); // Opens the socket. @@ -211,8 +215,6 @@ // Current socket tag if |socket_| is valid, otherwise the tag to apply when // |socket_| is opened. SocketTag tag_; - - DISALLOW_COPY_AND_ASSIGN(TCPSocketPosix); }; } // namespace net
diff --git a/net/socket/tcp_socket_unittest.cc b/net/socket/tcp_socket_unittest.cc index 96ccee3..74f8e1d 100644 --- a/net/socket/tcp_socket_unittest.cc +++ b/net/socket/tcp_socket_unittest.cc
@@ -73,6 +73,11 @@ : should_notify_updated_rtt_(should_notify_updated_rtt), connection_changed_count_(0u), rtt_notification_count_(0u) {} + + TestSocketPerformanceWatcher(const TestSocketPerformanceWatcher&) = delete; + TestSocketPerformanceWatcher& operator=(const TestSocketPerformanceWatcher&) = + delete; + ~TestSocketPerformanceWatcher() override = default; bool ShouldNotifyUpdatedRTT() const override { @@ -93,8 +98,6 @@ const bool should_notify_updated_rtt_; size_t connection_changed_count_; size_t rtt_notification_count_; - - DISALLOW_COPY_AND_ASSIGN(TestSocketPerformanceWatcher); }; const int kListenBacklog = 5;
diff --git a/net/socket/tcp_socket_win.h b/net/socket/tcp_socket_win.h index 8decd5d5..542bf8dd 100644 --- a/net/socket/tcp_socket_win.h +++ b/net/socket/tcp_socket_win.h
@@ -38,6 +38,10 @@ std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher, NetLog* net_log, const NetLogSource& source); + + TCPSocketWin(const TCPSocketWin&) = delete; + TCPSocketWin& operator=(const TCPSocketWin&) = delete; + ~TCPSocketWin() override; int Open(AddressFamily family); @@ -199,8 +203,6 @@ NetLogWithSource net_log_; THREAD_CHECKER(thread_checker_); - - DISALLOW_COPY_AND_ASSIGN(TCPSocketWin); }; } // namespace net
diff --git a/net/socket/transport_client_socket.h b/net/socket/transport_client_socket.h index 4f8c4b3f..548048e 100644 --- a/net/socket/transport_client_socket.h +++ b/net/socket/transport_client_socket.h
@@ -17,6 +17,10 @@ class NET_EXPORT TransportClientSocket : public StreamSocket { public: TransportClientSocket(); + + TransportClientSocket(const TransportClientSocket&) = delete; + TransportClientSocket& operator=(const TransportClientSocket&) = delete; + ~TransportClientSocket() override; // Binds the socket to a local address, |local_addr|. Returns OK on success, @@ -46,9 +50,6 @@ // should always be ready after successful connection or slightly earlier // during BeforeConnect handlers. virtual bool SetKeepAlive(bool enable, int delay_secs); - - private: - DISALLOW_COPY_AND_ASSIGN(TransportClientSocket); }; } // namespace net
diff --git a/net/socket/transport_client_socket_pool.h b/net/socket/transport_client_socket_pool.h index 054a11b..ab8aa9e4 100644 --- a/net/socket/transport_client_socket_pool.h +++ b/net/socket/transport_client_socket_pool.h
@@ -101,6 +101,9 @@ const absl::optional<NetworkTrafficAnnotationTag>& proxy_annotation_tag, const NetLogWithSource& net_log); + Request(const Request&) = delete; + Request& operator=(const Request&) = delete; + ~Request(); ClientSocketHandle* handle() const { return handle_; } @@ -141,8 +144,6 @@ const NetLogWithSource net_log_; const SocketTag socket_tag_; ConnectJob* job_; - - DISALLOW_COPY_AND_ASSIGN(Request); }; TransportClientSocketPool(
diff --git a/net/socket/transport_client_socket_pool_test_util.h b/net/socket/transport_client_socket_pool_test_util.h index f6dfb7b..91b69d3 100644 --- a/net/socket/transport_client_socket_pool_test_util.h +++ b/net/socket/transport_client_socket_pool_test_util.h
@@ -72,6 +72,12 @@ }; explicit MockTransportClientSocketFactory(NetLog* net_log); + + MockTransportClientSocketFactory(const MockTransportClientSocketFactory&) = + delete; + MockTransportClientSocketFactory& operator=( + const MockTransportClientSocketFactory&) = delete; + ~MockTransportClientSocketFactory() override; std::unique_ptr<DatagramClientSocket> CreateDatagramClientSocket( @@ -135,8 +141,6 @@ base::TimeDelta delay_; base::queue<base::OnceClosure> triggerable_sockets_; base::OnceClosure run_loop_quit_closure_; - - DISALLOW_COPY_AND_ASSIGN(MockTransportClientSocketFactory); }; } // namespace net
diff --git a/net/socket/transport_client_socket_pool_unittest.cc b/net/socket/transport_client_socket_pool_unittest.cc index e200a8a..d6afa3ca 100644 --- a/net/socket/transport_client_socket_pool_unittest.cc +++ b/net/socket/transport_client_socket_pool_unittest.cc
@@ -864,6 +864,9 @@ pool_(pool), within_callback_(false) {} + RequestSocketCallback(const RequestSocketCallback&) = delete; + RequestSocketCallback& operator=(const RequestSocketCallback&) = delete; + ~RequestSocketCallback() override = default; CompletionOnceCallback callback() { @@ -897,8 +900,6 @@ ClientSocketHandle* const handle_; TransportClientSocketPool* const pool_; bool within_callback_; - - DISALLOW_COPY_AND_ASSIGN(RequestSocketCallback); }; TEST_F(TransportClientSocketPoolTest, RequestTwice) {
diff --git a/net/socket/transport_connect_job.h b/net/socket/transport_connect_job.h index acf2c6b..ea04557a 100644 --- a/net/socket/transport_connect_job.h +++ b/net/socket/transport_connect_job.h
@@ -129,6 +129,10 @@ const scoped_refptr<TransportSocketParams>& params, Delegate* delegate, const NetLogWithSource* net_log); + + TransportConnectJob(const TransportConnectJob&) = delete; + TransportConnectJob& operator=(const TransportConnectJob&) = delete; + ~TransportConnectJob() override; // ConnectJob methods. @@ -205,8 +209,6 @@ ConnectionAttempts fallback_connection_attempts_; base::WeakPtrFactory<TransportConnectJob> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(TransportConnectJob); }; } // namespace net
diff --git a/net/socket/udp_client_socket.h b/net/socket/udp_client_socket.h index d8a7348c..d576370 100644 --- a/net/socket/udp_client_socket.h +++ b/net/socket/udp_client_socket.h
@@ -24,6 +24,10 @@ UDPClientSocket(DatagramSocket::BindType bind_type, net::NetLog* net_log, const net::NetLogSource& source); + + UDPClientSocket(const UDPClientSocket&) = delete; + UDPClientSocket& operator=(const UDPClientSocket&) = delete; + ~UDPClientSocket() override; // DatagramClientSocket implementation. @@ -78,8 +82,6 @@ private: UDPSocket socket_; NetworkChangeNotifier::NetworkHandle network_; - - DISALLOW_COPY_AND_ASSIGN(UDPClientSocket); }; } // namespace net
diff --git a/net/socket/udp_server_socket.h b/net/socket/udp_server_socket.h index 37ba36bba..54456c6 100644 --- a/net/socket/udp_server_socket.h +++ b/net/socket/udp_server_socket.h
@@ -24,6 +24,10 @@ class NET_EXPORT UDPServerSocket : public DatagramServerSocket { public: UDPServerSocket(net::NetLog* net_log, const net::NetLogSource& source); + + UDPServerSocket(const UDPServerSocket&) = delete; + UDPServerSocket& operator=(const UDPServerSocket&) = delete; + ~UDPServerSocket() override; // Implement DatagramServerSocket: @@ -61,7 +65,6 @@ bool allow_address_reuse_; bool allow_broadcast_; bool allow_address_sharing_for_multicast_; - DISALLOW_COPY_AND_ASSIGN(UDPServerSocket); }; } // namespace net
diff --git a/net/socket/udp_socket_posix.h b/net/socket/udp_socket_posix.h index 15aacb1..5fe0d8c 100644 --- a/net/socket/udp_socket_posix.h +++ b/net/socket/udp_socket_posix.h
@@ -129,6 +129,10 @@ class ReceivedActivityMonitor { public: ReceivedActivityMonitor() : bytes_(0), increments_(0) {} + + ReceivedActivityMonitor(const ReceivedActivityMonitor&) = delete; + ReceivedActivityMonitor& operator=(const ReceivedActivityMonitor&) = delete; + ~ReceivedActivityMonitor() = default; // Provided by sent/received subclass. // Update throughput, but batch to limit overhead of net::activity_monitor. @@ -143,7 +147,6 @@ uint32_t bytes_; uint32_t increments_; base::RepeatingTimer timer_; - DISALLOW_COPY_AND_ASSIGN(ReceivedActivityMonitor); }; UDPSocketPosix(DatagramSocket::BindType bind_type,
diff --git a/net/socket/udp_socket_win.h b/net/socket/udp_socket_win.h index a75bd08..928515e 100644 --- a/net/socket/udp_socket_win.h +++ b/net/socket/udp_socket_win.h
@@ -119,6 +119,10 @@ class NET_EXPORT DscpManager { public: DscpManager(QwaveApi* api, SOCKET socket); + + DscpManager(const DscpManager&) = delete; + DscpManager& operator=(const DscpManager&) = delete; + ~DscpManager(); // Remembers the latest |dscp| so PrepareToSend can add remote addresses to @@ -149,8 +153,6 @@ // 0 means no flow has been constructed. QOS_FLOWID flow_id_ = 0; base::WeakPtrFactory<DscpManager> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DscpManager); }; //----------------------------------------------------------------------------- @@ -162,6 +164,10 @@ UDPSocketWin(DatagramSocket::BindType bind_type, net::NetLog* net_log, const net::NetLogSource& source); + + UDPSocketWin(const UDPSocketWin&) = delete; + UDPSocketWin& operator=(const UDPSocketWin&) = delete; + ~UDPSocketWin() override; // Opens the socket. @@ -493,8 +499,6 @@ // Used to prevent null dereferences in OnObjectSignaled, when passing an // error to both read and write callbacks. Cleared in Close() base::WeakPtrFactory<UDPSocketWin> event_pending_{this}; - - DISALLOW_COPY_AND_ASSIGN(UDPSocketWin); }; //-----------------------------------------------------------------------------
diff --git a/net/socket/unix_domain_client_socket_posix.h b/net/socket/unix_domain_client_socket_posix.h index 2397b91..e2c34ee7 100644 --- a/net/socket/unix_domain_client_socket_posix.h +++ b/net/socket/unix_domain_client_socket_posix.h
@@ -34,6 +34,9 @@ // UnixDomainServerSocket uses this after it accepts a connection. explicit UnixDomainClientSocket(std::unique_ptr<SocketPosix> socket); + UnixDomainClientSocket(const UnixDomainClientSocket&) = delete; + UnixDomainClientSocket& operator=(const UnixDomainClientSocket&) = delete; + ~UnixDomainClientSocket() override; // Fills |address| with |socket_path| and its length. For Android or Linux @@ -83,8 +86,6 @@ // This net log is just to comply StreamSocket::NetLog(). It throws away // everything. NetLogWithSource net_log_; - - DISALLOW_COPY_AND_ASSIGN(UnixDomainClientSocket); }; } // namespace net
diff --git a/net/socket/unix_domain_server_socket_posix.h b/net/socket/unix_domain_server_socket_posix.h index 9da6bc0..8d3bdf8 100644 --- a/net/socket/unix_domain_server_socket_posix.h +++ b/net/socket/unix_domain_server_socket_posix.h
@@ -47,6 +47,10 @@ UnixDomainServerSocket(const AuthCallback& auth_callack, bool use_abstract_namespace); + + UnixDomainServerSocket(const UnixDomainServerSocket&) = delete; + UnixDomainServerSocket& operator=(const UnixDomainServerSocket&) = delete; + ~UnixDomainServerSocket() override; // Gets credentials of peer to check permissions. @@ -94,8 +98,6 @@ SocketDescriptor* descriptor = nullptr; }; SocketDestination out_socket_; - - DISALLOW_COPY_AND_ASSIGN(UnixDomainServerSocket); }; } // namespace net
diff --git a/net/socket/websocket_endpoint_lock_manager.h b/net/socket/websocket_endpoint_lock_manager.h index cdd8e03..a0e7607 100644 --- a/net/socket/websocket_endpoint_lock_manager.h +++ b/net/socket/websocket_endpoint_lock_manager.h
@@ -50,6 +50,10 @@ public: LockReleaser(WebSocketEndpointLockManager* websocket_endpoint_lock_manager, IPEndPoint endpoint); + + LockReleaser(const LockReleaser&) = delete; + LockReleaser& operator=(const LockReleaser&) = delete; + ~LockReleaser(); private: @@ -59,8 +63,6 @@ // destroyed. WebSocketEndpointLockManager* websocket_endpoint_lock_manager_; const IPEndPoint endpoint_; - - DISALLOW_COPY_AND_ASSIGN(LockReleaser); }; WebSocketEndpointLockManager();
diff --git a/net/socket/websocket_transport_client_socket_pool.h b/net/socket/websocket_transport_client_socket_pool.h index a0e8628..ac09b01a 100644 --- a/net/socket/websocket_transport_client_socket_pool.h +++ b/net/socket/websocket_transport_client_socket_pool.h
@@ -39,6 +39,11 @@ const ProxyServer& proxy_server, const CommonConnectJobParams* common_connect_job_params); + WebSocketTransportClientSocketPool( + const WebSocketTransportClientSocketPool&) = delete; + WebSocketTransportClientSocketPool& operator=( + const WebSocketTransportClientSocketPool&) = delete; + ~WebSocketTransportClientSocketPool() override; // Allow another connection to be started to the IPEndPoint that this |handle| @@ -100,6 +105,10 @@ CompletionOnceCallback callback, ClientSocketHandle* socket_handle, const NetLogWithSource& request_net_log); + + ConnectJobDelegate(const ConnectJobDelegate&) = delete; + ConnectJobDelegate& operator=(const ConnectJobDelegate&) = delete; + ~ConnectJobDelegate() override; // ConnectJob::Delegate implementation @@ -127,8 +136,6 @@ std::unique_ptr<ConnectJob> connect_job_; ClientSocketHandle* const socket_handle_; const NetLogWithSource request_net_log_; - - DISALLOW_COPY_AND_ASSIGN(ConnectJobDelegate); }; // Store the arguments from a call to RequestSocket() that has stalled so we @@ -200,8 +207,6 @@ bool flushing_; base::WeakPtrFactory<WebSocketTransportClientSocketPool> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(WebSocketTransportClientSocketPool); }; } // namespace net
diff --git a/net/socket/websocket_transport_connect_job.h b/net/socket/websocket_transport_connect_job.h index ab739039..0bb6aa8 100644 --- a/net/socket/websocket_transport_connect_job.h +++ b/net/socket/websocket_transport_connect_job.h
@@ -59,6 +59,11 @@ const scoped_refptr<TransportSocketParams>& params, Delegate* delegate, const NetLogWithSource* net_log); + + WebSocketTransportConnectJob(const WebSocketTransportConnectJob&) = delete; + WebSocketTransportConnectJob& operator=(const WebSocketTransportConnectJob&) = + delete; + ~WebSocketTransportConnectJob() override; // ConnectJob methods. @@ -123,8 +128,6 @@ ResolveErrorInfo resolve_error_info_; base::WeakPtrFactory<WebSocketTransportConnectJob> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(WebSocketTransportConnectJob); }; } // namespace net
diff --git a/net/socket/websocket_transport_connect_sub_job.cc b/net/socket/websocket_transport_connect_sub_job.cc index 43bc9061..cfbe9e3 100644 --- a/net/socket/websocket_transport_connect_sub_job.cc +++ b/net/socket/websocket_transport_connect_sub_job.cc
@@ -31,6 +31,9 @@ : wrapped_socket_(std::move(wrapped_socket)), lock_releaser_(websocket_endpoint_lock_manager, address) {} + WebSocketStreamSocket(const WebSocketStreamSocket&) = delete; + WebSocketStreamSocket& operator=(const WebSocketStreamSocket&) = delete; + ~WebSocketStreamSocket() override = default; // Socket implementation: @@ -114,8 +117,6 @@ private: std::unique_ptr<StreamSocket> wrapped_socket_; WebSocketEndpointLockManager::LockReleaser lock_releaser_; - - DISALLOW_COPY_AND_ASSIGN(WebSocketStreamSocket); }; } // namespace
diff --git a/net/socket/websocket_transport_connect_sub_job.h b/net/socket/websocket_transport_connect_sub_job.h index 23cb529..c7a1141f 100644 --- a/net/socket/websocket_transport_connect_sub_job.h +++ b/net/socket/websocket_transport_connect_sub_job.h
@@ -40,6 +40,11 @@ SubJobType type, WebSocketEndpointLockManager* websocket_endpoint_lock_manager); + WebSocketTransportConnectSubJob(const WebSocketTransportConnectSubJob&) = + delete; + WebSocketTransportConnectSubJob& operator=( + const WebSocketTransportConnectSubJob&) = delete; + ~WebSocketTransportConnectSubJob() override; // Start connecting. @@ -91,8 +96,6 @@ WebSocketEndpointLockManager* const websocket_endpoint_lock_manager_; std::unique_ptr<StreamSocket> transport_socket_; - - DISALLOW_COPY_AND_ASSIGN(WebSocketTransportConnectSubJob); }; } // namespace net
diff --git a/net/spdy/bidirectional_stream_spdy_impl.h b/net/spdy/bidirectional_stream_spdy_impl.h index 44ff6fd..e4836f1 100644 --- a/net/spdy/bidirectional_stream_spdy_impl.h +++ b/net/spdy/bidirectional_stream_spdy_impl.h
@@ -40,6 +40,10 @@ BidirectionalStreamSpdyImpl(const base::WeakPtr<SpdySession>& spdy_session, NetLogSource source_dependency); + BidirectionalStreamSpdyImpl(const BidirectionalStreamSpdyImpl&) = delete; + BidirectionalStreamSpdyImpl& operator=(const BidirectionalStreamSpdyImpl&) = + delete; + ~BidirectionalStreamSpdyImpl() override; // BidirectionalStreamImpl implementation: @@ -130,8 +134,6 @@ scoped_refptr<IOBuffer> pending_combined_buffer_; base::WeakPtrFactory<BidirectionalStreamSpdyImpl> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(BidirectionalStreamSpdyImpl); }; } // namespace net
diff --git a/net/spdy/bidirectional_stream_spdy_impl_unittest.cc b/net/spdy/bidirectional_stream_spdy_impl_unittest.cc index 23d632e..a017f6d 100644 --- a/net/spdy/bidirectional_stream_spdy_impl_unittest.cc +++ b/net/spdy/bidirectional_stream_spdy_impl_unittest.cc
@@ -87,6 +87,9 @@ not_expect_callback_(false), on_failed_called_(false) {} + TestDelegateBase(const TestDelegateBase&) = delete; + TestDelegateBase& operator=(const TestDelegateBase&) = delete; + ~TestDelegateBase() override = default; void OnStreamReady(bool request_headers_sent) override { @@ -234,8 +237,6 @@ bool run_until_completion_; bool not_expect_callback_; bool on_failed_called_; - - DISALLOW_COPY_AND_ASSIGN(TestDelegateBase); }; } // namespace
diff --git a/net/spdy/buffered_spdy_framer.h b/net/spdy/buffered_spdy_framer.h index d1ef516..d9a4d09 100644 --- a/net/spdy/buffered_spdy_framer.h +++ b/net/spdy/buffered_spdy_framer.h
@@ -133,6 +133,10 @@ const NetLogWithSource& net_log, TimeFunc time_func = base::TimeTicks::Now); BufferedSpdyFramer() = delete; + + BufferedSpdyFramer(const BufferedSpdyFramer&) = delete; + BufferedSpdyFramer& operator=(const BufferedSpdyFramer&) = delete; + ~BufferedSpdyFramer() override; // Sets callbacks to be called from the buffered spdy framer. A visitor must @@ -279,8 +283,6 @@ const uint32_t max_header_list_size_; NetLogWithSource net_log_; TimeFunc time_func_; - - DISALLOW_COPY_AND_ASSIGN(BufferedSpdyFramer); }; } // namespace net
diff --git a/net/spdy/http2_push_promise_index.h b/net/spdy/http2_push_promise_index.h index f92fc2a..b27115b 100644 --- a/net/spdy/http2_push_promise_index.h +++ b/net/spdy/http2_push_promise_index.h
@@ -42,6 +42,10 @@ class NET_EXPORT Delegate { public: Delegate() {} + + Delegate(const Delegate&) = delete; + Delegate& operator=(const Delegate&) = delete; + virtual ~Delegate() {} // Return true if a pushed stream with |url| can be used for a request with @@ -54,12 +58,13 @@ // Generate weak pointer. Guaranateed to be called synchronously after // ValidatePushedStream() is called and returns true. virtual base::WeakPtr<SpdySession> GetWeakPtrToSession() = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(Delegate); }; Http2PushPromiseIndex(); + + Http2PushPromiseIndex(const Http2PushPromiseIndex&) = delete; + Http2PushPromiseIndex& operator=(const Http2PushPromiseIndex&) = delete; + ~Http2PushPromiseIndex(); // Tries to register a Delegate with an unclaimed pushed stream for |url|. @@ -124,8 +129,6 @@ // Delegate can have pushed streams for different URLs, and different // Delegates can have pushed streams for the same GURL). std::set<UnclaimedPushedStream, CompareByUrl> unclaimed_pushed_streams_; - - DISALLOW_COPY_AND_ASSIGN(Http2PushPromiseIndex); }; } // namespace net
diff --git a/net/spdy/spdy_buffer.h b/net/spdy/spdy_buffer.h index 93d8c5c8..cc6b191c 100644 --- a/net/spdy/spdy_buffer.h +++ b/net/spdy/spdy_buffer.h
@@ -56,6 +56,9 @@ // non-NULL and |size| must be non-zero. SpdyBuffer(const char* data, size_t size); + SpdyBuffer(const SpdyBuffer&) = delete; + SpdyBuffer& operator=(const SpdyBuffer&) = delete; + // If there are bytes remaining in the buffer, triggers a call to // any consume callbacks with a DISCARD source. ~SpdyBuffer(); @@ -99,8 +102,6 @@ const scoped_refptr<SharedFrame> shared_frame_; std::vector<ConsumeCallback> consume_callbacks_; size_t offset_; - - DISALLOW_COPY_AND_ASSIGN(SpdyBuffer); }; } // namespace net
diff --git a/net/spdy/spdy_buffer_producer.h b/net/spdy/spdy_buffer_producer.h index 8d09f7b..8b344e3 100644 --- a/net/spdy/spdy_buffer_producer.h +++ b/net/spdy/spdy_buffer_producer.h
@@ -25,10 +25,10 @@ // Produces the buffer to be written. Will be called at most once. virtual std::unique_ptr<SpdyBuffer> ProduceBuffer() = 0; - virtual ~SpdyBufferProducer(); + SpdyBufferProducer(const SpdyBufferProducer&) = delete; + SpdyBufferProducer& operator=(const SpdyBufferProducer&) = delete; - private: - DISALLOW_COPY_AND_ASSIGN(SpdyBufferProducer); + virtual ~SpdyBufferProducer(); }; // A simple wrapper around a single SpdyBuffer. @@ -36,14 +36,15 @@ public: explicit SimpleBufferProducer(std::unique_ptr<SpdyBuffer> buffer); + SimpleBufferProducer(const SimpleBufferProducer&) = delete; + SimpleBufferProducer& operator=(const SimpleBufferProducer&) = delete; + ~SimpleBufferProducer() override; std::unique_ptr<SpdyBuffer> ProduceBuffer() override; private: std::unique_ptr<SpdyBuffer> buffer_; - - DISALLOW_COPY_AND_ASSIGN(SimpleBufferProducer); }; } // namespace net
diff --git a/net/spdy/spdy_http_stream.h b/net/spdy/spdy_http_stream.h index ccfab263..6c5c63bd 100644 --- a/net/spdy/spdy_http_stream.h +++ b/net/spdy/spdy_http_stream.h
@@ -42,6 +42,10 @@ spdy::SpdyStreamId pushed_stream_id, NetLogSource source_dependency, std::vector<std::string> dns_aliases); + + SpdyHttpStream(const SpdyHttpStream&) = delete; + SpdyHttpStream& operator=(const SpdyHttpStream&) = delete; + ~SpdyHttpStream() override; SpdyStream* stream() { return stream_; } @@ -225,8 +229,6 @@ std::vector<std::string> dns_aliases_; base::WeakPtrFactory<SpdyHttpStream> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SpdyHttpStream); }; } // namespace net
diff --git a/net/spdy/spdy_proxy_client_socket.h b/net/spdy/spdy_proxy_client_socket.h index ca0e3c5..096b384 100644 --- a/net/spdy/spdy_proxy_client_socket.h +++ b/net/spdy/spdy_proxy_client_socket.h
@@ -54,6 +54,9 @@ HttpAuthController* auth_controller, ProxyDelegate* proxy_delegate); + SpdyProxyClientSocket(const SpdyProxyClientSocket&) = delete; + SpdyProxyClientSocket& operator=(const SpdyProxyClientSocket&) = delete; + // On destruction Disconnect() is called. ~SpdyProxyClientSocket() override; @@ -190,8 +193,6 @@ // factory are invalidated in Disconnect(). base::WeakPtrFactory<SpdyProxyClientSocket> write_callback_weak_factory_{ this}; - - DISALLOW_COPY_AND_ASSIGN(SpdyProxyClientSocket); }; } // namespace net
diff --git a/net/spdy/spdy_proxy_client_socket_unittest.cc b/net/spdy/spdy_proxy_client_socket_unittest.cc index 96690a0a..ebc34b5 100644 --- a/net/spdy/spdy_proxy_client_socket_unittest.cc +++ b/net/spdy/spdy_proxy_client_socket_unittest.cc
@@ -129,6 +129,11 @@ public ::testing::WithParamInterface<bool> { public: SpdyProxyClientSocketTest(); + + SpdyProxyClientSocketTest(const SpdyProxyClientSocketTest&) = delete; + SpdyProxyClientSocketTest& operator=(const SpdyProxyClientSocketTest&) = + delete; + ~SpdyProxyClientSocketTest() override; void TearDown() override; @@ -204,8 +209,6 @@ SpdySessionKey endpoint_spdy_session_key_; std::unique_ptr<CommonConnectJobParams> common_connect_job_params_; SSLSocketDataProvider ssl_; - - DISALLOW_COPY_AND_ASSIGN(SpdyProxyClientSocketTest); }; SpdyProxyClientSocketTest::SpdyProxyClientSocketTest() @@ -1465,6 +1468,9 @@ explicit DeleteSockCallback(std::unique_ptr<SpdyProxyClientSocket>* sock) : sock_(sock) {} + DeleteSockCallback(const DeleteSockCallback&) = delete; + DeleteSockCallback& operator=(const DeleteSockCallback&) = delete; + ~DeleteSockCallback() override = default; CompletionOnceCallback callback() { @@ -1479,8 +1485,6 @@ } std::unique_ptr<SpdyProxyClientSocket>* sock_; - - DISALLOW_COPY_AND_ASSIGN(DeleteSockCallback); }; // If the socket is Reset when both a read and write are pending, and the
diff --git a/net/spdy/spdy_read_queue.h b/net/spdy/spdy_read_queue.h index 73f1c67..a50a16d5 100644 --- a/net/spdy/spdy_read_queue.h +++ b/net/spdy/spdy_read_queue.h
@@ -21,6 +21,10 @@ class NET_EXPORT_PRIVATE SpdyReadQueue { public: SpdyReadQueue(); + + SpdyReadQueue(const SpdyReadQueue&) = delete; + SpdyReadQueue& operator=(const SpdyReadQueue&) = delete; + ~SpdyReadQueue(); // Returns whether there's anything in the queue. @@ -44,8 +48,6 @@ // |total_size_| is the sum of GetRemainingSize() of |queue_|'s elements. base::circular_deque<std::unique_ptr<SpdyBuffer>> queue_; size_t total_size_; - - DISALLOW_COPY_AND_ASSIGN(SpdyReadQueue); }; } // namespace net
diff --git a/net/spdy/spdy_session.h b/net/spdy/spdy_session.h index 0b087604..3bdcd84 100644 --- a/net/spdy/spdy_session.h +++ b/net/spdy/spdy_session.h
@@ -224,6 +224,10 @@ class NET_EXPORT_PRIVATE SpdyStreamRequest { public: SpdyStreamRequest(); + + SpdyStreamRequest(const SpdyStreamRequest&) = delete; + SpdyStreamRequest& operator=(const SpdyStreamRequest&) = delete; + // Calls CancelRequest(). ~SpdyStreamRequest(); @@ -310,8 +314,6 @@ base::TimeTicks confirm_handshake_end_; base::WeakPtrFactory<SpdyStreamRequest> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SpdyStreamRequest); }; class NET_EXPORT SpdySession : public BufferedSpdyFramerVisitorInterface,
diff --git a/net/spdy/spdy_session_pool.h b/net/spdy/spdy_session_pool.h index 15956d1..f645186 100644 --- a/net/spdy/spdy_session_pool.h +++ b/net/spdy/spdy_session_pool.h
@@ -79,14 +79,15 @@ class NET_EXPORT_PRIVATE Delegate { public: Delegate(); + + Delegate(const Delegate&) = delete; + Delegate& operator=(const Delegate&) = delete; + virtual ~Delegate(); // |spdy_session| will not be null. virtual void OnSpdySessionAvailable( base::WeakPtr<SpdySession> spdy_session) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(Delegate); }; // Constructor - this is called by the SpdySessionPool. @@ -97,6 +98,9 @@ Delegate* delegate, SpdySessionPool* spdy_session_pool); + SpdySessionRequest(const SpdySessionRequest&) = delete; + SpdySessionRequest& operator=(const SpdySessionRequest&) = delete; + ~SpdySessionRequest(); // Called by SpdySessionPool to signal that the request has been removed @@ -122,8 +126,6 @@ const bool is_blocking_request_for_session_; Delegate* const delegate_; SpdySessionPool* spdy_session_pool_; - - DISALLOW_COPY_AND_ASSIGN(SpdySessionRequest); }; SpdySessionPool(HostResolver* host_resolver,
diff --git a/net/spdy/spdy_session_pool_unittest.cc b/net/spdy/spdy_session_pool_unittest.cc index 4d87baf6..0704524 100644 --- a/net/spdy/spdy_session_pool_unittest.cc +++ b/net/spdy/spdy_session_pool_unittest.cc
@@ -96,6 +96,11 @@ : public SpdySessionPool::SpdySessionRequest::Delegate { public: SpdySessionRequestDelegate() = default; + + SpdySessionRequestDelegate(const SpdySessionRequestDelegate&) = delete; + SpdySessionRequestDelegate& operator=(const SpdySessionRequestDelegate&) = + delete; + ~SpdySessionRequestDelegate() override = default; void OnSpdySessionAvailable( @@ -112,8 +117,6 @@ private: bool callback_invoked_ = false; base::WeakPtr<SpdySession> spdy_session_; - - DISALLOW_COPY_AND_ASSIGN(SpdySessionRequestDelegate); }; // Attempts to set up an alias for |key| using an already existing session in @@ -1194,6 +1197,11 @@ class TestOnRequestDeletedCallback { public: TestOnRequestDeletedCallback() = default; + + TestOnRequestDeletedCallback(const TestOnRequestDeletedCallback&) = delete; + TestOnRequestDeletedCallback& operator=(const TestOnRequestDeletedCallback&) = + delete; + ~TestOnRequestDeletedCallback() = default; base::RepeatingClosure Callback() { @@ -1223,22 +1231,21 @@ base::RunLoop run_loop_; base::OnceClosure request_deleted_callback_; - - DISALLOW_COPY_AND_ASSIGN(TestOnRequestDeletedCallback); }; class TestRequestDelegate : public SpdySessionPool::SpdySessionRequest::Delegate { public: TestRequestDelegate() = default; + + TestRequestDelegate(const TestRequestDelegate&) = delete; + TestRequestDelegate& operator=(const TestRequestDelegate&) = delete; + ~TestRequestDelegate() override = default; // SpdySessionPool::SpdySessionRequest::Delegate implementation: void OnSpdySessionAvailable( base::WeakPtr<SpdySession> spdy_session) override {} - - private: - DISALLOW_COPY_AND_ASSIGN(TestRequestDelegate); }; TEST_F(SpdySessionPoolTest, RequestSessionWithNoSessions) {
diff --git a/net/spdy/spdy_session_unittest.cc b/net/spdy/spdy_session_unittest.cc index df02402..8a1113c 100644 --- a/net/spdy/spdy_session_unittest.cc +++ b/net/spdy/spdy_session_unittest.cc
@@ -113,13 +113,15 @@ : public SpdySessionPool::SpdySessionRequest::Delegate { public: SpdySessionRequestDelegate() = default; + + SpdySessionRequestDelegate(const SpdySessionRequestDelegate&) = delete; + SpdySessionRequestDelegate& operator=(const SpdySessionRequestDelegate&) = + delete; + ~SpdySessionRequestDelegate() override = default; void OnSpdySessionAvailable( base::WeakPtr<SpdySession> spdy_session) override {} - - private: - DISALLOW_COPY_AND_ASSIGN(SpdySessionRequestDelegate); }; } // namespace
diff --git a/net/spdy/spdy_write_queue.h b/net/spdy/spdy_write_queue.h index a39ab4a..b7d39e6 100644 --- a/net/spdy/spdy_write_queue.h +++ b/net/spdy/spdy_write_queue.h
@@ -30,6 +30,10 @@ class NET_EXPORT_PRIVATE SpdyWriteQueue { public: SpdyWriteQueue(); + + SpdyWriteQueue(const SpdyWriteQueue&) = delete; + SpdyWriteQueue& operator=(const SpdyWriteQueue&) = delete; + ~SpdyWriteQueue(); // Returns whether there is anything in the write queue, @@ -108,8 +112,6 @@ // The actual write queue, binned by priority. base::circular_deque<PendingWrite> queue_[NUM_PRIORITIES]; - - DISALLOW_COPY_AND_ASSIGN(SpdyWriteQueue); }; } // namespace net
diff --git a/net/ssl/client_cert_store.h b/net/ssl/client_cert_store.h index b0c1c65..e6a3f07 100644 --- a/net/ssl/client_cert_store.h +++ b/net/ssl/client_cert_store.h
@@ -21,6 +21,9 @@ // gets its own uniquely owned handle. class NET_EXPORT ClientCertStore { public: + ClientCertStore(const ClientCertStore&) = delete; + ClientCertStore& operator=(const ClientCertStore&) = delete; + virtual ~ClientCertStore() {} using ClientCertListCallback = @@ -35,9 +38,6 @@ protected: ClientCertStore() {} - - private: - DISALLOW_COPY_AND_ASSIGN(ClientCertStore); }; } // namespace net
diff --git a/net/ssl/client_cert_store_mac.h b/net/ssl/client_cert_store_mac.h index 7dc3b4c..288be6a 100644 --- a/net/ssl/client_cert_store_mac.h +++ b/net/ssl/client_cert_store_mac.h
@@ -16,6 +16,10 @@ class NET_EXPORT ClientCertStoreMac : public ClientCertStore { public: ClientCertStoreMac(); + + ClientCertStoreMac(const ClientCertStoreMac&) = delete; + ClientCertStoreMac& operator=(const ClientCertStoreMac&) = delete; + ~ClientCertStoreMac() override; // ClientCertStore: @@ -44,8 +48,6 @@ ClientCertIdentityList regular_identities, const SSLCertRequestInfo& request, ClientCertIdentityList* selected_identities); - - DISALLOW_COPY_AND_ASSIGN(ClientCertStoreMac); }; } // namespace net
diff --git a/net/ssl/client_cert_store_nss.h b/net/ssl/client_cert_store_nss.h index 95313553..046a6e4 100644 --- a/net/ssl/client_cert_store_nss.h +++ b/net/ssl/client_cert_store_nss.h
@@ -31,6 +31,10 @@ explicit ClientCertStoreNSS( const PasswordDelegateFactory& password_delegate_factory); + + ClientCertStoreNSS(const ClientCertStoreNSS&) = delete; + ClientCertStoreNSS& operator=(const ClientCertStoreNSS&) = delete; + ~ClientCertStoreNSS() override; // ClientCertStore: @@ -64,8 +68,6 @@ // The factory for creating the delegate for requesting a password to a // PKCS#11 token. May be null. PasswordDelegateFactory password_delegate_factory_; - - DISALLOW_COPY_AND_ASSIGN(ClientCertStoreNSS); }; } // namespace net
diff --git a/net/ssl/client_cert_store_win.h b/net/ssl/client_cert_store_win.h index 6dac938..2c09ba5 100644 --- a/net/ssl/client_cert_store_win.h +++ b/net/ssl/client_cert_store_win.h
@@ -25,6 +25,9 @@ explicit ClientCertStoreWin( base::RepeatingCallback<crypto::ScopedHCERTSTORE()> cert_store_callback); + ClientCertStoreWin(const ClientCertStoreWin&) = delete; + ClientCertStoreWin& operator=(const ClientCertStoreWin&) = delete; + ~ClientCertStoreWin() override; // If a cert store has been provided at construction time GetClientCerts @@ -51,8 +54,6 @@ ClientCertIdentityList* selected_identities); base::RepeatingCallback<crypto::ScopedHCERTSTORE()> cert_store_callback_; - - DISALLOW_COPY_AND_ASSIGN(ClientCertStoreWin); }; } // namespace net
diff --git a/net/ssl/ssl_client_session_cache.h b/net/ssl/ssl_client_session_cache.h index 787891af..9cccdfd 100644 --- a/net/ssl/ssl_client_session_cache.h +++ b/net/ssl/ssl_client_session_cache.h
@@ -57,6 +57,10 @@ }; explicit SSLClientSessionCache(const Config& config); + + SSLClientSessionCache(const SSLClientSessionCache&) = delete; + SSLClientSessionCache& operator=(const SSLClientSessionCache&) = delete; + ~SSLClientSessionCache(); // Returns true if |entry| is expired as of |now|. @@ -119,8 +123,6 @@ base::MRUCache<Key, Entry> cache_; size_t lookups_since_flush_; std::unique_ptr<base::MemoryPressureListener> memory_pressure_listener_; - - DISALLOW_COPY_AND_ASSIGN(SSLClientSessionCache); }; } // namespace net
diff --git a/net/ssl/ssl_config_service_defaults.h b/net/ssl/ssl_config_service_defaults.h index ab5bb4b..273a51d 100644 --- a/net/ssl/ssl_config_service_defaults.h +++ b/net/ssl/ssl_config_service_defaults.h
@@ -17,6 +17,10 @@ class NET_EXPORT SSLConfigServiceDefaults : public SSLConfigService { public: SSLConfigServiceDefaults(); + + SSLConfigServiceDefaults(const SSLConfigServiceDefaults&) = delete; + SSLConfigServiceDefaults& operator=(const SSLConfigServiceDefaults&) = delete; + ~SSLConfigServiceDefaults() override; // Returns the default SSL config settings. @@ -28,8 +32,6 @@ private: // Default value of prefs. const SSLContextConfig default_config_; - - DISALLOW_COPY_AND_ASSIGN(SSLConfigServiceDefaults); }; } // namespace net
diff --git a/net/ssl/ssl_key_logger_impl.h b/net/ssl/ssl_key_logger_impl.h index 87f1a6b..85167d6a 100644 --- a/net/ssl/ssl_key_logger_impl.h +++ b/net/ssl/ssl_key_logger_impl.h
@@ -32,6 +32,9 @@ // operations in the background. explicit SSLKeyLoggerImpl(base::File file); + SSLKeyLoggerImpl(const SSLKeyLoggerImpl&) = delete; + SSLKeyLoggerImpl& operator=(const SSLKeyLoggerImpl&) = delete; + ~SSLKeyLoggerImpl() override; void WriteLine(const std::string& line) override; @@ -39,8 +42,6 @@ private: class Core; scoped_refptr<Core> core_; - - DISALLOW_COPY_AND_ASSIGN(SSLKeyLoggerImpl); }; } // namespace net
diff --git a/net/ssl/ssl_platform_key_android.cc b/net/ssl/ssl_platform_key_android.cc index 21baf77f..079e283 100644 --- a/net/ssl/ssl_platform_key_android.cc +++ b/net/ssl/ssl_platform_key_android.cc
@@ -95,6 +95,9 @@ } } + SSLPlatformKeyAndroid(const SSLPlatformKeyAndroid&) = delete; + SSLPlatformKeyAndroid& operator=(const SSLPlatformKeyAndroid&) = delete; + ~SSLPlatformKeyAndroid() override {} std::string GetProviderName() override { return provider_name_; } @@ -177,8 +180,6 @@ std::string provider_name_; std::vector<uint16_t> preferences_; base::flat_set<uint16_t> use_pss_fallback_; - - DISALLOW_COPY_AND_ASSIGN(SSLPlatformKeyAndroid); }; } // namespace
diff --git a/net/ssl/ssl_platform_key_mac.cc b/net/ssl/ssl_platform_key_mac.cc index 4887c14..c14c550 100644 --- a/net/ssl/ssl_platform_key_mac.cc +++ b/net/ssl/ssl_platform_key_mac.cc
@@ -56,6 +56,9 @@ ScopedCSSM_CC_HANDLE() : handle_(0) {} explicit ScopedCSSM_CC_HANDLE(CSSM_CC_HANDLE handle) : handle_(handle) {} + ScopedCSSM_CC_HANDLE(const ScopedCSSM_CC_HANDLE&) = delete; + ScopedCSSM_CC_HANDLE& operator=(const ScopedCSSM_CC_HANDLE&) = delete; + ~ScopedCSSM_CC_HANDLE() { reset(); } CSSM_CC_HANDLE get() const { return handle_; } @@ -68,8 +71,6 @@ private: CSSM_CC_HANDLE handle_; - - DISALLOW_COPY_AND_ASSIGN(ScopedCSSM_CC_HANDLE); }; class SSLPlatformKeyCSSM : public ThreadedSSLPrivateKey::Delegate { @@ -81,6 +82,9 @@ key_(key, base::scoped_policy::RETAIN), cssm_key_(cssm_key) {} + SSLPlatformKeyCSSM(const SSLPlatformKeyCSSM&) = delete; + SSLPlatformKeyCSSM& operator=(const SSLPlatformKeyCSSM&) = delete; + ~SSLPlatformKeyCSSM() override {} std::string GetProviderName() override { @@ -195,8 +199,6 @@ bssl::UniquePtr<EVP_PKEY> pubkey_; base::ScopedCFTypeRef<SecKeyRef> key_; const CSSM_KEY* cssm_key_; - - DISALLOW_COPY_AND_ASSIGN(SSLPlatformKeyCSSM); }; // Returns the corresponding SecKeyAlgorithm or nullptr if unrecognized. @@ -254,6 +256,9 @@ } } + SSLPlatformKeySecKey(const SSLPlatformKeySecKey&) = delete; + SSLPlatformKeySecKey& operator=(const SSLPlatformKeySecKey&) = delete; + ~SSLPlatformKeySecKey() override {} std::string GetProviderName() override { @@ -344,8 +349,6 @@ std::vector<uint16_t> preferences_; bssl::UniquePtr<EVP_PKEY> pubkey_; base::ScopedCFTypeRef<SecKeyRef> key_; - - DISALLOW_COPY_AND_ASSIGN(SSLPlatformKeySecKey); }; scoped_refptr<SSLPrivateKey> CreateSSLPrivateKeyForSecKey(
diff --git a/net/ssl/ssl_platform_key_nss.cc b/net/ssl/ssl_platform_key_nss.cc index 2f720ff..637f01f 100644 --- a/net/ssl/ssl_platform_key_nss.cc +++ b/net/ssl/ssl_platform_key_nss.cc
@@ -56,6 +56,10 @@ password_delegate_(std::move(password_delegate)), key_(std::move(key)), supports_pss_(PK11_DoesMechanism(key_->pkcs11Slot, CKM_RSA_PKCS_PSS)) {} + + SSLPlatformKeyNSS(const SSLPlatformKeyNSS&) = delete; + SSLPlatformKeyNSS& operator=(const SSLPlatformKeyNSS&) = delete; + ~SSLPlatformKeyNSS() override = default; std::string GetProviderName() override { @@ -183,8 +187,6 @@ password_delegate_; crypto::ScopedSECKEYPrivateKey key_; bool supports_pss_; - - DISALLOW_COPY_AND_ASSIGN(SSLPlatformKeyNSS); }; } // namespace
diff --git a/net/ssl/ssl_platform_key_util.cc b/net/ssl/ssl_platform_key_util.cc index 2d1a8c3a..7d9d498 100644 --- a/net/ssl/ssl_platform_key_util.cc +++ b/net/ssl/ssl_platform_key_util.cc
@@ -30,6 +30,9 @@ worker_thread_.StartWithOptions(std::move(options)); } + SSLPlatformKeyTaskRunner(const SSLPlatformKeyTaskRunner&) = delete; + SSLPlatformKeyTaskRunner& operator=(const SSLPlatformKeyTaskRunner&) = delete; + ~SSLPlatformKeyTaskRunner() = default; scoped_refptr<base::SingleThreadTaskRunner> task_runner() { @@ -38,8 +41,6 @@ private: base::Thread worker_thread_; - - DISALLOW_COPY_AND_ASSIGN(SSLPlatformKeyTaskRunner); }; base::LazyInstance<SSLPlatformKeyTaskRunner>::Leaky g_platform_key_task_runner =
diff --git a/net/ssl/ssl_platform_key_win.cc b/net/ssl/ssl_platform_key_win.cc index 64b43e6..e33e448 100644 --- a/net/ssl/ssl_platform_key_win.cc +++ b/net/ssl/ssl_platform_key_win.cc
@@ -55,6 +55,9 @@ provider_(std::move(provider)), key_spec_(key_spec) {} + SSLPlatformKeyCAPI(const SSLPlatformKeyCAPI&) = delete; + SSLPlatformKeyCAPI& operator=(const SSLPlatformKeyCAPI&) = delete; + ~SSLPlatformKeyCAPI() override = default; std::string GetProviderName() override { return "CAPI: " + provider_name_; } @@ -149,8 +152,6 @@ std::string provider_name_; crypto::ScopedHCRYPTPROV provider_; DWORD key_spec_; - - DISALLOW_COPY_AND_ASSIGN(SSLPlatformKeyCAPI); }; class ScopedNCRYPT_PROV_HANDLE { @@ -220,6 +221,9 @@ type_(type), max_length_(max_length) {} + SSLPlatformKeyCNG(const SSLPlatformKeyCNG&) = delete; + SSLPlatformKeyCNG& operator=(const SSLPlatformKeyCNG&) = delete; + ~SSLPlatformKeyCNG() override { NCryptFreeObject(key_); } std::string GetProviderName() override { @@ -375,8 +379,6 @@ NCRYPT_KEY_HANDLE key_; int type_; size_t max_length_; - - DISALLOW_COPY_AND_ASSIGN(SSLPlatformKeyCNG); }; } // namespace
diff --git a/net/ssl/test_ssl_private_key.cc b/net/ssl/test_ssl_private_key.cc index 98c8e3f1..336c13b 100644 --- a/net/ssl/test_ssl_private_key.cc +++ b/net/ssl/test_ssl_private_key.cc
@@ -28,6 +28,9 @@ explicit TestSSLPlatformKey(bssl::UniquePtr<EVP_PKEY> key) : key_(std::move(key)) {} + TestSSLPlatformKey(const TestSSLPlatformKey&) = delete; + TestSSLPlatformKey& operator=(const TestSSLPlatformKey&) = delete; + ~TestSSLPlatformKey() override = default; std::string GetProviderName() override { return "EVP_PKEY"; } @@ -68,13 +71,15 @@ private: bssl::UniquePtr<EVP_PKEY> key_; - - DISALLOW_COPY_AND_ASSIGN(TestSSLPlatformKey); }; class FailingSSLPlatformKey : public ThreadedSSLPrivateKey::Delegate { public: FailingSSLPlatformKey() = default; + + FailingSSLPlatformKey(const FailingSSLPlatformKey&) = delete; + FailingSSLPlatformKey& operator=(const FailingSSLPlatformKey&) = delete; + ~FailingSSLPlatformKey() override = default; std::string GetProviderName() override { return "FailingSSLPlatformKey"; } @@ -89,9 +94,6 @@ std::vector<uint8_t>* signature) override { return ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED; } - - private: - DISALLOW_COPY_AND_ASSIGN(FailingSSLPlatformKey); }; } // namespace
diff --git a/net/ssl/threaded_ssl_private_key.h b/net/ssl/threaded_ssl_private_key.h index a769331..4bfa5d63 100644 --- a/net/ssl/threaded_ssl_private_key.h +++ b/net/ssl/threaded_ssl_private_key.h
@@ -33,6 +33,10 @@ class Delegate { public: Delegate() {} + + Delegate(const Delegate&) = delete; + Delegate& operator=(const Delegate&) = delete; + virtual ~Delegate() {} // Returns a human-readable name of the provider that backs this @@ -60,9 +64,6 @@ virtual Error Sign(uint16_t algorithm, base::span<const uint8_t> input, std::vector<uint8_t>* signature) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(Delegate); }; ThreadedSSLPrivateKey(
diff --git a/net/test/embedded_test_server/android/embedded_test_server_android.h b/net/test/embedded_test_server/android/embedded_test_server_android.h index b5d657db..2dbece3 100644 --- a/net/test/embedded_test_server/android/embedded_test_server_android.h +++ b/net/test/embedded_test_server/android/embedded_test_server_android.h
@@ -24,6 +24,11 @@ EmbeddedTestServerAndroid(JNIEnv* env, const base::android::JavaRef<jobject>& obj, jboolean jhttps); + + EmbeddedTestServerAndroid(const EmbeddedTestServerAndroid&) = delete; + EmbeddedTestServerAndroid& operator=(const EmbeddedTestServerAndroid&) = + delete; + ~EmbeddedTestServerAndroid(); void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); @@ -94,8 +99,6 @@ EmbeddedTestServer test_server_; ConnectionListener connection_listener_; - - DISALLOW_COPY_AND_ASSIGN(EmbeddedTestServerAndroid); }; } // namespace test_server
diff --git a/net/test/embedded_test_server/controllable_http_response.cc b/net/test/embedded_test_server/controllable_http_response.cc index a3fd4996..7541b2c 100644 --- a/net/test/embedded_test_server/controllable_http_response.cc +++ b/net/test/embedded_test_server/controllable_http_response.cc
@@ -22,6 +22,10 @@ : controller_(controller), controller_task_runner_(controller_task_runner), http_request_(std::make_unique<HttpRequest>(http_request)) {} + + Interceptor(const Interceptor&) = delete; + Interceptor& operator=(const Interceptor&) = delete; + ~Interceptor() override {} private: @@ -38,8 +42,6 @@ scoped_refptr<base::SingleThreadTaskRunner> controller_task_runner_; std::unique_ptr<HttpRequest> http_request_; - - DISALLOW_COPY_AND_ASSIGN(Interceptor); }; ControllableHttpResponse::ControllableHttpResponse(
diff --git a/net/test/embedded_test_server/controllable_http_response.h b/net/test/embedded_test_server/controllable_http_response.h index c04da5cf..9e8cb0d 100644 --- a/net/test/embedded_test_server/controllable_http_response.h +++ b/net/test/embedded_test_server/controllable_http_response.h
@@ -38,6 +38,10 @@ ControllableHttpResponse(EmbeddedTestServer* embedded_test_server, const std::string& relative_url, bool relative_url_is_prefix = false); + + ControllableHttpResponse(const ControllableHttpResponse&) = delete; + ControllableHttpResponse& operator=(const ControllableHttpResponse&) = delete; + ~ControllableHttpResponse(); // These method are intented to be used in order. @@ -89,8 +93,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<ControllableHttpResponse> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ControllableHttpResponse); }; } // namespace test_server
diff --git a/net/test/embedded_test_server/embedded_test_server_unittest.cc b/net/test/embedded_test_server/embedded_test_server_unittest.cc index e572f629..91edebf 100644 --- a/net/test/embedded_test_server/embedded_test_server_unittest.cc +++ b/net/test/embedded_test_server/embedded_test_server_unittest.cc
@@ -55,6 +55,9 @@ did_get_socket_on_complete_(false), task_runner_(base::ThreadTaskRunnerHandle::Get()) {} + TestConnectionListener(const TestConnectionListener&) = delete; + TestConnectionListener& operator=(const TestConnectionListener&) = delete; + ~TestConnectionListener() override = default; // Get called from the EmbeddedTestServer thread to be notified that @@ -110,8 +113,6 @@ scoped_refptr<base::SingleThreadTaskRunner> task_runner_; mutable base::Lock lock_; - - DISALLOW_COPY_AND_ASSIGN(TestConnectionListener); }; class EmbeddedTestServerTest @@ -430,6 +431,10 @@ class CancelRequestDelegate : public TestDelegate { public: CancelRequestDelegate() { set_on_complete(base::DoNothing()); } + + CancelRequestDelegate(const CancelRequestDelegate&) = delete; + CancelRequestDelegate& operator=(const CancelRequestDelegate&) = delete; + ~CancelRequestDelegate() override = default; void OnResponseStarted(URLRequest* request, int net_error) override { @@ -442,8 +447,6 @@ private: base::RunLoop run_loop_; - - DISALLOW_COPY_AND_ASSIGN(CancelRequestDelegate); }; class InfiniteResponse : public BasicHttpResponse {
diff --git a/net/test/embedded_test_server/http_request.h b/net/test/embedded_test_server/http_request.h index 65b37bb..35a1177 100644 --- a/net/test/embedded_test_server/http_request.h +++ b/net/test/embedded_test_server/http_request.h
@@ -95,6 +95,10 @@ }; HttpRequestParser(); + + HttpRequestParser(const HttpRequestParser&) = delete; + HttpRequestParser& operator=(const HttpRequestParser&) = delete; + ~HttpRequestParser(); // Adds chunk of data into the internal buffer. @@ -135,8 +139,6 @@ size_t declared_content_length_; std::unique_ptr<HttpChunkedDecoder> chunked_decoder_; - - DISALLOW_COPY_AND_ASSIGN(HttpRequestParser); }; } // namespace test_server
diff --git a/net/test/embedded_test_server/http_response.h b/net/test/embedded_test_server/http_response.h index d8a8a28..64b704a 100644 --- a/net/test/embedded_test_server/http_response.h +++ b/net/test/embedded_test_server/http_response.h
@@ -44,6 +44,10 @@ class BasicHttpResponse : public HttpResponse { public: BasicHttpResponse(); + + BasicHttpResponse(const BasicHttpResponse&) = delete; + BasicHttpResponse& operator=(const BasicHttpResponse&) = delete; + ~BasicHttpResponse() override; // The response code. @@ -76,13 +80,15 @@ std::string content_; std::string content_type_; base::StringPairs custom_headers_; - - DISALLOW_COPY_AND_ASSIGN(BasicHttpResponse); }; class DelayedHttpResponse : public BasicHttpResponse { public: DelayedHttpResponse(const base::TimeDelta delay); + + DelayedHttpResponse(const DelayedHttpResponse&) = delete; + DelayedHttpResponse& operator=(const DelayedHttpResponse&) = delete; + ~DelayedHttpResponse() override; // Issues a delayed send to the to the task runner. @@ -92,13 +98,15 @@ private: // The delay time for the response. const base::TimeDelta delay_; - - DISALLOW_COPY_AND_ASSIGN(DelayedHttpResponse); }; class RawHttpResponse : public HttpResponse { public: RawHttpResponse(const std::string& headers, const std::string& contents); + + RawHttpResponse(const RawHttpResponse&) = delete; + RawHttpResponse& operator=(const RawHttpResponse&) = delete; + ~RawHttpResponse() override; void SendResponse(const SendBytesCallback& send, @@ -109,8 +117,6 @@ private: std::string headers_; const std::string contents_; - - DISALLOW_COPY_AND_ASSIGN(RawHttpResponse); }; // "Response" where the server doesn't actually respond until the server is @@ -118,13 +124,14 @@ class HungResponse : public HttpResponse { public: HungResponse() {} + + HungResponse(const HungResponse&) = delete; + HungResponse& operator=(const HungResponse&) = delete; + ~HungResponse() override {} void SendResponse(const SendBytesCallback& send, SendCompleteCallback done) override; - - private: - DISALLOW_COPY_AND_ASSIGN(HungResponse); }; } // namespace test_server
diff --git a/net/test/embedded_test_server/simple_connection_listener.h b/net/test/embedded_test_server/simple_connection_listener.h index ac3324589..d3eb785d 100644 --- a/net/test/embedded_test_server/simple_connection_listener.h +++ b/net/test/embedded_test_server/simple_connection_listener.h
@@ -33,6 +33,9 @@ int expected_connections, AllowAdditionalConnections allow_additional_connections); + SimpleConnectionListener(const SimpleConnectionListener&) = delete; + SimpleConnectionListener& operator=(const SimpleConnectionListener&) = delete; + // Must be torn down only after the EmbeddedTestServer it's attached to is // shut down. ~SimpleConnectionListener() override; @@ -53,8 +56,6 @@ const AllowAdditionalConnections allow_additional_connections_; base::RunLoop run_loop_; - - DISALLOW_COPY_AND_ASSIGN(SimpleConnectionListener); }; } // namespace test_server
diff --git a/net/test/scoped_disable_exit_on_dfatal.h b/net/test/scoped_disable_exit_on_dfatal.h index 5bb7643..47866752 100644 --- a/net/test/scoped_disable_exit_on_dfatal.h +++ b/net/test/scoped_disable_exit_on_dfatal.h
@@ -20,6 +20,11 @@ class ScopedDisableExitOnDFatal { public: ScopedDisableExitOnDFatal(); + + ScopedDisableExitOnDFatal(const ScopedDisableExitOnDFatal&) = delete; + ScopedDisableExitOnDFatal& operator=(const ScopedDisableExitOnDFatal&) = + delete; + ~ScopedDisableExitOnDFatal(); private: @@ -31,8 +36,6 @@ const base::StringPiece stack_trace); logging::ScopedLogAssertHandler assert_handler_; - - DISALLOW_COPY_AND_ASSIGN(ScopedDisableExitOnDFatal); }; } // namespace test
diff --git a/net/test/spawned_test_server/local_test_server.h b/net/test/spawned_test_server/local_test_server.h index b76f90b6..d4594de43 100644 --- a/net/test/spawned_test_server/local_test_server.h +++ b/net/test/spawned_test_server/local_test_server.h
@@ -39,6 +39,9 @@ const SSLOptions& ssl_options, const base::FilePath& document_root); + LocalTestServer(const LocalTestServer&) = delete; + LocalTestServer& operator=(const LocalTestServer&) = delete; + ~LocalTestServer() override; // BaseTestServer overrides. @@ -93,8 +96,6 @@ // The file descriptor the child writes to when it starts. base::ScopedFD child_fd_; #endif - - DISALLOW_COPY_AND_ASSIGN(LocalTestServer); }; } // namespace net
diff --git a/net/test/spawned_test_server/remote_test_server.h b/net/test/spawned_test_server/remote_test_server.h index ca6588923..e37afa0 100644 --- a/net/test/spawned_test_server/remote_test_server.h +++ b/net/test/spawned_test_server/remote_test_server.h
@@ -74,6 +74,9 @@ const SSLOptions& ssl_options, const base::FilePath& document_root); + RemoteTestServer(const RemoteTestServer&) = delete; + RemoteTestServer& operator=(const RemoteTestServer&) = delete; + ~RemoteTestServer() override; // BaseTestServer overrides. @@ -107,8 +110,6 @@ // Server port. Non-zero when the server is running. int remote_port_ = 0; - - DISALLOW_COPY_AND_ASSIGN(RemoteTestServer); }; } // namespace net
diff --git a/net/test/spawned_test_server/remote_test_server_spawner_request.cc b/net/test/spawned_test_server/remote_test_server_spawner_request.cc index bbd0433..7fee89d0 100644 --- a/net/test/spawned_test_server/remote_test_server_spawner_request.cc +++ b/net/test/spawned_test_server/remote_test_server_spawner_request.cc
@@ -32,6 +32,10 @@ class RemoteTestServerSpawnerRequest::Core : public URLRequest::Delegate { public: Core(); + + Core(const Core&) = delete; + Core& operator=(const Core&) = delete; + ~Core() override; void SendRequest(const GURL& url, const std::string& post_data); @@ -62,8 +66,6 @@ scoped_refptr<IOBuffer> read_buffer_; THREAD_CHECKER(thread_checker_); - - DISALLOW_COPY_AND_ASSIGN(Core); }; RemoteTestServerSpawnerRequest::Core::Core()
diff --git a/net/test/spawned_test_server/remote_test_server_spawner_request.h b/net/test/spawned_test_server/remote_test_server_spawner_request.h index 7abc4f5..bf0a29a 100644 --- a/net/test/spawned_test_server/remote_test_server_spawner_request.h +++ b/net/test/spawned_test_server/remote_test_server_spawner_request.h
@@ -33,6 +33,12 @@ scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, const GURL& url, const std::string& post_data); + + RemoteTestServerSpawnerRequest(const RemoteTestServerSpawnerRequest&) = + delete; + RemoteTestServerSpawnerRequest& operator=( + const RemoteTestServerSpawnerRequest&) = delete; + ~RemoteTestServerSpawnerRequest(); // Blocks until request is finished. If |response| isn't nullptr then server @@ -55,8 +61,6 @@ std::unique_ptr<ScopedPortException> allowed_port_; THREAD_CHECKER(thread_checker_); - - DISALLOW_COPY_AND_ASSIGN(RemoteTestServerSpawnerRequest); }; } // namespace net
diff --git a/net/test/url_request/ssl_certificate_error_job.cc b/net/test/url_request/ssl_certificate_error_job.cc index ebe76f3..85c7ac6 100644 --- a/net/test/url_request/ssl_certificate_error_job.cc +++ b/net/test/url_request/ssl_certificate_error_job.cc
@@ -24,6 +24,10 @@ class MockJobInterceptor : public URLRequestInterceptor { public: MockJobInterceptor() = default; + + MockJobInterceptor(const MockJobInterceptor&) = delete; + MockJobInterceptor& operator=(const MockJobInterceptor&) = delete; + ~MockJobInterceptor() override = default; // URLRequestJobFactory::ProtocolHandler implementation: @@ -31,9 +35,6 @@ URLRequest* request) const override { return std::make_unique<SSLCertificateErrorJob>(request); } - - private: - DISALLOW_COPY_AND_ASSIGN(MockJobInterceptor); }; } // namespace
diff --git a/net/test/url_request/ssl_certificate_error_job.h b/net/test/url_request/ssl_certificate_error_job.h index c3af368..9b02e4d 100644 --- a/net/test/url_request/ssl_certificate_error_job.h +++ b/net/test/url_request/ssl_certificate_error_job.h
@@ -19,6 +19,9 @@ public: explicit SSLCertificateErrorJob(URLRequest* request); + SSLCertificateErrorJob(const SSLCertificateErrorJob&) = delete; + SSLCertificateErrorJob& operator=(const SSLCertificateErrorJob&) = delete; + ~SSLCertificateErrorJob() override; // URLRequestJob implementation: @@ -33,8 +36,6 @@ void NotifyError(); base::WeakPtrFactory<SSLCertificateErrorJob> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SSLCertificateErrorJob); }; } // namespace net
diff --git a/net/test/url_request/url_request_failed_job.cc b/net/test/url_request/url_request_failed_job.cc index d9f77cc..8ef1def5 100644 --- a/net/test/url_request/url_request_failed_job.cc +++ b/net/test/url_request/url_request_failed_job.cc
@@ -38,6 +38,10 @@ class MockJobInterceptor : public URLRequestInterceptor { public: MockJobInterceptor() = default; + + MockJobInterceptor(const MockJobInterceptor&) = delete; + MockJobInterceptor& operator=(const MockJobInterceptor&) = delete; + ~MockJobInterceptor() override = default; // URLRequestJobFactory::ProtocolHandler implementation: @@ -58,9 +62,6 @@ } return std::make_unique<URLRequestFailedJob>(request, phase, net_error); } - - private: - DISALLOW_COPY_AND_ASSIGN(MockJobInterceptor); }; GURL GetMockUrl(const std::string& scheme,
diff --git a/net/test/url_request/url_request_failed_job.h b/net/test/url_request/url_request_failed_job.h index 3b14f9c1..fb6fceff0 100644 --- a/net/test/url_request/url_request_failed_job.h +++ b/net/test/url_request/url_request_failed_job.h
@@ -36,6 +36,9 @@ URLRequestFailedJob(URLRequest* request, int net_error); + URLRequestFailedJob(const URLRequestFailedJob&) = delete; + URLRequestFailedJob& operator=(const URLRequestFailedJob&) = delete; + ~URLRequestFailedJob() override; // URLRequestJob implementation: @@ -81,8 +84,6 @@ int64_t total_received_bytes_; base::WeakPtrFactory<URLRequestFailedJob> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(URLRequestFailedJob); }; } // namespace net
diff --git a/net/test/url_request/url_request_hanging_read_job.cc b/net/test/url_request/url_request_hanging_read_job.cc index 4089df8d..60008a0d 100644 --- a/net/test/url_request/url_request_hanging_read_job.cc +++ b/net/test/url_request/url_request_hanging_read_job.cc
@@ -28,6 +28,10 @@ class MockJobInterceptor : public URLRequestInterceptor { public: MockJobInterceptor() = default; + + MockJobInterceptor(const MockJobInterceptor&) = delete; + MockJobInterceptor& operator=(const MockJobInterceptor&) = delete; + ~MockJobInterceptor() override = default; // URLRequestInterceptor implementation @@ -35,9 +39,6 @@ URLRequest* request) const override { return std::make_unique<URLRequestHangingReadJob>(request); } - - private: - DISALLOW_COPY_AND_ASSIGN(MockJobInterceptor); }; } // namespace
diff --git a/net/test/url_request/url_request_hanging_read_job.h b/net/test/url_request/url_request_hanging_read_job.h index d91580d..4448b861 100644 --- a/net/test/url_request/url_request_hanging_read_job.h +++ b/net/test/url_request/url_request_hanging_read_job.h
@@ -17,6 +17,10 @@ class URLRequestHangingReadJob : public URLRequestJob { public: explicit URLRequestHangingReadJob(URLRequest* request); + + URLRequestHangingReadJob(const URLRequestHangingReadJob&) = delete; + URLRequestHangingReadJob& operator=(const URLRequestHangingReadJob&) = delete; + ~URLRequestHangingReadJob() override; void Start() override; @@ -36,8 +40,6 @@ const int content_length_; base::WeakPtrFactory<URLRequestHangingReadJob> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(URLRequestHangingReadJob); }; } // namespace net
diff --git a/net/test/url_request/url_request_mock_data_job.cc b/net/test/url_request/url_request_mock_data_job.cc index aec6c61a..2dfabdb 100644 --- a/net/test/url_request/url_request_mock_data_job.cc +++ b/net/test/url_request/url_request_mock_data_job.cc
@@ -78,6 +78,10 @@ class MockJobInterceptor : public URLRequestInterceptor { public: MockJobInterceptor() = default; + + MockJobInterceptor(const MockJobInterceptor&) = delete; + MockJobInterceptor& operator=(const MockJobInterceptor&) = delete; + ~MockJobInterceptor() override = default; // URLRequestInterceptor implementation @@ -88,9 +92,6 @@ GetRepeatCountFromRequest(*request), GetRequestClientCertificate(*request)); } - - private: - DISALLOW_COPY_AND_ASSIGN(MockJobInterceptor); }; } // namespace
diff --git a/net/test/url_request/url_request_mock_http_job.cc b/net/test/url_request/url_request_mock_http_job.cc index 8533009b..dcd9fcfb 100644 --- a/net/test/url_request/url_request_mock_http_job.cc +++ b/net/test/url_request/url_request_mock_http_job.cc
@@ -38,6 +38,10 @@ bool map_all_requests_to_base_path) : base_path_(base_path), map_all_requests_to_base_path_(map_all_requests_to_base_path) {} + + MockJobInterceptor(const MockJobInterceptor&) = delete; + MockJobInterceptor& operator=(const MockJobInterceptor&) = delete; + ~MockJobInterceptor() override = default; // URLRequestJobFactory::ProtocolHandler implementation @@ -63,8 +67,6 @@ const base::FilePath base_path_; const bool map_all_requests_to_base_path_; - - DISALLOW_COPY_AND_ASSIGN(MockJobInterceptor); }; std::string DoFileIO(const base::FilePath& file_path) {
diff --git a/net/test/url_request/url_request_mock_http_job.h b/net/test/url_request/url_request_mock_http_job.h index 2c053792..b31d86c 100644 --- a/net/test/url_request/url_request_mock_http_job.h +++ b/net/test/url_request/url_request_mock_http_job.h
@@ -31,6 +31,10 @@ // Note that all file I/O is done using ThreadPool. URLRequestMockHTTPJob(URLRequest* request, const base::FilePath& file_path); + + URLRequestMockHTTPJob(const URLRequestMockHTTPJob&) = delete; + URLRequestMockHTTPJob& operator=(const URLRequestMockHTTPJob&) = delete; + ~URLRequestMockHTTPJob() override; // URLRequestJob overrides. @@ -75,8 +79,6 @@ int64_t total_received_bytes_ = 0; base::WeakPtrFactory<URLRequestMockHTTPJob> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(URLRequestMockHTTPJob); }; } // namespace net
diff --git a/net/tools/content_decoder_tool/content_decoder_tool.cc b/net/tools/content_decoder_tool/content_decoder_tool.cc index b08cae1..ee265b6 100644 --- a/net/tools/content_decoder_tool/content_decoder_tool.cc +++ b/net/tools/content_decoder_tool/content_decoder_tool.cc
@@ -31,6 +31,10 @@ public: explicit StdinSourceStream(std::istream* input_stream) : SourceStream(SourceStream::TYPE_NONE), input_stream_(input_stream) {} + + StdinSourceStream(const StdinSourceStream&) = delete; + StdinSourceStream& operator=(const StdinSourceStream&) = delete; + ~StdinSourceStream() override = default; // SourceStream implementation. @@ -53,8 +57,6 @@ private: std::istream* input_stream_; - - DISALLOW_COPY_AND_ASSIGN(StdinSourceStream); }; } // namespace
diff --git a/net/tools/huffman_trie/bit_writer.h b/net/tools/huffman_trie/bit_writer.h index d9bfc2f..a701461 100644 --- a/net/tools/huffman_trie/bit_writer.h +++ b/net/tools/huffman_trie/bit_writer.h
@@ -21,6 +21,10 @@ class BitWriter { public: BitWriter(); + + BitWriter(const BitWriter&) = delete; + BitWriter& operator=(const BitWriter&) = delete; + ~BitWriter(); // Appends |bit| to the end of the buffer. @@ -51,8 +55,6 @@ uint32_t position_ = 0; std::vector<uint8_t> bytes_; - - DISALLOW_COPY_AND_ASSIGN(BitWriter); }; } // namespace huffman_trie
diff --git a/net/tools/huffman_trie/trie/trie_bit_buffer.h b/net/tools/huffman_trie/trie/trie_bit_buffer.h index 434f7d8..879d3ed0 100644 --- a/net/tools/huffman_trie/trie/trie_bit_buffer.h +++ b/net/tools/huffman_trie/trie/trie_bit_buffer.h
@@ -25,6 +25,10 @@ class TrieBitBuffer { public: TrieBitBuffer(); + + TrieBitBuffer(const TrieBitBuffer&) = delete; + TrieBitBuffer& operator=(const TrieBitBuffer&) = delete; + ~TrieBitBuffer(); // Writes |bit| to the buffer. @@ -81,8 +85,6 @@ uint32_t used_ = 0; std::vector<BitsOrPosition> elements_; - - DISALLOW_COPY_AND_ASSIGN(TrieBitBuffer); }; } // namespace huffman_trie
diff --git a/net/tools/net_watcher/net_watcher.cc b/net/tools/net_watcher/net_watcher.cc index 6cb48ea..978f152d 100644 --- a/net/tools/net_watcher/net_watcher.cc +++ b/net/tools/net_watcher/net_watcher.cc
@@ -112,6 +112,9 @@ public: NetWatcher() = default; + NetWatcher(const NetWatcher&) = delete; + NetWatcher& operator=(const NetWatcher&) = delete; + ~NetWatcher() override = default; // net::NetworkChangeNotifier::IPAddressObserver implementation. @@ -141,9 +144,6 @@ LOG(INFO) << "OnProxyConfigChanged(" << ProxyConfigToString(config.value()) << ", " << ConfigAvailabilityToString(availability) << ")"; } - - private: - DISALLOW_COPY_AND_ASSIGN(NetWatcher); }; } // namespace
diff --git a/net/tools/quic/quic_client_message_loop_network_helper.h b/net/tools/quic/quic_client_message_loop_network_helper.h index a0ba9ad..a13206f2 100644 --- a/net/tools/quic/quic_client_message_loop_network_helper.h +++ b/net/tools/quic/quic_client_message_loop_network_helper.h
@@ -38,6 +38,11 @@ QuicClientMessageLooplNetworkHelper(quic::QuicChromiumClock* clock, quic::QuicClientBase* client); + QuicClientMessageLooplNetworkHelper( + const QuicClientMessageLooplNetworkHelper&) = delete; + QuicClientMessageLooplNetworkHelper& operator=( + const QuicClientMessageLooplNetworkHelper&) = delete; + ~QuicClientMessageLooplNetworkHelper() override; // QuicChromiumPacketReader::Visitor @@ -70,8 +75,6 @@ quic::QuicChromiumClock* clock_; quic::QuicClientBase* client_; - - DISALLOW_COPY_AND_ASSIGN(QuicClientMessageLooplNetworkHelper); }; } // namespace net
diff --git a/net/tools/quic/quic_http_proxy_backend.h b/net/tools/quic/quic_http_proxy_backend.h index 7739b9d..172adc8 100644 --- a/net/tools/quic/quic_http_proxy_backend.h +++ b/net/tools/quic/quic_http_proxy_backend.h
@@ -51,6 +51,10 @@ class QuicHttpProxyBackend : public quic::QuicSimpleServerBackend { public: explicit QuicHttpProxyBackend(); + + QuicHttpProxyBackend(const QuicHttpProxyBackend&) = delete; + QuicHttpProxyBackend& operator=(const QuicHttpProxyBackend&) = delete; + ~QuicHttpProxyBackend() override; // Must be called from the backend thread of the quic proxy @@ -100,8 +104,6 @@ // Protects against concurrent access from quic (main) and proxy // threads for adding and clearing a backend request handler base::Lock backend_stream_mutex_; - - DISALLOW_COPY_AND_ASSIGN(QuicHttpProxyBackend); }; } // namespace net
diff --git a/net/tools/quic/quic_http_proxy_backend_stream.h b/net/tools/quic/quic_http_proxy_backend_stream.h index 67c7aafb..13b5b95 100644 --- a/net/tools/quic/quic_http_proxy_backend_stream.h +++ b/net/tools/quic/quic_http_proxy_backend_stream.h
@@ -60,6 +60,11 @@ class QuicHttpProxyBackendStream : public net::URLRequest::Delegate { public: explicit QuicHttpProxyBackendStream(QuicHttpProxyBackend* context); + + QuicHttpProxyBackendStream(const QuicHttpProxyBackendStream&) = delete; + QuicHttpProxyBackendStream& operator=(const QuicHttpProxyBackendStream&) = + delete; + ~QuicHttpProxyBackendStream() override; static const std::set<std::string> kHopHeaders; @@ -157,8 +162,6 @@ std::unique_ptr<quic::QuicBackendResponse> quic_response_; base::WeakPtrFactory<QuicHttpProxyBackendStream> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(QuicHttpProxyBackendStream); }; } // namespace net
diff --git a/net/tools/quic/quic_simple_client.h b/net/tools/quic/quic_simple_client.h index 5e9d4d1f..88c364eb 100644 --- a/net/tools/quic/quic_simple_client.h +++ b/net/tools/quic/quic_simple_client.h
@@ -43,6 +43,9 @@ const quic::QuicConfig& config, std::unique_ptr<quic::ProofVerifier> proof_verifier); + QuicSimpleClient(const QuicSimpleClient&) = delete; + QuicSimpleClient& operator=(const QuicSimpleClient&) = delete; + ~QuicSimpleClient() override; std::unique_ptr<quic::QuicSession> CreateQuicClientSession( @@ -62,8 +65,6 @@ bool initialized_; base::WeakPtrFactory<QuicSimpleClient> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(QuicSimpleClient); }; } // namespace net
diff --git a/net/tools/quic/quic_simple_server.h b/net/tools/quic/quic_simple_server.h index ae8b0f7..2d843db4 100644 --- a/net/tools/quic/quic_simple_server.h +++ b/net/tools/quic/quic_simple_server.h
@@ -45,6 +45,9 @@ const quic::ParsedQuicVersionVector& supported_versions, quic::QuicSimpleServerBackend* quic_simple_server_backend); + QuicSimpleServer(const QuicSimpleServer&) = delete; + QuicSimpleServer& operator=(const QuicSimpleServer&) = delete; + ~QuicSimpleServer() override; // QuicSpdyServerBase methods: @@ -122,8 +125,6 @@ quic::QuicSimpleServerBackend* quic_simple_server_backend_; base::WeakPtrFactory<QuicSimpleServer> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(QuicSimpleServer); }; } // namespace net
diff --git a/net/tools/quic/quic_simple_server_packet_writer.h b/net/tools/quic/quic_simple_server_packet_writer.h index 0b34c08..6d343255 100644 --- a/net/tools/quic/quic_simple_server_packet_writer.h +++ b/net/tools/quic/quic_simple_server_packet_writer.h
@@ -31,6 +31,11 @@ public: QuicSimpleServerPacketWriter(UDPServerSocket* socket, quic::QuicDispatcher* dispatcher); + + QuicSimpleServerPacketWriter(const QuicSimpleServerPacketWriter&) = delete; + QuicSimpleServerPacketWriter& operator=(const QuicSimpleServerPacketWriter&) = + delete; + ~QuicSimpleServerPacketWriter() override; quic::WriteResult WritePacket(const char* buffer, @@ -63,8 +68,6 @@ bool write_blocked_; base::WeakPtrFactory<QuicSimpleServerPacketWriter> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(QuicSimpleServerPacketWriter); }; } // namespace net
diff --git a/net/tools/quic/synchronous_host_resolver.cc b/net/tools/quic/synchronous_host_resolver.cc index 26e9845..54a0d61 100644 --- a/net/tools/quic/synchronous_host_resolver.cc +++ b/net/tools/quic/synchronous_host_resolver.cc
@@ -35,6 +35,9 @@ public: ResolverThread(); + ResolverThread(const ResolverThread&) = delete; + ResolverThread& operator=(const ResolverThread&) = delete; + ~ResolverThread() override; // Called on the main thread. @@ -49,8 +52,6 @@ AddressList* addresses_; std::string host_; int rv_; - - DISALLOW_COPY_AND_ASSIGN(ResolverThread); }; ResolverThread::ResolverThread()
diff --git a/net/tools/transport_security_state_generator/pinset.h b/net/tools/transport_security_state_generator/pinset.h index b8efca66..2b0778ae 100644 --- a/net/tools/transport_security_state_generator/pinset.h +++ b/net/tools/transport_security_state_generator/pinset.h
@@ -20,6 +20,10 @@ class Pinset { public: Pinset(std::string name, std::string report_uri); + + Pinset(const Pinset&) = delete; + Pinset& operator=(const Pinset&) = delete; + ~Pinset(); const std::string& name() const { return name_; } @@ -47,8 +51,6 @@ // These vectors contain names rather than actual hashes. std::vector<std::string> static_spki_hashes_; std::vector<std::string> bad_static_spki_hashes_; - - DISALLOW_COPY_AND_ASSIGN(Pinset); }; } // namespace transport_security_state
diff --git a/net/tools/transport_security_state_generator/pinsets.h b/net/tools/transport_security_state_generator/pinsets.h index 76790307..ac8f8b0 100644 --- a/net/tools/transport_security_state_generator/pinsets.h +++ b/net/tools/transport_security_state_generator/pinsets.h
@@ -27,6 +27,10 @@ class Pinsets { public: Pinsets(); + + Pinsets(const Pinsets&) = delete; + Pinsets& operator=(const Pinsets&) = delete; + ~Pinsets(); void RegisterSPKIHash(base::StringPiece name, const SPKIHash& hash); @@ -44,8 +48,6 @@ // Contains all pinsets in the input JSON file. PinsetMap pinsets_; - - DISALLOW_COPY_AND_ASSIGN(Pinsets); }; } // namespace transport_security_state
diff --git a/net/url_request/report_sender.h b/net/url_request/report_sender.h index 2400db5..484012b 100644 --- a/net/url_request/report_sender.h +++ b/net/url_request/report_sender.h
@@ -46,6 +46,9 @@ explicit ReportSender(URLRequestContext* request_context, net::NetworkTrafficAnnotationTag traffic_annotation); + ReportSender(const ReportSender&) = delete; + ReportSender& operator=(const ReportSender&) = delete; + ~ReportSender() override; // TransportSecurityState::ReportSenderInterface implementation. @@ -64,8 +67,6 @@ net::URLRequestContext* const request_context_; std::map<URLRequest*, std::unique_ptr<URLRequest>> inflight_requests_; const net::NetworkTrafficAnnotationTag traffic_annotation_; - - DISALLOW_COPY_AND_ASSIGN(ReportSender); }; } // namespace net
diff --git a/net/url_request/report_sender_unittest.cc b/net/url_request/report_sender_unittest.cc index 4dee747..9523010 100644 --- a/net/url_request/report_sender_unittest.cc +++ b/net/url_request/report_sender_unittest.cc
@@ -82,6 +82,10 @@ class MockServerErrorJob : public URLRequestJob { public: explicit MockServerErrorJob(URLRequest* request) : URLRequestJob(request) {} + + MockServerErrorJob(const MockServerErrorJob&) = delete; + MockServerErrorJob& operator=(const MockServerErrorJob&) = delete; + ~MockServerErrorJob() override = default; protected: @@ -92,23 +96,22 @@ "Content-Length: 0\n"); } void Start() override { NotifyHeadersComplete(); } - - private: - DISALLOW_COPY_AND_ASSIGN(MockServerErrorJob); }; class MockServerErrorJobInterceptor : public URLRequestInterceptor { public: MockServerErrorJobInterceptor() = default; + + MockServerErrorJobInterceptor(const MockServerErrorJobInterceptor&) = delete; + MockServerErrorJobInterceptor& operator=( + const MockServerErrorJobInterceptor&) = delete; + ~MockServerErrorJobInterceptor() override = default; std::unique_ptr<URLRequestJob> MaybeInterceptRequest( URLRequest* request) const override { return std::make_unique<MockServerErrorJob>(request); } - - private: - DISALLOW_COPY_AND_ASSIGN(MockServerErrorJobInterceptor); }; // A network delegate that lets tests check that a report
diff --git a/net/url_request/static_http_user_agent_settings.h b/net/url_request/static_http_user_agent_settings.h index 0ccfe13..ab97cbf 100644 --- a/net/url_request/static_http_user_agent_settings.h +++ b/net/url_request/static_http_user_agent_settings.h
@@ -20,6 +20,11 @@ public: StaticHttpUserAgentSettings(const std::string& accept_language, const std::string& user_agent); + + StaticHttpUserAgentSettings(const StaticHttpUserAgentSettings&) = delete; + StaticHttpUserAgentSettings& operator=(const StaticHttpUserAgentSettings&) = + delete; + ~StaticHttpUserAgentSettings() override; void set_accept_language(const std::string& new_accept_language) { @@ -33,8 +38,6 @@ private: std::string accept_language_; const std::string user_agent_; - - DISALLOW_COPY_AND_ASSIGN(StaticHttpUserAgentSettings); }; } // namespace net
diff --git a/net/url_request/test_url_fetcher_factory.h b/net/url_request/test_url_fetcher_factory.h index 44a48108..2c213962 100644 --- a/net/url_request/test_url_fetcher_factory.h +++ b/net/url_request/test_url_fetcher_factory.h
@@ -37,12 +37,14 @@ class ScopedURLFetcherFactory { public: explicit ScopedURLFetcherFactory(URLFetcherFactory* factory); + + ScopedURLFetcherFactory(const ScopedURLFetcherFactory&) = delete; + ScopedURLFetcherFactory& operator=(const ScopedURLFetcherFactory&) = delete; + virtual ~ScopedURLFetcherFactory(); private: THREAD_CHECKER(thread_checker_); - - DISALLOW_COPY_AND_ASSIGN(ScopedURLFetcherFactory); }; // TestURLFetcher and TestURLFetcherFactory are used for testing consumers of @@ -92,6 +94,10 @@ TestURLFetcher(int id, const GURL& url, URLFetcherDelegate* d); + + TestURLFetcher(const TestURLFetcher&) = delete; + TestURLFetcher& operator=(const TestURLFetcher&) = delete; + ~TestURLFetcher() override; // URLFetcher implementation @@ -236,8 +242,6 @@ int fake_max_retries_; base::TimeDelta fake_backoff_delay_; std::unique_ptr<URLFetcherResponseWriter> response_writer_; - - DISALLOW_COPY_AND_ASSIGN(TestURLFetcher); }; // The FakeURLFetcher and FakeURLFetcherFactory classes are similar to the @@ -276,6 +280,9 @@ const GURL& GetURL() const override; + FakeURLFetcher(const FakeURLFetcher&) = delete; + FakeURLFetcher& operator=(const FakeURLFetcher&) = delete; + ~FakeURLFetcher() override; private: @@ -285,8 +292,6 @@ int64_t response_bytes_; base::WeakPtrFactory<FakeURLFetcher> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeURLFetcher); }; // FakeURLFetcherFactory is a factory for FakeURLFetcher objects. When @@ -370,6 +375,9 @@ FakeURLFetcherFactory(URLFetcherFactory* default_factory, const FakeURLFetcherCreator& creator); + FakeURLFetcherFactory(const FakeURLFetcherFactory&) = delete; + FakeURLFetcherFactory& operator=(const FakeURLFetcherFactory&) = delete; + ~FakeURLFetcherFactory() override; // If no fake response is set for the given URL this method will delegate the @@ -417,7 +425,6 @@ const std::string& response_data, HttpStatusCode response_code, Error error); - DISALLOW_COPY_AND_ASSIGN(FakeURLFetcherFactory); }; } // namespace net
diff --git a/net/url_request/url_fetcher_core.h b/net/url_request/url_fetcher_core.h index 45804271..c852c75 100644 --- a/net/url_request/url_fetcher_core.h +++ b/net/url_request/url_fetcher_core.h
@@ -164,6 +164,10 @@ class Registry { public: Registry(); + + Registry(const Registry&) = delete; + Registry& operator=(const Registry&) = delete; + ~Registry(); void AddURLFetcherCore(URLFetcherCore* core); @@ -177,8 +181,6 @@ private: std::set<URLFetcherCore*> fetchers_; - - DISALLOW_COPY_AND_ASSIGN(Registry); }; ~URLFetcherCore() override;
diff --git a/net/url_request/url_fetcher_impl.h b/net/url_request/url_fetcher_impl.h index 15bf017..c199509 100644 --- a/net/url_request/url_fetcher_impl.h +++ b/net/url_request/url_fetcher_impl.h
@@ -33,6 +33,9 @@ class NET_EXPORT_PRIVATE URLFetcherImpl : public URLFetcher { public: + URLFetcherImpl(const URLFetcherImpl&) = delete; + URLFetcherImpl& operator=(const URLFetcherImpl&) = delete; + ~URLFetcherImpl() override; // URLFetcher implementation: @@ -131,8 +134,6 @@ static int GetNumFetcherCores(); const scoped_refptr<URLFetcherCore> core_; - - DISALLOW_COPY_AND_ASSIGN(URLFetcherImpl); }; } // namespace net
diff --git a/net/url_request/url_fetcher_impl_unittest.cc b/net/url_request/url_fetcher_impl_unittest.cc index 976a9ed3..3056789 100644 --- a/net/url_request/url_fetcher_impl_unittest.cc +++ b/net/url_request/url_fetcher_impl_unittest.cc
@@ -947,6 +947,11 @@ public: CheckUploadProgressDelegate() : chunk_(1 << 16, 'a'), num_chunks_appended_(0), last_seen_progress_(0) {} + + CheckUploadProgressDelegate(const CheckUploadProgressDelegate&) = delete; + CheckUploadProgressDelegate& operator=(const CheckUploadProgressDelegate&) = + delete; + ~CheckUploadProgressDelegate() override = default; void OnURLFetchUploadProgress(const URLFetcher* source, @@ -981,8 +986,6 @@ int64_t num_chunks_appended_; int64_t last_seen_progress_; - - DISALLOW_COPY_AND_ASSIGN(CheckUploadProgressDelegate); }; TEST_F(URLFetcherTest, UploadProgress) { @@ -1014,6 +1017,11 @@ public: CheckDownloadProgressDelegate(int64_t file_size) : file_size_(file_size), last_seen_progress_(0) {} + + CheckDownloadProgressDelegate(const CheckDownloadProgressDelegate&) = delete; + CheckDownloadProgressDelegate& operator=( + const CheckDownloadProgressDelegate&) = delete; + ~CheckDownloadProgressDelegate() override = default; void OnURLFetchDownloadProgress(const URLFetcher* source, @@ -1032,8 +1040,6 @@ private: int64_t file_size_; int64_t last_seen_progress_; - - DISALLOW_COPY_AND_ASSIGN(CheckDownloadProgressDelegate); }; TEST_F(URLFetcherTest, DownloadProgress) { @@ -1065,6 +1071,12 @@ class CancelOnUploadProgressDelegate : public WaitingURLFetcherDelegate { public: CancelOnUploadProgressDelegate() = default; + + CancelOnUploadProgressDelegate(const CancelOnUploadProgressDelegate&) = + delete; + CancelOnUploadProgressDelegate& operator=( + const CancelOnUploadProgressDelegate&) = delete; + ~CancelOnUploadProgressDelegate() override = default; void OnURLFetchUploadProgress(const URLFetcher* source, @@ -1072,9 +1084,6 @@ int64_t total) override { CancelFetch(); } - - private: - DISALLOW_COPY_AND_ASSIGN(CancelOnUploadProgressDelegate); }; // Check that a fetch can be safely cancelled/deleted during an upload progress @@ -1102,6 +1111,12 @@ class CancelOnDownloadProgressDelegate : public WaitingURLFetcherDelegate { public: CancelOnDownloadProgressDelegate() = default; + + CancelOnDownloadProgressDelegate(const CancelOnDownloadProgressDelegate&) = + delete; + CancelOnDownloadProgressDelegate& operator=( + const CancelOnDownloadProgressDelegate&) = delete; + ~CancelOnDownloadProgressDelegate() override = default; void OnURLFetchDownloadProgress(const URLFetcher* source, @@ -1110,9 +1125,6 @@ int64_t current_network_bytes) override { CancelFetch(); } - - private: - DISALLOW_COPY_AND_ASSIGN(CancelOnDownloadProgressDelegate); }; // Check that a fetch can be safely cancelled/deleted during a download progress @@ -1419,6 +1431,9 @@ : first_request_complete_(false), second_request_context_getter_(second_request_context_getter) {} + ReuseFetcherDelegate(const ReuseFetcherDelegate&) = delete; + ReuseFetcherDelegate& operator=(const ReuseFetcherDelegate&) = delete; + ~ReuseFetcherDelegate() override = default; void OnURLFetchComplete(const URLFetcher* source) override { @@ -1443,8 +1458,6 @@ private: bool first_request_complete_; scoped_refptr<URLRequestContextGetter> second_request_context_getter_; - - DISALLOW_COPY_AND_ASSIGN(ReuseFetcherDelegate); }; TEST_F(URLFetcherTest, ReuseFetcherForSameURL) {
diff --git a/net/url_request/url_fetcher_response_writer.h b/net/url_request/url_fetcher_response_writer.h index 202cf63..c82ca68 100644 --- a/net/url_request/url_fetcher_response_writer.h +++ b/net/url_request/url_fetcher_response_writer.h
@@ -69,6 +69,10 @@ class NET_EXPORT URLFetcherStringWriter : public URLFetcherResponseWriter { public: URLFetcherStringWriter(); + + URLFetcherStringWriter(const URLFetcherStringWriter&) = delete; + URLFetcherStringWriter& operator=(const URLFetcherStringWriter&) = delete; + ~URLFetcherStringWriter() override; const std::string& data() const { return data_; } @@ -83,8 +87,6 @@ private: std::string data_; - - DISALLOW_COPY_AND_ASSIGN(URLFetcherStringWriter); }; // URLFetcherResponseWriter implementation for files. @@ -97,6 +99,10 @@ URLFetcherFileWriter( scoped_refptr<base::SequencedTaskRunner> file_task_runner, const base::FilePath& file_path); + + URLFetcherFileWriter(const URLFetcherFileWriter&) = delete; + URLFetcherFileWriter& operator=(const URLFetcherFileWriter&) = delete; + ~URLFetcherFileWriter() override; const base::FilePath& file_path() const { return file_path_; } @@ -142,8 +148,6 @@ CompletionOnceCallback callback_; base::WeakPtrFactory<URLFetcherFileWriter> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(URLFetcherFileWriter); }; } // namespace net
diff --git a/net/url_request/url_request_context.h b/net/url_request/url_request_context.h index 94f648b..472ab4d 100644 --- a/net/url_request/url_request_context.h +++ b/net/url_request/url_request_context.h
@@ -64,6 +64,10 @@ class NET_EXPORT URLRequestContext { public: URLRequestContext(); + + URLRequestContext(const URLRequestContext&) = delete; + URLRequestContext& operator=(const URLRequestContext&) = delete; + virtual ~URLRequestContext(); // May return nullptr if this context doesn't have an associated network @@ -339,8 +343,6 @@ bool require_network_isolation_key_; THREAD_CHECKER(thread_checker_); - - DISALLOW_COPY_AND_ASSIGN(URLRequestContext); }; } // namespace net
diff --git a/net/url_request/url_request_context_builder.cc b/net/url_request/url_request_context_builder.cc index 489ae32..05a75460 100644 --- a/net/url_request/url_request_context_builder.cc +++ b/net/url_request/url_request_context_builder.cc
@@ -72,6 +72,10 @@ public: explicit ContainerURLRequestContext() : storage_(this) {} + ContainerURLRequestContext(const ContainerURLRequestContext&) = delete; + ContainerURLRequestContext& operator=(const ContainerURLRequestContext&) = + delete; + ~ContainerURLRequestContext() override { #if BUILDFLAG(ENABLE_REPORTING) // Shut down the NetworkErrorLoggingService so that destroying the @@ -110,8 +114,6 @@ private: URLRequestContextStorage storage_; std::unique_ptr<TransportSecurityPersister> transport_security_persister_; - - DISALLOW_COPY_AND_ASSIGN(ContainerURLRequestContext); }; } // namespace
diff --git a/net/url_request/url_request_context_builder.h b/net/url_request/url_request_context_builder.h index 2424976..560577e 100644 --- a/net/url_request/url_request_context_builder.h +++ b/net/url_request/url_request_context_builder.h
@@ -127,6 +127,10 @@ }; URLRequestContextBuilder(); + + URLRequestContextBuilder(const URLRequestContextBuilder&) = delete; + URLRequestContextBuilder& operator=(const URLRequestContextBuilder&) = delete; + virtual ~URLRequestContextBuilder(); // Sets whether Brotli compression is enabled. Disabled by default; @@ -372,8 +376,6 @@ protocol_handlers_; ClientSocketFactory* client_socket_factory_for_testing_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); }; } // namespace net
diff --git a/net/url_request/url_request_context_storage.h b/net/url_request/url_request_context_storage.h index 07db9e0..d58d9f8 100644 --- a/net/url_request/url_request_context_storage.h +++ b/net/url_request/url_request_context_storage.h
@@ -49,6 +49,10 @@ // URLRequestContext, since it is often designed to be embedded in a // URLRequestContext subclass. explicit URLRequestContextStorage(URLRequestContext* context); + + URLRequestContextStorage(const URLRequestContextStorage&) = delete; + URLRequestContextStorage& operator=(const URLRequestContextStorage&) = delete; + ~URLRequestContextStorage(); // These setters will set both the member variables and call the setter on the @@ -137,8 +141,6 @@ std::unique_ptr<ReportingService> reporting_service_; std::unique_ptr<NetworkErrorLoggingService> network_error_logging_service_; #endif // BUILDFLAG(ENABLE_REPORTING) - - DISALLOW_COPY_AND_ASSIGN(URLRequestContextStorage); }; } // namespace net
diff --git a/net/url_request/url_request_filter_unittest.cc b/net/url_request/url_request_filter_unittest.cc index d0e3502..cc8e26f 100644 --- a/net/url_request/url_request_filter_unittest.cc +++ b/net/url_request/url_request_filter_unittest.cc
@@ -26,6 +26,11 @@ class TestURLRequestInterceptor : public URLRequestInterceptor { public: TestURLRequestInterceptor() : job_(nullptr) {} + + TestURLRequestInterceptor(const TestURLRequestInterceptor&) = delete; + TestURLRequestInterceptor& operator=(const TestURLRequestInterceptor&) = + delete; + ~TestURLRequestInterceptor() override = default; // URLRequestInterceptor implementation: @@ -42,8 +47,6 @@ private: mutable URLRequestTestJob* job_; - - DISALLOW_COPY_AND_ASSIGN(TestURLRequestInterceptor); }; TEST(URLRequestFilter, BasicMatching) {
diff --git a/net/url_request/url_request_http_job_unittest.cc b/net/url_request/url_request_http_job_unittest.cc index 7ee508d..4f26241b 100644 --- a/net/url_request/url_request_http_job_unittest.cc +++ b/net/url_request/url_request_http_job_unittest.cc
@@ -105,6 +105,9 @@ request->context()->http_user_agent_settings()), use_null_source_stream_(false) {} + TestURLRequestHttpJob(const TestURLRequestHttpJob&) = delete; + TestURLRequestHttpJob& operator=(const TestURLRequestHttpJob&) = delete; + ~TestURLRequestHttpJob() override = default; // URLRequestJob implementation: @@ -125,8 +128,6 @@ private: bool use_null_source_stream_; - - DISALLOW_COPY_AND_ASSIGN(TestURLRequestHttpJob); }; class URLRequestHttpJobSetUpSourceTest : public TestWithTaskEnvironment {
diff --git a/net/url_request/url_request_interceptor.h b/net/url_request/url_request_interceptor.h index 0ce071f..99daa05c 100644 --- a/net/url_request/url_request_interceptor.h +++ b/net/url_request/url_request_interceptor.h
@@ -24,6 +24,10 @@ class NET_EXPORT URLRequestInterceptor { public: URLRequestInterceptor(); + + URLRequestInterceptor(const URLRequestInterceptor&) = delete; + URLRequestInterceptor& operator=(const URLRequestInterceptor&) = delete; + virtual ~URLRequestInterceptor(); // Returns a URLRequestJob to handle |request|, if the interceptor wants to @@ -31,9 +35,6 @@ // Otherwise, returns nullptr. virtual std::unique_ptr<URLRequestJob> MaybeInterceptRequest( URLRequest* request) const = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(URLRequestInterceptor); }; } // namespace net
diff --git a/net/url_request/url_request_job.cc b/net/url_request/url_request_job.cc index 5400f1e..9ac20ba8 100644 --- a/net/url_request/url_request_job.cc +++ b/net/url_request/url_request_job.cc
@@ -57,6 +57,10 @@ DCHECK(job_); } + URLRequestJobSourceStream(const URLRequestJobSourceStream&) = delete; + URLRequestJobSourceStream& operator=(const URLRequestJobSourceStream&) = + delete; + ~URLRequestJobSourceStream() override = default; // SourceStream implementation: @@ -77,8 +81,6 @@ // indirectly owns |this|. Therefore, |job_| will not be destroyed when |this| // is alive. URLRequestJob* const job_; - - DISALLOW_COPY_AND_ASSIGN(URLRequestJobSourceStream); }; URLRequestJob::URLRequestJob(URLRequest* request)
diff --git a/net/url_request/url_request_job.h b/net/url_request/url_request_job.h index 7cd566d..d0721381 100644 --- a/net/url_request/url_request_job.h +++ b/net/url_request/url_request_job.h
@@ -52,6 +52,10 @@ class NET_EXPORT URLRequestJob { public: explicit URLRequestJob(URLRequest* request); + + URLRequestJob(const URLRequestJob&) = delete; + URLRequestJob& operator=(const URLRequestJob&) = delete; + virtual ~URLRequestJob(); // Returns the request that owns this job. @@ -447,8 +451,6 @@ CompletionOnceCallback read_raw_callback_; base::WeakPtrFactory<URLRequestJob> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(URLRequestJob); }; } // namespace net
diff --git a/net/url_request/url_request_job_factory.h b/net/url_request/url_request_job_factory.h index 9d31c6c..7809cdf 100644 --- a/net/url_request/url_request_job_factory.h +++ b/net/url_request/url_request_job_factory.h
@@ -41,6 +41,10 @@ }; URLRequestJobFactory(); + + URLRequestJobFactory(const URLRequestJobFactory&) = delete; + URLRequestJobFactory& operator=(const URLRequestJobFactory&) = delete; + virtual ~URLRequestJobFactory(); // Sets the ProtocolHandler for a scheme. Returns true on success, false on @@ -77,8 +81,6 @@ static void SetInterceptorForTesting(URLRequestInterceptor* interceptor); ProtocolHandlerMap protocol_handler_map_; - - DISALLOW_COPY_AND_ASSIGN(URLRequestJobFactory); }; } // namespace net
diff --git a/net/url_request/url_request_throttler_manager.h b/net/url_request/url_request_throttler_manager.h index 308a4726..4f52382 100644 --- a/net/url_request/url_request_throttler_manager.h +++ b/net/url_request/url_request_throttler_manager.h
@@ -37,6 +37,11 @@ public NetworkChangeNotifier::ConnectionTypeObserver { public: URLRequestThrottlerManager(); + + URLRequestThrottlerManager(const URLRequestThrottlerManager&) = delete; + URLRequestThrottlerManager& operator=(const URLRequestThrottlerManager&) = + delete; + ~URLRequestThrottlerManager() override; // Must be called for every request, returns the URL request throttler entry @@ -140,8 +145,6 @@ base::PlatformThreadId registered_from_thread_; THREAD_CHECKER(thread_checker_); - - DISALLOW_COPY_AND_ASSIGN(URLRequestThrottlerManager); }; } // namespace net
diff --git a/net/url_request/url_request_throttler_test_support.h b/net/url_request/url_request_throttler_test_support.h index ede659f..b3e2c8c 100644 --- a/net/url_request/url_request_throttler_test_support.h +++ b/net/url_request/url_request_throttler_test_support.h
@@ -16,6 +16,10 @@ public: TestTickClock(); explicit TestTickClock(base::TimeTicks now); + + TestTickClock(const TestTickClock&) = delete; + TestTickClock& operator=(const TestTickClock&) = delete; + ~TestTickClock() override; base::TimeTicks NowTicks() const override; @@ -23,7 +27,6 @@ private: base::TimeTicks now_ticks_; - DISALLOW_COPY_AND_ASSIGN(TestTickClock); }; } // namespace net
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc index 0ab74888..8e37ec3 100644 --- a/net/url_request/url_request_unittest.cc +++ b/net/url_request/url_request_unittest.cc
@@ -3586,6 +3586,10 @@ public: explicit FixedDateNetworkDelegate(const std::string& fixed_date) : fixed_date_(fixed_date) {} + + FixedDateNetworkDelegate(const FixedDateNetworkDelegate&) = delete; + FixedDateNetworkDelegate& operator=(const FixedDateNetworkDelegate&) = delete; + ~FixedDateNetworkDelegate() override = default; // NetworkDelegate implementation @@ -3599,8 +3603,6 @@ private: std::string fixed_date_; - - DISALLOW_COPY_AND_ASSIGN(FixedDateNetworkDelegate); }; int FixedDateNetworkDelegate::OnHeadersReceived( @@ -3750,6 +3752,12 @@ : public URLRequestJobFactory::ProtocolHandler { public: UnsafeRedirectProtocolHandler() = default; + + UnsafeRedirectProtocolHandler(const UnsafeRedirectProtocolHandler&) = + delete; + UnsafeRedirectProtocolHandler& operator=( + const UnsafeRedirectProtocolHandler&) = delete; + ~UnsafeRedirectProtocolHandler() override = default; // URLRequestJobFactory::ProtocolHandler implementation: @@ -3763,9 +3771,6 @@ bool IsSafeRedirectTarget(const GURL& location) const override { return false; } - - private: - DISALLOW_COPY_AND_ASSIGN(UnsafeRedirectProtocolHandler); }; // URLRequestTest interface: @@ -5013,6 +5018,11 @@ class AsyncLoggingNetworkDelegate : public TestNetworkDelegate { public: AsyncLoggingNetworkDelegate() = default; + + AsyncLoggingNetworkDelegate(const AsyncLoggingNetworkDelegate&) = delete; + AsyncLoggingNetworkDelegate& operator=(const AsyncLoggingNetworkDelegate&) = + delete; + ~AsyncLoggingNetworkDelegate() override = default; // NetworkDelegate implementation. @@ -5065,8 +5075,6 @@ base::BindOnce(std::move(callback), OK)); return ERR_IO_PENDING; } - - DISALLOW_COPY_AND_ASSIGN(AsyncLoggingNetworkDelegate); }; // URLRequest::Delegate that logs delegate information when the headers @@ -5093,6 +5101,12 @@ else if (cancel_stage == CANCEL_ON_READ_COMPLETED) set_cancel_in_received_data(true); } + + AsyncLoggingUrlRequestDelegate(const AsyncLoggingUrlRequestDelegate&) = + delete; + AsyncLoggingUrlRequestDelegate& operator=( + const AsyncLoggingUrlRequestDelegate&) = delete; + ~AsyncLoggingUrlRequestDelegate() override = default; // URLRequest::Delegate implementation: @@ -5150,8 +5164,6 @@ } const CancelStage cancel_stage_; - - DISALLOW_COPY_AND_ASSIGN(AsyncLoggingUrlRequestDelegate); }; // Tests handling of delegate info before a request starts. @@ -8981,6 +8993,10 @@ explicit FailingHttpTransactionFactory(HttpNetworkSession* network_session) : network_session_(network_session) {} + FailingHttpTransactionFactory(const FailingHttpTransactionFactory&) = delete; + FailingHttpTransactionFactory& operator=( + const FailingHttpTransactionFactory&) = delete; + ~FailingHttpTransactionFactory() override = default; // HttpTransactionFactory methods: @@ -8995,8 +9011,6 @@ private: HttpNetworkSession* network_session_; - - DISALLOW_COPY_AND_ASSIGN(FailingHttpTransactionFactory); }; } // namespace @@ -12270,6 +12284,10 @@ public: ZeroRTTResponse(bool zero_rtt, bool send_too_early) : zero_rtt_(zero_rtt), send_too_early_(send_too_early) {} + + ZeroRTTResponse(const ZeroRTTResponse&) = delete; + ZeroRTTResponse& operator=(const ZeroRTTResponse&) = delete; + ~ZeroRTTResponse() override {} void SendResponse(const test_server::SendBytesCallback& send, @@ -12294,8 +12312,6 @@ private: bool zero_rtt_; bool send_too_early_; - - DISALLOW_COPY_AND_ASSIGN(ZeroRTTResponse); }; std::unique_ptr<test_server::HttpResponse> HandleZeroRTTRequest(
diff --git a/net/websockets/websocket_basic_handshake_stream.h b/net/websockets/websocket_basic_handshake_stream.h index 003a11d..ce3beb73 100644 --- a/net/websockets/websocket_basic_handshake_stream.h +++ b/net/websockets/websocket_basic_handshake_stream.h
@@ -43,6 +43,10 @@ WebSocketStreamRequestAPI* request, WebSocketEndpointLockManager* websocket_endpoint_lock_manager); + WebSocketBasicHandshakeStream(const WebSocketBasicHandshakeStream&) = delete; + WebSocketBasicHandshakeStream& operator=( + const WebSocketBasicHandshakeStream&) = delete; + ~WebSocketBasicHandshakeStream() override; // HttpStreamBase methods @@ -152,8 +156,6 @@ WebSocketEndpointLockManager* const websocket_endpoint_lock_manager_; base::WeakPtrFactory<WebSocketBasicHandshakeStream> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(WebSocketBasicHandshakeStream); }; } // namespace net
diff --git a/net/websockets/websocket_channel.h b/net/websockets/websocket_channel.h index 2d9f495..8323049 100644 --- a/net/websockets/websocket_channel.h +++ b/net/websockets/websocket_channel.h
@@ -76,6 +76,10 @@ // connection process. WebSocketChannel(std::unique_ptr<WebSocketEventInterface> event_interface, URLRequestContext* url_request_context); + + WebSocketChannel(const WebSocketChannel&) = delete; + WebSocketChannel& operator=(const WebSocketChannel&) = delete; + virtual ~WebSocketChannel(); // Starts the connection process. @@ -388,8 +392,6 @@ // True if we're waiting for OnReadDone() callback. bool is_reading_ = false; - - DISALLOW_COPY_AND_ASSIGN(WebSocketChannel); }; } // namespace net
diff --git a/net/websockets/websocket_deflate_stream.h b/net/websockets/websocket_deflate_stream.h index 20f2ea9..4960126f 100644 --- a/net/websockets/websocket_deflate_stream.h +++ b/net/websockets/websocket_deflate_stream.h
@@ -43,6 +43,10 @@ WebSocketDeflateStream(std::unique_ptr<WebSocketStream> stream, const WebSocketDeflateParameters& params, std::unique_ptr<WebSocketDeflatePredictor> predictor); + + WebSocketDeflateStream(const WebSocketDeflateStream&) = delete; + WebSocketDeflateStream& operator=(const WebSocketDeflateStream&) = delete; + ~WebSocketDeflateStream() override; // WebSocketStream functions. @@ -106,8 +110,6 @@ std::vector<scoped_refptr<IOBufferWithSize>> deflater_outputs_; // References of Inflater outputs kept until next ReadFrames(). std::vector<scoped_refptr<IOBufferWithSize>> inflater_outputs_; - - DISALLOW_COPY_AND_ASSIGN(WebSocketDeflateStream); }; } // namespace net
diff --git a/net/websockets/websocket_deflate_stream_test.cc b/net/websockets/websocket_deflate_stream_test.cc index 6abcbff7..b0dee6c 100644 --- a/net/websockets/websocket_deflate_stream_test.cc +++ b/net/websockets/websocket_deflate_stream_test.cc
@@ -93,6 +93,11 @@ class WebSocketDeflatePredictorMock : public WebSocketDeflatePredictor { public: WebSocketDeflatePredictorMock() : result_(DEFLATE) {} + + WebSocketDeflatePredictorMock(const WebSocketDeflatePredictorMock&) = delete; + WebSocketDeflatePredictorMock& operator=( + const WebSocketDeflatePredictorMock&) = delete; + ~WebSocketDeflatePredictorMock() override { // Verify whether all expectaions are consumed. if (!frames_to_be_input_.empty()) { @@ -187,8 +192,6 @@ // Pushed by |RecordWrittenFrames| and popped and verified by // |VerifySentFrame|. base::circular_deque<const WebSocketFrame*> frames_written_; - - DISALLOW_COPY_AND_ASSIGN(WebSocketDeflatePredictorMock); }; class WebSocketDeflateStreamTest : public ::testing::Test {
diff --git a/net/websockets/websocket_deflater.h b/net/websockets/websocket_deflater.h index d72c7335..3040d67 100644 --- a/net/websockets/websocket_deflater.h +++ b/net/websockets/websocket_deflater.h
@@ -30,6 +30,10 @@ }; explicit WebSocketDeflater(ContextTakeOverMode mode); + + WebSocketDeflater(const WebSocketDeflater&) = delete; + WebSocketDeflater& operator=(const WebSocketDeflater&) = delete; + ~WebSocketDeflater(); // Returns true if there is no error and false otherwise. @@ -69,8 +73,6 @@ std::vector<char> fixed_buffer_; // true if bytes were added after last Finish(). bool are_bytes_added_; - - DISALLOW_COPY_AND_ASSIGN(WebSocketDeflater); }; } // namespace net
diff --git a/net/websockets/websocket_event_interface.h b/net/websockets/websocket_event_interface.h index 1ee46ef..b9fe963 100644 --- a/net/websockets/websocket_event_interface.h +++ b/net/websockets/websocket_event_interface.h
@@ -38,6 +38,9 @@ public: typedef int WebSocketMessageType; + WebSocketEventInterface(const WebSocketEventInterface&) = delete; + WebSocketEventInterface& operator=(const WebSocketEventInterface&) = delete; + virtual ~WebSocketEventInterface() {} // Called when a URLRequest is created for handshaking. @@ -156,9 +159,6 @@ protected: WebSocketEventInterface() {} - - private: - DISALLOW_COPY_AND_ASSIGN(WebSocketEventInterface); }; } // namespace net
diff --git a/net/websockets/websocket_extension_parser.h b/net/websockets/websocket_extension_parser.h index ebba4f04..842f4a1 100644 --- a/net/websockets/websocket_extension_parser.h +++ b/net/websockets/websocket_extension_parser.h
@@ -21,6 +21,10 @@ class NET_EXPORT_PRIVATE WebSocketExtensionParser { public: WebSocketExtensionParser(); + + WebSocketExtensionParser(const WebSocketExtensionParser&) = delete; + WebSocketExtensionParser& operator=(const WebSocketExtensionParser&) = delete; + ~WebSocketExtensionParser(); // Parses the given string as a Sec-WebSocket-Extensions header value. @@ -55,8 +59,6 @@ // The pointer of the end of the input string. const char* end_; std::vector<WebSocketExtension> extensions_; - - DISALLOW_COPY_AND_ASSIGN(WebSocketExtensionParser); }; } // namespace net
diff --git a/net/websockets/websocket_frame_parser.h b/net/websockets/websocket_frame_parser.h index 141a945..87e3b569 100644 --- a/net/websockets/websocket_frame_parser.h +++ b/net/websockets/websocket_frame_parser.h
@@ -27,6 +27,10 @@ class NET_EXPORT WebSocketFrameParser { public: WebSocketFrameParser(); + + WebSocketFrameParser(const WebSocketFrameParser&) = delete; + WebSocketFrameParser& operator=(const WebSocketFrameParser&) = delete; + ~WebSocketFrameParser(); // Decodes the given byte stream and stores parsed WebSocket frames in @@ -81,8 +85,6 @@ uint64_t frame_offset_; WebSocketError websocket_error_; - - DISALLOW_COPY_AND_ASSIGN(WebSocketFrameParser); }; } // namespace net
diff --git a/net/websockets/websocket_handshake_stream_base.h b/net/websockets/websocket_handshake_stream_base.h index d1c4bc93..230476a 100644 --- a/net/websockets/websocket_handshake_stream_base.h +++ b/net/websockets/websocket_handshake_stream_base.h
@@ -83,6 +83,11 @@ }; WebSocketHandshakeStreamBase() = default; + + WebSocketHandshakeStreamBase(const WebSocketHandshakeStreamBase&) = delete; + WebSocketHandshakeStreamBase& operator=(const WebSocketHandshakeStreamBase&) = + delete; + ~WebSocketHandshakeStreamBase() override = default; // An object that stores data needed for the creation of a @@ -148,9 +153,6 @@ WebSocketExtensionParams* params); void RecordHandshakeResult(HandshakeResult result); - - private: - DISALLOW_COPY_AND_ASSIGN(WebSocketHandshakeStreamBase); }; } // namespace net
diff --git a/net/websockets/websocket_handshake_stream_create_helper.h b/net/websockets/websocket_handshake_stream_create_helper.h index a684232..dfafe40 100644 --- a/net/websockets/websocket_handshake_stream_create_helper.h +++ b/net/websockets/websocket_handshake_stream_create_helper.h
@@ -36,6 +36,11 @@ const std::vector<std::string>& requested_subprotocols, WebSocketStreamRequestAPI* request); + WebSocketHandshakeStreamCreateHelper( + const WebSocketHandshakeStreamCreateHelper&) = delete; + WebSocketHandshakeStreamCreateHelper& operator=( + const WebSocketHandshakeStreamCreateHelper&) = delete; + ~WebSocketHandshakeStreamCreateHelper() override; // WebSocketHandshakeStreamBase::CreateHelper methods @@ -55,8 +60,6 @@ WebSocketStream::ConnectDelegate* const connect_delegate_; const std::vector<std::string> requested_subprotocols_; WebSocketStreamRequestAPI* const request_; - - DISALLOW_COPY_AND_ASSIGN(WebSocketHandshakeStreamCreateHelper); }; } // namespace net
diff --git a/net/websockets/websocket_http2_handshake_stream.h b/net/websockets/websocket_http2_handshake_stream.h index 19edfd2..0f5e3040 100644 --- a/net/websockets/websocket_http2_handshake_stream.h +++ b/net/websockets/websocket_http2_handshake_stream.h
@@ -56,6 +56,10 @@ WebSocketStreamRequestAPI* request, std::vector<std::string> dns_aliases); + WebSocketHttp2HandshakeStream(const WebSocketHttp2HandshakeStream&) = delete; + WebSocketHttp2HandshakeStream& operator=( + const WebSocketHttp2HandshakeStream&) = delete; + ~WebSocketHttp2HandshakeStream() override; // HttpStream methods. @@ -196,8 +200,6 @@ std::vector<std::string> dns_aliases_; base::WeakPtrFactory<WebSocketHttp2HandshakeStream> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(WebSocketHttp2HandshakeStream); }; } // namespace net
diff --git a/net/websockets/websocket_inflater.h b/net/websockets/websocket_inflater.h index e92fea3..0b583a6 100644 --- a/net/websockets/websocket_inflater.h +++ b/net/websockets/websocket_inflater.h
@@ -29,6 +29,10 @@ // |input_queue_capacity| is a capacity for each contiguous block in the // input queue. The input queue can grow without limit. WebSocketInflater(size_t input_queue_capacity, size_t output_buffer_capacity); + + WebSocketInflater(const WebSocketInflater&) = delete; + WebSocketInflater& operator=(const WebSocketInflater&) = delete; + ~WebSocketInflater(); // Returns true if there is no error. @@ -123,8 +127,6 @@ std::unique_ptr<z_stream_s> stream_; InputQueue input_queue_; OutputBuffer output_buffer_; - - DISALLOW_COPY_AND_ASSIGN(WebSocketInflater); }; } // namespace net
diff --git a/net/websockets/websocket_stream.h b/net/websockets/websocket_stream.h index 8c3f483..4e6e449 100644 --- a/net/websockets/websocket_stream.h +++ b/net/websockets/websocket_stream.h
@@ -180,6 +180,9 @@ std::unique_ptr<base::OneShotTimer> timer, std::unique_ptr<WebSocketStreamRequestAPI> api_delegate); + WebSocketStream(const WebSocketStream&) = delete; + WebSocketStream& operator=(const WebSocketStream&) = delete; + // Derived classes must make sure Close() is called when the stream is not // closed on destruction. virtual ~WebSocketStream(); @@ -270,9 +273,6 @@ protected: WebSocketStream(); - - private: - DISALLOW_COPY_AND_ASSIGN(WebSocketStream); }; // A helper function used in the implementation of CreateAndConnectStream() and
diff --git a/net/websockets/websocket_stream_create_test_base.h b/net/websockets/websocket_stream_create_test_base.h index 3ec3374f5..e670a4e 100644 --- a/net/websockets/websocket_stream_create_test_base.h +++ b/net/websockets/websocket_stream_create_test_base.h
@@ -38,6 +38,11 @@ using HeaderKeyValuePair = std::pair<std::string, std::string>; WebSocketStreamCreateTestBase(); + + WebSocketStreamCreateTestBase(const WebSocketStreamCreateTestBase&) = delete; + WebSocketStreamCreateTestBase& operator=( + const WebSocketStreamCreateTestBase&) = delete; + virtual ~WebSocketStreamCreateTestBase(); // A wrapper for CreateAndConnectStreamForTesting that knows about our default @@ -100,7 +105,6 @@ private: class TestConnectDelegate; - DISALLOW_COPY_AND_ASSIGN(WebSocketStreamCreateTestBase); }; } // namespace net
diff --git a/net/websockets/websocket_test_util.h b/net/websockets/websocket_test_util.h index f59ba89..7bcba01 100644 --- a/net/websockets/websocket_test_util.h +++ b/net/websockets/websocket_test_util.h
@@ -103,6 +103,12 @@ class WebSocketMockClientSocketFactoryMaker { public: WebSocketMockClientSocketFactoryMaker(); + + WebSocketMockClientSocketFactoryMaker( + const WebSocketMockClientSocketFactoryMaker&) = delete; + WebSocketMockClientSocketFactoryMaker& operator=( + const WebSocketMockClientSocketFactoryMaker&) = delete; + ~WebSocketMockClientSocketFactoryMaker(); // Tell the factory to create a socket which expects |expect_written| to be @@ -132,8 +138,6 @@ private: struct Detail; std::unique_ptr<Detail> detail_; - - DISALLOW_COPY_AND_ASSIGN(WebSocketMockClientSocketFactoryMaker); }; // This class encapsulates the details of creating a @@ -142,6 +146,12 @@ struct WebSocketTestURLRequestContextHost { public: WebSocketTestURLRequestContextHost(); + + WebSocketTestURLRequestContextHost( + const WebSocketTestURLRequestContextHost&) = delete; + WebSocketTestURLRequestContextHost& operator=( + const WebSocketTestURLRequestContextHost&) = delete; + ~WebSocketTestURLRequestContextHost(); void SetExpectations(const std::string& expect_written, @@ -175,8 +185,6 @@ TestNetworkDelegate network_delegate_; std::unique_ptr<ProxyResolutionService> proxy_resolution_service_; bool url_request_context_initialized_; - - DISALLOW_COPY_AND_ASSIGN(WebSocketTestURLRequestContextHost); }; // WebSocketStream::ConnectDelegate implementation that does nothing. @@ -233,13 +241,16 @@ /* requested_subprotocols = */ {}, &request_) {} + TestWebSocketHandshakeStreamCreateHelper( + const TestWebSocketHandshakeStreamCreateHelper&) = delete; + TestWebSocketHandshakeStreamCreateHelper& operator=( + const TestWebSocketHandshakeStreamCreateHelper&) = delete; + ~TestWebSocketHandshakeStreamCreateHelper() override = default; private: DummyConnectDelegate connect_delegate_; TestWebSocketStreamRequestAPI request_; - - DISALLOW_COPY_AND_ASSIGN(TestWebSocketHandshakeStreamCreateHelper); }; } // namespace net
diff --git a/printing/print_job_constants.cc b/printing/print_job_constants.cc index fd6436a..3f3c1157 100644 --- a/printing/print_job_constants.cc +++ b/printing/print_job_constants.cc
@@ -209,7 +209,7 @@ const int COMPLETE_PREVIEW_DOCUMENT_INDEX = -1; // Whether to show PDF in view provided by OS. Implemented for MacOS only. -const char kSettingOpenPDFInPreview[] = "OpenPDFInPreview"; +const char kSettingOpenPDFInPreview[] = "openPDFInPreview"; const uint32_t kInvalidPageIndex = std::numeric_limits<int>::max(); const uint32_t kMaxPageCount = std::numeric_limits<int>::max();
diff --git a/remoting/base/auto_thread.h b/remoting/base/auto_thread.h index 667dfd1..28954f3 100644 --- a/remoting/base/auto_thread.h +++ b/remoting/base/auto_thread.h
@@ -58,6 +58,9 @@ // Construct the AutoThread. |name| identifies the thread for debugging. explicit AutoThread(const char* name); + AutoThread(const AutoThread&) = delete; + AutoThread& operator=(const AutoThread&) = delete; + // Waits for the thread to exit, and then destroys it. ~AutoThread() override; @@ -112,8 +115,6 @@ // Verifies that QuitThread() is called on the same thread as ThreadMain(). base::ThreadChecker thread_checker_; - - DISALLOW_COPY_AND_ASSIGN(AutoThread); }; } // namespace remoting
diff --git a/remoting/base/breakpad_win.cc b/remoting/base/breakpad_win.cc index a50048e..62d3fee 100644 --- a/remoting/base/breakpad_win.cc +++ b/remoting/base/breakpad_win.cc
@@ -59,6 +59,10 @@ class BreakpadWin { public: BreakpadWin(); + + BreakpadWin(const BreakpadWin&) = delete; + BreakpadWin& operator=(const BreakpadWin&) = delete; + ~BreakpadWin(); static BreakpadWin* GetInstance(); @@ -90,8 +94,6 @@ static const wchar_t* pipe_name_; friend void ::remoting::InitializeCrashReportingForTest(const wchar_t*); - - DISALLOW_COPY_AND_ASSIGN(BreakpadWin); }; // |LazyInstance| is used to guarantee that the exception handler will be
diff --git a/remoting/base/compound_buffer.h b/remoting/base/compound_buffer.h index 2979325f..7c951c6 100644 --- a/remoting/base/compound_buffer.h +++ b/remoting/base/compound_buffer.h
@@ -36,6 +36,10 @@ class CompoundBuffer { public: CompoundBuffer(); + + CompoundBuffer(const CompoundBuffer&) = delete; + CompoundBuffer& operator=(const CompoundBuffer&) = delete; + ~CompoundBuffer(); void Clear(); @@ -99,8 +103,6 @@ DataChunkList chunks_; int total_bytes_; bool locked_; - - DISALLOW_COPY_AND_ASSIGN(CompoundBuffer); }; class CompoundBufferInputStream
diff --git a/remoting/base/dispatch_win.h b/remoting/base/dispatch_win.h index 75a8c9d8..876862b 100644 --- a/remoting/base/dispatch_win.h +++ b/remoting/base/dispatch_win.h
@@ -45,6 +45,9 @@ vt = VT_EMPTY; } + ScopedVariantArg(const ScopedVariantArg&) = delete; + ScopedVariantArg& operator=(const ScopedVariantArg&) = delete; + ~ScopedVariantArg() { VariantClear(this); } @@ -90,8 +93,6 @@ *other = *this; *static_cast<VARIANTARG*>(this) = temp; } - - DISALLOW_COPY_AND_ASSIGN(ScopedVariantArg); }; // Make sure the layouts of |VARIANTARG| and |ScopedVariantArg| are identical.
diff --git a/remoting/base/dispatch_win.h.pump b/remoting/base/dispatch_win.h.pump index fb6a01c..95d4bf272 100644 --- a/remoting/base/dispatch_win.h.pump +++ b/remoting/base/dispatch_win.h.pump
@@ -48,6 +48,10 @@ vt = VT_EMPTY; } +ScopedVariantArg(const ScopedVariantArg&) = delete; +ScopedVariantArg& operator=(const ScopedVariantArg&) = delete; + + ~ScopedVariantArg() { VariantClear(this); } @@ -93,8 +97,6 @@ *other = *this; *static_cast<VARIANTARG*>(this) = temp; } - - DISALLOW_COPY_AND_ASSIGN(ScopedVariantArg); }; // Make sure the layouts of |VARIANTARG| and |ScopedVariantArg| are identical.
diff --git a/remoting/base/gaia_oauth_client.h b/remoting/base/gaia_oauth_client.h index 3c473fce..ffa2ee3 100644 --- a/remoting/base/gaia_oauth_client.h +++ b/remoting/base/gaia_oauth_client.h
@@ -24,6 +24,9 @@ GaiaOAuthClient( scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory); + GaiaOAuthClient(const GaiaOAuthClient&) = delete; + GaiaOAuthClient& operator=(const GaiaOAuthClient&) = delete; + ~GaiaOAuthClient() override; // Redeems |auth_code| using |oauth_client_info| to obtain |refresh_token| and @@ -72,8 +75,6 @@ std::string refresh_token_; bool need_user_email_; CompletionCallback on_done_; - - DISALLOW_COPY_AND_ASSIGN(GaiaOAuthClient); }; } // namespace remoting
diff --git a/remoting/base/leaky_bucket.h b/remoting/base/leaky_bucket.h index ab5f762a..8fb8cad 100644 --- a/remoting/base/leaky_bucket.h +++ b/remoting/base/leaky_bucket.h
@@ -17,6 +17,10 @@ // |depth| specifies depth of the bucket in drops. kUnlimitedDepth indicate // that bucket size is unlimited. |rate| is specified in drops per second. LeakyBucket(int depth, int rate); + + LeakyBucket(const LeakyBucket&) = delete; + LeakyBucket& operator=(const LeakyBucket&) = delete; + ~LeakyBucket(); // If the bucket can fit |drops| then adds them and returns true. Otherwise @@ -42,8 +46,6 @@ // UpdateLevel(), which is called from RefillOrSpill() and UpdateRate(). int current_level_; base::TimeTicks level_updated_time_; - - DISALLOW_COPY_AND_ASSIGN(LeakyBucket); }; } // namespace remoting
diff --git a/remoting/base/oauth_token_getter.h b/remoting/base/oauth_token_getter.h index 361d01e..fe36cac 100644 --- a/remoting/base/oauth_token_getter.h +++ b/remoting/base/oauth_token_getter.h
@@ -82,6 +82,10 @@ }; OAuthTokenGetter() {} + + OAuthTokenGetter(const OAuthTokenGetter&) = delete; + OAuthTokenGetter& operator=(const OAuthTokenGetter&) = delete; + virtual ~OAuthTokenGetter() {} // Call |on_access_token| with an access token, or the failure status. @@ -91,8 +95,6 @@ // Invalidates the cache, so the next CallWithToken() will get a fresh access // token. virtual void InvalidateCache() = 0; - - DISALLOW_COPY_AND_ASSIGN(OAuthTokenGetter); }; } // namespace remoting
diff --git a/remoting/base/oauth_token_getter_proxy.h b/remoting/base/oauth_token_getter_proxy.h index 1e15619..90bc6ee 100644 --- a/remoting/base/oauth_token_getter_proxy.h +++ b/remoting/base/oauth_token_getter_proxy.h
@@ -31,6 +31,9 @@ // sequence where this constructor is called. explicit OAuthTokenGetterProxy(base::WeakPtr<OAuthTokenGetter> token_getter); + OAuthTokenGetterProxy(const OAuthTokenGetterProxy&) = delete; + OAuthTokenGetterProxy& operator=(const OAuthTokenGetterProxy&) = delete; + ~OAuthTokenGetterProxy() override; // OAuthTokenGetter overrides. @@ -40,8 +43,6 @@ private: base::WeakPtr<OAuthTokenGetter> token_getter_; scoped_refptr<base::SequencedTaskRunner> task_runner_; - - DISALLOW_COPY_AND_ASSIGN(OAuthTokenGetterProxy); }; } // namespace remoting
diff --git a/remoting/base/oauth_token_getter_proxy_unittest.cc b/remoting/base/oauth_token_getter_proxy_unittest.cc index b30218c7..2801e56c 100644 --- a/remoting/base/oauth_token_getter_proxy_unittest.cc +++ b/remoting/base/oauth_token_getter_proxy_unittest.cc
@@ -28,6 +28,10 @@ class FakeOAuthTokenGetter : public OAuthTokenGetter { public: FakeOAuthTokenGetter(); + + FakeOAuthTokenGetter(const FakeOAuthTokenGetter&) = delete; + FakeOAuthTokenGetter& operator=(const FakeOAuthTokenGetter&) = delete; + ~FakeOAuthTokenGetter() override; void ResolveCallback(Status status, @@ -49,7 +53,6 @@ THREAD_CHECKER(thread_checker_); base::WeakPtrFactory<FakeOAuthTokenGetter> weak_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(FakeOAuthTokenGetter); }; FakeOAuthTokenGetter::FakeOAuthTokenGetter() { @@ -95,6 +98,11 @@ class OAuthTokenGetterProxyTest : public testing::Test { public: OAuthTokenGetterProxyTest() = default; + + OAuthTokenGetterProxyTest(const OAuthTokenGetterProxyTest&) = delete; + OAuthTokenGetterProxyTest& operator=(const OAuthTokenGetterProxyTest&) = + delete; + ~OAuthTokenGetterProxyTest() override = default; // testing::Test overrides. @@ -136,8 +144,6 @@ std::unique_ptr<TokenCallbackResult> expected_callback_result_; base::test::SingleThreadTaskEnvironment task_environment_; - - DISALLOW_COPY_AND_ASSIGN(OAuthTokenGetterProxyTest); }; void OAuthTokenGetterProxyTest::SetUp() {
diff --git a/remoting/base/queued_task_poster.h b/remoting/base/queued_task_poster.h index 5a8ee67..5067b00 100644 --- a/remoting/base/queued_task_poster.h +++ b/remoting/base/queued_task_poster.h
@@ -24,6 +24,10 @@ public: QueuedTaskPoster( scoped_refptr<base::SingleThreadTaskRunner> target_task_runner); + + QueuedTaskPoster(const QueuedTaskPoster&) = delete; + QueuedTaskPoster& operator=(const QueuedTaskPoster&) = delete; + ~QueuedTaskPoster(); void AddTask(base::OnceClosure closure); @@ -39,8 +43,6 @@ bool transfer_task_scheduled_ = false; base::WeakPtrFactory<QueuedTaskPoster> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(QueuedTaskPoster); }; } // namespace remoting
diff --git a/remoting/base/rate_counter.h b/remoting/base/rate_counter.h index 8367a3f..2f2091b 100644 --- a/remoting/base/rate_counter.h +++ b/remoting/base/rate_counter.h
@@ -25,6 +25,10 @@ public: // Constructs a rate counter over the specified |time_window|. explicit RateCounter(base::TimeDelta time_window); + + RateCounter(const RateCounter&) = delete; + RateCounter& operator=(const RateCounter&) = delete; + virtual ~RateCounter(); // Records a point event count to include in the rate. @@ -57,8 +61,6 @@ const base::TickClock* tick_clock_ = base::DefaultTickClock::GetInstance(); SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(RateCounter); }; } // namespace remoting
diff --git a/remoting/base/running_samples.h b/remoting/base/running_samples.h index e96b7f2..67e5584 100644 --- a/remoting/base/running_samples.h +++ b/remoting/base/running_samples.h
@@ -23,6 +23,10 @@ // Constructs a running sample helper that stores |window_size| most // recent samples. explicit RunningSamples(int window_size); + + RunningSamples(const RunningSamples&) = delete; + RunningSamples& operator=(const RunningSamples&) = delete; + virtual ~RunningSamples(); // Records a point sample. @@ -52,8 +56,6 @@ int64_t sum_ GUARDED_BY_CONTEXT(sequence_checker_) = 0; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(RunningSamples); }; } // namespace remoting
diff --git a/remoting/base/socket_reader.h b/remoting/base/socket_reader.h index 688b456..3cb655e3 100644 --- a/remoting/base/socket_reader.h +++ b/remoting/base/socket_reader.h
@@ -30,6 +30,10 @@ ReadResultCallback; SocketReader(); + + SocketReader(const SocketReader&) = delete; + SocketReader& operator=(const SocketReader&) = delete; + ~SocketReader(); // Starts reading from |socket|. |read_result_callback| is called for each @@ -48,8 +52,6 @@ scoped_refptr<net::IOBuffer> read_buffer_; base::WeakPtrFactory<SocketReader> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SocketReader); }; } // namespace remoting
diff --git a/remoting/base/telemetry_log_writer.h b/remoting/base/telemetry_log_writer.h index c9bd66a..fe25cac 100644 --- a/remoting/base/telemetry_log_writer.h +++ b/remoting/base/telemetry_log_writer.h
@@ -48,6 +48,9 @@ public: explicit TelemetryLogWriter(std::unique_ptr<OAuthTokenGetter> token_getter); + TelemetryLogWriter(const TelemetryLogWriter&) = delete; + TelemetryLogWriter& operator=(const TelemetryLogWriter&) = delete; + ~TelemetryLogWriter() override; void Init(scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory); @@ -79,7 +82,6 @@ base::circular_deque<ChromotingEvent> sending_entries_; friend class TelemetryLogWriterTest; - DISALLOW_COPY_AND_ASSIGN(TelemetryLogWriter); }; } // namespace remoting
diff --git a/remoting/base/typed_buffer.h b/remoting/base/typed_buffer.h index cd0d59b6..6ab304d 100644 --- a/remoting/base/typed_buffer.h +++ b/remoting/base/typed_buffer.h
@@ -31,6 +31,9 @@ TypedBuffer(TypedBuffer&& rvalue) : TypedBuffer() { Swap(rvalue); } + TypedBuffer(const TypedBuffer&) = delete; + TypedBuffer& operator=(const TypedBuffer&) = delete; + ~TypedBuffer() { if (buffer_) { delete[] reinterpret_cast<uint8_t*>(buffer_); @@ -78,8 +81,6 @@ // Length of the owned buffer in bytes. uint32_t length_; - - DISALLOW_COPY_AND_ASSIGN(TypedBuffer); }; } // namespace remoting
diff --git a/remoting/base/vlog_net_log.cc b/remoting/base/vlog_net_log.cc index 1e8e0d3..33fd085 100644 --- a/remoting/base/vlog_net_log.cc +++ b/remoting/base/vlog_net_log.cc
@@ -21,13 +21,14 @@ class VlogNetLogObserver : public net::NetLog::ThreadSafeObserver { public: VlogNetLogObserver(); + + VlogNetLogObserver(const VlogNetLogObserver&) = delete; + VlogNetLogObserver& operator=(const VlogNetLogObserver&) = delete; + ~VlogNetLogObserver() override; // NetLog::ThreadSafeObserver overrides: void OnAddEntry(const net::NetLogEntry& entry) override; - - private: - DISALLOW_COPY_AND_ASSIGN(VlogNetLogObserver); }; VlogNetLogObserver::VlogNetLogObserver() {
diff --git a/remoting/client/audio/audio_jitter_buffer.h b/remoting/client/audio/audio_jitter_buffer.h index 5f744f5b..5c7b15ae 100644 --- a/remoting/client/audio/audio_jitter_buffer.h +++ b/remoting/client/audio/audio_jitter_buffer.h
@@ -31,6 +31,10 @@ // Pending get-data requests will be dropped when the stream format is // changed. explicit AudioJitterBuffer(OnFormatChangedCallback on_format_changed); + + AudioJitterBuffer(const AudioJitterBuffer&) = delete; + AudioJitterBuffer& operator=(const AudioJitterBuffer&) = delete; + ~AudioJitterBuffer() override; void AddAudioPacket(std::unique_ptr<AudioPacket> packet); @@ -85,8 +89,6 @@ bool underrun_protection_mode_ = true; THREAD_CHECKER(thread_checker_); - - DISALLOW_COPY_AND_ASSIGN(AudioJitterBuffer); }; } // namespace remoting
diff --git a/remoting/client/audio/audio_playback_sink.h b/remoting/client/audio/audio_playback_sink.h index a02615f..97f0d5f 100644 --- a/remoting/client/audio/audio_playback_sink.h +++ b/remoting/client/audio/audio_playback_sink.h
@@ -16,6 +16,10 @@ class AudioPlaybackSink { public: AudioPlaybackSink() = default; + + AudioPlaybackSink(const AudioPlaybackSink&) = delete; + AudioPlaybackSink& operator=(const AudioPlaybackSink&) = delete; + virtual ~AudioPlaybackSink() = default; // Sets the data supplier to be used by the sink to request for more audio @@ -25,9 +29,6 @@ // Called whenever the stream format is first received or has been changed. virtual void ResetStreamFormat(const AudioStreamFormat& format) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(AudioPlaybackSink); }; } // namespace remoting
diff --git a/remoting/client/audio/audio_playback_stream.cc b/remoting/client/audio/audio_playback_stream.cc index 61b5dc1..98022fd 100644 --- a/remoting/client/audio/audio_playback_stream.cc +++ b/remoting/client/audio/audio_playback_stream.cc
@@ -15,6 +15,10 @@ class AudioPlaybackStream::Core { public: explicit Core(std::unique_ptr<AudioPlaybackSink> audio_sink); + + Core(const Core&) = delete; + Core& operator=(const Core&) = delete; + ~Core(); void AddAudioPacket(std::unique_ptr<AudioPacket> packet); @@ -25,8 +29,6 @@ // |jitter_buffer_| must outlive |audio_sink_|. std::unique_ptr<AudioJitterBuffer> jitter_buffer_; std::unique_ptr<AudioPlaybackSink> audio_sink_; - - DISALLOW_COPY_AND_ASSIGN(Core); }; AudioPlaybackStream::Core::Core(std::unique_ptr<AudioPlaybackSink> audio_sink) {
diff --git a/remoting/client/audio/audio_playback_stream.h b/remoting/client/audio/audio_playback_stream.h index 13fded7..950ac763 100644 --- a/remoting/client/audio/audio_playback_stream.h +++ b/remoting/client/audio/audio_playback_stream.h
@@ -31,6 +31,9 @@ std::unique_ptr<AudioPlaybackSink> audio_sink, scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner); + AudioPlaybackStream(const AudioPlaybackStream&) = delete; + AudioPlaybackStream& operator=(const AudioPlaybackStream&) = delete; + ~AudioPlaybackStream() override; // AudioStub implementations. @@ -45,8 +48,6 @@ std::unique_ptr<Core> core_; scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner_; - - DISALLOW_COPY_AND_ASSIGN(AudioPlaybackStream); }; } // namespace remoting
diff --git a/remoting/client/audio/audio_player.h b/remoting/client/audio/audio_player.h index ad217d18..80fa583 100644 --- a/remoting/client/audio/audio_player.h +++ b/remoting/client/audio/audio_player.h
@@ -24,6 +24,9 @@ static const int kChannels = 2; static const int kSampleSizeBytes = 2; + AudioPlayer(const AudioPlayer&) = delete; + AudioPlayer& operator=(const AudioPlayer&) = delete; + ~AudioPlayer() override; // protocol::AudioStub implementation. @@ -70,8 +73,6 @@ // The number of bytes from |queued_packets_| that have been consumed. size_t bytes_consumed_; - - DISALLOW_COPY_AND_ASSIGN(AudioPlayer); }; } // namespace remoting
diff --git a/remoting/client/audio/audio_player_android.h b/remoting/client/audio/audio_player_android.h index 8887131..f7bb023 100644 --- a/remoting/client/audio/audio_player_android.h +++ b/remoting/client/audio/audio_player_android.h
@@ -19,6 +19,10 @@ class AudioPlayerAndroid : public AudioPlayer { public: AudioPlayerAndroid(); + + AudioPlayerAndroid(const AudioPlayerAndroid&) = delete; + AudioPlayerAndroid& operator=(const AudioPlayerAndroid&) = delete; + ~AudioPlayerAndroid() override; base::WeakPtr<AudioPlayerAndroid> GetWeakPtr(); @@ -48,8 +52,6 @@ uint32_t sample_per_frame_ = 0; base::WeakPtrFactory<AudioPlayerAndroid> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(AudioPlayerAndroid); }; } // namespace remoting
diff --git a/remoting/client/audio/fake_async_audio_data_supplier.h b/remoting/client/audio/fake_async_audio_data_supplier.h index 223b41bb..1df70e0a 100644 --- a/remoting/client/audio/fake_async_audio_data_supplier.h +++ b/remoting/client/audio/fake_async_audio_data_supplier.h
@@ -21,6 +21,11 @@ const uint8_t kDummyAudioData = 0x8b; FakeAsyncAudioDataSupplier(); + + FakeAsyncAudioDataSupplier(const FakeAsyncAudioDataSupplier&) = delete; + FakeAsyncAudioDataSupplier& operator=(const FakeAsyncAudioDataSupplier&) = + delete; + ~FakeAsyncAudioDataSupplier() override; // AsyncAudioDataSupplier implementations. @@ -55,8 +60,6 @@ bool fulfill_requests_immediately_ = false; std::list<std::unique_ptr<GetDataRequest>> pending_requests_; size_t fulfilled_requests_count_ = 0u; - - DISALLOW_COPY_AND_ASSIGN(FakeAsyncAudioDataSupplier); }; } // namespace remoting
diff --git a/remoting/client/chromoting_client.h b/remoting/client/chromoting_client.h index 7ef15b6c..65400be0 100644 --- a/remoting/client/chromoting_client.h +++ b/remoting/client/chromoting_client.h
@@ -53,6 +53,9 @@ protocol::VideoRenderer* video_renderer, base::WeakPtr<protocol::AudioStub> audio_stream_consumer); + ChromotingClient(const ChromotingClient&) = delete; + ChromotingClient& operator=(const ChromotingClient&) = delete; + ~ChromotingClient() override; void set_protocol_config( @@ -150,8 +153,6 @@ bool host_capabilities_received_ = false; std::unique_ptr<HostExperimentSender> host_experiment_sender_; - - DISALLOW_COPY_AND_ASSIGN(ChromotingClient); }; } // namespace remoting
diff --git a/remoting/client/chromoting_session.cc b/remoting/client/chromoting_session.cc index 7ead2af..fb41272 100644 --- a/remoting/client/chromoting_session.cc +++ b/remoting/client/chromoting_session.cc
@@ -102,6 +102,10 @@ Core(ChromotingClientRuntime* runtime, std::unique_ptr<ClientTelemetryLogger> logger, std::unique_ptr<SessionContext> session_context); + + Core(const Core&) = delete; + Core& operator=(const Core&) = delete; + ~Core() override; void RequestPairing(const std::string& device_name); @@ -210,7 +214,6 @@ // InvalidateWeakPtrs() is called. base::WeakPtr<Core> weak_ptr_; base::WeakPtrFactory<Core> weak_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(Core); }; ChromotingSession::Core::Core(ChromotingClientRuntime* runtime,
diff --git a/remoting/client/chromoting_session.h b/remoting/client/chromoting_session.h index 4820eab..387c57d 100644 --- a/remoting/client/chromoting_session.h +++ b/remoting/client/chromoting_session.h
@@ -95,6 +95,9 @@ std::unique_ptr<protocol::AudioStub> audio_player, const ConnectToHostInfo& info); + ChromotingSession(const ChromotingSession&) = delete; + ChromotingSession& operator=(const ChromotingSession&) = delete; + ~ChromotingSession() override; // Gets the current feedback data and returns it to the callback on the @@ -140,8 +143,6 @@ // Created when the session is connected, then used, and destroyed on the // network thread when the instance is destroyed. std::unique_ptr<Core> core_; - - DISALLOW_COPY_AND_ASSIGN(ChromotingSession); }; } // namespace remoting
diff --git a/remoting/client/client_context.h b/remoting/client/client_context.h index 0f7e11a8..37e27d50 100644 --- a/remoting/client/client_context.h +++ b/remoting/client/client_context.h
@@ -20,6 +20,10 @@ public: ClientContext( const scoped_refptr<base::SingleThreadTaskRunner>& main_task_runner); + + ClientContext(const ClientContext&) = delete; + ClientContext& operator=(const ClientContext&) = delete; + virtual ~ClientContext(); void Start(); @@ -37,8 +41,6 @@ // A thread that handles all audio decode operations. base::Thread audio_decode_thread_; - - DISALLOW_COPY_AND_ASSIGN(ClientContext); }; } // namespace remoting
diff --git a/remoting/client/client_telemetry_logger.h b/remoting/client/client_telemetry_logger.h index 3a05c75..8bfc3a1 100644 --- a/remoting/client/client_telemetry_logger.h +++ b/remoting/client/client_telemetry_logger.h
@@ -31,6 +31,10 @@ ClientTelemetryLogger(ChromotingEventLogWriter* log_writer, ChromotingEvent::Mode mode, ChromotingEvent::SessionEntryPoint entry_point); + + ClientTelemetryLogger(const ClientTelemetryLogger&) = delete; + ClientTelemetryLogger& operator=(const ClientTelemetryLogger&) = delete; + ~ClientTelemetryLogger(); void SetAuthMethod(ChromotingEvent::AuthMethod auth_method); @@ -119,8 +123,6 @@ ChromotingEventLogWriter* log_writer_; base::ThreadChecker thread_checker_; - - DISALLOW_COPY_AND_ASSIGN(ClientTelemetryLogger); }; } // namespace remoting
diff --git a/remoting/client/cursor_shape_stub_proxy.h b/remoting/client/cursor_shape_stub_proxy.h index 5f1b3a9..2e7ba65 100644 --- a/remoting/client/cursor_shape_stub_proxy.h +++ b/remoting/client/cursor_shape_stub_proxy.h
@@ -20,6 +20,10 @@ CursorShapeStubProxy( base::WeakPtr<protocol::CursorShapeStub> stub, scoped_refptr<base::SingleThreadTaskRunner> task_runner); + + CursorShapeStubProxy(const CursorShapeStubProxy&) = delete; + CursorShapeStubProxy& operator=(const CursorShapeStubProxy&) = delete; + ~CursorShapeStubProxy() override; // CursorShapeStub override. @@ -28,8 +32,6 @@ private: base::WeakPtr<protocol::CursorShapeStub> stub_; scoped_refptr<base::SingleThreadTaskRunner> task_runner_; - - DISALLOW_COPY_AND_ASSIGN(CursorShapeStubProxy); }; } // namespace remoting
diff --git a/remoting/client/display/canvas.h b/remoting/client/display/canvas.h index 44836825..fb04ee4b 100644 --- a/remoting/client/display/canvas.h +++ b/remoting/client/display/canvas.h
@@ -17,6 +17,10 @@ class Canvas { public: Canvas() {} + + Canvas(const Canvas&) = delete; + Canvas& operator=(const Canvas&) = delete; + virtual ~Canvas() {} // Clears the frame. @@ -67,9 +71,6 @@ // Intended to be given to a Drawable to draw onto. virtual base::WeakPtr<Canvas> GetWeakPtr() = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(Canvas); }; } // namespace remoting
diff --git a/remoting/client/display/drawable.h b/remoting/client/display/drawable.h index 3b8180b4..96c9ac7 100644 --- a/remoting/client/display/drawable.h +++ b/remoting/client/display/drawable.h
@@ -16,6 +16,10 @@ class Drawable { public: Drawable() {} + + Drawable(const Drawable&) = delete; + Drawable& operator=(const Drawable&) = delete; + virtual ~Drawable() {} // Sets the canvas on which the object will be drawn. @@ -39,9 +43,6 @@ // A higher Z Index shiould be draw ontop of a lower z index. Elements with // the same Z Index should draw in order inserted into the renderer. virtual int GetZIndex() = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(Drawable); }; } // namespace remoting
diff --git a/remoting/client/display/fake_canvas.h b/remoting/client/display/fake_canvas.h index e150dac..5fecedf 100644 --- a/remoting/client/display/fake_canvas.h +++ b/remoting/client/display/fake_canvas.h
@@ -17,6 +17,10 @@ class FakeCanvas : public Canvas { public: FakeCanvas(); + + FakeCanvas(const FakeCanvas&) = delete; + FakeCanvas& operator=(const FakeCanvas&) = delete; + ~FakeCanvas() override; // Drawable implementation. @@ -34,8 +38,6 @@ private: base::ThreadChecker thread_checker_; base::WeakPtrFactory<Canvas> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeCanvas); }; } // namespace remoting
diff --git a/remoting/client/display/gl_canvas.h b/remoting/client/display/gl_canvas.h index 9ed50d35..fa61561 100644 --- a/remoting/client/display/gl_canvas.h +++ b/remoting/client/display/gl_canvas.h
@@ -22,6 +22,10 @@ public: // gl_version: version number of the OpenGL ES context. Either 2 or 3. GlCanvas(int gl_version); + + GlCanvas(const GlCanvas&) = delete; + GlCanvas& operator=(const GlCanvas&) = delete; + ~GlCanvas() override; // Canvas implementation. @@ -58,8 +62,6 @@ base::ThreadChecker thread_checker_; base::WeakPtrFactory<Canvas> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(GlCanvas); }; } // namespace remoting
diff --git a/remoting/client/display/gl_cursor.h b/remoting/client/display/gl_cursor.h index a15fe16..ed7a143 100644 --- a/remoting/client/display/gl_cursor.h +++ b/remoting/client/display/gl_cursor.h
@@ -27,6 +27,10 @@ class GlCursor : public Drawable { public: GlCursor(); + + GlCursor(const GlCursor&) = delete; + GlCursor& operator=(const GlCursor&) = delete; + ~GlCursor() override; void SetCursorShape(const protocol::CursorShapeInfo& cursor_shape); @@ -63,8 +67,6 @@ base::ThreadChecker thread_checker_; base::WeakPtrFactory<Drawable> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(GlCursor); }; } // namespace remoting
diff --git a/remoting/client/display/gl_cursor_feedback.h b/remoting/client/display/gl_cursor_feedback.h index dcba54a0..53a03aeb 100644 --- a/remoting/client/display/gl_cursor_feedback.h +++ b/remoting/client/display/gl_cursor_feedback.h
@@ -24,6 +24,10 @@ class GlCursorFeedback : public Drawable { public: GlCursorFeedback(); + + GlCursorFeedback(const GlCursorFeedback&) = delete; + GlCursorFeedback& operator=(const GlCursorFeedback&) = delete; + ~GlCursorFeedback() override; void StartAnimation(float x, float y, float diameter); @@ -43,8 +47,6 @@ base::ThreadChecker thread_checker_; base::WeakPtrFactory<Drawable> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(GlCursorFeedback); }; } // namespace remoting
diff --git a/remoting/client/display/gl_desktop.h b/remoting/client/display/gl_desktop.h index d5953dca..9febca8 100644 --- a/remoting/client/display/gl_desktop.h +++ b/remoting/client/display/gl_desktop.h
@@ -26,6 +26,10 @@ class GlDesktop : public Drawable { public: GlDesktop(); + + GlDesktop(const GlDesktop&) = delete; + GlDesktop& operator=(const GlDesktop&) = delete; + ~GlDesktop() override; // |frame| can be either a full frame or updated regions only frame. @@ -49,8 +53,6 @@ base::WeakPtr<Canvas> canvas_ = nullptr; base::ThreadChecker thread_checker_; base::WeakPtrFactory<Drawable> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(GlDesktop); }; } // namespace remoting
diff --git a/remoting/client/display/gl_render_layer.h b/remoting/client/display/gl_render_layer.h index e330039..f738651 100644 --- a/remoting/client/display/gl_render_layer.h +++ b/remoting/client/display/gl_render_layer.h
@@ -26,6 +26,10 @@ // texture_id: An integer in range [0, GL_MAX_TEXTURE_IMAGE_UNITS], defining // which slot to store the texture. GlRenderLayer(int texture_id, base::WeakPtr<Canvas> canvas); + + GlRenderLayer(const GlRenderLayer&) = delete; + GlRenderLayer& operator=(const GlRenderLayer&) = delete; + ~GlRenderLayer(); // Sets the texture (RGBA 8888) to be drawn. Please use UpdateTexture() if the @@ -95,7 +99,6 @@ int update_buffer_size_ = 0; base::ThreadChecker thread_checker_; - DISALLOW_COPY_AND_ASSIGN(GlRenderLayer); }; } // namespace remoting
diff --git a/remoting/client/display/gl_renderer.h b/remoting/client/display/gl_renderer.h index 3c0b66c..b6f8a96 100644 --- a/remoting/client/display/gl_renderer.h +++ b/remoting/client/display/gl_renderer.h
@@ -40,6 +40,10 @@ class GlRenderer { public: explicit GlRenderer(); + + GlRenderer(const GlRenderer&) = delete; + GlRenderer& operator=(const GlRenderer&) = delete; + ~GlRenderer(); // The delegate can be set on any hread no more than once before calling any @@ -147,8 +151,6 @@ base::ThreadChecker thread_checker_; base::WeakPtr<GlRenderer> weak_ptr_; base::WeakPtrFactory<GlRenderer> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(GlRenderer); }; } // namespace remoting
diff --git a/remoting/client/display/renderer_proxy.h b/remoting/client/display/renderer_proxy.h index d8ee7da9..c041e68c 100644 --- a/remoting/client/display/renderer_proxy.h +++ b/remoting/client/display/renderer_proxy.h
@@ -25,6 +25,10 @@ public: // task_runner: The task runner that |renderer_| should be run on. RendererProxy(scoped_refptr<base::SingleThreadTaskRunner> task_runner); + + RendererProxy(const RendererProxy&) = delete; + RendererProxy& operator=(const RendererProxy&) = delete; + ~RendererProxy(); // Initialize with the renderer to be proxied. @@ -47,8 +51,6 @@ std::unique_ptr<remoting::QueuedTaskPoster> ui_task_poster_; THREAD_CHECKER(thread_checker_); - - DISALLOW_COPY_AND_ASSIGN(RendererProxy); }; } // namespace remoting
diff --git a/remoting/client/dual_buffer_frame_consumer.cc b/remoting/client/dual_buffer_frame_consumer.cc index 1cae22ed..c197f14 100644 --- a/remoting/client/dual_buffer_frame_consumer.cc +++ b/remoting/client/dual_buffer_frame_consumer.cc
@@ -29,14 +29,15 @@ class PaddedDesktopFrame : public webrtc::DesktopFrame { public: explicit PaddedDesktopFrame(webrtc::DesktopSize size); + + PaddedDesktopFrame(const PaddedDesktopFrame&) = delete; + PaddedDesktopFrame& operator=(const PaddedDesktopFrame&) = delete; + ~PaddedDesktopFrame() override; // Creates a PaddedDesktopFrame that contains copy of |frame|. static std::unique_ptr<webrtc::DesktopFrame> CopyOf( const webrtc::DesktopFrame& frame); - - private: - DISALLOW_COPY_AND_ASSIGN(PaddedDesktopFrame); }; PaddedDesktopFrame::PaddedDesktopFrame(webrtc::DesktopSize size)
diff --git a/remoting/client/dual_buffer_frame_consumer.h b/remoting/client/dual_buffer_frame_consumer.h index 37e4f29..6232316 100644 --- a/remoting/client/dual_buffer_frame_consumer.h +++ b/remoting/client/dual_buffer_frame_consumer.h
@@ -37,6 +37,10 @@ RenderCallback callback, scoped_refptr<base::SingleThreadTaskRunner> task_runner, PixelFormat format); + + DualBufferFrameConsumer(const DualBufferFrameConsumer&) = delete; + DualBufferFrameConsumer& operator=(const DualBufferFrameConsumer&) = delete; + ~DualBufferFrameConsumer() override; // Feeds the callback on the right thread with a BasicDesktopFrame that merges @@ -71,8 +75,6 @@ base::ThreadChecker thread_checker_; base::WeakPtr<DualBufferFrameConsumer> weak_ptr_; base::WeakPtrFactory<DualBufferFrameConsumer> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DualBufferFrameConsumer); }; } // namespace remoting
diff --git a/remoting/client/empty_cursor_filter.h b/remoting/client/empty_cursor_filter.h index 03eb347..8e925fe5 100644 --- a/remoting/client/empty_cursor_filter.h +++ b/remoting/client/empty_cursor_filter.h
@@ -23,6 +23,10 @@ class EmptyCursorFilter : public protocol::CursorShapeStub { public: explicit EmptyCursorFilter(protocol::CursorShapeStub* cursor_stub); + + EmptyCursorFilter(const EmptyCursorFilter&) = delete; + EmptyCursorFilter& operator=(const EmptyCursorFilter&) = delete; + ~EmptyCursorFilter() override; // protocol::CursorShapeStub interface. @@ -35,8 +39,6 @@ private: protocol::CursorShapeStub* cursor_stub_; - - DISALLOW_COPY_AND_ASSIGN(EmptyCursorFilter); }; } // namespace remoting
diff --git a/remoting/client/feedback_data.h b/remoting/client/feedback_data.h index 7eb332be..b3d305e5 100644 --- a/remoting/client/feedback_data.h +++ b/remoting/client/feedback_data.h
@@ -30,6 +30,10 @@ }; FeedbackData(); + + FeedbackData(const FeedbackData&) = delete; + FeedbackData& operator=(const FeedbackData&) = delete; + ~FeedbackData(); void SetData(Key key, const std::string& data); @@ -42,8 +46,6 @@ private: std::map<Key, std::string> data_; - - DISALLOW_COPY_AND_ASSIGN(FeedbackData); }; } // namespace remoting
diff --git a/remoting/client/gesture_interpreter.h b/remoting/client/gesture_interpreter.h index 7e1b2015..6122b38 100644 --- a/remoting/client/gesture_interpreter.h +++ b/remoting/client/gesture_interpreter.h
@@ -32,6 +32,10 @@ }; GestureInterpreter(); + + GestureInterpreter(const GestureInterpreter&) = delete; + GestureInterpreter& operator=(const GestureInterpreter&) = delete; + ~GestureInterpreter(); // Sets the context for the interpreter. Both arguments are nullable. If both @@ -120,9 +124,6 @@ FlingAnimation scroll_animation_; base::WeakPtrFactory<GestureInterpreter> weak_factory_{this}; - - // GestureInterpreter is neither copyable nor movable. - DISALLOW_COPY_AND_ASSIGN(GestureInterpreter); }; } // namespace remoting
diff --git a/remoting/client/input/key_event_mapper.h b/remoting/client/input/key_event_mapper.h index 008ebe2..caccde9 100644 --- a/remoting/client/input/key_event_mapper.h +++ b/remoting/client/input/key_event_mapper.h
@@ -24,6 +24,10 @@ public: KeyEventMapper(); explicit KeyEventMapper(InputStub* input_stub); + + KeyEventMapper(const KeyEventMapper&) = delete; + KeyEventMapper& operator=(const KeyEventMapper&) = delete; + ~KeyEventMapper() override; // Callback type for use with SetTrapCallback(), below. @@ -48,8 +52,6 @@ std::map<uint32_t, uint32_t> mapped_keys; std::set<uint32_t> trapped_keys; KeyTrapCallback trap_callback; - - DISALLOW_COPY_AND_ASSIGN(KeyEventMapper); }; } // namespace remoting
diff --git a/remoting/client/input/keyboard_interpreter.h b/remoting/client/input/keyboard_interpreter.h index bf4205a..061effd 100644 --- a/remoting/client/input/keyboard_interpreter.h +++ b/remoting/client/input/keyboard_interpreter.h
@@ -22,6 +22,10 @@ class KeyboardInterpreter { public: explicit KeyboardInterpreter(); + + KeyboardInterpreter(const KeyboardInterpreter&) = delete; + KeyboardInterpreter& operator=(const KeyboardInterpreter&) = delete; + ~KeyboardInterpreter(); // If |input_injector| is nullptr, all methods below will have no effect. @@ -43,8 +47,6 @@ private: std::unique_ptr<KeyboardInputStrategy> input_strategy_; - - DISALLOW_COPY_AND_ASSIGN(KeyboardInterpreter); }; } // namespace remoting
diff --git a/remoting/client/input/normalizing_input_filter_cros.h b/remoting/client/input/normalizing_input_filter_cros.h index fc3f911..377df19 100644 --- a/remoting/client/input/normalizing_input_filter_cros.h +++ b/remoting/client/input/normalizing_input_filter_cros.h
@@ -28,6 +28,11 @@ class NormalizingInputFilterCros : public protocol::InputFilter { public: explicit NormalizingInputFilterCros(protocol::InputStub* input_stub); + + NormalizingInputFilterCros(const NormalizingInputFilterCros&) = delete; + NormalizingInputFilterCros& operator=(const NormalizingInputFilterCros&) = + delete; + ~NormalizingInputFilterCros() override; // InputFilter overrides. @@ -61,8 +66,6 @@ // Previous mouse coordinates. int previous_mouse_x_; int previous_mouse_y_; - - DISALLOW_COPY_AND_ASSIGN(NormalizingInputFilterCros); }; } // namespace remoting
diff --git a/remoting/client/input/normalizing_input_filter_mac.h b/remoting/client/input/normalizing_input_filter_mac.h index 1d4e92d..bc5b978 100644 --- a/remoting/client/input/normalizing_input_filter_mac.h +++ b/remoting/client/input/normalizing_input_filter_mac.h
@@ -49,6 +49,11 @@ class NormalizingInputFilterMac : public protocol::InputFilter { public: explicit NormalizingInputFilterMac(protocol::InputStub* input_stub); + + NormalizingInputFilterMac(const NormalizingInputFilterMac&) = delete; + NormalizingInputFilterMac& operator=(const NormalizingInputFilterMac&) = + delete; + ~NormalizingInputFilterMac() override; // InputFilter overrides. @@ -62,8 +67,6 @@ // A map that stores pressed keycodes and the corresponding key event. KeyPressedMap key_pressed_map_; - - DISALLOW_COPY_AND_ASSIGN(NormalizingInputFilterMac); }; } // namespace remoting
diff --git a/remoting/client/input/normalizing_input_filter_win.h b/remoting/client/input/normalizing_input_filter_win.h index 12059b2..c2e758b 100644 --- a/remoting/client/input/normalizing_input_filter_win.h +++ b/remoting/client/input/normalizing_input_filter_win.h
@@ -29,6 +29,11 @@ class NormalizingInputFilterWin : public protocol::InputFilter { public: explicit NormalizingInputFilterWin(protocol::InputStub* input_stub); + + NormalizingInputFilterWin(const NormalizingInputFilterWin&) = delete; + NormalizingInputFilterWin& operator=(const NormalizingInputFilterWin&) = + delete; + ~NormalizingInputFilterWin() override; // InputFilter interface. @@ -51,8 +56,6 @@ // True if LeftControl is pressed as part of AltGr. bool altgr_is_pressed_ = false; - - DISALLOW_COPY_AND_ASSIGN(NormalizingInputFilterWin); }; } // namespace remoting
diff --git a/remoting/client/input/text_keyboard_input_strategy.h b/remoting/client/input/text_keyboard_input_strategy.h index e036b288..02ca26d5 100644 --- a/remoting/client/input/text_keyboard_input_strategy.h +++ b/remoting/client/input/text_keyboard_input_strategy.h
@@ -17,6 +17,11 @@ class TextKeyboardInputStrategy : public KeyboardInputStrategy { public: explicit TextKeyboardInputStrategy(ClientInputInjector* input_injector); + + TextKeyboardInputStrategy(const TextKeyboardInputStrategy&) = delete; + TextKeyboardInputStrategy& operator=(const TextKeyboardInputStrategy&) = + delete; + ~TextKeyboardInputStrategy() override; // KeyboardInputStrategy overrides. @@ -27,8 +32,6 @@ base::queue<KeyEvent> ConvertDeleteEvent(uint8_t modifiers); ClientInputInjector* input_injector_; - - DISALLOW_COPY_AND_ASSIGN(TextKeyboardInputStrategy); }; } // namespace remoting
diff --git a/remoting/client/input/touch_input_scaler.h b/remoting/client/input/touch_input_scaler.h index 87bf563..527b1396 100644 --- a/remoting/client/input/touch_input_scaler.h +++ b/remoting/client/input/touch_input_scaler.h
@@ -22,6 +22,10 @@ public: TouchInputScaler() = default; explicit TouchInputScaler(InputStub* input_stub); + + TouchInputScaler(const TouchInputScaler&) = delete; + TouchInputScaler& operator=(const TouchInputScaler&) = delete; + ~TouchInputScaler() override; // Set input and output desktop sizes. @@ -40,8 +44,6 @@ // These hold the max-X,Y coordinates and not the actual width and height. webrtc::DesktopSize input_size_; webrtc::DesktopSize output_size_; - - DISALLOW_COPY_AND_ASSIGN(TouchInputScaler); }; } // namespace remoting
diff --git a/remoting/client/jni/egl_thread_context.h b/remoting/client/jni/egl_thread_context.h index aa5645c..a45670b3 100644 --- a/remoting/client/jni/egl_thread_context.h +++ b/remoting/client/jni/egl_thread_context.h
@@ -25,6 +25,10 @@ }; EglThreadContext(); + + EglThreadContext(const EglThreadContext&) = delete; + EglThreadContext& operator=(const EglThreadContext&) = delete; + ~EglThreadContext(); // Creates a surface on the given window and binds the context to the surface. @@ -60,8 +64,6 @@ GlVersion client_version_ = GlVersion::UNKNOWN; base::ThreadChecker thread_checker_; - - DISALLOW_COPY_AND_ASSIGN(EglThreadContext); }; } // namespace remoting
diff --git a/remoting/client/jni/jni_client.h b/remoting/client/jni/jni_client.h index deebd36..72a6e96 100644 --- a/remoting/client/jni/jni_client.h +++ b/remoting/client/jni/jni_client.h
@@ -27,6 +27,10 @@ class JniClient : public ChromotingSession::Delegate { public: JniClient(base::android::ScopedJavaGlobalRef<jobject> java_client); + + JniClient(const JniClient&) = delete; + JniClient& operator=(const JniClient&) = delete; + ~JniClient() override; // Initiates a connection with the specified host. To skip the attempt at @@ -179,8 +183,6 @@ // Holds pointer for the UI thread. base::WeakPtr<JniClient> weak_ptr_; base::WeakPtrFactory<JniClient> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(JniClient); }; } // namespace remoting
diff --git a/remoting/client/jni/jni_gl_display_handler.cc b/remoting/client/jni/jni_gl_display_handler.cc index 59383d5..4579723 100644 --- a/remoting/client/jni/jni_gl_display_handler.cc +++ b/remoting/client/jni/jni_gl_display_handler.cc
@@ -28,6 +28,10 @@ public GlRendererDelegate { public: Core(base::WeakPtr<JniGlDisplayHandler> shell); + + Core(const Core&) = delete; + Core& operator=(const Core&) = delete; + ~Core() override; // GlRendererDelegate interface. @@ -75,8 +79,6 @@ // Used on display thread. base::WeakPtr<Core> weak_ptr_; base::WeakPtrFactory<Core> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(Core); }; JniGlDisplayHandler::Core::Core(base::WeakPtr<JniGlDisplayHandler> shell)
diff --git a/remoting/client/jni/jni_gl_display_handler.h b/remoting/client/jni/jni_gl_display_handler.h index acc3e47..0f3bc37 100644 --- a/remoting/client/jni/jni_gl_display_handler.h +++ b/remoting/client/jni/jni_gl_display_handler.h
@@ -30,6 +30,10 @@ class JniGlDisplayHandler { public: JniGlDisplayHandler(const base::android::JavaRef<jobject>& java_client); + + JniGlDisplayHandler(const JniGlDisplayHandler&) = delete; + JniGlDisplayHandler& operator=(const JniGlDisplayHandler&) = delete; + ~JniGlDisplayHandler(); std::unique_ptr<protocol::CursorShapeStub> CreateCursorShapeStub(); @@ -90,7 +94,6 @@ // Used on UI thread. base::WeakPtrFactory<JniGlDisplayHandler> weak_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(JniGlDisplayHandler); }; } // namespace remoting
diff --git a/remoting/client/jni/jni_notification_presenter.h b/remoting/client/jni/jni_notification_presenter.h index afdb5a9..f15575e 100644 --- a/remoting/client/jni/jni_notification_presenter.h +++ b/remoting/client/jni/jni_notification_presenter.h
@@ -21,6 +21,10 @@ public: explicit JniNotificationPresenter( const JavaObjectWeakGlobalRef& java_presenter); + + JniNotificationPresenter(const JniNotificationPresenter&) = delete; + JniNotificationPresenter& operator=(const JniNotificationPresenter&) = delete; + ~JniNotificationPresenter(); void FetchNotification(JNIEnv* env, @@ -33,8 +37,6 @@ JavaObjectWeakGlobalRef java_presenter_; NotificationClient notification_client_; scoped_refptr<base::SequencedTaskRunner> sequence_; - - DISALLOW_COPY_AND_ASSIGN(JniNotificationPresenter); }; } // namespace remoting
diff --git a/remoting/client/jni/jni_oauth_token_getter.h b/remoting/client/jni/jni_oauth_token_getter.h index e6b4232f..4675243 100644 --- a/remoting/client/jni/jni_oauth_token_getter.h +++ b/remoting/client/jni/jni_oauth_token_getter.h
@@ -28,6 +28,10 @@ }; JniOAuthTokenGetter(); + + JniOAuthTokenGetter(const JniOAuthTokenGetter&) = delete; + JniOAuthTokenGetter& operator=(const JniOAuthTokenGetter&) = delete; + ~JniOAuthTokenGetter() override; // OAuthTokenGetter overrides. @@ -41,7 +45,6 @@ base::WeakPtr<JniOAuthTokenGetter> weak_ptr_; base::WeakPtrFactory<JniOAuthTokenGetter> weak_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(JniOAuthTokenGetter); }; } // namespace remoting
diff --git a/remoting/client/jni/jni_touch_event_data.h b/remoting/client/jni/jni_touch_event_data.h index 03cccff..6e2a06a 100644 --- a/remoting/client/jni/jni_touch_event_data.h +++ b/remoting/client/jni/jni_touch_event_data.h
@@ -19,6 +19,10 @@ class JniTouchEventData { public: JniTouchEventData(); + + JniTouchEventData(const JniTouchEventData&) = delete; + JniTouchEventData& operator=(const JniTouchEventData&) = delete; + ~JniTouchEventData(); // Copies touch point data from a Java object to a C++ object. @@ -26,9 +30,6 @@ JNIEnv* env, const base::android::ScopedJavaLocalRef<jobject>& java_object, protocol::TouchEventPoint* touch_event_point); - - private: - DISALLOW_COPY_AND_ASSIGN(JniTouchEventData); }; } // namespace remoting
diff --git a/remoting/client/notification/gstatic_json_fetcher.h b/remoting/client/notification/gstatic_json_fetcher.h index 92002bf..d290855 100644 --- a/remoting/client/notification/gstatic_json_fetcher.h +++ b/remoting/client/notification/gstatic_json_fetcher.h
@@ -24,6 +24,10 @@ public: explicit GstaticJsonFetcher( scoped_refptr<base::SingleThreadTaskRunner> network_task_runner); + + GstaticJsonFetcher(const GstaticJsonFetcher&) = delete; + GstaticJsonFetcher& operator=(const GstaticJsonFetcher&) = delete; + ~GstaticJsonFetcher() override; // JsonFetcher implementation. @@ -43,8 +47,6 @@ scoped_refptr<URLRequestContextGetter> request_context_getter_; base::flat_map<std::unique_ptr<net::URLFetcher>, FetchJsonFileCallback> fetcher_callback_map_; - - DISALLOW_COPY_AND_ASSIGN(GstaticJsonFetcher); }; } // namespace remoting
diff --git a/remoting/client/notification/notification_client.h b/remoting/client/notification/notification_client.h index 871410f..a662e5f 100644 --- a/remoting/client/notification/notification_client.h +++ b/remoting/client/notification/notification_client.h
@@ -31,6 +31,10 @@ explicit NotificationClient( scoped_refptr<base::SingleThreadTaskRunner> network_task_runner); + + NotificationClient(const NotificationClient&) = delete; + NotificationClient& operator=(const NotificationClient&) = delete; + ~NotificationClient(); // Fetches notifications from the server and calls |callback| with the @@ -74,8 +78,6 @@ std::string current_version_; std::string locale_; bool should_ignore_dev_messages_; - - DISALLOW_COPY_AND_ASSIGN(NotificationClient); }; } // namespace remoting
diff --git a/remoting/client/notification/version_range.h b/remoting/client/notification/version_range.h index 1ac0601c..39586b20 100644 --- a/remoting/client/notification/version_range.h +++ b/remoting/client/notification/version_range.h
@@ -32,6 +32,10 @@ // // Min version must be less than or equal to max version. explicit VersionRange(const std::string& range_spec); + + VersionRange(const VersionRange&) = delete; + VersionRange& operator=(const VersionRange&) = delete; + ~VersionRange(); bool IsValid() const; @@ -43,8 +47,6 @@ bool is_min_version_inclusive_ = false; bool is_max_version_inclusive_ = false; - - DISALLOW_COPY_AND_ASSIGN(VersionRange); }; } // namespace remoting
diff --git a/remoting/client/software_video_renderer.h b/remoting/client/software_video_renderer.h index f6b96bf..b149d676 100644 --- a/remoting/client/software_video_renderer.h +++ b/remoting/client/software_video_renderer.h
@@ -48,6 +48,9 @@ explicit SoftwareVideoRenderer( std::unique_ptr<protocol::FrameConsumer> consumer); + SoftwareVideoRenderer(const SoftwareVideoRenderer&) = delete; + SoftwareVideoRenderer& operator=(const SoftwareVideoRenderer&) = delete; + ~SoftwareVideoRenderer() override; // VideoRenderer interface. @@ -86,8 +89,6 @@ base::ThreadChecker thread_checker_; base::WeakPtrFactory<SoftwareVideoRenderer> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SoftwareVideoRenderer); }; } // namespace remoting
diff --git a/remoting/codec/audio_decoder_opus.h b/remoting/codec/audio_decoder_opus.h index 5fb7d5d..5ff1a9c 100644 --- a/remoting/codec/audio_decoder_opus.h +++ b/remoting/codec/audio_decoder_opus.h
@@ -19,6 +19,10 @@ class AudioDecoderOpus : public AudioDecoder { public: AudioDecoderOpus(); + + AudioDecoderOpus(const AudioDecoderOpus&) = delete; + AudioDecoderOpus& operator=(const AudioDecoderOpus&) = delete; + ~AudioDecoderOpus() override; // AudioDecoder interface. @@ -33,8 +37,6 @@ int sampling_rate_; int channels_; OpusDecoder* decoder_; - - DISALLOW_COPY_AND_ASSIGN(AudioDecoderOpus); }; } // namespace remoting
diff --git a/remoting/codec/audio_encoder_opus.h b/remoting/codec/audio_encoder_opus.h index d692f655..77a1027 100644 --- a/remoting/codec/audio_encoder_opus.h +++ b/remoting/codec/audio_encoder_opus.h
@@ -26,6 +26,10 @@ class AudioEncoderOpus : public AudioEncoder { public: AudioEncoderOpus(); + + AudioEncoderOpus(const AudioEncoderOpus&) = delete; + AudioEncoderOpus& operator=(const AudioEncoderOpus&) = delete; + ~AudioEncoderOpus() override; // AudioEncoder interface. @@ -59,8 +63,6 @@ std::unique_ptr<int16_t[]> leftover_buffer_; int leftover_buffer_size_; int leftover_samples_; - - DISALLOW_COPY_AND_ASSIGN(AudioEncoderOpus); }; } // namespace remoting
diff --git a/remoting/codec/codec_test.cc b/remoting/codec/codec_test.cc index 82a0941..00d6a320 100644 --- a/remoting/codec/codec_test.cc +++ b/remoting/codec/codec_test.cc
@@ -177,6 +177,9 @@ public: VideoEncoderTester() : decoder_tester_(nullptr), data_available_(0) {} + VideoEncoderTester(const VideoEncoderTester&) = delete; + VideoEncoderTester& operator=(const VideoEncoderTester&) = delete; + ~VideoEncoderTester() { EXPECT_GT(data_available_, 0); } @@ -196,8 +199,6 @@ private: VideoDecoderTester* decoder_tester_; int data_available_; - - DISALLOW_COPY_AND_ASSIGN(VideoEncoderTester); }; std::unique_ptr<DesktopFrame> PrepareFrame(const DesktopSize& size) {
diff --git a/remoting/codec/video_decoder_verbatim.h b/remoting/codec/video_decoder_verbatim.h index b1e52384..7b42c735 100644 --- a/remoting/codec/video_decoder_verbatim.h +++ b/remoting/codec/video_decoder_verbatim.h
@@ -19,15 +19,16 @@ class VideoDecoderVerbatim : public VideoDecoder { public: VideoDecoderVerbatim(); + + VideoDecoderVerbatim(const VideoDecoderVerbatim&) = delete; + VideoDecoderVerbatim& operator=(const VideoDecoderVerbatim&) = delete; + ~VideoDecoderVerbatim() override; // VideoDecoder implementation. void SetPixelFormat(PixelFormat pixel_format) override; bool DecodePacket(const VideoPacket& packet, webrtc::DesktopFrame* frame) override; - - private: - DISALLOW_COPY_AND_ASSIGN(VideoDecoderVerbatim); }; } // namespace remoting
diff --git a/remoting/codec/video_decoder_vpx.h b/remoting/codec/video_decoder_vpx.h index d1ad98b4..5486576 100644 --- a/remoting/codec/video_decoder_vpx.h +++ b/remoting/codec/video_decoder_vpx.h
@@ -23,6 +23,9 @@ static std::unique_ptr<VideoDecoderVpx> CreateForVP8(); static std::unique_ptr<VideoDecoderVpx> CreateForVP9(); + VideoDecoderVpx(const VideoDecoderVpx&) = delete; + VideoDecoderVpx& operator=(const VideoDecoderVpx&) = delete; + ~VideoDecoderVpx() override; // VideoDecoder interface. @@ -35,8 +38,6 @@ ScopedVpxCodec codec_; PixelFormat pixel_format_ = PixelFormat::BGRA; - - DISALLOW_COPY_AND_ASSIGN(VideoDecoderVpx); }; } // namespace remoting
diff --git a/remoting/codec/video_encoder_verbatim.h b/remoting/codec/video_encoder_verbatim.h index e4e0701..00adb9f2 100644 --- a/remoting/codec/video_encoder_verbatim.h +++ b/remoting/codec/video_encoder_verbatim.h
@@ -16,6 +16,10 @@ class VideoEncoderVerbatim : public VideoEncoder { public: VideoEncoderVerbatim(); + + VideoEncoderVerbatim(const VideoEncoderVerbatim&) = delete; + VideoEncoderVerbatim& operator=(const VideoEncoderVerbatim&) = delete; + ~VideoEncoderVerbatim() override; // VideoEncoder interface. @@ -24,8 +28,6 @@ private: VideoEncoderHelper helper_; - - DISALLOW_COPY_AND_ASSIGN(VideoEncoderVerbatim); }; } // namespace remoting
diff --git a/remoting/codec/video_encoder_vpx.h b/remoting/codec/video_encoder_vpx.h index 3ad6084..5b42bfc 100644 --- a/remoting/codec/video_encoder_vpx.h +++ b/remoting/codec/video_encoder_vpx.h
@@ -30,6 +30,9 @@ static std::unique_ptr<VideoEncoderVpx> CreateForVP8(); static std::unique_ptr<VideoEncoderVpx> CreateForVP9(); + VideoEncoderVpx(const VideoEncoderVpx&) = delete; + VideoEncoderVpx& operator=(const VideoEncoderVpx&) = delete; + ~VideoEncoderVpx() override; void SetTickClockForTests(const base::TickClock* tick_clock); @@ -89,8 +92,6 @@ VideoEncoderHelper helper_; const base::TickClock* clock_; - - DISALLOW_COPY_AND_ASSIGN(VideoEncoderVpx); }; } // namespace remoting
diff --git a/remoting/codec/webrtc_video_encoder_vpx.h b/remoting/codec/webrtc_video_encoder_vpx.h index 7edd361a..f97c5d5 100644 --- a/remoting/codec/webrtc_video_encoder_vpx.h +++ b/remoting/codec/webrtc_video_encoder_vpx.h
@@ -41,6 +41,9 @@ static bool IsSupportedByVP9( const WebrtcVideoEncoderSelector::Profile& profile); + WebrtcVideoEncoderVpx(const WebrtcVideoEncoderVpx&) = delete; + WebrtcVideoEncoderVpx& operator=(const WebrtcVideoEncoderVpx&) = delete; + ~WebrtcVideoEncoderVpx() override; void SetTickClockForTests(const base::TickClock* tick_clock); @@ -105,8 +108,6 @@ const base::TickClock* clock_; EncoderBitrateFilter bitrate_filter_; - - DISALLOW_COPY_AND_ASSIGN(WebrtcVideoEncoderVpx); }; } // namespace remoting
diff --git a/remoting/host/action_executor.h b/remoting/host/action_executor.h index 0b738f8..39da71c 100644 --- a/remoting/host/action_executor.h +++ b/remoting/host/action_executor.h
@@ -17,6 +17,9 @@ class ActionExecutor { public: + ActionExecutor(const ActionExecutor&) = delete; + ActionExecutor& operator=(const ActionExecutor&) = delete; + virtual ~ActionExecutor(); // Creates an action executor for the current platform / host architecture. @@ -28,9 +31,6 @@ protected: ActionExecutor(); - - private: - DISALLOW_COPY_AND_ASSIGN(ActionExecutor); }; } // namespace remoting
diff --git a/remoting/host/action_message_handler.h b/remoting/host/action_message_handler.h index 251fb466..47b56fd2 100644 --- a/remoting/host/action_message_handler.h +++ b/remoting/host/action_message_handler.h
@@ -27,6 +27,10 @@ const std::vector<protocol::ActionRequest::Action>& actions, std::unique_ptr<protocol::MessagePipe> pipe, std::unique_ptr<ActionExecutor> action_executor); + + ActionMessageHandler(const ActionMessageHandler&) = delete; + ActionMessageHandler& operator=(const ActionMessageHandler&) = delete; + ~ActionMessageHandler() override; // protocol::NamedMessagePipeHandler implementation. @@ -37,8 +41,6 @@ // Populated via the negotiated capabilities between host and client. base::flat_set<protocol::ActionRequest::Action> supported_actions_; - - DISALLOW_COPY_AND_ASSIGN(ActionMessageHandler); }; } // namespace remoting
diff --git a/remoting/host/audio_capturer_linux.h b/remoting/host/audio_capturer_linux.h index 1b23158..83e25cf 100644 --- a/remoting/host/audio_capturer_linux.h +++ b/remoting/host/audio_capturer_linux.h
@@ -32,6 +32,10 @@ explicit AudioCapturerLinux( scoped_refptr<AudioPipeReader> pipe_reader); + + AudioCapturerLinux(const AudioCapturerLinux&) = delete; + AudioCapturerLinux& operator=(const AudioCapturerLinux&) = delete; + ~AudioCapturerLinux() override; // AudioCapturer interface. @@ -45,8 +49,6 @@ PacketCapturedCallback callback_; AudioSilenceDetector silence_detector_; - - DISALLOW_COPY_AND_ASSIGN(AudioCapturerLinux); }; } // namespace remoting
diff --git a/remoting/host/audio_capturer_win.h b/remoting/host/audio_capturer_win.h index 0260613..7f5c3cc 100644 --- a/remoting/host/audio_capturer_win.h +++ b/remoting/host/audio_capturer_win.h
@@ -30,6 +30,10 @@ class AudioCapturerWin : public AudioCapturer { public: AudioCapturerWin(); + + AudioCapturerWin(const AudioCapturerWin&) = delete; + AudioCapturerWin& operator=(const AudioCapturerWin&) = delete; + ~AudioCapturerWin() override; // AudioCapturer interface. @@ -78,8 +82,6 @@ HRESULT last_capture_error_; base::ThreadChecker thread_checker_; - - DISALLOW_COPY_AND_ASSIGN(AudioCapturerWin); }; } // namespace remoting
diff --git a/remoting/host/backoff_timer.h b/remoting/host/backoff_timer.h index 672cfc1..354dbf4 100644 --- a/remoting/host/backoff_timer.h +++ b/remoting/host/backoff_timer.h
@@ -18,6 +18,10 @@ class BackoffTimer { public: BackoffTimer(); + + BackoffTimer(const BackoffTimer&) = delete; + BackoffTimer& operator=(const BackoffTimer&) = delete; + ~BackoffTimer(); // Invokes |user_task| at intervals specified by |delay|, and @@ -43,8 +47,6 @@ base::Location posted_from_; net::BackoffEntry::Policy backoff_policy_ = {}; std::unique_ptr<net::BackoffEntry> backoff_entry_; - - DISALLOW_COPY_AND_ASSIGN(BackoffTimer); }; } // namespace remoting
diff --git a/remoting/host/basic_desktop_environment.h b/remoting/host/basic_desktop_environment.h index 413aa63..7b8fa56 100644 --- a/remoting/host/basic_desktop_environment.h +++ b/remoting/host/basic_desktop_environment.h
@@ -30,6 +30,9 @@ // the local console. class BasicDesktopEnvironment : public DesktopEnvironment { public: + BasicDesktopEnvironment(const BasicDesktopEnvironment&) = delete; + BasicDesktopEnvironment& operator=(const BasicDesktopEnvironment&) = delete; + ~BasicDesktopEnvironment() override; // DesktopEnvironment implementation. @@ -110,8 +113,6 @@ base::WeakPtr<ClientSessionControl> client_session_control_; DesktopEnvironmentOptions options_; - - DISALLOW_COPY_AND_ASSIGN(BasicDesktopEnvironment); }; // Used to create |BasicDesktopEnvironment| instances. @@ -122,6 +123,12 @@ scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner, scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); + + BasicDesktopEnvironmentFactory(const BasicDesktopEnvironmentFactory&) = + delete; + BasicDesktopEnvironmentFactory& operator=( + const BasicDesktopEnvironmentFactory&) = delete; + ~BasicDesktopEnvironmentFactory() override; // DesktopEnvironmentFactory implementation. @@ -158,8 +165,6 @@ // Used to run UI code. scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; - - DISALLOW_COPY_AND_ASSIGN(BasicDesktopEnvironmentFactory); }; } // namespace remoting
diff --git a/remoting/host/chromeos/aura_desktop_capturer.h b/remoting/host/chromeos/aura_desktop_capturer.h index f58e24fc..a6c0fe8 100644 --- a/remoting/host/chromeos/aura_desktop_capturer.h +++ b/remoting/host/chromeos/aura_desktop_capturer.h
@@ -28,6 +28,10 @@ class AuraDesktopCapturer : public webrtc::DesktopCapturer { public: AuraDesktopCapturer(); + + AuraDesktopCapturer(const AuraDesktopCapturer&) = delete; + AuraDesktopCapturer& operator=(const AuraDesktopCapturer&) = delete; + ~AuraDesktopCapturer() override; // webrtc::DesktopCapturer implementation. @@ -49,8 +53,6 @@ aura::Window* desktop_window_; base::WeakPtrFactory<AuraDesktopCapturer> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(AuraDesktopCapturer); }; } // namespace remoting
diff --git a/remoting/host/chromeos/clipboard_aura.h b/remoting/host/chromeos/clipboard_aura.h index 5262fc37..28909b9b 100644 --- a/remoting/host/chromeos/clipboard_aura.h +++ b/remoting/host/chromeos/clipboard_aura.h
@@ -34,6 +34,10 @@ class ClipboardAura : public Clipboard { public: explicit ClipboardAura(); + + ClipboardAura(const ClipboardAura&) = delete; + ClipboardAura& operator=(const ClipboardAura&) = delete; + ~ClipboardAura() override; // Clipboard interface. @@ -52,8 +56,6 @@ base::RepeatingTimer clipboard_polling_timer_; ui::ClipboardSequenceNumberToken current_change_token_; base::TimeDelta polling_interval_; - - DISALLOW_COPY_AND_ASSIGN(ClipboardAura); }; } // namespace remoting
diff --git a/remoting/host/chromeos/message_box.h b/remoting/host/chromeos/message_box.h index cf5747b..f198317 100644 --- a/remoting/host/chromeos/message_box.h +++ b/remoting/host/chromeos/message_box.h
@@ -35,6 +35,10 @@ const std::u16string& ok_label, const std::u16string& cancel_label, ResultCallback result_callback); + + MessageBox(const MessageBox&) = delete; + MessageBox& operator=(const MessageBox&) = delete; + ~MessageBox(); void Show(); @@ -43,8 +47,6 @@ class Core; Core* core_; base::ThreadChecker thread_checker_; - - DISALLOW_COPY_AND_ASSIGN(MessageBox); }; } // namespace remoting
diff --git a/remoting/host/chromeos/point_transformer.h b/remoting/host/chromeos/point_transformer.h index 46d08f2..06106b6 100644 --- a/remoting/host/chromeos/point_transformer.h +++ b/remoting/host/chromeos/point_transformer.h
@@ -31,6 +31,10 @@ class PointTransformer : public aura::WindowObserver { public: PointTransformer(); + + PointTransformer(const PointTransformer&) = delete; + PointTransformer& operator=(const PointTransformer&) = delete; + ~PointTransformer() override; // Converts from root window coordinates to native screen coordinates. @@ -48,8 +52,6 @@ aura::Window* root_window_; gfx::Transform root_to_screen_; gfx::Transform screen_to_root_; - - DISALLOW_COPY_AND_ASSIGN(PointTransformer); }; } // namespace remoting
diff --git a/remoting/host/chromeos/skia_bitmap_desktop_frame.h b/remoting/host/chromeos/skia_bitmap_desktop_frame.h index 8798e07a..6b8613db 100644 --- a/remoting/host/chromeos/skia_bitmap_desktop_frame.h +++ b/remoting/host/chromeos/skia_bitmap_desktop_frame.h
@@ -20,6 +20,10 @@ class SkiaBitmapDesktopFrame : public webrtc::DesktopFrame { public: static SkiaBitmapDesktopFrame* Create(std::unique_ptr<SkBitmap> bitmap); + + SkiaBitmapDesktopFrame(const SkiaBitmapDesktopFrame&) = delete; + SkiaBitmapDesktopFrame& operator=(const SkiaBitmapDesktopFrame&) = delete; + ~SkiaBitmapDesktopFrame() override; private: @@ -29,8 +33,6 @@ std::unique_ptr<SkBitmap> bitmap); std::unique_ptr<SkBitmap> bitmap_; - - DISALLOW_COPY_AND_ASSIGN(SkiaBitmapDesktopFrame); }; } // namespace remoting
diff --git a/remoting/host/chromoting_host.h b/remoting/host/chromoting_host.h index b6532f6e..dc5edd22 100644 --- a/remoting/host/chromoting_host.h +++ b/remoting/host/chromoting_host.h
@@ -73,6 +73,10 @@ scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner, scoped_refptr<base::SingleThreadTaskRunner> video_encode_task_runner, const DesktopEnvironmentOptions& options); + + ChromotingHost(const ChromotingHost&) = delete; + ChromotingHost& operator=(const ChromotingHost&) = delete; + ~ChromotingHost() override; // Asynchronously starts the host. @@ -174,8 +178,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<ChromotingHost> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ChromotingHost); }; } // namespace remoting
diff --git a/remoting/host/chromoting_host_context.h b/remoting/host/chromoting_host_context.h index 1d83ada..d07fb91c 100644 --- a/remoting/host/chromoting_host_context.h +++ b/remoting/host/chromoting_host_context.h
@@ -57,6 +57,9 @@ scoped_refptr<base::SingleThreadTaskRunner> file_task_runner); #endif // BUILDFLAG(IS_CHROMEOS_ASH) + ChromotingHostContext(const ChromotingHostContext&) = delete; + ChromotingHostContext& operator=(const ChromotingHostContext&) = delete; + ~ChromotingHostContext(); std::unique_ptr<ChromotingHostContext> Copy(); @@ -137,8 +140,6 @@ // Makes a SharedURLLoaderFactory out of |url_request_context_getter_| std::unique_ptr<network::TransitionalURLLoaderFactoryOwner> url_loader_factory_owner_; - - DISALLOW_COPY_AND_ASSIGN(ChromotingHostContext); }; } // namespace remoting
diff --git a/remoting/host/clipboard_mac.mm b/remoting/host/clipboard_mac.mm index 5c75d875..7e1e271 100644 --- a/remoting/host/clipboard_mac.mm +++ b/remoting/host/clipboard_mac.mm
@@ -32,6 +32,10 @@ class ClipboardMac : public Clipboard { public: ClipboardMac(); + + ClipboardMac(const ClipboardMac&) = delete; + ClipboardMac& operator=(const ClipboardMac&) = delete; + ~ClipboardMac() override; void Start( @@ -44,8 +48,6 @@ std::unique_ptr<protocol::ClipboardStub> client_clipboard_; std::unique_ptr<base::RepeatingTimer> clipboard_polling_timer_; NSInteger current_change_count_; - - DISALLOW_COPY_AND_ASSIGN(ClipboardMac); }; ClipboardMac::ClipboardMac() : current_change_count_(0) {}
diff --git a/remoting/host/clipboard_win.cc b/remoting/host/clipboard_win.cc index 8aa9bda..668b47b 100644 --- a/remoting/host/clipboard_win.cc +++ b/remoting/host/clipboard_win.cc
@@ -106,6 +106,10 @@ class ClipboardWin : public Clipboard { public: ClipboardWin(); + + ClipboardWin(const ClipboardWin&) = delete; + ClipboardWin& operator=(const ClipboardWin&) = delete; + ~ClipboardWin() override; void Start( @@ -125,8 +129,6 @@ std::unique_ptr<protocol::ClipboardStub> client_clipboard_; // Used to subscribe to WM_CLIPBOARDUPDATE messages. std::unique_ptr<base::win::MessageWindow> window_; - - DISALLOW_COPY_AND_ASSIGN(ClipboardWin); }; ClipboardWin::ClipboardWin() {}
diff --git a/remoting/host/clipboard_x11.cc b/remoting/host/clipboard_x11.cc index 64be1bb..dddf2832 100644 --- a/remoting/host/clipboard_x11.cc +++ b/remoting/host/clipboard_x11.cc
@@ -21,6 +21,10 @@ class ClipboardX11 : public Clipboard, public x11::EventObserver { public: ClipboardX11(); + + ClipboardX11(const ClipboardX11&) = delete; + ClipboardX11& operator=(const ClipboardX11&) = delete; + ~ClipboardX11() override; void Init(); @@ -45,8 +49,6 @@ // Connection to the X server, used by |x_server_clipboard_|. This must only // be accessed on the input thread. x11::Connection* connection_; - - DISALLOW_COPY_AND_ASSIGN(ClipboardX11); }; ClipboardX11::ClipboardX11() = default;
diff --git a/remoting/host/config_file_watcher.h b/remoting/host/config_file_watcher.h index cfdc217..3587e98 100644 --- a/remoting/host/config_file_watcher.h +++ b/remoting/host/config_file_watcher.h
@@ -30,6 +30,10 @@ scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, const base::FilePath& config_path); + + ConfigFileWatcher(const ConfigFileWatcher&) = delete; + ConfigFileWatcher& operator=(const ConfigFileWatcher&) = delete; + ~ConfigFileWatcher() override; // Inherited from ConfigWatcher. @@ -37,8 +41,6 @@ private: scoped_refptr<ConfigFileWatcherImpl> impl_; - - DISALLOW_COPY_AND_ASSIGN(ConfigFileWatcher); }; } // namespace remoting
diff --git a/remoting/host/config_file_watcher_unittest.cc b/remoting/host/config_file_watcher_unittest.cc index b47608a..a483b29 100644 --- a/remoting/host/config_file_watcher_unittest.cc +++ b/remoting/host/config_file_watcher_unittest.cc
@@ -28,13 +28,15 @@ class ConfigFileWatcherDelegate : public ConfigFileWatcher::Delegate { public: ConfigFileWatcherDelegate() = default; + + ConfigFileWatcherDelegate(const ConfigFileWatcherDelegate&) = delete; + ConfigFileWatcherDelegate& operator=(const ConfigFileWatcherDelegate&) = + delete; + ~ConfigFileWatcherDelegate() override = default; MOCK_METHOD1(OnConfigUpdated, void(const std::string&)); MOCK_METHOD0(OnConfigWatcherError, void()); - - private: - DISALLOW_COPY_AND_ASSIGN(ConfigFileWatcherDelegate); }; } // namespace
diff --git a/remoting/host/config_watcher.h b/remoting/host/config_watcher.h index 3b150dc..ea6e5f9 100644 --- a/remoting/host/config_watcher.h +++ b/remoting/host/config_watcher.h
@@ -31,9 +31,10 @@ ConfigWatcher() {} + ConfigWatcher(const ConfigWatcher&) = delete; + ConfigWatcher& operator=(const ConfigWatcher&) = delete; + virtual ~ConfigWatcher() {} - private: - DISALLOW_COPY_AND_ASSIGN(ConfigWatcher); }; } // namespace remoting
diff --git a/remoting/host/continue_window.h b/remoting/host/continue_window.h index 9af72d8b..c72a9fc 100644 --- a/remoting/host/continue_window.h +++ b/remoting/host/continue_window.h
@@ -14,6 +14,9 @@ class ContinueWindow : public HostWindow { public: + ContinueWindow(const ContinueWindow&) = delete; + ContinueWindow& operator=(const ContinueWindow&) = delete; + ~ContinueWindow() override; // HostWindow override. @@ -46,8 +49,6 @@ // Used to ask the local user whether the session should be continued. base::OneShotTimer session_expired_timer_; - - DISALLOW_COPY_AND_ASSIGN(ContinueWindow); }; } // namespace remoting
diff --git a/remoting/host/continue_window_chromeos.cc b/remoting/host/continue_window_chromeos.cc index 674ebff..4108765 100644 --- a/remoting/host/continue_window_chromeos.cc +++ b/remoting/host/continue_window_chromeos.cc
@@ -19,6 +19,10 @@ class ContinueWindowAura : public ContinueWindow { public: ContinueWindowAura(); + + ContinueWindowAura(const ContinueWindowAura&) = delete; + ContinueWindowAura& operator=(const ContinueWindowAura&) = delete; + ~ContinueWindowAura() override; void OnMessageBoxResult(MessageBox::Result result); @@ -30,7 +34,6 @@ private: std::unique_ptr<MessageBox> message_box_; - DISALLOW_COPY_AND_ASSIGN(ContinueWindowAura); }; ContinueWindowAura::ContinueWindowAura() = default;
diff --git a/remoting/host/continue_window_linux.cc b/remoting/host/continue_window_linux.cc index 83102dd..491562a8 100644 --- a/remoting/host/continue_window_linux.cc +++ b/remoting/host/continue_window_linux.cc
@@ -21,6 +21,10 @@ class ContinueWindowGtk : public ContinueWindow { public: ContinueWindowGtk(); + + ContinueWindowGtk(const ContinueWindowGtk&) = delete; + ContinueWindowGtk& operator=(const ContinueWindowGtk&) = delete; + ~ContinueWindowGtk() override; protected: @@ -34,8 +38,6 @@ CHROMEG_CALLBACK_1(ContinueWindowGtk, void, OnResponse, GtkDialog*, int); GtkWidget* continue_window_; - - DISALLOW_COPY_AND_ASSIGN(ContinueWindowGtk); }; ContinueWindowGtk::ContinueWindowGtk()
diff --git a/remoting/host/continue_window_mac.mm b/remoting/host/continue_window_mac.mm index 8ea8ca18..87c84b0 100644 --- a/remoting/host/continue_window_mac.mm +++ b/remoting/host/continue_window_mac.mm
@@ -38,6 +38,10 @@ class ContinueWindowMac : public ContinueWindow { public: ContinueWindowMac(); + + ContinueWindowMac(const ContinueWindowMac&) = delete; + ContinueWindowMac& operator=(const ContinueWindowMac&) = delete; + ~ContinueWindowMac() override; protected: @@ -47,8 +51,6 @@ private: base::scoped_nsobject<ContinueWindowMacController> controller_; - - DISALLOW_COPY_AND_ASSIGN(ContinueWindowMac); }; ContinueWindowMac::ContinueWindowMac() {
diff --git a/remoting/host/continue_window_win.cc b/remoting/host/continue_window_win.cc index a7efed90..042d4fa 100644 --- a/remoting/host/continue_window_win.cc +++ b/remoting/host/continue_window_win.cc
@@ -26,6 +26,10 @@ class ContinueWindowWin : public ContinueWindow { public: ContinueWindowWin(); + + ContinueWindowWin(const ContinueWindowWin&) = delete; + ContinueWindowWin& operator=(const ContinueWindowWin&) = delete; + ~ContinueWindowWin() override; protected: @@ -42,8 +46,6 @@ void EndDialog(); HWND hwnd_; - - DISALLOW_COPY_AND_ASSIGN(ContinueWindowWin); }; ContinueWindowWin::ContinueWindowWin()
diff --git a/remoting/host/curtain_mode.h b/remoting/host/curtain_mode.h index 5e39710..3be387e2 100644 --- a/remoting/host/curtain_mode.h +++ b/remoting/host/curtain_mode.h
@@ -22,6 +22,9 @@ class CurtainMode { public: + CurtainMode(const CurtainMode&) = delete; + CurtainMode& operator=(const CurtainMode&) = delete; + virtual ~CurtainMode() {} // Creates a platform-specific curtain mode implementation object that @@ -39,9 +42,6 @@ protected: CurtainMode() {} - - private: - DISALLOW_COPY_AND_ASSIGN(CurtainMode); }; } // namespace remoting
diff --git a/remoting/host/curtain_mode_mac.cc b/remoting/host/curtain_mode_mac.cc index 38c60ac9e..aec94617 100644 --- a/remoting/host/curtain_mode_mac.cc +++ b/remoting/host/curtain_mode_mac.cc
@@ -290,6 +290,10 @@ scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, base::WeakPtr<ClientSessionControl> client_session_control); + + CurtainModeMac(const CurtainModeMac&) = delete; + CurtainModeMac& operator=(const CurtainModeMac&) = delete; + ~CurtainModeMac() override; // Overriden from CurtainMode. @@ -297,8 +301,6 @@ private: scoped_refptr<SessionWatcher> session_watcher_; - - DISALLOW_COPY_AND_ASSIGN(CurtainModeMac); }; CurtainModeMac::CurtainModeMac(
diff --git a/remoting/host/daemon_process.h b/remoting/host/daemon_process.h index c6a4589..b048d5bd 100644 --- a/remoting/host/daemon_process.h +++ b/remoting/host/daemon_process.h
@@ -48,6 +48,9 @@ public: typedef std::list<DesktopSession*> DesktopSessionList; + DaemonProcess(const DaemonProcess&) = delete; + DaemonProcess& operator=(const DaemonProcess&) = delete; + ~DaemonProcess() override; // Creates a platform-specific implementation of the daemon process object @@ -209,8 +212,6 @@ int process_stats_request_count_ = 0; CurrentProcessStatsAgent current_process_stats_; - - DISALLOW_COPY_AND_ASSIGN(DaemonProcess); }; } // namespace remoting
diff --git a/remoting/host/daemon_process_unittest.cc b/remoting/host/daemon_process_unittest.cc index a1097e93..15866b8 100644 --- a/remoting/host/daemon_process_unittest.cc +++ b/remoting/host/daemon_process_unittest.cc
@@ -50,12 +50,13 @@ class FakeDesktopSession : public DesktopSession { public: FakeDesktopSession(DaemonProcess* daemon_process, int id); + + FakeDesktopSession(const FakeDesktopSession&) = delete; + FakeDesktopSession& operator=(const FakeDesktopSession&) = delete; + ~FakeDesktopSession() override; void SetScreenResolution(const ScreenResolution& resolution) override {} - - private: - DISALLOW_COPY_AND_ASSIGN(FakeDesktopSession); }; class MockDaemonProcess : public DaemonProcess { @@ -63,6 +64,10 @@ MockDaemonProcess(scoped_refptr<AutoThreadTaskRunner> caller_task_runner, scoped_refptr<AutoThreadTaskRunner> io_task_runner, base::OnceClosure stopped_callback); + + MockDaemonProcess(const MockDaemonProcess&) = delete; + MockDaemonProcess& operator=(const MockDaemonProcess&) = delete; + ~MockDaemonProcess() override; std::unique_ptr<DesktopSession> DoCreateDesktopSession( @@ -82,9 +87,6 @@ MOCK_METHOD1(DoCreateDesktopSessionPtr, DesktopSession*(int)); MOCK_METHOD1(DoCrashNetworkProcess, void(const base::Location&)); MOCK_METHOD0(LaunchNetworkProcess, void()); - - private: - DISALLOW_COPY_AND_ASSIGN(MockDaemonProcess); }; FakeDesktopSession::FakeDesktopSession(DaemonProcess* daemon_process, int id)
diff --git a/remoting/host/daemon_process_win.cc b/remoting/host/daemon_process_win.cc index 257ed5a..0d164415 100644 --- a/remoting/host/daemon_process_win.cc +++ b/remoting/host/daemon_process_win.cc
@@ -86,6 +86,10 @@ DaemonProcessWin(scoped_refptr<AutoThreadTaskRunner> caller_task_runner, scoped_refptr<AutoThreadTaskRunner> io_task_runner, base::OnceClosure stopped_callback); + + DaemonProcessWin(const DaemonProcessWin&) = delete; + DaemonProcessWin& operator=(const DaemonProcessWin&) = delete; + ~DaemonProcessWin() override; // WorkerProcessIpcDelegate implementation. @@ -139,8 +143,6 @@ base::win::RegKey pairing_registry_unprivileged_key_; std::unique_ptr<EtwTraceConsumer> etw_trace_consumer_; - - DISALLOW_COPY_AND_ASSIGN(DaemonProcessWin); }; DaemonProcessWin::DaemonProcessWin(
diff --git a/remoting/host/desktop_and_cursor_composer_notifier.h b/remoting/host/desktop_and_cursor_composer_notifier.h index dab0b22f..16537718 100644 --- a/remoting/host/desktop_and_cursor_composer_notifier.h +++ b/remoting/host/desktop_and_cursor_composer_notifier.h
@@ -22,6 +22,12 @@ DesktopAndCursorComposerNotifier(InputStub* input_stub, EventHandler* event_handler_); + + DesktopAndCursorComposerNotifier(const DesktopAndCursorComposerNotifier&) = + delete; + DesktopAndCursorComposerNotifier& operator=( + const DesktopAndCursorComposerNotifier&) = delete; + ~DesktopAndCursorComposerNotifier() override; // InputStub overrides. @@ -35,8 +41,6 @@ EventHandler* event_handler_; bool has_triggered_ = false; bool is_enabled_ = false; - - DISALLOW_COPY_AND_ASSIGN(DesktopAndCursorComposerNotifier); }; } // namespace remoting
diff --git a/remoting/host/desktop_capturer_checker.h b/remoting/host/desktop_capturer_checker.h index 44b8315..4e66623 100644 --- a/remoting/host/desktop_capturer_checker.h +++ b/remoting/host/desktop_capturer_checker.h
@@ -19,6 +19,10 @@ class DesktopCapturerChecker : public webrtc::DesktopCapturer::Callback { public: DesktopCapturerChecker(); + + DesktopCapturerChecker(const DesktopCapturerChecker&) = delete; + DesktopCapturerChecker& operator=(const DesktopCapturerChecker&) = delete; + ~DesktopCapturerChecker() override; void TriggerSingleCapture(); @@ -29,7 +33,6 @@ std::unique_ptr<webrtc::DesktopFrame> frame) override; std::unique_ptr<webrtc::DesktopCapturer> capturer_; - DISALLOW_COPY_AND_ASSIGN(DesktopCapturerChecker); }; } // namespace remoting
diff --git a/remoting/host/desktop_capturer_proxy.cc b/remoting/host/desktop_capturer_proxy.cc index 56418b3..f4566691 100644 --- a/remoting/host/desktop_capturer_proxy.cc +++ b/remoting/host/desktop_capturer_proxy.cc
@@ -35,6 +35,10 @@ class DesktopCapturerProxy::Core : public webrtc::DesktopCapturer::Callback { public: explicit Core(base::WeakPtr<DesktopCapturerProxy> proxy); + + Core(const Core&) = delete; + Core& operator=(const Core&) = delete; + ~Core() override; void set_capturer(std::unique_ptr<webrtc::DesktopCapturer> capturer) { @@ -59,8 +63,6 @@ base::WeakPtr<DesktopCapturerProxy> proxy_; scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner_; std::unique_ptr<webrtc::DesktopCapturer> capturer_; - - DISALLOW_COPY_AND_ASSIGN(Core); }; DesktopCapturerProxy::Core::Core(base::WeakPtr<DesktopCapturerProxy> proxy)
diff --git a/remoting/host/desktop_capturer_proxy.h b/remoting/host/desktop_capturer_proxy.h index 9d50674..984b567 100644 --- a/remoting/host/desktop_capturer_proxy.h +++ b/remoting/host/desktop_capturer_proxy.h
@@ -38,6 +38,10 @@ scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner, scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, base::WeakPtr<ClientSessionControl> client_session_control); + + DesktopCapturerProxy(const DesktopCapturerProxy&) = delete; + DesktopCapturerProxy& operator=(const DesktopCapturerProxy&) = delete; + ~DesktopCapturerProxy() override; // CreateCapturer() should be used if the capturer needs to be created on the @@ -81,8 +85,6 @@ std::unique_ptr<DesktopDisplayInfoLoader> desktop_display_info_loader_; base::WeakPtrFactory<DesktopCapturerProxy> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DesktopCapturerProxy); }; } // namespace remoting
diff --git a/remoting/host/desktop_process.h b/remoting/host/desktop_process.h index 414dcdc4..8d21701 100644 --- a/remoting/host/desktop_process.h +++ b/remoting/host/desktop_process.h
@@ -35,6 +35,10 @@ scoped_refptr<AutoThreadTaskRunner> input_task_runner, scoped_refptr<AutoThreadTaskRunner> io_task_runner, mojo::ScopedMessagePipeHandle daemon_channel_handle); + + DesktopProcess(const DesktopProcess&) = delete; + DesktopProcess& operator=(const DesktopProcess&) = delete; + ~DesktopProcess() override; // DesktopSessionAgent::Delegate implementation. @@ -89,8 +93,6 @@ scoped_refptr<DesktopSessionAgent> desktop_agent_; base::WeakPtrFactory<DesktopProcess> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DesktopProcess); }; } // namespace remoting
diff --git a/remoting/host/desktop_process_unittest.cc b/remoting/host/desktop_process_unittest.cc index 743140b5..2ad94c1 100644 --- a/remoting/host/desktop_process_unittest.cc +++ b/remoting/host/desktop_process_unittest.cc
@@ -52,6 +52,10 @@ class MockDaemonListener : public IPC::Listener { public: MockDaemonListener() = default; + + MockDaemonListener(const MockDaemonListener&) = delete; + MockDaemonListener& operator=(const MockDaemonListener&) = delete; + ~MockDaemonListener() override = default; bool OnMessageReceived(const IPC::Message& message) override; @@ -59,14 +63,15 @@ MOCK_METHOD1(OnDesktopAttached, void(const IPC::ChannelHandle&)); MOCK_METHOD1(OnChannelConnected, void(int32_t)); MOCK_METHOD0(OnChannelError, void()); - - private: - DISALLOW_COPY_AND_ASSIGN(MockDaemonListener); }; class MockNetworkListener : public IPC::Listener { public: MockNetworkListener() = default; + + MockNetworkListener(const MockNetworkListener&) = delete; + MockNetworkListener& operator=(const MockNetworkListener&) = delete; + ~MockNetworkListener() override = default; bool OnMessageReceived(const IPC::Message& message) override; @@ -75,9 +80,6 @@ MOCK_METHOD0(OnChannelError, void()); MOCK_METHOD0(OnDesktopEnvironmentCreated, void()); - - private: - DISALLOW_COPY_AND_ASSIGN(MockNetworkListener); }; bool MockDaemonListener::OnMessageReceived(const IPC::Message& message) {
diff --git a/remoting/host/desktop_session.h b/remoting/host/desktop_session.h index 903172a..933f9df3 100644 --- a/remoting/host/desktop_session.h +++ b/remoting/host/desktop_session.h
@@ -17,6 +17,9 @@ // has a unique identifier used by cross-platform code to refer to it. class DesktopSession { public: + DesktopSession(const DesktopSession&) = delete; + DesktopSession& operator=(const DesktopSession&) = delete; + virtual ~DesktopSession(); // Changes the screen resolution of the desktop session. @@ -37,8 +40,6 @@ // A unique identifier of the terminal. const int id_; - - DISALLOW_COPY_AND_ASSIGN(DesktopSession); }; } // namespace remoting
diff --git a/remoting/host/desktop_session_agent.cc b/remoting/host/desktop_session_agent.cc index a21bd410..3a9fbd6 100644 --- a/remoting/host/desktop_session_agent.cc +++ b/remoting/host/desktop_session_agent.cc
@@ -106,6 +106,9 @@ handle, id, std::move(on_deleted_callback))); } + SharedMemoryImpl(const SharedMemoryImpl&) = delete; + SharedMemoryImpl& operator=(const SharedMemoryImpl&) = delete; + ~SharedMemoryImpl() override { std::move(on_deleted_callback_).Run(); } const base::ReadOnlySharedMemoryRegion& region() const { return region_; } @@ -135,8 +138,6 @@ // webrtc::ScreenCapturer. base::win::ScopedHandle writable_handle_; #endif - - DISALLOW_COPY_AND_ASSIGN(SharedMemoryImpl); }; namespace { @@ -149,6 +150,11 @@ public: explicit DesktopSessionClipboardStub( scoped_refptr<DesktopSessionAgent> desktop_session_agent); + + DesktopSessionClipboardStub(const DesktopSessionClipboardStub&) = delete; + DesktopSessionClipboardStub& operator=(const DesktopSessionClipboardStub&) = + delete; + ~DesktopSessionClipboardStub() override; // protocol::ClipboardStub implementation. @@ -156,8 +162,6 @@ private: scoped_refptr<DesktopSessionAgent> desktop_session_agent_; - - DISALLOW_COPY_AND_ASSIGN(DesktopSessionClipboardStub); }; DesktopSessionClipboardStub::DesktopSessionClipboardStub(
diff --git a/remoting/host/desktop_session_connector.h b/remoting/host/desktop_session_connector.h index 6a6af7d..b74de91 100644 --- a/remoting/host/desktop_session_connector.h +++ b/remoting/host/desktop_session_connector.h
@@ -19,6 +19,10 @@ class DesktopSessionConnector { public: DesktopSessionConnector() {} + + DesktopSessionConnector(const DesktopSessionConnector&) = delete; + DesktopSessionConnector& operator=(const DesktopSessionConnector&) = delete; + virtual ~DesktopSessionConnector() {} // Requests the daemon process to create a desktop session and associates @@ -52,9 +56,6 @@ // Notifies the network process that the daemon has disconnected the desktop // session from the associated desktop environment. virtual void OnTerminalDisconnected(int terminal_id) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(DesktopSessionConnector); }; } // namespace remoting
diff --git a/remoting/host/desktop_session_win.cc b/remoting/host/desktop_session_win.cc index a28b22d..b99450d 100644 --- a/remoting/host/desktop_session_win.cc +++ b/remoting/host/desktop_session_win.cc
@@ -254,6 +254,10 @@ DaemonProcess* daemon_process, int id, WtsTerminalMonitor* monitor); + + ConsoleSession(const ConsoleSession&) = delete; + ConsoleSession& operator=(const ConsoleSession&) = delete; + ~ConsoleSession() override; protected: @@ -265,8 +269,6 @@ private: std::unique_ptr<SasInjector> sas_injector_; - - DISALLOW_COPY_AND_ASSIGN(ConsoleSession); }; // DesktopSession implementation which attaches to virtual RDP console. @@ -282,6 +284,10 @@ DaemonProcess* daemon_process, int id, WtsTerminalMonitor* monitor); + + RdpSession(const RdpSession&) = delete; + RdpSession& operator=(const RdpSession&) = delete; + ~RdpSession() override; // Performs the part of initialization that can fail. @@ -304,6 +310,10 @@ class EventHandler : public IRdpDesktopSessionEventHandler { public: explicit EventHandler(base::WeakPtr<RdpSession> desktop_session); + + EventHandler(const EventHandler&) = delete; + EventHandler& operator=(const EventHandler&) = delete; + virtual ~EventHandler(); // IUnknown interface. @@ -323,8 +333,6 @@ // This class must be used on a single thread. base::ThreadChecker thread_checker_; - - DISALLOW_COPY_AND_ASSIGN(EventHandler); }; // Examines the system settings required to establish an RDP session. @@ -344,8 +352,6 @@ std::string terminal_id_; base::WeakPtrFactory<RdpSession> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(RdpSession); }; ConsoleSession::ConsoleSession(
diff --git a/remoting/host/disconnect_window_chromeos.cc b/remoting/host/disconnect_window_chromeos.cc index 76dfd5f..d4644d0 100644 --- a/remoting/host/disconnect_window_chromeos.cc +++ b/remoting/host/disconnect_window_chromeos.cc
@@ -19,14 +19,15 @@ class DisconnectWindowAura : public HostWindow { public: DisconnectWindowAura(); + + DisconnectWindowAura(const DisconnectWindowAura&) = delete; + DisconnectWindowAura& operator=(const DisconnectWindowAura&) = delete; + ~DisconnectWindowAura() override; // HostWindow interface. void Start(const base::WeakPtr<ClientSessionControl>& client_session_control) override; - - private: - DISALLOW_COPY_AND_ASSIGN(DisconnectWindowAura); }; DisconnectWindowAura::DisconnectWindowAura() = default;
diff --git a/remoting/host/disconnect_window_linux.cc b/remoting/host/disconnect_window_linux.cc index 9f3bea5..4b0853d 100644 --- a/remoting/host/disconnect_window_linux.cc +++ b/remoting/host/disconnect_window_linux.cc
@@ -25,6 +25,10 @@ class DisconnectWindowGtk : public HostWindow { public: DisconnectWindowGtk(); + + DisconnectWindowGtk(const DisconnectWindowGtk&) = delete; + DisconnectWindowGtk& operator=(const DisconnectWindowGtk&) = delete; + ~DisconnectWindowGtk() override; // HostWindow overrides. @@ -65,8 +69,6 @@ // notifications. int current_width_; int current_height_; - - DISALLOW_COPY_AND_ASSIGN(DisconnectWindowGtk); }; // Helper function for creating a rectangular path with rounded corners, as
diff --git a/remoting/host/disconnect_window_mac.mm b/remoting/host/disconnect_window_mac.mm index bbd5ea6..4bb46d6c 100644 --- a/remoting/host/disconnect_window_mac.mm +++ b/remoting/host/disconnect_window_mac.mm
@@ -49,6 +49,10 @@ class DisconnectWindowMac : public HostWindow { public: DisconnectWindowMac(); + + DisconnectWindowMac(const DisconnectWindowMac&) = delete; + DisconnectWindowMac& operator=(const DisconnectWindowMac&) = delete; + ~DisconnectWindowMac() override; // HostWindow overrides. @@ -57,8 +61,6 @@ private: DisconnectWindowController* window_controller_; - - DISALLOW_COPY_AND_ASSIGN(DisconnectWindowMac); }; DisconnectWindowMac::DisconnectWindowMac()
diff --git a/remoting/host/disconnect_window_win.cc b/remoting/host/disconnect_window_win.cc index 49f5a0b3..1b5da6f 100644 --- a/remoting/host/disconnect_window_win.cc +++ b/remoting/host/disconnect_window_win.cc
@@ -54,6 +54,10 @@ class DisconnectWindowWin : public HostWindow { public: DisconnectWindowWin(); + + DisconnectWindowWin(const DisconnectWindowWin&) = delete; + DisconnectWindowWin& operator=(const DisconnectWindowWin&) = delete; + ~DisconnectWindowWin() override; // Allow dialog to auto-hide after a period of time. The dialog will be @@ -130,8 +134,6 @@ webrtc::DesktopVector mouse_position_; base::WeakPtrFactory<DisconnectWindowWin> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DisconnectWindowWin); }; // Returns the text for the given dialog control window.
diff --git a/remoting/host/fake_desktop_environment.h b/remoting/host/fake_desktop_environment.h index b9c9e1d..638763f7 100644 --- a/remoting/host/fake_desktop_environment.h +++ b/remoting/host/fake_desktop_environment.h
@@ -25,6 +25,10 @@ class FakeInputInjector : public InputInjector { public: FakeInputInjector(); + + FakeInputInjector(const FakeInputInjector&) = delete; + FakeInputInjector& operator=(const FakeInputInjector&) = delete; + ~FakeInputInjector() override; void Start( @@ -62,8 +66,6 @@ std::vector<protocol::ClipboardEvent>* clipboard_events_ = nullptr; base::WeakPtrFactory<FakeInputInjector> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeInputInjector); }; class FakeScreenControls : public ScreenControls { @@ -80,6 +82,10 @@ explicit FakeDesktopEnvironment( scoped_refptr<base::SingleThreadTaskRunner> capture_thread, const DesktopEnvironmentOptions& options); + + FakeDesktopEnvironment(const FakeDesktopEnvironment&) = delete; + FakeDesktopEnvironment& operator=(const FakeDesktopEnvironment&) = delete; + ~FakeDesktopEnvironment() override; // Sets frame generator to be used for protocol::FakeDesktopCapturer created @@ -126,14 +132,17 @@ const DesktopEnvironmentOptions options_; base::WeakPtrFactory<FakeDesktopEnvironment> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeDesktopEnvironment); }; class FakeDesktopEnvironmentFactory : public DesktopEnvironmentFactory { public: explicit FakeDesktopEnvironmentFactory( scoped_refptr<base::SingleThreadTaskRunner> capture_thread); + + FakeDesktopEnvironmentFactory(const FakeDesktopEnvironmentFactory&) = delete; + FakeDesktopEnvironmentFactory& operator=( + const FakeDesktopEnvironmentFactory&) = delete; + ~FakeDesktopEnvironmentFactory() override; // Sets frame generator to be used for protocol::FakeDesktopCapturer created @@ -158,8 +167,6 @@ protocol::FakeDesktopCapturer::FrameGenerator frame_generator_; base::WeakPtr<FakeDesktopEnvironment> last_desktop_environment_; - - DISALLOW_COPY_AND_ASSIGN(FakeDesktopEnvironmentFactory); }; } // namespace remoting
diff --git a/remoting/host/fake_host_extension.cc b/remoting/host/fake_host_extension.cc index 925c6c9..2803bd8e 100644 --- a/remoting/host/fake_host_extension.cc +++ b/remoting/host/fake_host_extension.cc
@@ -18,6 +18,10 @@ class FakeExtension::Session : public HostExtensionSession { public: Session(FakeExtension* extension, const std::string& message_type); + + Session(const Session&) = delete; + Session& operator=(const Session&) = delete; + ~Session() override = default; // HostExtensionSession interface. @@ -28,8 +32,6 @@ private: FakeExtension* extension_; std::string message_type_; - - DISALLOW_COPY_AND_ASSIGN(Session); }; FakeExtension::Session::Session(FakeExtension* extension,
diff --git a/remoting/host/fake_host_extension.h b/remoting/host/fake_host_extension.h index a45a6efb..1394f43 100644 --- a/remoting/host/fake_host_extension.h +++ b/remoting/host/fake_host_extension.h
@@ -25,6 +25,10 @@ public: FakeExtension(const std::string& message_type, const std::string& capability); + + FakeExtension(const FakeExtension&) = delete; + FakeExtension& operator=(const FakeExtension&) = delete; + ~FakeExtension() override; // HostExtension interface. @@ -52,8 +56,6 @@ // True if CreateExtensionSession() was called on this extension. bool was_instantiated_ = false; - - DISALLOW_COPY_AND_ASSIGN(FakeExtension); }; } // namespace remoting
diff --git a/remoting/host/fake_mouse_cursor_monitor.h b/remoting/host/fake_mouse_cursor_monitor.h index 5d1e5e9..8e0c056c 100644 --- a/remoting/host/fake_mouse_cursor_monitor.h +++ b/remoting/host/fake_mouse_cursor_monitor.h
@@ -13,6 +13,10 @@ class FakeMouseCursorMonitor : public webrtc::MouseCursorMonitor { public: FakeMouseCursorMonitor(); + + FakeMouseCursorMonitor(const FakeMouseCursorMonitor&) = delete; + FakeMouseCursorMonitor& operator=(const FakeMouseCursorMonitor&) = delete; + ~FakeMouseCursorMonitor() override; void Init(Callback* callback, Mode mode) override; @@ -20,8 +24,6 @@ private: Callback* callback_; - - DISALLOW_COPY_AND_ASSIGN(FakeMouseCursorMonitor); }; } // namespace remoting
diff --git a/remoting/host/file_transfer/fake_file_chooser.h b/remoting/host/file_transfer/fake_file_chooser.h index a50a902..cb50199 100644 --- a/remoting/host/file_transfer/fake_file_chooser.h +++ b/remoting/host/file_transfer/fake_file_chooser.h
@@ -14,6 +14,9 @@ public: explicit FakeFileChooser(ResultCallback callback); + FakeFileChooser(const FakeFileChooser&) = delete; + FakeFileChooser& operator=(const FakeFileChooser&) = delete; + ~FakeFileChooser() override; // FileChooser implementation. @@ -24,8 +27,6 @@ private: ResultCallback callback_; - - DISALLOW_COPY_AND_ASSIGN(FakeFileChooser); }; } // namespace remoting
diff --git a/remoting/host/file_transfer/file_chooser.h b/remoting/host/file_transfer/file_chooser.h index a1b19e09..e65c501a 100644 --- a/remoting/host/file_transfer/file_chooser.h +++ b/remoting/host/file_transfer/file_chooser.h
@@ -21,6 +21,9 @@ FileChooser() = default; + FileChooser(const FileChooser&) = delete; + FileChooser& operator=(const FileChooser&) = delete; + // If the file dialog is currently displayed, destroys it without invoking // |callback|. virtual ~FileChooser() = default; @@ -35,9 +38,6 @@ static std::unique_ptr<FileChooser> Create( scoped_refptr<base::SequencedTaskRunner> ui_task_runner, ResultCallback callback); - - private: - DISALLOW_COPY_AND_ASSIGN(FileChooser); }; } // namespace remoting
diff --git a/remoting/host/file_transfer/file_chooser_linux.cc b/remoting/host/file_transfer/file_chooser_linux.cc index be7ef13..f977a6e6a 100644 --- a/remoting/host/file_transfer/file_chooser_linux.cc +++ b/remoting/host/file_transfer/file_chooser_linux.cc
@@ -28,6 +28,9 @@ scoped_refptr<base::SequencedTaskRunner> caller_task_runner, base::WeakPtr<FileChooserLinux> file_chooser_linux); + GtkFileChooserOnUiThread(const GtkFileChooserOnUiThread&) = delete; + GtkFileChooserOnUiThread& operator=(const GtkFileChooserOnUiThread&) = delete; + ~GtkFileChooserOnUiThread(); void Show(); @@ -46,8 +49,6 @@ GObject* file_dialog_ = nullptr; scoped_refptr<base::SequencedTaskRunner> caller_task_runner_; base::WeakPtr<FileChooserLinux> file_chooser_linux_; - - DISALLOW_COPY_AND_ASSIGN(GtkFileChooserOnUiThread); }; class FileChooserLinux : public FileChooser { @@ -55,6 +56,9 @@ FileChooserLinux(scoped_refptr<base::SequencedTaskRunner> ui_task_runner, ResultCallback callback); + FileChooserLinux(const FileChooserLinux&) = delete; + FileChooserLinux& operator=(const FileChooserLinux&) = delete; + ~FileChooserLinux() override; // FileChooser implementation. @@ -66,8 +70,6 @@ FileChooser::ResultCallback callback_; base::SequenceBound<GtkFileChooserOnUiThread> gtk_file_chooser_on_ui_thread_; base::WeakPtrFactory<FileChooserLinux> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FileChooserLinux); }; GtkFileChooserOnUiThread::GtkFileChooserOnUiThread(
diff --git a/remoting/host/file_transfer/file_chooser_mac.mm b/remoting/host/file_transfer/file_chooser_mac.mm index 5c0b147..4889f49 100644 --- a/remoting/host/file_transfer/file_chooser_mac.mm +++ b/remoting/host/file_transfer/file_chooser_mac.mm
@@ -52,6 +52,9 @@ scoped_refptr<base::SequencedTaskRunner> caller_task_runner, base::WeakPtr<FileChooserMac> file_chooser_mac); + MacFileChooserOnUiThread(const MacFileChooserOnUiThread&) = delete; + MacFileChooserOnUiThread& operator=(const MacFileChooserOnUiThread&) = delete; + ~MacFileChooserOnUiThread(); void Show(); @@ -63,8 +66,6 @@ base::scoped_nsobject<NSOpenPanel> open_panel_; scoped_refptr<base::SequencedTaskRunner> caller_task_runner_; base::WeakPtr<FileChooserMac> file_chooser_mac_; - - DISALLOW_COPY_AND_ASSIGN(MacFileChooserOnUiThread); }; class FileChooserMac : public FileChooser { @@ -72,6 +73,9 @@ FileChooserMac(scoped_refptr<base::SequencedTaskRunner> ui_task_runner, ResultCallback callback); + FileChooserMac(const FileChooserMac&) = delete; + FileChooserMac& operator=(const FileChooserMac&) = delete; + ~FileChooserMac() override; // FileChooser implementation. @@ -83,8 +87,6 @@ FileChooser::ResultCallback callback_; base::SequenceBound<MacFileChooserOnUiThread> mac_file_chooser_on_ui_thread_; base::WeakPtrFactory<FileChooserMac> weak_ptr_factory_; - - DISALLOW_COPY_AND_ASSIGN(FileChooserMac); }; MacFileChooserOnUiThread::MacFileChooserOnUiThread(
diff --git a/remoting/host/file_transfer/file_chooser_win.cc b/remoting/host/file_transfer/file_chooser_win.cc index a210388..7e49879 100644 --- a/remoting/host/file_transfer/file_chooser_win.cc +++ b/remoting/host/file_transfer/file_chooser_win.cc
@@ -100,6 +100,9 @@ FileChooserWindows(scoped_refptr<base::SequencedTaskRunner> ui_task_runner, ResultCallback callback); + FileChooserWindows(const FileChooserWindows&) = delete; + FileChooserWindows& operator=(const FileChooserWindows&) = delete; + ~FileChooserWindows() override; // FileChooser implementation. @@ -115,8 +118,6 @@ base::Process process_; base::win::ObjectWatcher object_watcher_; ScopedHandle pipe_read_; - - DISALLOW_COPY_AND_ASSIGN(FileChooserWindows); }; FileChooserWindows::FileChooserWindows(
diff --git a/remoting/host/file_transfer/file_operations.h b/remoting/host/file_transfer/file_operations.h index 31ea7e1c..0b426a18 100644 --- a/remoting/host/file_transfer/file_operations.h +++ b/remoting/host/file_transfer/file_operations.h
@@ -101,12 +101,14 @@ }; FileOperations() = default; + + FileOperations(const FileOperations&) = delete; + FileOperations& operator=(const FileOperations&) = delete; + virtual ~FileOperations() = default; virtual std::unique_ptr<Reader> CreateReader() = 0; virtual std::unique_ptr<Writer> CreateWriter() = 0; - - DISALLOW_COPY_AND_ASSIGN(FileOperations); }; } // namespace remoting
diff --git a/remoting/host/file_transfer/ipc_file_operations.cc b/remoting/host/file_transfer/ipc_file_operations.cc index b797ca33..7fc55336 100644 --- a/remoting/host/file_transfer/ipc_file_operations.cc +++ b/remoting/host/file_transfer/ipc_file_operations.cc
@@ -18,6 +18,10 @@ class IpcFileOperations::IpcReader : public FileOperations::Reader { public: IpcReader(std::uint64_t file_id, base::WeakPtr<SharedState> shared_state); + + IpcReader(const IpcReader&) = delete; + IpcReader& operator=(const IpcReader&) = delete; + ~IpcReader() override; // FileOperations::Reader implementation. @@ -36,13 +40,15 @@ base::FilePath filename_; std::uint64_t size_ = 0; base::WeakPtr<SharedState> shared_state_; - - DISALLOW_COPY_AND_ASSIGN(IpcReader); }; class IpcFileOperations::IpcWriter : public FileOperations::Writer { public: IpcWriter(std::uint64_t file_id, base::WeakPtr<SharedState> shared_state); + + IpcWriter(const IpcWriter&) = delete; + IpcWriter& operator=(const IpcWriter&) = delete; + ~IpcWriter() override; // FileOperations::Writer implementation. @@ -58,8 +64,6 @@ State state_ = kCreated; std::uint64_t file_id_; base::WeakPtr<SharedState> shared_state_; - - DISALLOW_COPY_AND_ASSIGN(IpcWriter); }; IpcFileOperations::IpcFileOperations(base::WeakPtr<SharedState> shared_state)
diff --git a/remoting/host/file_transfer/ipc_file_operations.h b/remoting/host/file_transfer/ipc_file_operations.h index deaf66d..01b32d0 100644 --- a/remoting/host/file_transfer/ipc_file_operations.h +++ b/remoting/host/file_transfer/ipc_file_operations.h
@@ -54,6 +54,9 @@ virtual void OnDataResult(std::uint64_t file_id, DataResult result) = 0; }; + IpcFileOperations(const IpcFileOperations&) = delete; + IpcFileOperations& operator=(const IpcFileOperations&) = delete; + ~IpcFileOperations() override; // FileOperations implementation. @@ -73,6 +76,10 @@ struct SharedState { public: explicit SharedState(RequestHandler* request_handler); + + SharedState(const SharedState&) = delete; + SharedState& operator=(const SharedState&) = delete; + ~SharedState(); // Send a Cancel request for |file_id| and provide an error response to any @@ -93,9 +100,6 @@ RequestHandler* request_handler; base::WeakPtrFactory<SharedState> weak_ptr_factory{this}; - - private: - DISALLOW_COPY_AND_ASSIGN(SharedState); }; explicit IpcFileOperations(base::WeakPtr<SharedState> shared_state); @@ -107,7 +111,6 @@ base::WeakPtr<SharedState> shared_state_; friend class IpcFileOperationsFactory; - DISALLOW_COPY_AND_ASSIGN(IpcFileOperations); }; // Creates IpcFileOperations instances for a given RequestHandler. All @@ -119,6 +122,10 @@ // IpcFileOperationsFactory, and must only be used to construct a single // IpcFileOperationsFactory to avoid file ID conflicts. IpcFileOperationsFactory(IpcFileOperations::RequestHandler* request_handler); + + IpcFileOperationsFactory(const IpcFileOperationsFactory&) = delete; + IpcFileOperationsFactory& operator=(const IpcFileOperationsFactory&) = delete; + ~IpcFileOperationsFactory() override; std::unique_ptr<FileOperations> CreateFileOperations(); @@ -130,8 +137,6 @@ private: IpcFileOperations::SharedState shared_state_; - - DISALLOW_COPY_AND_ASSIGN(IpcFileOperationsFactory); }; } // namespace remoting
diff --git a/remoting/host/file_transfer/ipc_file_operations_unittest.cc b/remoting/host/file_transfer/ipc_file_operations_unittest.cc index 85db32c1..4a3ec29 100644 --- a/remoting/host/file_transfer/ipc_file_operations_unittest.cc +++ b/remoting/host/file_transfer/ipc_file_operations_unittest.cc
@@ -51,6 +51,9 @@ std::make_unique<LocalFileOperations>(std::move(ui_task_runner))), file_operations_(ipc_file_operations_factory_.CreateFileOperations()) {} + IpcTestBridge(const IpcTestBridge&) = delete; + IpcTestBridge& operator=(const IpcTestBridge&) = delete; + ~IpcTestBridge() override = default; // IpcFileOperations::RequestHandler implementation. @@ -98,8 +101,6 @@ IpcFileOperationsFactory ipc_file_operations_factory_; SessionFileOperationsHandler session_file_operations_handler_; std::unique_ptr<FileOperations> file_operations_; - - DISALLOW_COPY_AND_ASSIGN(IpcTestBridge); }; } // namespace @@ -107,6 +108,10 @@ class IpcFileOperationsTest : public testing::Test { public: IpcFileOperationsTest(); + + IpcFileOperationsTest(const IpcFileOperationsTest&) = delete; + IpcFileOperationsTest& operator=(const IpcFileOperationsTest&) = delete; + ~IpcFileOperationsTest() override; protected: @@ -125,8 +130,6 @@ base::ScopedPathOverride scoped_path_override_; base::test::TaskEnvironment task_environment_; std::unique_ptr<FileOperations> file_operations_; - - DISALLOW_COPY_AND_ASSIGN(IpcFileOperationsTest); }; IpcFileOperationsTest::IpcFileOperationsTest()
diff --git a/remoting/host/file_transfer/local_file_operations.cc b/remoting/host/file_transfer/local_file_operations.cc index 834a412..312620d 100644 --- a/remoting/host/file_transfer/local_file_operations.cc +++ b/remoting/host/file_transfer/local_file_operations.cc
@@ -63,6 +63,10 @@ public: explicit LocalFileReader( scoped_refptr<base::SequencedTaskRunner> ui_task_runner); + + LocalFileReader(const LocalFileReader&) = delete; + LocalFileReader& operator=(const LocalFileReader&) = delete; + ~LocalFileReader() override; // FileOperations::Reader implementation. @@ -98,13 +102,15 @@ absl::optional<base::FileProxy> file_proxy_; SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<LocalFileReader> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(LocalFileReader); }; class LocalFileWriter : public FileOperations::Writer { public: LocalFileWriter(); + + LocalFileWriter(const LocalFileWriter&) = delete; + LocalFileWriter& operator=(const LocalFileWriter&) = delete; + ~LocalFileWriter() override; // FileOperations::Writer implementation. @@ -147,8 +153,6 @@ absl::optional<base::FileProxy> file_proxy_; SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<LocalFileWriter> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(LocalFileWriter); }; LocalFileReader::LocalFileReader(
diff --git a/remoting/host/file_transfer/local_file_operations.h b/remoting/host/file_transfer/local_file_operations.h index d0ce5f1..39c0b01 100644 --- a/remoting/host/file_transfer/local_file_operations.h +++ b/remoting/host/file_transfer/local_file_operations.h
@@ -21,6 +21,10 @@ public: explicit LocalFileOperations( scoped_refptr<base::SequencedTaskRunner> ui_task_runner); + + LocalFileOperations(const LocalFileOperations&) = delete; + LocalFileOperations& operator=(const LocalFileOperations&) = delete; + ~LocalFileOperations() override; // FileOperations implementation. @@ -29,8 +33,6 @@ private: scoped_refptr<base::SequencedTaskRunner> ui_task_runner_; - - DISALLOW_COPY_AND_ASSIGN(LocalFileOperations); }; } // namespace remoting
diff --git a/remoting/host/ftl_echo_message_listener.h b/remoting/host/ftl_echo_message_listener.h index 4716afd..bdea713 100644 --- a/remoting/host/ftl_echo_message_listener.h +++ b/remoting/host/ftl_echo_message_listener.h
@@ -22,6 +22,10 @@ // |signal_strategy| is expected to outlive this object. FtlEchoMessageListener(std::string host_owner, SignalStrategy* signal_strategy); + + FtlEchoMessageListener(const FtlEchoMessageListener&) = delete; + FtlEchoMessageListener& operator=(const FtlEchoMessageListener&) = delete; + ~FtlEchoMessageListener() override; // SignalStrategy::Listener interface. @@ -36,7 +40,6 @@ private: std::string host_owner_; SignalStrategy* signal_strategy_; - DISALLOW_COPY_AND_ASSIGN(FtlEchoMessageListener); }; } // namespace remoting
diff --git a/remoting/host/ftl_host_change_notification_listener.h b/remoting/host/ftl_host_change_notification_listener.h index 0e2ccab4..92c5b501 100644 --- a/remoting/host/ftl_host_change_notification_listener.h +++ b/remoting/host/ftl_host_change_notification_listener.h
@@ -31,6 +31,12 @@ // Both listener and signal_strategy are expected to outlive this object. FtlHostChangeNotificationListener(Listener* listener, SignalStrategy* signal_strategy); + + FtlHostChangeNotificationListener(const FtlHostChangeNotificationListener&) = + delete; + FtlHostChangeNotificationListener& operator=( + const FtlHostChangeNotificationListener&) = delete; + ~FtlHostChangeNotificationListener() override; // SignalStrategy::Listener interface. @@ -48,7 +54,6 @@ Listener* listener_; SignalStrategy* signal_strategy_; base::WeakPtrFactory<FtlHostChangeNotificationListener> weak_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(FtlHostChangeNotificationListener); }; } // namespace remoting
diff --git a/remoting/host/ftl_signaling_connector.h b/remoting/host/ftl_signaling_connector.h index 3523f90..0b191739 100644 --- a/remoting/host/ftl_signaling_connector.h +++ b/remoting/host/ftl_signaling_connector.h
@@ -29,6 +29,10 @@ // called. FtlSignalingConnector(SignalStrategy* signal_strategy, base::OnceClosure auth_failed_callback); + + FtlSignalingConnector(const FtlSignalingConnector&) = delete; + FtlSignalingConnector& operator=(const FtlSignalingConnector&) = delete; + ~FtlSignalingConnector() override; void Start(); @@ -59,8 +63,6 @@ base::OneShotTimer backoff_reset_timer_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(FtlSignalingConnector); }; } // namespace remoting
diff --git a/remoting/host/heartbeat_sender.cc b/remoting/host/heartbeat_sender.cc index 26bb7a6..bfc08de1 100644 --- a/remoting/host/heartbeat_sender.cc +++ b/remoting/host/heartbeat_sender.cc
@@ -143,6 +143,10 @@ explicit HeartbeatClientImpl( OAuthTokenGetter* oauth_token_getter, scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory); + + HeartbeatClientImpl(const HeartbeatClientImpl&) = delete; + HeartbeatClientImpl& operator=(const HeartbeatClientImpl&) = delete; + ~HeartbeatClientImpl() override; void Heartbeat(std::unique_ptr<apis::v1::HeartbeatRequest> request, @@ -151,7 +155,6 @@ private: ProtobufHttpClient http_client_; - DISALLOW_COPY_AND_ASSIGN(HeartbeatClientImpl); }; HeartbeatSender::HeartbeatClientImpl::HeartbeatClientImpl(
diff --git a/remoting/host/host_event_logger.h b/remoting/host/host_event_logger.h index 254aa968..09dfaec 100644 --- a/remoting/host/host_event_logger.h +++ b/remoting/host/host_event_logger.h
@@ -18,6 +18,9 @@ class HostEventLogger { public: + HostEventLogger(const HostEventLogger&) = delete; + HostEventLogger& operator=(const HostEventLogger&) = delete; + virtual ~HostEventLogger() {} // Creates an event-logger that monitors host status changes and logs @@ -28,9 +31,6 @@ protected: HostEventLogger() {} - - private: - DISALLOW_COPY_AND_ASSIGN(HostEventLogger); }; }
diff --git a/remoting/host/host_event_logger_posix.cc b/remoting/host/host_event_logger_posix.cc index abe4a15..012e43783 100644 --- a/remoting/host/host_event_logger_posix.cc +++ b/remoting/host/host_event_logger_posix.cc
@@ -32,6 +32,9 @@ HostEventLoggerPosix(scoped_refptr<HostStatusMonitor> monitor, const std::string& application_name); + HostEventLoggerPosix(const HostEventLoggerPosix&) = delete; + HostEventLoggerPosix& operator=(const HostEventLoggerPosix&) = delete; + ~HostEventLoggerPosix() override; // HostStatusObserver implementation. These methods will be called from the @@ -50,8 +53,6 @@ scoped_refptr<HostStatusMonitor> monitor_; std::string application_name_; - - DISALLOW_COPY_AND_ASSIGN(HostEventLoggerPosix); }; } //namespace
diff --git a/remoting/host/host_event_logger_win.cc b/remoting/host/host_event_logger_win.cc index 080f826..12c2af2 100644 --- a/remoting/host/host_event_logger_win.cc +++ b/remoting/host/host_event_logger_win.cc
@@ -31,6 +31,9 @@ HostEventLoggerWin(scoped_refptr<HostStatusMonitor> monitor, const std::string& application_name); + HostEventLoggerWin(const HostEventLoggerWin&) = delete; + HostEventLoggerWin& operator=(const HostEventLoggerWin&) = delete; + ~HostEventLoggerWin() override; // HostStatusObserver implementation. These methods will be called from the @@ -52,8 +55,6 @@ scoped_refptr<HostStatusMonitor> monitor_; WindowsEventLogger event_logger_; - - DISALLOW_COPY_AND_ASSIGN(HostEventLoggerWin); }; } // namespace
diff --git a/remoting/host/host_extension_session_manager.h b/remoting/host/host_extension_session_manager.h index e26ec08f..da3ce5b5 100644 --- a/remoting/host/host_extension_session_manager.h +++ b/remoting/host/host_extension_session_manager.h
@@ -32,6 +32,11 @@ // Creates an extension manager for the specified |extensions|. HostExtensionSessionManager(const HostExtensions& extensions, ClientSessionDetails* client_session_details); + + HostExtensionSessionManager(const HostExtensionSessionManager&) = delete; + HostExtensionSessionManager& operator=(const HostExtensionSessionManager&) = + delete; + virtual ~HostExtensionSessionManager(); // Returns the union of all capabilities supported by registered extensions. @@ -62,8 +67,6 @@ // The instantiated HostExtensionSessions, used to handle extension messages. HostExtensionSessions extension_sessions_; - - DISALLOW_COPY_AND_ASSIGN(HostExtensionSessionManager); }; } // namespace remoting
diff --git a/remoting/host/host_extension_session_manager_unittest.cc b/remoting/host/host_extension_session_manager_unittest.cc index b769c56e..24874f7 100644 --- a/remoting/host/host_extension_session_manager_unittest.cc +++ b/remoting/host/host_extension_session_manager_unittest.cc
@@ -25,6 +25,12 @@ extensions_.push_back(&extension2_); extensions_.push_back(&extension3_); } + + HostExtensionSessionManagerTest(const HostExtensionSessionManagerTest&) = + delete; + HostExtensionSessionManagerTest& operator=( + const HostExtensionSessionManagerTest&) = delete; + ~HostExtensionSessionManagerTest() override = default; protected: @@ -37,8 +43,6 @@ // Mocks of interfaces provided by ClientSession. MockClientSessionDetails client_session_details_; protocol::MockClientStub client_stub_; - - DISALLOW_COPY_AND_ASSIGN(HostExtensionSessionManagerTest); }; // Verifies that messages are handled by the correct extension.
diff --git a/remoting/host/host_mock_objects.h b/remoting/host/host_mock_objects.h index e5255ba..b7dad9c2 100644 --- a/remoting/host/host_mock_objects.h +++ b/remoting/host/host_mock_objects.h
@@ -84,6 +84,10 @@ class MockClientSessionControl : public ClientSessionControl { public: MockClientSessionControl(); + + MockClientSessionControl(const MockClientSessionControl&) = delete; + MockClientSessionControl& operator=(const MockClientSessionControl&) = delete; + ~MockClientSessionControl() override; MOCK_CONST_METHOD0(client_jid, const std::string&()); @@ -95,26 +99,29 @@ MOCK_METHOD0(ResetVideoPipeline, void()); MOCK_METHOD1(OnDesktopDisplayChanged, void(std::unique_ptr<protocol::VideoLayout>)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockClientSessionControl); }; class MockClientSessionDetails : public ClientSessionDetails { public: MockClientSessionDetails(); + + MockClientSessionDetails(const MockClientSessionDetails&) = delete; + MockClientSessionDetails& operator=(const MockClientSessionDetails&) = delete; + ~MockClientSessionDetails() override; MOCK_METHOD0(session_control, ClientSessionControl*()); MOCK_CONST_METHOD0(desktop_session_id, uint32_t()); - - private: - DISALLOW_COPY_AND_ASSIGN(MockClientSessionDetails); }; class MockClientSessionEventHandler : public ClientSession::EventHandler { public: MockClientSessionEventHandler(); + + MockClientSessionEventHandler(const MockClientSessionEventHandler&) = delete; + MockClientSessionEventHandler& operator=( + const MockClientSessionEventHandler&) = delete; + ~MockClientSessionEventHandler() override; MOCK_METHOD1(OnSessionAuthenticating, void(ClientSession* client)); @@ -126,14 +133,16 @@ ClientSession* client, const std::string& channel_name, const protocol::TransportRoute& route)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockClientSessionEventHandler); }; class MockDesktopEnvironmentFactory : public DesktopEnvironmentFactory { public: MockDesktopEnvironmentFactory(); + + MockDesktopEnvironmentFactory(const MockDesktopEnvironmentFactory&) = delete; + MockDesktopEnvironmentFactory& operator=( + const MockDesktopEnvironmentFactory&) = delete; + ~MockDesktopEnvironmentFactory() override; MOCK_METHOD0(CreatePtr, DesktopEnvironment*()); @@ -142,14 +151,15 @@ std::unique_ptr<DesktopEnvironment> Create( base::WeakPtr<ClientSessionControl> client_session_control, const DesktopEnvironmentOptions& options) override; - - private: - DISALLOW_COPY_AND_ASSIGN(MockDesktopEnvironmentFactory); }; class MockInputInjector : public InputInjector { public: MockInputInjector(); + + MockInputInjector(const MockInputInjector&) = delete; + MockInputInjector& operator=(const MockInputInjector&) = delete; + ~MockInputInjector() override; MOCK_METHOD1(InjectClipboardEvent, @@ -163,9 +173,6 @@ void Start( std::unique_ptr<protocol::ClipboardStub> client_clipboard) override; - - private: - DISALLOW_COPY_AND_ASSIGN(MockInputInjector); }; class MockHostStatusObserver : public HostStatusObserver { @@ -188,6 +195,11 @@ class MockSecurityKeyAuthHandler : public SecurityKeyAuthHandler { public: MockSecurityKeyAuthHandler(); + + MockSecurityKeyAuthHandler(const MockSecurityKeyAuthHandler&) = delete; + MockSecurityKeyAuthHandler& operator=(const MockSecurityKeyAuthHandler&) = + delete; + ~MockSecurityKeyAuthHandler() override; MOCK_METHOD0(CreateSecurityKeyConnection, void()); @@ -204,20 +216,19 @@ private: SecurityKeyAuthHandler::SendMessageCallback callback_; - - DISALLOW_COPY_AND_ASSIGN(MockSecurityKeyAuthHandler); }; class MockMouseCursorMonitor : public webrtc::MouseCursorMonitor { public: MockMouseCursorMonitor(); + + MockMouseCursorMonitor(const MockMouseCursorMonitor&) = delete; + MockMouseCursorMonitor& operator=(const MockMouseCursorMonitor&) = delete; + ~MockMouseCursorMonitor() override; MOCK_METHOD2(Init, void(Callback* callback, Mode mode)); MOCK_METHOD0(Capture, void()); - - private: - DISALLOW_COPY_AND_ASSIGN(MockMouseCursorMonitor); }; class MockUrlForwarderConfigurator final : public UrlForwarderConfigurator {
diff --git a/remoting/host/host_status_logger.h b/remoting/host/host_status_logger.h index 38dec37..16f3c29 100644 --- a/remoting/host/host_status_logger.h +++ b/remoting/host/host_status_logger.h
@@ -25,6 +25,10 @@ public: HostStatusLogger(scoped_refptr<HostStatusMonitor> monitor, LogToServer* log_to_server); + + HostStatusLogger(const HostStatusLogger&) = delete; + HostStatusLogger& operator=(const HostStatusLogger&) = delete; + ~HostStatusLogger() override; // Logs a session state change. Currently, this is either @@ -49,8 +53,6 @@ connection_route_type_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(HostStatusLogger); }; } // namespace remoting
diff --git a/remoting/host/host_window.h b/remoting/host/host_window.h index 66a12b6..ba1d456 100644 --- a/remoting/host/host_window.h +++ b/remoting/host/host_window.h
@@ -19,6 +19,9 @@ class HostWindow { public: + HostWindow(const HostWindow&) = delete; + HostWindow& operator=(const HostWindow&) = delete; + virtual ~HostWindow(); // Creates a platform-specific instance of the continue window. @@ -46,9 +49,6 @@ HostWindow() {} SEQUENCE_CHECKER(sequence_checker_); - - private: - DISALLOW_COPY_AND_ASSIGN(HostWindow); }; } // namespace remoting
diff --git a/remoting/host/host_window_proxy.h b/remoting/host/host_window_proxy.h index 2419c40..95392c3 100644 --- a/remoting/host/host_window_proxy.h +++ b/remoting/host/host_window_proxy.h
@@ -25,6 +25,10 @@ scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, std::unique_ptr<HostWindow> host_window); + + HostWindowProxy(const HostWindowProxy&) = delete; + HostWindowProxy& operator=(const HostWindowProxy&) = delete; + ~HostWindowProxy() override; // HostWindow overrides. @@ -35,8 +39,6 @@ // All thread switching logic is implemented in the ref-counted |Core| class. class Core; scoped_refptr<Core> core_; - - DISALLOW_COPY_AND_ASSIGN(HostWindowProxy); }; } // namespace remoting
diff --git a/remoting/host/input_injector_chromeos.cc b/remoting/host/input_injector_chromeos.cc index dc8dfab..a4f3fd7 100644 --- a/remoting/host/input_injector_chromeos.cc +++ b/remoting/host/input_injector_chromeos.cc
@@ -79,8 +79,7 @@ // If caps_lock is specified, sets local keyboard state to match. void SetCapsLockState(bool caps_lock) { - chromeos::input_method::InputMethodManager* ime = - chromeos::input_method::InputMethodManager::Get(); + auto* ime = ash::input_method::InputMethodManager::Get(); ime->GetImeKeyboard()->SetCapsLockEnabled(caps_lock); } @@ -109,6 +108,10 @@ class InputInjectorChromeos::Core { public: Core(); + + Core(const Core&) = delete; + Core& operator=(const Core&) = delete; + ~Core(); // Mirrors the public InputInjectorChromeos interface. @@ -128,8 +131,6 @@ // Used to rotate the input coordinates appropriately based on the current // display rotation settings. std::unique_ptr<PointTransformer> point_transformer_; - - DISALLOW_COPY_AND_ASSIGN(Core); }; InputInjectorChromeos::Core::Core() = default;
diff --git a/remoting/host/input_injector_chromeos.h b/remoting/host/input_injector_chromeos.h index 802edd05c..577eb70 100644 --- a/remoting/host/input_injector_chromeos.h +++ b/remoting/host/input_injector_chromeos.h
@@ -20,6 +20,9 @@ explicit InputInjectorChromeos( scoped_refptr<base::SingleThreadTaskRunner> task_runner); + InputInjectorChromeos(const InputInjectorChromeos&) = delete; + InputInjectorChromeos& operator=(const InputInjectorChromeos&) = delete; + ~InputInjectorChromeos() override; // Clipboard stub interface. @@ -41,8 +44,6 @@ // Task runner for input injection. scoped_refptr<base::SingleThreadTaskRunner> input_task_runner_; std::unique_ptr<Core> core_; - - DISALLOW_COPY_AND_ASSIGN(InputInjectorChromeos); }; } // namespace remoting
diff --git a/remoting/host/input_injector_mac.cc b/remoting/host/input_injector_mac.cc index 80f00c8..e4ebe689 100644 --- a/remoting/host/input_injector_mac.cc +++ b/remoting/host/input_injector_mac.cc
@@ -112,6 +112,10 @@ explicit InputInjectorMac( scoped_refptr<base::SingleThreadTaskRunner> input_thread_task_runner, scoped_refptr<base::SingleThreadTaskRunner> ui_thread_task_runner); + + InputInjectorMac(const InputInjectorMac&) = delete; + InputInjectorMac& operator=(const InputInjectorMac&) = delete; + ~InputInjectorMac() override; // ClipboardStub interface. @@ -167,8 +171,6 @@ }; scoped_refptr<Core> core_; - - DISALLOW_COPY_AND_ASSIGN(InputInjectorMac); }; InputInjectorMac::InputInjectorMac(
diff --git a/remoting/host/input_injector_win.cc b/remoting/host/input_injector_win.cc index 6392c28..f9044863 100644 --- a/remoting/host/input_injector_win.cc +++ b/remoting/host/input_injector_win.cc
@@ -194,6 +194,10 @@ public: InputInjectorWin(scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); + + InputInjectorWin(const InputInjectorWin&) = delete; + InputInjectorWin& operator=(const InputInjectorWin&) = delete; + ~InputInjectorWin() override; // ClipboardStub interface. @@ -248,8 +252,6 @@ }; scoped_refptr<Core> core_; - - DISALLOW_COPY_AND_ASSIGN(InputInjectorWin); }; InputInjectorWin::InputInjectorWin(
diff --git a/remoting/host/input_injector_x11.cc b/remoting/host/input_injector_x11.cc index ff828ab..369b4b6 100644 --- a/remoting/host/input_injector_x11.cc +++ b/remoting/host/input_injector_x11.cc
@@ -87,6 +87,10 @@ public: explicit InputInjectorX11( scoped_refptr<base::SingleThreadTaskRunner> task_runner); + + InputInjectorX11(const InputInjectorX11&) = delete; + InputInjectorX11& operator=(const InputInjectorX11&) = delete; + ~InputInjectorX11() override; void Init(); @@ -190,8 +194,6 @@ }; scoped_refptr<Core> core_; - - DISALLOW_COPY_AND_ASSIGN(InputInjectorX11); }; InputInjectorX11::InputInjectorX11(
diff --git a/remoting/host/input_monitor/local_hotkey_input_monitor_chromeos.cc b/remoting/host/input_monitor/local_hotkey_input_monitor_chromeos.cc index c6e3e9c..15dd6aaa 100644 --- a/remoting/host/input_monitor/local_hotkey_input_monitor_chromeos.cc +++ b/remoting/host/input_monitor/local_hotkey_input_monitor_chromeos.cc
@@ -27,6 +27,12 @@ scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, base::OnceClosure disconnect_callback); + + LocalHotkeyInputMonitorChromeos(const LocalHotkeyInputMonitorChromeos&) = + delete; + LocalHotkeyInputMonitorChromeos& operator=( + const LocalHotkeyInputMonitorChromeos&) = delete; + ~LocalHotkeyInputMonitorChromeos() override; private: @@ -34,6 +40,10 @@ public: Core(scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, base::OnceClosure disconnect_callback); + + Core(const Core&) = delete; + Core& operator=(const Core&) = delete; + ~Core() override; void Start(); @@ -49,15 +59,11 @@ // Must be called on |caller_task_runner_|. base::OnceClosure disconnect_callback_; - - DISALLOW_COPY_AND_ASSIGN(Core); }; // Task runner on which ui::events are received. scoped_refptr<base::SingleThreadTaskRunner> input_task_runner_; std::unique_ptr<Core> core_; - - DISALLOW_COPY_AND_ASSIGN(LocalHotkeyInputMonitorChromeos); }; LocalHotkeyInputMonitorChromeos::LocalHotkeyInputMonitorChromeos(
diff --git a/remoting/host/input_monitor/local_hotkey_input_monitor_mac.mm b/remoting/host/input_monitor/local_hotkey_input_monitor_mac.mm index 912724a..c095ed6f 100644 --- a/remoting/host/input_monitor/local_hotkey_input_monitor_mac.mm +++ b/remoting/host/input_monitor/local_hotkey_input_monitor_mac.mm
@@ -45,6 +45,11 @@ scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, base::OnceClosure disconnect_callback); + + LocalHotkeyInputMonitorMac(const LocalHotkeyInputMonitorMac&) = delete; + LocalHotkeyInputMonitorMac& operator=(const LocalHotkeyInputMonitorMac&) = + delete; + ~LocalHotkeyInputMonitorMac() override; private: @@ -53,8 +58,6 @@ scoped_refptr<Core> core_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(LocalHotkeyInputMonitorMac); }; } // namespace
diff --git a/remoting/host/input_monitor/local_hotkey_input_monitor_x11.cc b/remoting/host/input_monitor/local_hotkey_input_monitor_x11.cc index bec810ac..c41e11d 100644 --- a/remoting/host/input_monitor/local_hotkey_input_monitor_x11.cc +++ b/remoting/host/input_monitor/local_hotkey_input_monitor_x11.cc
@@ -34,6 +34,11 @@ scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, base::OnceClosure disconnect_callback); + + LocalHotkeyInputMonitorX11(const LocalHotkeyInputMonitorX11&) = delete; + LocalHotkeyInputMonitorX11& operator=(const LocalHotkeyInputMonitorX11&) = + delete; + ~LocalHotkeyInputMonitorX11() override; private: @@ -81,8 +86,6 @@ scoped_refptr<Core> core_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(LocalHotkeyInputMonitorX11); }; LocalHotkeyInputMonitorX11::LocalHotkeyInputMonitorX11(
diff --git a/remoting/host/input_monitor/local_input_monitor.cc b/remoting/host/input_monitor/local_input_monitor.cc index fc6680c..ebf307e 100644 --- a/remoting/host/input_monitor/local_input_monitor.cc +++ b/remoting/host/input_monitor/local_input_monitor.cc
@@ -24,6 +24,10 @@ scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); + + LocalInputMonitorImpl(const LocalInputMonitorImpl&) = delete; + LocalInputMonitorImpl& operator=(const LocalInputMonitorImpl&) = delete; + ~LocalInputMonitorImpl() override; // LocalInputMonitor implementation. @@ -46,8 +50,6 @@ // Indicates whether the instance is actively monitoring local input. bool monitoring_ = false; - - DISALLOW_COPY_AND_ASSIGN(LocalInputMonitorImpl); }; LocalInputMonitorImpl::LocalInputMonitorImpl(
diff --git a/remoting/host/input_monitor/local_input_monitor_win.cc b/remoting/host/input_monitor/local_input_monitor_win.cc index 36d60046..719ac6d 100644 --- a/remoting/host/input_monitor/local_input_monitor_win.cc +++ b/remoting/host/input_monitor/local_input_monitor_win.cc
@@ -27,6 +27,10 @@ scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, std::unique_ptr<RawInputHandler> raw_input_handler); + + LocalInputMonitorWinImpl(const LocalInputMonitorWinImpl&) = delete; + LocalInputMonitorWinImpl& operator=(const LocalInputMonitorWinImpl&) = delete; + ~LocalInputMonitorWinImpl() override; private: @@ -73,8 +77,6 @@ scoped_refptr<Core> core_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(LocalInputMonitorWinImpl); }; LocalInputMonitorWinImpl::LocalInputMonitorWinImpl(
diff --git a/remoting/host/input_monitor/local_keyboard_input_monitor_chromeos.cc b/remoting/host/input_monitor/local_keyboard_input_monitor_chromeos.cc index bf6dff82..60deb79 100644 --- a/remoting/host/input_monitor/local_keyboard_input_monitor_chromeos.cc +++ b/remoting/host/input_monitor/local_keyboard_input_monitor_chromeos.cc
@@ -29,6 +29,12 @@ scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, LocalInputMonitor::KeyPressedCallback key_pressed_callback); + + LocalKeyboardInputMonitorChromeos(const LocalKeyboardInputMonitorChromeos&) = + delete; + LocalKeyboardInputMonitorChromeos& operator=( + const LocalKeyboardInputMonitorChromeos&) = delete; + ~LocalKeyboardInputMonitorChromeos() override; private: @@ -36,6 +42,10 @@ public: Core(scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, LocalInputMonitor::KeyPressedCallback on_key_event_callback); + + Core(const Core&) = delete; + Core& operator=(const Core&) = delete; + ~Core() override; void Start(); @@ -47,15 +57,11 @@ private: scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner_; LocalInputMonitor::KeyPressedCallback key_pressed_callback_; - - DISALLOW_COPY_AND_ASSIGN(Core); }; // Task runner on which ui::events are received. scoped_refptr<base::SingleThreadTaskRunner> input_task_runner_; std::unique_ptr<Core> core_; - - DISALLOW_COPY_AND_ASSIGN(LocalKeyboardInputMonitorChromeos); }; LocalKeyboardInputMonitorChromeos::LocalKeyboardInputMonitorChromeos(
diff --git a/remoting/host/input_monitor/local_keyboard_input_monitor_win.cc b/remoting/host/input_monitor/local_keyboard_input_monitor_win.cc index 29e29cc..ec8d697 100644 --- a/remoting/host/input_monitor/local_keyboard_input_monitor_win.cc +++ b/remoting/host/input_monitor/local_keyboard_input_monitor_win.cc
@@ -30,6 +30,11 @@ scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, LocalInputMonitor::KeyPressedCallback on_key_event_callback, base::OnceClosure disconnect_callback); + + KeyboardRawInputHandlerWin(const KeyboardRawInputHandlerWin&) = delete; + KeyboardRawInputHandlerWin& operator=(const KeyboardRawInputHandlerWin&) = + delete; + ~KeyboardRawInputHandlerWin() override; // LocalInputMonitorWin::RawInputHandler implementation. @@ -46,8 +51,6 @@ // Tracks whether the instance is registered to receive raw input events. bool registered_ = false; - - DISALLOW_COPY_AND_ASSIGN(KeyboardRawInputHandlerWin); }; KeyboardRawInputHandlerWin::KeyboardRawInputHandlerWin(
diff --git a/remoting/host/input_monitor/local_mouse_input_monitor_mac.mm b/remoting/host/input_monitor/local_mouse_input_monitor_mac.mm index 1a515ba..bf88322 100644 --- a/remoting/host/input_monitor/local_mouse_input_monitor_mac.mm +++ b/remoting/host/input_monitor/local_mouse_input_monitor_mac.mm
@@ -38,6 +38,11 @@ scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, LocalInputMonitor::PointerMoveCallback on_mouse_move); + + LocalMouseInputMonitorMac(const LocalMouseInputMonitorMac&) = delete; + LocalMouseInputMonitorMac& operator=(const LocalMouseInputMonitorMac&) = + delete; + ~LocalMouseInputMonitorMac() override; private: @@ -46,8 +51,6 @@ scoped_refptr<Core> core_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(LocalMouseInputMonitorMac); }; } // namespace
diff --git a/remoting/host/input_monitor/local_mouse_input_monitor_win.cc b/remoting/host/input_monitor/local_mouse_input_monitor_win.cc index 9d3fb37..1ec8d29 100644 --- a/remoting/host/input_monitor/local_mouse_input_monitor_win.cc +++ b/remoting/host/input_monitor/local_mouse_input_monitor_win.cc
@@ -30,6 +30,10 @@ scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, LocalInputMonitor::PointerMoveCallback on_mouse_move, base::OnceClosure disconnect_callback); + + MouseRawInputHandlerWin(const MouseRawInputHandlerWin&) = delete; + MouseRawInputHandlerWin& operator=(const MouseRawInputHandlerWin&) = delete; + ~MouseRawInputHandlerWin() override; // LocalInputMonitorWin::RawInputHandler implementation. @@ -48,8 +52,6 @@ // Tracks whether the instance is registered to receive raw input events. bool registered_ = false; - - DISALLOW_COPY_AND_ASSIGN(MouseRawInputHandlerWin); }; MouseRawInputHandlerWin::MouseRawInputHandlerWin(
diff --git a/remoting/host/input_monitor/local_mouse_input_monitor_x11.cc b/remoting/host/input_monitor/local_mouse_input_monitor_x11.cc index d68be54e..663b824 100644 --- a/remoting/host/input_monitor/local_mouse_input_monitor_x11.cc +++ b/remoting/host/input_monitor/local_mouse_input_monitor_x11.cc
@@ -37,6 +37,11 @@ scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, LocalInputMonitor::PointerMoveCallback on_mouse_move); + + LocalMouseInputMonitorX11(const LocalMouseInputMonitorX11&) = delete; + LocalMouseInputMonitorX11& operator=(const LocalMouseInputMonitorX11&) = + delete; + ~LocalMouseInputMonitorX11() override; private: @@ -81,8 +86,6 @@ scoped_refptr<Core> core_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(LocalMouseInputMonitorX11); }; LocalMouseInputMonitorX11::LocalMouseInputMonitorX11(
diff --git a/remoting/host/input_monitor/local_pointer_input_monitor_chromeos.cc b/remoting/host/input_monitor/local_pointer_input_monitor_chromeos.cc index 3481590a..6bb1313 100644 --- a/remoting/host/input_monitor/local_pointer_input_monitor_chromeos.cc +++ b/remoting/host/input_monitor/local_pointer_input_monitor_chromeos.cc
@@ -29,6 +29,12 @@ scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, LocalInputMonitor::PointerMoveCallback on_pointer_move); + + LocalPointerInputMonitorChromeos(const LocalPointerInputMonitorChromeos&) = + delete; + LocalPointerInputMonitorChromeos& operator=( + const LocalPointerInputMonitorChromeos&) = delete; + ~LocalPointerInputMonitorChromeos() override; private: @@ -36,6 +42,10 @@ public: Core(scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, LocalInputMonitor::PointerMoveCallback on_pointer_move); + + Core(const Core&) = delete; + Core& operator=(const Core&) = delete; + ~Core() override; void Start(); @@ -56,15 +66,11 @@ // Used to rotate the local pointer positions appropriately based on the // current display rotation settings. std::unique_ptr<PointTransformer> point_transformer_; - - DISALLOW_COPY_AND_ASSIGN(Core); }; // Task runner on which ui::events are received. scoped_refptr<base::SingleThreadTaskRunner> input_task_runner_; std::unique_ptr<Core> core_; - - DISALLOW_COPY_AND_ASSIGN(LocalPointerInputMonitorChromeos); }; LocalPointerInputMonitorChromeos::LocalPointerInputMonitorChromeos(
diff --git a/remoting/host/ipc_action_executor.h b/remoting/host/ipc_action_executor.h index 11cd8de..858dbcb 100644 --- a/remoting/host/ipc_action_executor.h +++ b/remoting/host/ipc_action_executor.h
@@ -20,6 +20,10 @@ public: explicit IpcActionExecutor( scoped_refptr<DesktopSessionProxy> desktop_session_proxy); + + IpcActionExecutor(const IpcActionExecutor&) = delete; + IpcActionExecutor& operator=(const IpcActionExecutor&) = delete; + ~IpcActionExecutor() override; // ActionStub interface. @@ -28,8 +32,6 @@ private: // Wraps the IPC channel to the desktop process. scoped_refptr<DesktopSessionProxy> desktop_session_proxy_; - - DISALLOW_COPY_AND_ASSIGN(IpcActionExecutor); }; } // namespace remoting
diff --git a/remoting/host/ipc_audio_capturer.h b/remoting/host/ipc_audio_capturer.h index d812e9f..5dd8fecf 100644 --- a/remoting/host/ipc_audio_capturer.h +++ b/remoting/host/ipc_audio_capturer.h
@@ -21,6 +21,10 @@ public: explicit IpcAudioCapturer( scoped_refptr<DesktopSessionProxy> desktop_session_proxy); + + IpcAudioCapturer(const IpcAudioCapturer&) = delete; + IpcAudioCapturer& operator=(const IpcAudioCapturer&) = delete; + ~IpcAudioCapturer() override; // AudioCapturer interface. @@ -38,8 +42,6 @@ // Used to cancel tasks pending on the capturer when it is stopped. base::WeakPtrFactory<IpcAudioCapturer> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(IpcAudioCapturer); }; } // namespace remoting
diff --git a/remoting/host/ipc_desktop_environment.h b/remoting/host/ipc_desktop_environment.h index fef092082..e853a26 100644 --- a/remoting/host/ipc_desktop_environment.h +++ b/remoting/host/ipc_desktop_environment.h
@@ -47,6 +47,10 @@ base::WeakPtr<ClientSessionControl> client_session_control, base::WeakPtr<DesktopSessionConnector> desktop_session_connector, const DesktopEnvironmentOptions& options); + + IpcDesktopEnvironment(const IpcDesktopEnvironment&) = delete; + IpcDesktopEnvironment& operator=(const IpcDesktopEnvironment&) = delete; + ~IpcDesktopEnvironment() override; // DesktopEnvironment implementation. @@ -71,8 +75,6 @@ private: scoped_refptr<DesktopSessionProxy> desktop_session_proxy_; - - DISALLOW_COPY_AND_ASSIGN(IpcDesktopEnvironment); }; // Used to create IpcDesktopEnvironment objects integrating with the desktop via @@ -88,6 +90,11 @@ scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, IPC::Sender* daemon_channel); + + IpcDesktopEnvironmentFactory(const IpcDesktopEnvironmentFactory&) = delete; + IpcDesktopEnvironmentFactory& operator=(const IpcDesktopEnvironmentFactory&) = + delete; + ~IpcDesktopEnvironmentFactory() override; // DesktopEnvironmentFactory implementation. @@ -134,8 +141,6 @@ // Factory for weak pointers to DesktopSessionConnector interface. base::WeakPtrFactory<DesktopSessionConnector> connector_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(IpcDesktopEnvironmentFactory); }; } // namespace remoting
diff --git a/remoting/host/ipc_desktop_environment_unittest.cc b/remoting/host/ipc_desktop_environment_unittest.cc index 25b752d..3a821cf 100644 --- a/remoting/host/ipc_desktop_environment_unittest.cc +++ b/remoting/host/ipc_desktop_environment_unittest.cc
@@ -77,6 +77,11 @@ class MockScreenCapturerCallback : public webrtc::DesktopCapturer::Callback { public: MockScreenCapturerCallback() = default; + + MockScreenCapturerCallback(const MockScreenCapturerCallback&) = delete; + MockScreenCapturerCallback& operator=(const MockScreenCapturerCallback&) = + delete; + ~MockScreenCapturerCallback() override = default; MOCK_METHOD2(OnCaptureResultPtr, @@ -86,15 +91,16 @@ std::unique_ptr<webrtc::DesktopFrame> frame) override { OnCaptureResultPtr(result, &frame); } - - private: - DISALLOW_COPY_AND_ASSIGN(MockScreenCapturerCallback); }; // Receives messages sent from the network process to the daemon. class FakeDaemonSender : public IPC::Sender { public: FakeDaemonSender() = default; + + FakeDaemonSender(const FakeDaemonSender&) = delete; + FakeDaemonSender& operator=(const FakeDaemonSender&) = delete; + ~FakeDaemonSender() override = default; // IPC::Sender implementation. @@ -106,14 +112,16 @@ private: void OnMessageReceived(const IPC::Message& message); - - DISALLOW_COPY_AND_ASSIGN(FakeDaemonSender); }; // Receives messages sent from the desktop process to the daemon. class MockDaemonListener : public IPC::Listener { public: MockDaemonListener() = default; + + MockDaemonListener(const MockDaemonListener&) = delete; + MockDaemonListener& operator=(const MockDaemonListener&) = delete; + ~MockDaemonListener() override = default; bool OnMessageReceived(const IPC::Message& message) override; @@ -121,9 +129,6 @@ MOCK_METHOD1(OnDesktopAttached, void(const IPC::ChannelHandle&)); MOCK_METHOD1(OnChannelConnected, void(int32_t)); MOCK_METHOD0(OnChannelError, void()); - - private: - DISALLOW_COPY_AND_ASSIGN(MockDaemonListener); }; bool FakeDaemonSender::Send(IPC::Message* message) {
diff --git a/remoting/host/ipc_host_event_logger.h b/remoting/host/ipc_host_event_logger.h index 2157b8f..7fc9e62a 100644 --- a/remoting/host/ipc_host_event_logger.h +++ b/remoting/host/ipc_host_event_logger.h
@@ -28,6 +28,10 @@ // Initializes the logger. |daemon_channel| must outlive this object. IpcHostEventLogger(scoped_refptr<HostStatusMonitor> monitor, IPC::Sender* daemon_channel); + + IpcHostEventLogger(const IpcHostEventLogger&) = delete; + IpcHostEventLogger& operator=(const IpcHostEventLogger&) = delete; + ~IpcHostEventLogger() override; // HostStatusObserver interface. @@ -48,8 +52,6 @@ scoped_refptr<HostStatusMonitor> monitor_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(IpcHostEventLogger); }; }
diff --git a/remoting/host/ipc_input_injector.h b/remoting/host/ipc_input_injector.h index e161d6d..dfefc77 100644 --- a/remoting/host/ipc_input_injector.h +++ b/remoting/host/ipc_input_injector.h
@@ -20,6 +20,10 @@ public: explicit IpcInputInjector( scoped_refptr<DesktopSessionProxy> desktop_session_proxy); + + IpcInputInjector(const IpcInputInjector&) = delete; + IpcInputInjector& operator=(const IpcInputInjector&) = delete; + ~IpcInputInjector() override; // ClipboardStub interface. @@ -38,8 +42,6 @@ private: // Wraps the IPC channel to the desktop process. scoped_refptr<DesktopSessionProxy> desktop_session_proxy_; - - DISALLOW_COPY_AND_ASSIGN(IpcInputInjector); }; } // namespace remoting
diff --git a/remoting/host/ipc_mouse_cursor_monitor.h b/remoting/host/ipc_mouse_cursor_monitor.h index b80012e..57b8b6c 100644 --- a/remoting/host/ipc_mouse_cursor_monitor.h +++ b/remoting/host/ipc_mouse_cursor_monitor.h
@@ -23,6 +23,10 @@ public: explicit IpcMouseCursorMonitor( scoped_refptr<DesktopSessionProxy> desktop_session_proxy); + + IpcMouseCursorMonitor(const IpcMouseCursorMonitor&) = delete; + IpcMouseCursorMonitor& operator=(const IpcMouseCursorMonitor&) = delete; + ~IpcMouseCursorMonitor() override; // webrtc::MouseCursorMonitor interface. @@ -41,8 +45,6 @@ // Used to cancel tasks pending on the capturer when it is stopped. base::WeakPtrFactory<IpcMouseCursorMonitor> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(IpcMouseCursorMonitor); }; } // namespace remoting
diff --git a/remoting/host/ipc_screen_controls.h b/remoting/host/ipc_screen_controls.h index 3d41b96..071d428 100644 --- a/remoting/host/ipc_screen_controls.h +++ b/remoting/host/ipc_screen_controls.h
@@ -18,6 +18,10 @@ public: explicit IpcScreenControls( scoped_refptr<DesktopSessionProxy> desktop_session_proxy); + + IpcScreenControls(const IpcScreenControls&) = delete; + IpcScreenControls& operator=(const IpcScreenControls&) = delete; + ~IpcScreenControls() override; // SessionController interface. @@ -26,8 +30,6 @@ private: // Wraps the IPC channel to the desktop session agent. scoped_refptr<DesktopSessionProxy> desktop_session_proxy_; - - DISALLOW_COPY_AND_ASSIGN(IpcScreenControls); }; } // namespace remoting
diff --git a/remoting/host/ipc_video_frame_capturer.h b/remoting/host/ipc_video_frame_capturer.h index 45b9984..e02c656f 100644 --- a/remoting/host/ipc_video_frame_capturer.h +++ b/remoting/host/ipc_video_frame_capturer.h
@@ -24,6 +24,10 @@ public: explicit IpcVideoFrameCapturer( scoped_refptr<DesktopSessionProxy> desktop_session_proxy); + + IpcVideoFrameCapturer(const IpcVideoFrameCapturer&) = delete; + IpcVideoFrameCapturer& operator=(const IpcVideoFrameCapturer&) = delete; + ~IpcVideoFrameCapturer() override; // webrtc::DesktopCapturer interface. @@ -48,8 +52,6 @@ // Used to cancel tasks pending on the capturer when it is stopped. base::WeakPtrFactory<IpcVideoFrameCapturer> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(IpcVideoFrameCapturer); }; } // namespace remoting
diff --git a/remoting/host/it2me/it2me_confirmation_dialog.h b/remoting/host/it2me/it2me_confirmation_dialog.h index aec36039..956dcbc 100644 --- a/remoting/host/it2me/it2me_confirmation_dialog.h +++ b/remoting/host/it2me/it2me_confirmation_dialog.h
@@ -40,6 +40,12 @@ explicit It2MeConfirmationDialogFactory( It2MeConfirmationDialog::DialogStyle dialog_style) : dialog_style_(dialog_style) {} + + It2MeConfirmationDialogFactory(const It2MeConfirmationDialogFactory&) = + delete; + It2MeConfirmationDialogFactory& operator=( + const It2MeConfirmationDialogFactory&) = delete; + virtual ~It2MeConfirmationDialogFactory() = default; virtual std::unique_ptr<It2MeConfirmationDialog> Create(); @@ -48,8 +54,6 @@ // This field is only used on ChromeOS. ALLOW_UNUSED_TYPE It2MeConfirmationDialog::DialogStyle dialog_style_ = It2MeConfirmationDialog::DialogStyle::kConsumer; - - DISALLOW_COPY_AND_ASSIGN(It2MeConfirmationDialogFactory); }; } // namespace remoting
diff --git a/remoting/host/it2me/it2me_confirmation_dialog_chromeos.cc b/remoting/host/it2me/it2me_confirmation_dialog_chromeos.cc index a409225..c9af352 100644 --- a/remoting/host/it2me/it2me_confirmation_dialog_chromeos.cc +++ b/remoting/host/it2me/it2me_confirmation_dialog_chromeos.cc
@@ -48,6 +48,12 @@ class It2MeConfirmationDialogChromeOS : public It2MeConfirmationDialog { public: explicit It2MeConfirmationDialogChromeOS(DialogStyle style); + + It2MeConfirmationDialogChromeOS(const It2MeConfirmationDialogChromeOS&) = + delete; + It2MeConfirmationDialogChromeOS& operator=( + const It2MeConfirmationDialogChromeOS&) = delete; + ~It2MeConfirmationDialogChromeOS() override; // It2MeConfirmationDialog implementation. @@ -67,8 +73,6 @@ ResultCallback callback_; DialogStyle style_; - - DISALLOW_COPY_AND_ASSIGN(It2MeConfirmationDialogChromeOS); }; It2MeConfirmationDialogChromeOS::It2MeConfirmationDialogChromeOS(
diff --git a/remoting/host/it2me/it2me_confirmation_dialog_linux.cc b/remoting/host/it2me/it2me_confirmation_dialog_linux.cc index 4b73deeb..d45e0afd 100644 --- a/remoting/host/it2me/it2me_confirmation_dialog_linux.cc +++ b/remoting/host/it2me/it2me_confirmation_dialog_linux.cc
@@ -32,6 +32,11 @@ class It2MeConfirmationDialogLinux : public It2MeConfirmationDialog { public: It2MeConfirmationDialogLinux(); + + It2MeConfirmationDialogLinux(const It2MeConfirmationDialogLinux&) = delete; + It2MeConfirmationDialogLinux& operator=(const It2MeConfirmationDialogLinux&) = + delete; + ~It2MeConfirmationDialogLinux() override; // It2MeConfirmationDialog implementation. @@ -54,8 +59,6 @@ ResultCallback result_callback_; base::OneShotTimer dialog_timer_; - - DISALLOW_COPY_AND_ASSIGN(It2MeConfirmationDialogLinux); }; It2MeConfirmationDialogLinux::It2MeConfirmationDialogLinux() {}
diff --git a/remoting/host/it2me/it2me_confirmation_dialog_mac.mm b/remoting/host/it2me/it2me_confirmation_dialog_mac.mm index 63d3c59..4b5ac3e 100644 --- a/remoting/host/it2me/it2me_confirmation_dialog_mac.mm +++ b/remoting/host/it2me/it2me_confirmation_dialog_mac.mm
@@ -51,6 +51,11 @@ class It2MeConfirmationDialogMac : public It2MeConfirmationDialog { public: It2MeConfirmationDialogMac(); + + It2MeConfirmationDialogMac(const It2MeConfirmationDialogMac&) = delete; + It2MeConfirmationDialogMac& operator=(const It2MeConfirmationDialogMac&) = + delete; + ~It2MeConfirmationDialogMac() override; // It2MeConfirmationDialog implementation. @@ -65,8 +70,6 @@ ResultCallback result_callback_; base::OneShotTimer dialog_timer_; - - DISALLOW_COPY_AND_ASSIGN(It2MeConfirmationDialogMac); }; It2MeConfirmationDialogMac::It2MeConfirmationDialogMac() {}
diff --git a/remoting/host/it2me/it2me_confirmation_dialog_proxy.cc b/remoting/host/it2me/it2me_confirmation_dialog_proxy.cc index 05ac145..f0f6fd4f 100644 --- a/remoting/host/it2me/it2me_confirmation_dialog_proxy.cc +++ b/remoting/host/it2me/it2me_confirmation_dialog_proxy.cc
@@ -20,6 +20,10 @@ scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, base::WeakPtr<It2MeConfirmationDialogProxy> parent, std::unique_ptr<It2MeConfirmationDialog> dialog); + + Core(const Core&) = delete; + Core& operator=(const Core&) = delete; + ~Core(); // Shows the wrapped dialog. Must be called on the UI thread. @@ -41,8 +45,6 @@ scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner_; base::WeakPtr<It2MeConfirmationDialogProxy> parent_; std::unique_ptr<It2MeConfirmationDialog> dialog_; - - DISALLOW_COPY_AND_ASSIGN(Core); }; It2MeConfirmationDialogProxy::Core::Core(
diff --git a/remoting/host/it2me/it2me_confirmation_dialog_proxy.h b/remoting/host/it2me/it2me_confirmation_dialog_proxy.h index dc3f51f7..24e16ec 100644 --- a/remoting/host/it2me/it2me_confirmation_dialog_proxy.h +++ b/remoting/host/it2me/it2me_confirmation_dialog_proxy.h
@@ -24,6 +24,10 @@ scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, std::unique_ptr<It2MeConfirmationDialog> dialog); + It2MeConfirmationDialogProxy(const It2MeConfirmationDialogProxy&) = delete; + It2MeConfirmationDialogProxy& operator=(const It2MeConfirmationDialogProxy&) = + delete; + ~It2MeConfirmationDialogProxy() override; // It2MeConfirmationDialog implementation. @@ -38,8 +42,6 @@ std::unique_ptr<Core> core_; It2MeConfirmationDialog::ResultCallback callback_; base::WeakPtrFactory<It2MeConfirmationDialogProxy> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(It2MeConfirmationDialogProxy); }; } // namespace remoting
diff --git a/remoting/host/it2me/it2me_confirmation_dialog_win.cc b/remoting/host/it2me/it2me_confirmation_dialog_win.cc index 5aecdb66..17d6637 100644 --- a/remoting/host/it2me/it2me_confirmation_dialog_win.cc +++ b/remoting/host/it2me/it2me_confirmation_dialog_win.cc
@@ -32,14 +32,16 @@ class It2MeConfirmationDialogWin : public It2MeConfirmationDialog { public: It2MeConfirmationDialogWin(); + + It2MeConfirmationDialogWin(const It2MeConfirmationDialogWin&) = delete; + It2MeConfirmationDialogWin& operator=(const It2MeConfirmationDialogWin&) = + delete; + ~It2MeConfirmationDialogWin() override; // It2MeConfirmationDialog implementation. void Show(const std::string& remote_user_email, ResultCallback callback) override; - - private: - DISALLOW_COPY_AND_ASSIGN(It2MeConfirmationDialogWin); }; It2MeConfirmationDialogWin::It2MeConfirmationDialogWin() = default;
diff --git a/remoting/host/it2me/it2me_host.h b/remoting/host/it2me/it2me_host.h index d8f89edd..3c5067bc 100644 --- a/remoting/host/it2me/it2me_host.h +++ b/remoting/host/it2me/it2me_host.h
@@ -229,12 +229,13 @@ class It2MeHostFactory { public: It2MeHostFactory(); + + It2MeHostFactory(const It2MeHostFactory&) = delete; + It2MeHostFactory& operator=(const It2MeHostFactory&) = delete; + virtual ~It2MeHostFactory(); virtual scoped_refptr<It2MeHost> CreateIt2MeHost(); - - private: - DISALLOW_COPY_AND_ASSIGN(It2MeHostFactory); }; } // namespace remoting
diff --git a/remoting/host/it2me/it2me_host_unittest.cc b/remoting/host/it2me/it2me_host_unittest.cc index 70a34b9..71d126b9 100644 --- a/remoting/host/it2me/it2me_host_unittest.cc +++ b/remoting/host/it2me/it2me_host_unittest.cc
@@ -68,6 +68,11 @@ public: FakeIt2MeConfirmationDialog(const std::string& remote_user_email, DialogResult dialog_result); + + FakeIt2MeConfirmationDialog(const FakeIt2MeConfirmationDialog&) = delete; + FakeIt2MeConfirmationDialog& operator=(const FakeIt2MeConfirmationDialog&) = + delete; + ~FakeIt2MeConfirmationDialog() override; // It2MeConfirmationDialog implementation. @@ -79,8 +84,6 @@ std::string remote_user_email_; DialogResult dialog_result_ = DialogResult::OK; - - DISALLOW_COPY_AND_ASSIGN(FakeIt2MeConfirmationDialog); }; FakeIt2MeConfirmationDialog::FakeIt2MeConfirmationDialog() = default; @@ -103,6 +106,10 @@ class FakeIt2MeDialogFactory : public It2MeConfirmationDialogFactory { public: FakeIt2MeDialogFactory(); + + FakeIt2MeDialogFactory(const FakeIt2MeDialogFactory&) = delete; + FakeIt2MeDialogFactory& operator=(const FakeIt2MeDialogFactory&) = delete; + ~FakeIt2MeDialogFactory() override; std::unique_ptr<It2MeConfirmationDialog> Create() override; @@ -121,8 +128,6 @@ std::string remote_user_email_; DialogResult dialog_result_ = DialogResult::OK; bool dialog_created_ = false; - - DISALLOW_COPY_AND_ASSIGN(FakeIt2MeDialogFactory); }; FakeIt2MeDialogFactory::FakeIt2MeDialogFactory() @@ -142,6 +147,10 @@ class It2MeHostTest : public testing::Test, public It2MeHost::Observer { public: It2MeHostTest(); + + It2MeHostTest(const It2MeHostTest&) = delete; + It2MeHostTest& operator=(const It2MeHostTest&) = delete; + ~It2MeHostTest() override; // testing::Test interface. @@ -211,8 +220,6 @@ scoped_refptr<AutoThreadTaskRunner> ui_task_runner_; base::WeakPtrFactory<It2MeHostTest> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(It2MeHostTest); }; It2MeHostTest::It2MeHostTest() {}
diff --git a/remoting/host/it2me/it2me_native_messaging_host.h b/remoting/host/it2me/it2me_native_messaging_host.h index 93b2b54..a0e10c46 100644 --- a/remoting/host/it2me/it2me_native_messaging_host.h +++ b/remoting/host/it2me/it2me_native_messaging_host.h
@@ -43,6 +43,10 @@ std::unique_ptr<PolicyWatcher> policy_watcher, std::unique_ptr<ChromotingHostContext> host_context, std::unique_ptr<It2MeHostFactory> host_factory); + + It2MeNativeMessagingHost(const It2MeNativeMessagingHost&) = delete; + It2MeNativeMessagingHost& operator=(const It2MeNativeMessagingHost&) = delete; + ~It2MeNativeMessagingHost() override; // extensions::NativeMessageHost implementation. @@ -153,8 +157,6 @@ base::WeakPtr<It2MeNativeMessagingHost> weak_ptr_; base::WeakPtrFactory<It2MeNativeMessagingHost> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(It2MeNativeMessagingHost); }; } // namespace remoting
diff --git a/remoting/host/it2me/it2me_native_messaging_host_unittest.cc b/remoting/host/it2me/it2me_native_messaging_host_unittest.cc index 3dbd485e..af3cff2 100644 --- a/remoting/host/it2me/it2me_native_messaging_host_unittest.cc +++ b/remoting/host/it2me/it2me_native_messaging_host_unittest.cc
@@ -216,6 +216,10 @@ class MockIt2MeHostFactory : public It2MeHostFactory { public: MockIt2MeHostFactory() : host(new MockIt2MeHost()) {} + + MockIt2MeHostFactory(const MockIt2MeHostFactory&) = delete; + MockIt2MeHostFactory& operator=(const MockIt2MeHostFactory&) = delete; + ~MockIt2MeHostFactory() override = default; scoped_refptr<It2MeHost> CreateIt2MeHost() override { @@ -223,14 +227,16 @@ } scoped_refptr<MockIt2MeHost> host; - - private: - DISALLOW_COPY_AND_ASSIGN(MockIt2MeHostFactory); }; class It2MeNativeMessagingHostTest : public testing::Test { public: It2MeNativeMessagingHostTest() = default; + + It2MeNativeMessagingHostTest(const It2MeNativeMessagingHostTest&) = delete; + It2MeNativeMessagingHostTest& operator=(const It2MeNativeMessagingHostTest&) = + delete; + ~It2MeNativeMessagingHostTest() override = default; void SetUp() override; @@ -286,8 +292,6 @@ // Task runner of the host thread. scoped_refptr<AutoThreadTaskRunner> host_task_runner_; std::unique_ptr<remoting::NativeMessagingPipe> pipe_; - - DISALLOW_COPY_AND_ASSIGN(It2MeNativeMessagingHostTest); }; void It2MeNativeMessagingHostTest::SetUp() {
diff --git a/remoting/host/it2me_desktop_environment.h b/remoting/host/it2me_desktop_environment.h index 6756dc6..d36c1ac7 100644 --- a/remoting/host/it2me_desktop_environment.h +++ b/remoting/host/it2me_desktop_environment.h
@@ -21,6 +21,9 @@ // the local user. class It2MeDesktopEnvironment : public BasicDesktopEnvironment { public: + It2MeDesktopEnvironment(const It2MeDesktopEnvironment&) = delete; + It2MeDesktopEnvironment& operator=(const It2MeDesktopEnvironment&) = delete; + ~It2MeDesktopEnvironment() override; protected: @@ -42,8 +45,6 @@ // Notifies the client session about the local mouse movements. std::unique_ptr<LocalInputMonitor> local_input_monitor_; - - DISALLOW_COPY_AND_ASSIGN(It2MeDesktopEnvironment); }; // Used to create |It2MeDesktopEnvironment| instances. @@ -54,15 +55,18 @@ scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner, scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); + + It2MeDesktopEnvironmentFactory(const It2MeDesktopEnvironmentFactory&) = + delete; + It2MeDesktopEnvironmentFactory& operator=( + const It2MeDesktopEnvironmentFactory&) = delete; + ~It2MeDesktopEnvironmentFactory() override; // DesktopEnvironmentFactory interface. std::unique_ptr<DesktopEnvironment> Create( base::WeakPtr<ClientSessionControl> client_session_control, const DesktopEnvironmentOptions& options) override; - - private: - DISALLOW_COPY_AND_ASSIGN(It2MeDesktopEnvironmentFactory); }; } // namespace remoting
diff --git a/remoting/host/keyboard_layout_monitor_chromeos.cc b/remoting/host/keyboard_layout_monitor_chromeos.cc index 541c369..9d848b3 100644 --- a/remoting/host/keyboard_layout_monitor_chromeos.cc +++ b/remoting/host/keyboard_layout_monitor_chromeos.cc
@@ -32,7 +32,7 @@ class KeyboardLayoutMonitorChromeOs : public KeyboardLayoutMonitor, - public chromeos::input_method::ImeKeyboard::Observer { + public ash::input_method::ImeKeyboard::Observer { public: explicit KeyboardLayoutMonitorChromeOs( base::RepeatingCallback<void(const protocol::KeyboardLayout&)> callback); @@ -41,7 +41,7 @@ // KeyboardLayoutMonitor implementation. void Start() override; - // chromeos::input_method::ImeKeyboard::Observer implementation. + // ash::input_method::ImeKeyboard::Observer implementation. void OnCapsLockChanged(bool enabled) override; void OnLayoutChanging(const std::string& layout_name) override; @@ -59,7 +59,7 @@ : callback_(callback) {} KeyboardLayoutMonitorChromeOs::~KeyboardLayoutMonitorChromeOs() { - chromeos::input_method::InputMethodManager::Get() + ash::input_method::InputMethodManager::Get() ->GetImeKeyboard() ->RemoveObserver(this); } @@ -67,9 +67,8 @@ void KeyboardLayoutMonitorChromeOs::Start() { QueryLayout(); - chromeos::input_method::InputMethodManager::Get() - ->GetImeKeyboard() - ->AddObserver(this); + ash::input_method::InputMethodManager::Get()->GetImeKeyboard()->AddObserver( + this); } void KeyboardLayoutMonitorChromeOs::OnCapsLockChanged(bool enabled) {} @@ -97,7 +96,7 @@ ui::KeyboardLayoutEngine* keyboard_layout_engine = ui::KeyboardLayoutEngineManager::GetKeyboardLayoutEngine(); - bool has_alt_gr = chromeos::input_method::InputMethodManager::Get() + bool has_alt_gr = ash::input_method::InputMethodManager::Get() ->GetImeKeyboard() ->IsAltGrAvailable(); int shift_levels = has_alt_gr ? 4 : 2;
diff --git a/remoting/host/linux/certificate_watcher.cc b/remoting/host/linux/certificate_watcher.cc index ee031ee..c1bf2b04 100644 --- a/remoting/host/linux/certificate_watcher.cc +++ b/remoting/host/linux/certificate_watcher.cc
@@ -37,6 +37,10 @@ scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, base::FilePath cert_watch_path, base::TimeDelta read_delay); + + CertDbContentWatcher(const CertDbContentWatcher&) = delete; + CertDbContentWatcher& operator=(const CertDbContentWatcher&) = delete; + ~CertDbContentWatcher(); void StartWatching(); @@ -82,8 +86,6 @@ // FileWatcher detects changes, the code is re-computed and compared with // this stored value. HashValue current_hash_; - - DISALLOW_COPY_AND_ASSIGN(CertDbContentWatcher); }; CertDbContentWatcher::CertDbContentWatcher(
diff --git a/remoting/host/linux/certificate_watcher.h b/remoting/host/linux/certificate_watcher.h index 9eb4866c..5c1e132 100644 --- a/remoting/host/linux/certificate_watcher.h +++ b/remoting/host/linux/certificate_watcher.h
@@ -36,6 +36,9 @@ const base::RepeatingClosure& restart_action, scoped_refptr<base::SingleThreadTaskRunner> io_task_runner); + CertificateWatcher(const CertificateWatcher&) = delete; + CertificateWatcher& operator=(const CertificateWatcher&) = delete; + // The message loop of io_task_runner MUST be running after the destructor is // called, otherwise there will be memory leaks. ~CertificateWatcher() override; @@ -95,8 +98,6 @@ base::TimeDelta delay_; base::WeakPtrFactory<CertificateWatcher> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(CertificateWatcher); }; } // namespace remoting
diff --git a/remoting/host/linux/remoting_user_session.cc b/remoting/host/linux/remoting_user_session.cc index e62fdc0..189db69 100644 --- a/remoting/host/linux/remoting_user_session.cc +++ b/remoting/host/linux/remoting_user_session.cc
@@ -191,6 +191,9 @@ } } + PamHandle(const PamHandle&) = delete; + PamHandle& operator=(const PamHandle&) = delete; + // Terminates PAM transaction ~PamHandle() { if (pam_handle_ != nullptr) { @@ -280,8 +283,6 @@ private: pam_handle_t* pam_handle_ = nullptr; int last_return_code_ = PAM_SUCCESS; - - DISALLOW_COPY_AND_ASSIGN(PamHandle); }; // Initializes the gExecutablePath global to the location of the running
diff --git a/remoting/host/linux/x11_character_injector.h b/remoting/host/linux/x11_character_injector.h index c237adec..3526b30f 100644 --- a/remoting/host/linux/x11_character_injector.h +++ b/remoting/host/linux/x11_character_injector.h
@@ -22,6 +22,10 @@ class X11CharacterInjector { public: explicit X11CharacterInjector(std::unique_ptr<X11Keyboard> keyboard); + + X11CharacterInjector(const X11CharacterInjector&) = delete; + X11CharacterInjector& operator=(const X11CharacterInjector&) = delete; + ~X11CharacterInjector(); void Inject(uint32_t code_point); @@ -57,7 +61,6 @@ std::vector<KeyInfo> available_keycodes_; base::ThreadChecker thread_checker_; - DISALLOW_COPY_AND_ASSIGN(X11CharacterInjector); }; } // namespace remoting
diff --git a/remoting/host/linux/x11_keyboard_impl.h b/remoting/host/linux/x11_keyboard_impl.h index c27f614..c4ab593 100644 --- a/remoting/host/linux/x11_keyboard_impl.h +++ b/remoting/host/linux/x11_keyboard_impl.h
@@ -15,6 +15,10 @@ class X11KeyboardImpl : public X11Keyboard { public: explicit X11KeyboardImpl(x11::Connection* connection); + + X11KeyboardImpl(const X11KeyboardImpl&) = delete; + X11KeyboardImpl& operator=(const X11KeyboardImpl&) = delete; + ~X11KeyboardImpl() override; // KeyboardInterface overrides. @@ -35,8 +39,6 @@ private: // X11 graphics context. x11::Connection* connection_; - - DISALLOW_COPY_AND_ASSIGN(X11KeyboardImpl); }; } // namespace remoting
diff --git a/remoting/host/linux/x11_util.h b/remoting/host/linux/x11_util.h index a22d1af..64e3d5d 100644 --- a/remoting/host/linux/x11_util.h +++ b/remoting/host/linux/x11_util.h
@@ -22,12 +22,14 @@ class ScopedXGrabServer { public: explicit ScopedXGrabServer(x11::Connection* connection); + + ScopedXGrabServer(const ScopedXGrabServer&) = delete; + ScopedXGrabServer& operator=(const ScopedXGrabServer&) = delete; + ~ScopedXGrabServer(); private: x11::Connection* connection_; - - DISALLOW_COPY_AND_ASSIGN(ScopedXGrabServer); }; // Make a connection to the X Server impervious to X Server grabs. Returns
diff --git a/remoting/host/linux/x_server_clipboard.h b/remoting/host/linux/x_server_clipboard.h index 82fb4b2..e51d2376 100644 --- a/remoting/host/linux/x_server_clipboard.h +++ b/remoting/host/linux/x_server_clipboard.h
@@ -35,6 +35,10 @@ ClipboardChangedCallback; XServerClipboard(); + + XServerClipboard(const XServerClipboard&) = delete; + XServerClipboard& operator=(const XServerClipboard&) = delete; + ~XServerClipboard(); // Start monitoring |connection|'s selections, and invoke |callback| whenever @@ -138,8 +142,6 @@ // |callback| argument supplied to Init(). ClipboardChangedCallback callback_; - - DISALLOW_COPY_AND_ASSIGN(XServerClipboard); }; } // namespace remoting
diff --git a/remoting/host/linux/x_server_clipboard_unittest.cc b/remoting/host/linux/x_server_clipboard_unittest.cc index 3ad92c6..688ed92 100644 --- a/remoting/host/linux/x_server_clipboard_unittest.cc +++ b/remoting/host/linux/x_server_clipboard_unittest.cc
@@ -19,6 +19,10 @@ class ClipboardTestClient : public x11::EventObserver { public: ClipboardTestClient() = default; + + ClipboardTestClient(const ClipboardTestClient&) = delete; + ClipboardTestClient& operator=(const ClipboardTestClient&) = delete; + ~ClipboardTestClient() override { DCHECK(connection_); connection_->RemoveEventObserver(this); @@ -64,8 +68,6 @@ XServerClipboard clipboard_; x11::Connection* connection_ = nullptr; bool dispatched_event_ = false; - - DISALLOW_COPY_AND_ASSIGN(ClipboardTestClient); }; } // namespace
diff --git a/remoting/host/me2me_desktop_environment.h b/remoting/host/me2me_desktop_environment.h index 535820b..54989376 100644 --- a/remoting/host/me2me_desktop_environment.h +++ b/remoting/host/me2me_desktop_environment.h
@@ -19,6 +19,9 @@ // notifications on Linux. class Me2MeDesktopEnvironment : public BasicDesktopEnvironment { public: + Me2MeDesktopEnvironment(const Me2MeDesktopEnvironment&) = delete; + Me2MeDesktopEnvironment& operator=(const Me2MeDesktopEnvironment&) = delete; + ~Me2MeDesktopEnvironment() override; // DesktopEnvironment interface. @@ -51,8 +54,6 @@ // Notifies the client session about the local mouse movements. std::unique_ptr<LocalInputMonitor> local_input_monitor_; - - DISALLOW_COPY_AND_ASSIGN(Me2MeDesktopEnvironment); }; // Used to create |Me2MeDesktopEnvironment| instances. @@ -63,15 +64,18 @@ scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner, scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); + + Me2MeDesktopEnvironmentFactory(const Me2MeDesktopEnvironmentFactory&) = + delete; + Me2MeDesktopEnvironmentFactory& operator=( + const Me2MeDesktopEnvironmentFactory&) = delete; + ~Me2MeDesktopEnvironmentFactory() override; // DesktopEnvironmentFactory interface. std::unique_ptr<DesktopEnvironment> Create( base::WeakPtr<ClientSessionControl> client_session_control, const DesktopEnvironmentOptions& options) override; - - private: - DISALLOW_COPY_AND_ASSIGN(Me2MeDesktopEnvironmentFactory); }; } // namespace remoting
diff --git a/remoting/host/mouse_cursor_monitor_proxy.cc b/remoting/host/mouse_cursor_monitor_proxy.cc index 8fb9d2ba..73163100 100644 --- a/remoting/host/mouse_cursor_monitor_proxy.cc +++ b/remoting/host/mouse_cursor_monitor_proxy.cc
@@ -28,6 +28,10 @@ : public webrtc::MouseCursorMonitor::Callback { public: explicit Core(base::WeakPtr<MouseCursorMonitorProxy> proxy); + + Core(const Core&) = delete; + Core& operator=(const Core&) = delete; + ~Core() override; void CreateMouseCursorMonitor(const webrtc::DesktopCaptureOptions& options); @@ -48,8 +52,6 @@ base::WeakPtr<MouseCursorMonitorProxy> proxy_; scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner_; std::unique_ptr<webrtc::MouseCursorMonitor> mouse_cursor_monitor_; - - DISALLOW_COPY_AND_ASSIGN(Core); }; MouseCursorMonitorProxy::Core::Core(
diff --git a/remoting/host/mouse_cursor_monitor_proxy.h b/remoting/host/mouse_cursor_monitor_proxy.h index 0a18b3ee..420b1783 100644 --- a/remoting/host/mouse_cursor_monitor_proxy.h +++ b/remoting/host/mouse_cursor_monitor_proxy.h
@@ -27,6 +27,10 @@ MouseCursorMonitorProxy( scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner, const webrtc::DesktopCaptureOptions& options); + + MouseCursorMonitorProxy(const MouseCursorMonitorProxy&) = delete; + MouseCursorMonitorProxy& operator=(const MouseCursorMonitorProxy&) = delete; + ~MouseCursorMonitorProxy() override; // webrtc::MouseCursorMonitor interface. @@ -49,8 +53,6 @@ Callback* callback_ = nullptr; base::WeakPtrFactory<MouseCursorMonitorProxy> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(MouseCursorMonitorProxy); }; } // namespace remoting
diff --git a/remoting/host/mouse_cursor_monitor_proxy_unittest.cc b/remoting/host/mouse_cursor_monitor_proxy_unittest.cc index 715f50da..74e22b0 100644 --- a/remoting/host/mouse_cursor_monitor_proxy_unittest.cc +++ b/remoting/host/mouse_cursor_monitor_proxy_unittest.cc
@@ -42,6 +42,11 @@ scoped_refptr<base::SingleThreadTaskRunner> task_runner) : task_runner_(task_runner), callback_(nullptr) { } + + ThreadCheckMouseCursorMonitor(const ThreadCheckMouseCursorMonitor&) = delete; + ThreadCheckMouseCursorMonitor& operator=( + const ThreadCheckMouseCursorMonitor&) = delete; + ~ThreadCheckMouseCursorMonitor() override { EXPECT_TRUE(task_runner_->BelongsToCurrentThread()); } @@ -70,8 +75,6 @@ scoped_refptr<base::SingleThreadTaskRunner> task_runner_; Callback* callback_; - - DISALLOW_COPY_AND_ASSIGN(ThreadCheckMouseCursorMonitor); }; class MouseCursorMonitorProxyTest
diff --git a/remoting/host/mouse_shape_pump.h b/remoting/host/mouse_shape_pump.h index 38c0e6b..1ae3e7b 100644 --- a/remoting/host/mouse_shape_pump.h +++ b/remoting/host/mouse_shape_pump.h
@@ -25,6 +25,10 @@ MouseShapePump( std::unique_ptr<webrtc::MouseCursorMonitor> mouse_cursor_monitor, protocol::CursorShapeStub* cursor_shape_stub); + + MouseShapePump(const MouseShapePump&) = delete; + MouseShapePump& operator=(const MouseShapePump&) = delete; + ~MouseShapePump() override; // Sets or unsets the callback to which to delegate MouseCursorMonitor events @@ -45,8 +49,6 @@ base::RepeatingTimer capture_timer_; webrtc::MouseCursorMonitor::Callback* callback_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(MouseShapePump); }; } // namespace remoting
diff --git a/remoting/host/mouse_shape_pump_unittest.cc b/remoting/host/mouse_shape_pump_unittest.cc index f782b85..1684fda2 100644 --- a/remoting/host/mouse_shape_pump_unittest.cc +++ b/remoting/host/mouse_shape_pump_unittest.cc
@@ -36,6 +36,10 @@ class TestMouseCursorMonitor : public webrtc::MouseCursorMonitor { public: TestMouseCursorMonitor() : callback_(nullptr) {} + + TestMouseCursorMonitor(const TestMouseCursorMonitor&) = delete; + TestMouseCursorMonitor& operator=(const TestMouseCursorMonitor&) = delete; + ~TestMouseCursorMonitor() override = default; void Init(Callback* callback, Mode mode) override { @@ -58,8 +62,6 @@ private: Callback* callback_; - - DISALLOW_COPY_AND_ASSIGN(TestMouseCursorMonitor); }; class MouseShapePumpTest : public testing::Test {
diff --git a/remoting/host/native_messaging/native_messaging_pipe.h b/remoting/host/native_messaging/native_messaging_pipe.h index b420931..57ec09b 100644 --- a/remoting/host/native_messaging/native_messaging_pipe.h +++ b/remoting/host/native_messaging/native_messaging_pipe.h
@@ -24,6 +24,10 @@ public extensions::NativeMessageHost::Client { public: NativeMessagingPipe(); + + NativeMessagingPipe(const NativeMessagingPipe&) = delete; + NativeMessagingPipe& operator=(const NativeMessagingPipe&) = delete; + ~NativeMessagingPipe() override; // Starts processing messages from the pipe. @@ -41,8 +45,6 @@ private: std::unique_ptr<extensions::NativeMessagingChannel> channel_; std::unique_ptr<extensions::NativeMessageHost> host_; - - DISALLOW_COPY_AND_ASSIGN(NativeMessagingPipe); }; } // namespace remoting
diff --git a/remoting/host/native_messaging/native_messaging_reader.cc b/remoting/host/native_messaging/native_messaging_reader.cc index 1c133b54..851f139 100644 --- a/remoting/host/native_messaging/native_messaging_reader.cc +++ b/remoting/host/native_messaging/native_messaging_reader.cc
@@ -53,6 +53,10 @@ scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, scoped_refptr<base::SequencedTaskRunner> read_task_runner, base::WeakPtr<NativeMessagingReader> reader_); + + Core(const Core&) = delete; + Core& operator=(const Core&) = delete; + ~Core(); // Reads a message from the Native Messaging client and passes it to @@ -72,8 +76,6 @@ // Used to DCHECK that the reader code executes on the correct thread. scoped_refptr<base::SequencedTaskRunner> read_task_runner_; - - DISALLOW_COPY_AND_ASSIGN(Core); }; NativeMessagingReader::Core::Core(
diff --git a/remoting/host/native_messaging/native_messaging_reader.h b/remoting/host/native_messaging/native_messaging_reader.h index dcaa9ba..6b79fe7 100644 --- a/remoting/host/native_messaging/native_messaging_reader.h +++ b/remoting/host/native_messaging/native_messaging_reader.h
@@ -28,6 +28,10 @@ MessageCallback; explicit NativeMessagingReader(base::File file); + + NativeMessagingReader(const NativeMessagingReader&) = delete; + NativeMessagingReader& operator=(const NativeMessagingReader&) = delete; + ~NativeMessagingReader(); // Begin reading messages from the Native Messaging client webapp, calling @@ -66,8 +70,6 @@ // Allows the reader to be deleted safely even when tasks may be pending on // it. base::WeakPtrFactory<NativeMessagingReader> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(NativeMessagingReader); }; } // namespace remoting
diff --git a/remoting/host/native_messaging/native_messaging_writer.h b/remoting/host/native_messaging/native_messaging_writer.h index 7c66b8708..a10ff76 100644 --- a/remoting/host/native_messaging/native_messaging_writer.h +++ b/remoting/host/native_messaging/native_messaging_writer.h
@@ -19,6 +19,10 @@ class NativeMessagingWriter { public: explicit NativeMessagingWriter(base::File file); + + NativeMessagingWriter(const NativeMessagingWriter&) = delete; + NativeMessagingWriter& operator=(const NativeMessagingWriter&) = delete; + ~NativeMessagingWriter(); // Sends a message to the Native Messaging client, returning true if @@ -28,8 +32,6 @@ private: base::File write_stream_; bool fail_; - - DISALLOW_COPY_AND_ASSIGN(NativeMessagingWriter); }; } // namespace remoting
diff --git a/remoting/host/native_messaging/pipe_messaging_channel.h b/remoting/host/native_messaging/pipe_messaging_channel.h index 3283726..f9dc76ac 100644 --- a/remoting/host/native_messaging/pipe_messaging_channel.h +++ b/remoting/host/native_messaging/pipe_messaging_channel.h
@@ -35,6 +35,10 @@ // Constructs an object taking the ownership of |input| and |output|. Closes // |input| and |output| to prevent the caller from using them. PipeMessagingChannel(base::File input, base::File output); + + PipeMessagingChannel(const PipeMessagingChannel&) = delete; + PipeMessagingChannel& operator=(const PipeMessagingChannel&) = delete; + ~PipeMessagingChannel() override; // If the ctor is called with |input| and |output| set to stdin/stdout, @@ -67,8 +71,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<PipeMessagingChannel> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PipeMessagingChannel); }; } // namespace remoting
diff --git a/remoting/host/pairing_registry_delegate_linux.h b/remoting/host/pairing_registry_delegate_linux.h index d147644..cb02cbe 100644 --- a/remoting/host/pairing_registry_delegate_linux.h +++ b/remoting/host/pairing_registry_delegate_linux.h
@@ -21,6 +21,11 @@ : public protocol::PairingRegistry::Delegate { public: PairingRegistryDelegateLinux(); + + PairingRegistryDelegateLinux(const PairingRegistryDelegateLinux&) = delete; + PairingRegistryDelegateLinux& operator=(const PairingRegistryDelegateLinux&) = + delete; + ~PairingRegistryDelegateLinux() override; // PairingRegistry::Delegate interface @@ -43,8 +48,6 @@ void SetRegistryPathForTesting(const base::FilePath& registry_path); base::FilePath registry_path_for_testing_; - - DISALLOW_COPY_AND_ASSIGN(PairingRegistryDelegateLinux); }; } // namespace remoting
diff --git a/remoting/host/pairing_registry_delegate_win.h b/remoting/host/pairing_registry_delegate_win.h index ed72dfd..083937b 100644 --- a/remoting/host/pairing_registry_delegate_win.h +++ b/remoting/host/pairing_registry_delegate_win.h
@@ -44,6 +44,11 @@ : public protocol::PairingRegistry::Delegate { public: PairingRegistryDelegateWin(); + + PairingRegistryDelegateWin(const PairingRegistryDelegateWin&) = delete; + PairingRegistryDelegateWin& operator=(const PairingRegistryDelegateWin&) = + delete; + ~PairingRegistryDelegateWin() override; // Passes the root keys to be used to access the pairing registry store. @@ -62,8 +67,6 @@ private: base::win::RegKey privileged_; base::win::RegKey unprivileged_; - - DISALLOW_COPY_AND_ASSIGN(PairingRegistryDelegateWin); }; } // namespace remoting
diff --git a/remoting/host/policy_watcher.h b/remoting/host/policy_watcher.h index 17005ab..c98aad38 100644 --- a/remoting/host/policy_watcher.h +++ b/remoting/host/policy_watcher.h
@@ -38,6 +38,9 @@ // Called after detecting malformed policies. typedef base::RepeatingCallback<void()> PolicyErrorCallback; + PolicyWatcher(const PolicyWatcher&) = delete; + PolicyWatcher& operator=(const PolicyWatcher&) = delete; + ~PolicyWatcher() override; // This guarantees that the |policy_updated_callback| is called at least once @@ -172,8 +175,6 @@ std::unique_ptr<policy::PolicyService> owned_policy_service_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(PolicyWatcher); }; } // namespace remoting
diff --git a/remoting/host/register_support_host_request.h b/remoting/host/register_support_host_request.h index 4204180..9ddb554 100644 --- a/remoting/host/register_support_host_request.h +++ b/remoting/host/register_support_host_request.h
@@ -33,14 +33,16 @@ protocol::ErrorCode error_code)>; RegisterSupportHostRequest() = default; + + RegisterSupportHostRequest(const RegisterSupportHostRequest&) = delete; + RegisterSupportHostRequest& operator=(const RegisterSupportHostRequest&) = + delete; + virtual ~RegisterSupportHostRequest() = default; virtual void StartRequest(SignalStrategy* signal_strategy, scoped_refptr<RsaKeyPair> key_pair, RegisterCallback callback) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(RegisterSupportHostRequest); }; } // namespace remoting
diff --git a/remoting/host/remote_input_filter.h b/remoting/host/remote_input_filter.h index e381387..ebe972a 100644 --- a/remoting/host/remote_input_filter.h +++ b/remoting/host/remote_input_filter.h
@@ -23,6 +23,10 @@ // Creates a filter forwarding events to the specified InputEventTracker. // The filter needs a tracker to release buttons & keys when blocking input. explicit RemoteInputFilter(protocol::InputEventTracker* event_tracker); + + RemoteInputFilter(const RemoteInputFilter&) = delete; + RemoteInputFilter& operator=(const RemoteInputFilter&) = delete; + ~RemoteInputFilter() override; // Informs the filter that local mouse or touch activity has been detected. @@ -63,8 +67,6 @@ // If |true| than the filter assumes that injecting input causes an echo. bool expect_local_echo_; - - DISALLOW_COPY_AND_ASSIGN(RemoteInputFilter); }; } // namespace remoting
diff --git a/remoting/host/remoting_register_support_host_request.cc b/remoting/host/remoting_register_support_host_request.cc index c272afda..cfdc8b1 100644 --- a/remoting/host/remoting_register_support_host_request.cc +++ b/remoting/host/remoting_register_support_host_request.cc
@@ -72,6 +72,11 @@ RegisterSupportHostClientImpl( OAuthTokenGetter* token_getter, scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory); + + RegisterSupportHostClientImpl(const RegisterSupportHostClientImpl&) = delete; + RegisterSupportHostClientImpl& operator=( + const RegisterSupportHostClientImpl&) = delete; + ~RegisterSupportHostClientImpl() override; void RegisterSupportHost( @@ -81,8 +86,6 @@ private: ProtobufHttpClient http_client_; - - DISALLOW_COPY_AND_ASSIGN(RegisterSupportHostClientImpl); }; RemotingRegisterSupportHostRequest::RegisterSupportHostClientImpl::
diff --git a/remoting/host/remoting_register_support_host_request.h b/remoting/host/remoting_register_support_host_request.h index a91a536..981d57d 100644 --- a/remoting/host/remoting_register_support_host_request.h +++ b/remoting/host/remoting_register_support_host_request.h
@@ -38,6 +38,12 @@ RemotingRegisterSupportHostRequest( std::unique_ptr<OAuthTokenGetter> token_getter, scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory); + + RemotingRegisterSupportHostRequest( + const RemotingRegisterSupportHostRequest&) = delete; + RemotingRegisterSupportHostRequest& operator=( + const RemotingRegisterSupportHostRequest&) = delete; + ~RemotingRegisterSupportHostRequest() override; // RegisterSupportHostRequest implementation. @@ -90,8 +96,6 @@ std::unique_ptr<RegisterSupportHostClient> register_host_client_; State state_ = State::NOT_STARTED; - - DISALLOW_COPY_AND_ASSIGN(RemotingRegisterSupportHostRequest); }; } // namespace remoting
diff --git a/remoting/host/resizing_host_observer.h b/remoting/host/resizing_host_observer.h index a259640..9b0f5d4 100644 --- a/remoting/host/resizing_host_observer.h +++ b/remoting/host/resizing_host_observer.h
@@ -35,6 +35,10 @@ explicit ResizingHostObserver( std::unique_ptr<DesktopResizer> desktop_resizer, bool restore); + + ResizingHostObserver(const ResizingHostObserver&) = delete; + ResizingHostObserver& operator=(const ResizingHostObserver&) = delete; + ~ResizingHostObserver() override; // ScreenControls interface. @@ -58,8 +62,6 @@ const base::TickClock* clock_; base::WeakPtrFactory<ResizingHostObserver> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ResizingHostObserver); }; } // namespace remoting
diff --git a/remoting/host/sas_injector_win.cc b/remoting/host/sas_injector_win.cc index 8abbef1..c9f91b7 100644 --- a/remoting/host/sas_injector_win.cc +++ b/remoting/host/sas_injector_win.cc
@@ -33,6 +33,10 @@ class ScopedSoftwareSasPolicy { public: ScopedSoftwareSasPolicy(); + + ScopedSoftwareSasPolicy(const ScopedSoftwareSasPolicy&) = delete; + ScopedSoftwareSasPolicy& operator=(const ScopedSoftwareSasPolicy&) = delete; + ~ScopedSoftwareSasPolicy(); bool Apply(); @@ -43,8 +47,6 @@ // True if the policy needs to be restored. bool restore_policy_ = false; - - DISALLOW_COPY_AND_ASSIGN(ScopedSoftwareSasPolicy); }; ScopedSoftwareSasPolicy::ScopedSoftwareSasPolicy() = default;
diff --git a/remoting/host/security_key/fake_security_key_ipc_client.h b/remoting/host/security_key/fake_security_key_ipc_client.h index 013ed44..570af8aa 100644 --- a/remoting/host/security_key/fake_security_key_ipc_client.h +++ b/remoting/host/security_key/fake_security_key_ipc_client.h
@@ -32,6 +32,10 @@ public: explicit FakeSecurityKeyIpcClient( const base::RepeatingClosure& channel_event_callback); + + FakeSecurityKeyIpcClient(const FakeSecurityKeyIpcClient&) = delete; + FakeSecurityKeyIpcClient& operator=(const FakeSecurityKeyIpcClient&) = delete; + ~FakeSecurityKeyIpcClient() override; // SecurityKeyIpcClient interface. @@ -132,8 +136,6 @@ std::string security_key_response_payload_; base::WeakPtrFactory<FakeSecurityKeyIpcClient> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeSecurityKeyIpcClient); }; } // namespace remoting
diff --git a/remoting/host/security_key/fake_security_key_ipc_server.h b/remoting/host/security_key/fake_security_key_ipc_server.h index 7063fd85..887b01f2 100644 --- a/remoting/host/security_key/fake_security_key_ipc_server.h +++ b/remoting/host/security_key/fake_security_key_ipc_server.h
@@ -41,6 +41,10 @@ const SecurityKeyAuthHandler::SendMessageCallback& send_message_callback, base::OnceClosure connect_callback, base::OnceClosure channel_closed_callback); + + FakeSecurityKeyIpcServer(const FakeSecurityKeyIpcServer&) = delete; + FakeSecurityKeyIpcServer& operator=(const FakeSecurityKeyIpcServer&) = delete; + ~FakeSecurityKeyIpcServer() override; // SecurityKeyIpcServer interface. @@ -105,8 +109,6 @@ // NOTE: Weak pointers must be invalidated before all other member variables. base::WeakPtrFactory<FakeSecurityKeyIpcServer> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeSecurityKeyIpcServer); }; // Used to create FakeSecurityKeyIpcServer instances for testing. @@ -116,6 +118,12 @@ class FakeSecurityKeyIpcServerFactory : public SecurityKeyIpcServerFactory { public: FakeSecurityKeyIpcServerFactory(); + + FakeSecurityKeyIpcServerFactory(const FakeSecurityKeyIpcServerFactory&) = + delete; + FakeSecurityKeyIpcServerFactory& operator=( + const FakeSecurityKeyIpcServerFactory&) = delete; + ~FakeSecurityKeyIpcServerFactory() override; // SecurityKeyIpcServerFactory implementation. @@ -135,8 +143,6 @@ // Tracks each FakeSecurityKeyIpcServer instance created by this // factory which allows them to be retrieved and queried for tests. std::map<int, base::WeakPtr<FakeSecurityKeyIpcServer>> ipc_server_map_; - - DISALLOW_COPY_AND_ASSIGN(FakeSecurityKeyIpcServerFactory); }; } // namespace remoting
diff --git a/remoting/host/security_key/fake_security_key_message_reader.h b/remoting/host/security_key/fake_security_key_message_reader.h index 8e2549c6..38cab6b 100644 --- a/remoting/host/security_key/fake_security_key_message_reader.h +++ b/remoting/host/security_key/fake_security_key_message_reader.h
@@ -18,6 +18,11 @@ class FakeSecurityKeyMessageReader : public SecurityKeyMessageReader { public: FakeSecurityKeyMessageReader(); + + FakeSecurityKeyMessageReader(const FakeSecurityKeyMessageReader&) = delete; + FakeSecurityKeyMessageReader& operator=(const FakeSecurityKeyMessageReader&) = + delete; + ~FakeSecurityKeyMessageReader() override; // SecurityKeyMessageReader interface. @@ -36,8 +41,6 @@ base::OnceClosure error_callback_; base::WeakPtrFactory<FakeSecurityKeyMessageReader> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeSecurityKeyMessageReader); }; } // namespace remoting
diff --git a/remoting/host/security_key/fake_security_key_message_writer.h b/remoting/host/security_key/fake_security_key_message_writer.h index 1922e56c..7a4b26b 100644 --- a/remoting/host/security_key/fake_security_key_message_writer.h +++ b/remoting/host/security_key/fake_security_key_message_writer.h
@@ -21,6 +21,11 @@ public: explicit FakeSecurityKeyMessageWriter( const base::RepeatingClosure& write_callback); + + FakeSecurityKeyMessageWriter(const FakeSecurityKeyMessageWriter&) = delete; + FakeSecurityKeyMessageWriter& operator=(const FakeSecurityKeyMessageWriter&) = + delete; + ~FakeSecurityKeyMessageWriter() override; // SecurityKeyMessageWriter interface. @@ -52,8 +57,6 @@ base::RepeatingClosure write_callback_; base::WeakPtrFactory<FakeSecurityKeyMessageWriter> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeSecurityKeyMessageWriter); }; } // namespace remoting
diff --git a/remoting/host/security_key/security_key_auth_handler_posix.cc b/remoting/host/security_key/security_key_auth_handler_posix.cc index 01d3e10..98fb632 100644 --- a/remoting/host/security_key/security_key_auth_handler_posix.cc +++ b/remoting/host/security_key/security_key_auth_handler_posix.cc
@@ -62,6 +62,11 @@ public: explicit SecurityKeyAuthHandlerPosix( scoped_refptr<base::SingleThreadTaskRunner> file_task_runner); + + SecurityKeyAuthHandlerPosix(const SecurityKeyAuthHandlerPosix&) = delete; + SecurityKeyAuthHandlerPosix& operator=(const SecurityKeyAuthHandlerPosix&) = + delete; + ~SecurityKeyAuthHandlerPosix() override; private: @@ -124,8 +129,6 @@ base::TimeDelta request_timeout_; base::WeakPtrFactory<SecurityKeyAuthHandlerPosix> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SecurityKeyAuthHandlerPosix); }; std::unique_ptr<SecurityKeyAuthHandler> SecurityKeyAuthHandler::Create(
diff --git a/remoting/host/security_key/security_key_auth_handler_win.cc b/remoting/host/security_key/security_key_auth_handler_win.cc index 33b6c1f..c8c7b23 100644 --- a/remoting/host/security_key/security_key_auth_handler_win.cc +++ b/remoting/host/security_key/security_key_auth_handler_win.cc
@@ -56,6 +56,11 @@ public: explicit SecurityKeyAuthHandlerWin( ClientSessionDetails* client_session_details); + + SecurityKeyAuthHandlerWin(const SecurityKeyAuthHandlerWin&) = delete; + SecurityKeyAuthHandlerWin& operator=(const SecurityKeyAuthHandlerWin&) = + delete; + ~SecurityKeyAuthHandlerWin() override; private: @@ -104,8 +109,6 @@ base::ThreadChecker thread_checker_; base::WeakPtrFactory<SecurityKeyAuthHandlerWin> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SecurityKeyAuthHandlerWin); }; std::unique_ptr<SecurityKeyAuthHandler> SecurityKeyAuthHandler::Create(
diff --git a/remoting/host/security_key/security_key_auth_handler_win_unittest.cc b/remoting/host/security_key/security_key_auth_handler_win_unittest.cc index 72f7376..b6cb9f6 100644 --- a/remoting/host/security_key/security_key_auth_handler_win_unittest.cc +++ b/remoting/host/security_key/security_key_auth_handler_win_unittest.cc
@@ -34,6 +34,11 @@ class SecurityKeyAuthHandlerWinTest : public testing::Test { public: SecurityKeyAuthHandlerWinTest(); + + SecurityKeyAuthHandlerWinTest(const SecurityKeyAuthHandlerWinTest&) = delete; + SecurityKeyAuthHandlerWinTest& operator=( + const SecurityKeyAuthHandlerWinTest&) = delete; + ~SecurityKeyAuthHandlerWinTest() override; // Passed to the object used for testing to be called back to signal @@ -109,8 +114,6 @@ private: testing::NiceMock<MockClientSessionDetails> mock_client_session_details_; - - DISALLOW_COPY_AND_ASSIGN(SecurityKeyAuthHandlerWinTest); }; SecurityKeyAuthHandlerWinTest::SecurityKeyAuthHandlerWinTest()
diff --git a/remoting/host/security_key/security_key_extension.h b/remoting/host/security_key/security_key_extension.h index e5f8b32..05384cc9 100644 --- a/remoting/host/security_key/security_key_extension.h +++ b/remoting/host/security_key/security_key_extension.h
@@ -26,6 +26,10 @@ public: explicit SecurityKeyExtension( scoped_refptr<base::SingleThreadTaskRunner> file_task_runner); + + SecurityKeyExtension(const SecurityKeyExtension&) = delete; + SecurityKeyExtension& operator=(const SecurityKeyExtension&) = delete; + ~SecurityKeyExtension() override; // HostExtension interface. @@ -37,8 +41,6 @@ private: // Allows underlying auth handler to perform blocking file IO. scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_; - - DISALLOW_COPY_AND_ASSIGN(SecurityKeyExtension); }; } // namespace remoting
diff --git a/remoting/host/security_key/security_key_extension_session.h b/remoting/host/security_key/security_key_extension_session.h index 1858eec0..0b6e3bb 100644 --- a/remoting/host/security_key/security_key_extension_session.h +++ b/remoting/host/security_key/security_key_extension_session.h
@@ -35,6 +35,11 @@ ClientSessionDetails* client_session_details, protocol::ClientStub* client_stub, scoped_refptr<base::SingleThreadTaskRunner> file_task_runner); + + SecurityKeyExtensionSession(const SecurityKeyExtensionSession&) = delete; + SecurityKeyExtensionSession& operator=(const SecurityKeyExtensionSession&) = + delete; + ~SecurityKeyExtensionSession() override; // HostExtensionSession interface. @@ -63,8 +68,6 @@ // Handles platform specific security key operations. std::unique_ptr<SecurityKeyAuthHandler> security_key_auth_handler_; - - DISALLOW_COPY_AND_ASSIGN(SecurityKeyExtensionSession); }; } // namespace remoting
diff --git a/remoting/host/security_key/security_key_extension_session_unittest.cc b/remoting/host/security_key/security_key_extension_session_unittest.cc index 563dac8..b3836c7 100644 --- a/remoting/host/security_key/security_key_extension_session_unittest.cc +++ b/remoting/host/security_key/security_key_extension_session_unittest.cc
@@ -57,6 +57,10 @@ class TestClientStub : public protocol::ClientStub { public: TestClientStub(); + + TestClientStub(const TestClientStub&) = delete; + TestClientStub& operator=(const TestClientStub&) = delete; + ~TestClientStub() override; // protocol::ClientStub implementation. @@ -83,8 +87,6 @@ private: protocol::ExtensionMessage message_; std::unique_ptr<base::RunLoop> run_loop_; - - DISALLOW_COPY_AND_ASSIGN(TestClientStub); }; TestClientStub::TestClientStub() : run_loop_(new base::RunLoop) {} @@ -137,6 +139,10 @@ class TestClientSessionDetails : public ClientSessionDetails { public: TestClientSessionDetails(); + + TestClientSessionDetails(const TestClientSessionDetails&) = delete; + TestClientSessionDetails& operator=(const TestClientSessionDetails&) = delete; + ~TestClientSessionDetails() override; // ClientSessionDetails interface. @@ -147,8 +153,6 @@ private: uint32_t desktop_session_id_ = UINT32_MAX; - - DISALLOW_COPY_AND_ASSIGN(TestClientSessionDetails); }; TestClientSessionDetails::TestClientSessionDetails() = default; @@ -158,6 +162,12 @@ class SecurityKeyExtensionSessionTest : public testing::Test { public: SecurityKeyExtensionSessionTest(); + + SecurityKeyExtensionSessionTest(const SecurityKeyExtensionSessionTest&) = + delete; + SecurityKeyExtensionSessionTest& operator=( + const SecurityKeyExtensionSessionTest&) = delete; + ~SecurityKeyExtensionSessionTest() override; void WaitForAndVerifyHostMessage(); @@ -175,9 +185,6 @@ TestClientStub client_stub_; TestClientSessionDetails client_details_; - - private: - DISALLOW_COPY_AND_ASSIGN(SecurityKeyExtensionSessionTest); }; SecurityKeyExtensionSessionTest::SecurityKeyExtensionSessionTest()
diff --git a/remoting/host/security_key/security_key_ipc_client.h b/remoting/host/security_key/security_key_ipc_client.h index 134a828..37d7f1c 100644 --- a/remoting/host/security_key/security_key_ipc_client.h +++ b/remoting/host/security_key/security_key_ipc_client.h
@@ -29,6 +29,10 @@ class SecurityKeyIpcClient : public IPC::Listener { public: SecurityKeyIpcClient(); + + SecurityKeyIpcClient(const SecurityKeyIpcClient&) = delete; + SecurityKeyIpcClient& operator=(const SecurityKeyIpcClient&) = delete; + ~SecurityKeyIpcClient() override; // Used to send security key extension messages to the client. @@ -111,8 +115,6 @@ base::ThreadChecker thread_checker_; base::WeakPtrFactory<SecurityKeyIpcClient> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SecurityKeyIpcClient); }; } // namespace remoting
diff --git a/remoting/host/security_key/security_key_ipc_client_unittest.cc b/remoting/host/security_key/security_key_ipc_client_unittest.cc index ce0831c..6db51244 100644 --- a/remoting/host/security_key/security_key_ipc_client_unittest.cc +++ b/remoting/host/security_key/security_key_ipc_client_unittest.cc
@@ -34,6 +34,10 @@ class SecurityKeyIpcClientTest : public testing::Test { public: SecurityKeyIpcClientTest(); + + SecurityKeyIpcClientTest(const SecurityKeyIpcClientTest&) = delete; + SecurityKeyIpcClientTest& operator=(const SecurityKeyIpcClientTest&) = delete; + ~SecurityKeyIpcClientTest() override; // Passed to the object used for testing to be called back to signal @@ -110,9 +114,6 @@ // Stores the contents of the last IPC message received for validation. std::string last_message_received_; - - private: - DISALLOW_COPY_AND_ASSIGN(SecurityKeyIpcClientTest); }; SecurityKeyIpcClientTest::SecurityKeyIpcClientTest()
diff --git a/remoting/host/security_key/security_key_ipc_server_impl.h b/remoting/host/security_key/security_key_ipc_server_impl.h index 389f677..324893fb 100644 --- a/remoting/host/security_key/security_key_ipc_server_impl.h +++ b/remoting/host/security_key/security_key_ipc_server_impl.h
@@ -45,6 +45,10 @@ const SecurityKeyAuthHandler::SendMessageCallback& message_callback, base::OnceClosure connect_callback, base::OnceClosure done_callback); + + SecurityKeyIpcServerImpl(const SecurityKeyIpcServerImpl&) = delete; + SecurityKeyIpcServerImpl& operator=(const SecurityKeyIpcServerImpl&) = delete; + ~SecurityKeyIpcServerImpl() override; // SecurityKeyIpcServer implementation. @@ -99,8 +103,6 @@ base::ThreadChecker thread_checker_; base::WeakPtrFactory<SecurityKeyIpcServerImpl> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SecurityKeyIpcServerImpl); }; } // namespace remoting
diff --git a/remoting/host/security_key/security_key_ipc_server_unittest.cc b/remoting/host/security_key/security_key_ipc_server_unittest.cc index 60489ba..f667021e 100644 --- a/remoting/host/security_key/security_key_ipc_server_unittest.cc +++ b/remoting/host/security_key/security_key_ipc_server_unittest.cc
@@ -41,6 +41,10 @@ public ClientSessionDetails { public: SecurityKeyIpcServerTest(); + + SecurityKeyIpcServerTest(const SecurityKeyIpcServerTest&) = delete; + SecurityKeyIpcServerTest& operator=(const SecurityKeyIpcServerTest&) = delete; + ~SecurityKeyIpcServerTest() override; // Passed to the object used for testing to be called back to signal @@ -87,9 +91,6 @@ std::string last_message_received_; uint32_t peer_session_id_ = UINT32_MAX; - - private: - DISALLOW_COPY_AND_ASSIGN(SecurityKeyIpcServerTest); }; SecurityKeyIpcServerTest::SecurityKeyIpcServerTest()
diff --git a/remoting/host/security_key/security_key_message.h b/remoting/host/security_key/security_key_message.h index bd54a25a..e90b4ae 100644 --- a/remoting/host/security_key/security_key_message.h +++ b/remoting/host/security_key/security_key_message.h
@@ -109,6 +109,10 @@ static const int kMessageTypeSizeBytes; SecurityKeyMessage(); + + SecurityKeyMessage(const SecurityKeyMessage&) = delete; + SecurityKeyMessage& operator=(const SecurityKeyMessage&) = delete; + ~SecurityKeyMessage(); // When given a header value (uint32_t), this method will return whether the @@ -136,8 +140,6 @@ private: SecurityKeyMessageType type_ = SecurityKeyMessageType::INVALID; std::string payload_; - - DISALLOW_COPY_AND_ASSIGN(SecurityKeyMessage); }; // Used to pass security key message data between classes.
diff --git a/remoting/host/security_key/security_key_message_handler.h b/remoting/host/security_key/security_key_message_handler.h index 8a2157fa..145f2c0 100644 --- a/remoting/host/security_key/security_key_message_handler.h +++ b/remoting/host/security_key/security_key_message_handler.h
@@ -25,6 +25,11 @@ class SecurityKeyMessageHandler { public: SecurityKeyMessageHandler(); + + SecurityKeyMessageHandler(const SecurityKeyMessageHandler&) = delete; + SecurityKeyMessageHandler& operator=(const SecurityKeyMessageHandler&) = + delete; + ~SecurityKeyMessageHandler(); // Sets up the handler to begin receiving and processing messages. @@ -87,8 +92,6 @@ bool expect_ipc_channel_close_ = false; base::ThreadChecker thread_checker_; - - DISALLOW_COPY_AND_ASSIGN(SecurityKeyMessageHandler); }; } // namespace remoting
diff --git a/remoting/host/security_key/security_key_message_handler_unittest.cc b/remoting/host/security_key/security_key_message_handler_unittest.cc index 5e99184..8e13595e 100644 --- a/remoting/host/security_key/security_key_message_handler_unittest.cc +++ b/remoting/host/security_key/security_key_message_handler_unittest.cc
@@ -25,6 +25,11 @@ class SecurityKeyMessageHandlerTest : public testing::Test { public: SecurityKeyMessageHandlerTest(); + + SecurityKeyMessageHandlerTest(const SecurityKeyMessageHandlerTest&) = delete; + SecurityKeyMessageHandlerTest& operator=( + const SecurityKeyMessageHandlerTest&) = delete; + ~SecurityKeyMessageHandlerTest() override; // Passed to the object used for testing to be called back to signal @@ -56,8 +61,6 @@ base::test::SingleThreadTaskEnvironment task_environment_{ base::test::SingleThreadTaskEnvironment::MainThreadType::IO}; std::unique_ptr<base::RunLoop> run_loop_; - - DISALLOW_COPY_AND_ASSIGN(SecurityKeyMessageHandlerTest); }; SecurityKeyMessageHandlerTest::SecurityKeyMessageHandlerTest() = default;
diff --git a/remoting/host/security_key/security_key_message_reader_impl.h b/remoting/host/security_key/security_key_message_reader_impl.h index 98b3743..f0348d8c 100644 --- a/remoting/host/security_key/security_key_message_reader_impl.h +++ b/remoting/host/security_key/security_key_message_reader_impl.h
@@ -26,6 +26,11 @@ class SecurityKeyMessageReaderImpl : public SecurityKeyMessageReader { public: explicit SecurityKeyMessageReaderImpl(base::File input_file); + + SecurityKeyMessageReaderImpl(const SecurityKeyMessageReaderImpl&) = delete; + SecurityKeyMessageReaderImpl& operator=(const SecurityKeyMessageReaderImpl&) = + delete; + ~SecurityKeyMessageReaderImpl() override; // SecurityKeyMessageReader interface. @@ -62,8 +67,6 @@ base::WeakPtr<SecurityKeyMessageReaderImpl> reader_; base::WeakPtrFactory<SecurityKeyMessageReaderImpl> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SecurityKeyMessageReaderImpl); }; } // namespace remoting
diff --git a/remoting/host/security_key/security_key_message_reader_impl_unittest.cc b/remoting/host/security_key/security_key_message_reader_impl_unittest.cc index 75c3027a..b523f9f 100644 --- a/remoting/host/security_key/security_key_message_reader_impl_unittest.cc +++ b/remoting/host/security_key/security_key_message_reader_impl_unittest.cc
@@ -27,6 +27,12 @@ class SecurityKeyMessageReaderImplTest : public testing::Test { public: SecurityKeyMessageReaderImplTest(); + + SecurityKeyMessageReaderImplTest(const SecurityKeyMessageReaderImplTest&) = + delete; + SecurityKeyMessageReaderImplTest& operator=( + const SecurityKeyMessageReaderImplTest&) = delete; + ~SecurityKeyMessageReaderImplTest() override; // SecurityKeyMessageCallback passed to the Reader. Stores |message| so it can @@ -64,8 +70,6 @@ base::test::SingleThreadTaskEnvironment task_environment_{ base::test::SingleThreadTaskEnvironment::MainThreadType::IO}; std::unique_ptr<base::RunLoop> run_loop_; - - DISALLOW_COPY_AND_ASSIGN(SecurityKeyMessageReaderImplTest); }; SecurityKeyMessageReaderImplTest::SecurityKeyMessageReaderImplTest()
diff --git a/remoting/host/security_key/security_key_message_writer_impl.h b/remoting/host/security_key/security_key_message_writer_impl.h index d8008f22..69abc115 100644 --- a/remoting/host/security_key/security_key_message_writer_impl.h +++ b/remoting/host/security_key/security_key_message_writer_impl.h
@@ -18,6 +18,11 @@ class SecurityKeyMessageWriterImpl : public SecurityKeyMessageWriter { public: explicit SecurityKeyMessageWriterImpl(base::File output_file); + + SecurityKeyMessageWriterImpl(const SecurityKeyMessageWriterImpl&) = delete; + SecurityKeyMessageWriterImpl& operator=(const SecurityKeyMessageWriterImpl&) = + delete; + ~SecurityKeyMessageWriterImpl() override; private: @@ -31,8 +36,6 @@ base::File output_stream_; bool write_failed_ = false; - - DISALLOW_COPY_AND_ASSIGN(SecurityKeyMessageWriterImpl); }; } // namespace remoting
diff --git a/remoting/host/security_key/security_key_message_writer_impl_unittest.cc b/remoting/host/security_key/security_key_message_writer_impl_unittest.cc index 1d6fea44..e9ff21a 100644 --- a/remoting/host/security_key/security_key_message_writer_impl_unittest.cc +++ b/remoting/host/security_key/security_key_message_writer_impl_unittest.cc
@@ -30,6 +30,12 @@ class SecurityKeyMessageWriterImplTest : public testing::Test { public: SecurityKeyMessageWriterImplTest(); + + SecurityKeyMessageWriterImplTest(const SecurityKeyMessageWriterImplTest&) = + delete; + SecurityKeyMessageWriterImplTest& operator=( + const SecurityKeyMessageWriterImplTest&) = delete; + ~SecurityKeyMessageWriterImplTest() override; // Run on a separate thread, this method reads the message written to the @@ -54,9 +60,6 @@ // Stores the result of the last read operation. std::string message_result_; - - private: - DISALLOW_COPY_AND_ASSIGN(SecurityKeyMessageWriterImplTest); }; SecurityKeyMessageWriterImplTest::SecurityKeyMessageWriterImplTest() = default;
diff --git a/remoting/host/security_key/security_key_socket.h b/remoting/host/security_key/security_key_socket.h index 9332ab3..168ee5b 100644 --- a/remoting/host/security_key/security_key_socket.h +++ b/remoting/host/security_key/security_key_socket.h
@@ -36,6 +36,10 @@ SecurityKeySocket(std::unique_ptr<net::StreamSocket> socket, base::TimeDelta timeout, base::OnceClosure timeout_callback); + + SecurityKeySocket(const SecurityKeySocket&) = delete; + SecurityKeySocket& operator=(const SecurityKeySocket&) = delete; + ~SecurityKeySocket(); // Returns false if the request has not yet completed, or is too large to be @@ -108,8 +112,6 @@ // The activity timer. std::unique_ptr<base::OneShotTimer> timer_; - - DISALLOW_COPY_AND_ASSIGN(SecurityKeySocket); }; } // namespace remoting
diff --git a/remoting/host/setup/daemon_controller_delegate_linux.h b/remoting/host/setup/daemon_controller_delegate_linux.h index 3246247f..0377806 100644 --- a/remoting/host/setup/daemon_controller_delegate_linux.h +++ b/remoting/host/setup/daemon_controller_delegate_linux.h
@@ -15,6 +15,11 @@ class DaemonControllerDelegateLinux : public DaemonController::Delegate { public: DaemonControllerDelegateLinux(); + + DaemonControllerDelegateLinux(const DaemonControllerDelegateLinux&) = delete; + DaemonControllerDelegateLinux& operator=( + const DaemonControllerDelegateLinux&) = delete; + ~DaemonControllerDelegateLinux() override; // DaemonController::Delegate interface. @@ -35,9 +40,6 @@ // SetConfigAndStart only sets the config, and it is up to the caller to // start the host if needed. static void set_start_host_after_setup(bool start_host); - - private: - DISALLOW_COPY_AND_ASSIGN(DaemonControllerDelegateLinux); }; } // namespace remoting
diff --git a/remoting/host/setup/daemon_controller_delegate_mac.h b/remoting/host/setup/daemon_controller_delegate_mac.h index b6edf32..38c9e7f 100644 --- a/remoting/host/setup/daemon_controller_delegate_mac.h +++ b/remoting/host/setup/daemon_controller_delegate_mac.h
@@ -22,6 +22,11 @@ class DaemonControllerDelegateMac : public DaemonController::Delegate { public: DaemonControllerDelegateMac(); + + DaemonControllerDelegateMac(const DaemonControllerDelegateMac&) = delete; + DaemonControllerDelegateMac& operator=(const DaemonControllerDelegateMac&) = + delete; + ~DaemonControllerDelegateMac() override; // DaemonController::Delegate interface. @@ -43,8 +48,6 @@ // thread. scoped_refptr<AutoThreadTaskRunner> io_task_runner_; AutoThread io_thread_; - - DISALLOW_COPY_AND_ASSIGN(DaemonControllerDelegateMac); }; } // namespace remoting
diff --git a/remoting/host/setup/daemon_controller_delegate_win.h b/remoting/host/setup/daemon_controller_delegate_win.h index c84e95a..d83702bf 100644 --- a/remoting/host/setup/daemon_controller_delegate_win.h +++ b/remoting/host/setup/daemon_controller_delegate_win.h
@@ -13,6 +13,11 @@ class DaemonControllerDelegateWin : public DaemonController::Delegate { public: DaemonControllerDelegateWin(); + + DaemonControllerDelegateWin(const DaemonControllerDelegateWin&) = delete; + DaemonControllerDelegateWin& operator=(const DaemonControllerDelegateWin&) = + delete; + ~DaemonControllerDelegateWin() override; // DaemonController::Delegate interface. @@ -26,8 +31,6 @@ DaemonController::CompletionCallback done) override; void Stop(DaemonController::CompletionCallback done) override; DaemonController::UsageStatsConsent GetUsageStatsConsent() override; - - DISALLOW_COPY_AND_ASSIGN(DaemonControllerDelegateWin); }; } // namespace remoting
diff --git a/remoting/host/setup/host_starter.h b/remoting/host/setup/host_starter.h index dae8cff..34f39a3 100644 --- a/remoting/host/setup/host_starter.h +++ b/remoting/host/setup/host_starter.h
@@ -36,6 +36,9 @@ typedef base::OnceCallback<void(Result)> CompletionCallback; + HostStarter(const HostStarter&) = delete; + HostStarter& operator=(const HostStarter&) = delete; + ~HostStarter() override; // Creates a HostStarter. @@ -122,8 +125,6 @@ base::WeakPtr<HostStarter> weak_ptr_; base::WeakPtrFactory<HostStarter> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(HostStarter); }; } // namespace remoting
diff --git a/remoting/host/setup/me2me_native_messaging_host.h b/remoting/host/setup/me2me_native_messaging_host.h index 00762d94..0600334 100644 --- a/remoting/host/setup/me2me_native_messaging_host.h +++ b/remoting/host/setup/me2me_native_messaging_host.h
@@ -45,6 +45,10 @@ scoped_refptr<DaemonController> daemon_controller, scoped_refptr<protocol::PairingRegistry> pairing_registry, std::unique_ptr<OAuthClient> oauth_client); + + Me2MeNativeMessagingHost(const Me2MeNativeMessagingHost&) = delete; + Me2MeNativeMessagingHost& operator=(const Me2MeNativeMessagingHost&) = delete; + ~Me2MeNativeMessagingHost() override; // extensions::NativeMessageHost implementation. @@ -154,8 +158,6 @@ base::WeakPtr<Me2MeNativeMessagingHost> weak_ptr_; base::WeakPtrFactory<Me2MeNativeMessagingHost> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(Me2MeNativeMessagingHost); }; } // namespace remoting
diff --git a/remoting/host/setup/me2me_native_messaging_host_unittest.cc b/remoting/host/setup/me2me_native_messaging_host_unittest.cc index 27be4a5..acfa602 100644 --- a/remoting/host/setup/me2me_native_messaging_host_unittest.cc +++ b/remoting/host/setup/me2me_native_messaging_host_unittest.cc
@@ -170,6 +170,11 @@ class MockDaemonControllerDelegate : public DaemonController::Delegate { public: MockDaemonControllerDelegate(); + + MockDaemonControllerDelegate(const MockDaemonControllerDelegate&) = delete; + MockDaemonControllerDelegate& operator=(const MockDaemonControllerDelegate&) = + delete; + ~MockDaemonControllerDelegate() override; // DaemonController::Delegate interface. @@ -184,9 +189,6 @@ DaemonController::CompletionCallback done) override; void Stop(DaemonController::CompletionCallback done) override; DaemonController::UsageStatsConsent GetUsageStatsConsent() override; - - private: - DISALLOW_COPY_AND_ASSIGN(MockDaemonControllerDelegate); }; MockDaemonControllerDelegate::MockDaemonControllerDelegate() = default; @@ -247,6 +249,11 @@ class Me2MeNativeMessagingHostTest : public testing::Test { public: Me2MeNativeMessagingHostTest(); + + Me2MeNativeMessagingHostTest(const Me2MeNativeMessagingHostTest&) = delete; + Me2MeNativeMessagingHostTest& operator=(const Me2MeNativeMessagingHostTest&) = + delete; + ~Me2MeNativeMessagingHostTest() override; void SetUp() override; @@ -290,8 +297,6 @@ // Task runner of the host thread. scoped_refptr<AutoThreadTaskRunner> host_task_runner_; std::unique_ptr<NativeMessagingPipe> native_messaging_pipe_; - - DISALLOW_COPY_AND_ASSIGN(Me2MeNativeMessagingHostTest); }; Me2MeNativeMessagingHostTest::Me2MeNativeMessagingHostTest() = default;
diff --git a/remoting/host/test_echo_extension.h b/remoting/host/test_echo_extension.h index 5d8b5ec..4784605 100644 --- a/remoting/host/test_echo_extension.h +++ b/remoting/host/test_echo_extension.h
@@ -13,6 +13,10 @@ class TestEchoExtension : public HostExtension { public: TestEchoExtension(); + + TestEchoExtension(const TestEchoExtension&) = delete; + TestEchoExtension& operator=(const TestEchoExtension&) = delete; + ~TestEchoExtension() override; // HostExtension interface. @@ -20,9 +24,6 @@ std::unique_ptr<HostExtensionSession> CreateExtensionSession( ClientSessionDetails* client_session_details, protocol::ClientStub* client_stub) override; - - private: - DISALLOW_COPY_AND_ASSIGN(TestEchoExtension); }; } // namespace remoting
diff --git a/remoting/host/token_validator_base.h b/remoting/host/token_validator_base.h index 8afe236..54e51ac 100644 --- a/remoting/host/token_validator_base.h +++ b/remoting/host/token_validator_base.h
@@ -31,6 +31,10 @@ const ThirdPartyAuthConfig& third_party_auth_config, const std::string& token_scope, scoped_refptr<net::URLRequestContextGetter> request_context_getter); + + TokenValidatorBase(const TokenValidatorBase&) = delete; + TokenValidatorBase& operator=(const TokenValidatorBase&) = delete; + ~TokenValidatorBase() override; // TokenValidator interface. @@ -87,8 +91,6 @@ TokenValidatedCallback on_token_validated_; base::WeakPtrFactory<TokenValidatorBase> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(TokenValidatorBase); }; } // namespace remoting
diff --git a/remoting/host/touch_injector_win.h b/remoting/host/touch_injector_win.h index c0723737..92aed12d 100644 --- a/remoting/host/touch_injector_win.h +++ b/remoting/host/touch_injector_win.h
@@ -26,6 +26,9 @@ // The methods are virtual for mocking. class TouchInjectorWinDelegate { public: + TouchInjectorWinDelegate(const TouchInjectorWinDelegate&) = delete; + TouchInjectorWinDelegate& operator=(const TouchInjectorWinDelegate&) = delete; + virtual ~TouchInjectorWinDelegate(); // Determines whether Windows touch injection functions can be used. @@ -51,8 +54,6 @@ // Pointers to Windows touch injection functions. BOOL(NTAPI* initialize_touch_injection_func_)(UINT32, DWORD); BOOL(NTAPI* inject_touch_input_func_)(UINT32, const POINTER_TOUCH_INFO*); - - DISALLOW_COPY_AND_ASSIGN(TouchInjectorWinDelegate); }; // This class converts TouchEvent objects to POINTER_TOUCH_INFO so that it can @@ -63,6 +64,10 @@ class TouchInjectorWin { public: TouchInjectorWin(); + + TouchInjectorWin(const TouchInjectorWin&) = delete; + TouchInjectorWin& operator=(const TouchInjectorWin&) = delete; + ~TouchInjectorWin(); // Returns false if initialization of touch injection APIs fails. @@ -99,8 +104,6 @@ // and resize the vector. // All the POINTER_TOUCH_INFOs are stored as "move" points. std::map<uint32_t, POINTER_TOUCH_INFO> touches_in_contact_; - - DISALLOW_COPY_AND_ASSIGN(TouchInjectorWin); }; } // namespace remoting
diff --git a/remoting/host/win/chromoting_module.h b/remoting/host/win/chromoting_module.h index ea92270..72c58248 100644 --- a/remoting/host/win/chromoting_module.h +++ b/remoting/host/win/chromoting_module.h
@@ -33,6 +33,10 @@ // Initializes the module. |classes| and |classes_end| must outlive |this|. ChromotingModule(ATL::_ATL_OBJMAP_ENTRY* classes, ATL::_ATL_OBJMAP_ENTRY* classes_end); + + ChromotingModule(const ChromotingModule&) = delete; + ChromotingModule& operator=(const ChromotingModule&) = delete; + ~ChromotingModule() override; // Returns the task runner used by the module. Returns nullptr if the task @@ -59,8 +63,6 @@ // Point to the vector of classes registered by this module. ATL::_ATL_OBJMAP_ENTRY* classes_; ATL::_ATL_OBJMAP_ENTRY* classes_end_; - - DISALLOW_COPY_AND_ASSIGN(ChromotingModule); }; } // namespace remoting
diff --git a/remoting/host/win/elevated_native_messaging_host.h b/remoting/host/win/elevated_native_messaging_host.h index 9209e1054..d23998e 100644 --- a/remoting/host/win/elevated_native_messaging_host.h +++ b/remoting/host/win/elevated_native_messaging_host.h
@@ -33,6 +33,11 @@ bool elevate_process, base::TimeDelta host_timeout, extensions::NativeMessageHost::Client* client); + + ElevatedNativeMessagingHost(const ElevatedNativeMessagingHost&) = delete; + ElevatedNativeMessagingHost& operator=(const ElevatedNativeMessagingHost&) = + delete; + ~ElevatedNativeMessagingHost() override; // extensions::NativeMessagingChannel::EventHandle implementation. @@ -76,8 +81,6 @@ base::OneShotTimer elevated_host_timer_; base::ThreadChecker thread_checker_; - - DISALLOW_COPY_AND_ASSIGN(ElevatedNativeMessagingHost); }; } // namespace remoting
diff --git a/remoting/host/win/rdp_client.h b/remoting/host/win/rdp_client.h index 8225a524..4359e8eb6 100644 --- a/remoting/host/win/rdp_client.h +++ b/remoting/host/win/rdp_client.h
@@ -41,6 +41,10 @@ const std::string& terminal_id, DWORD port_number, EventHandler* event_handler); + + RdpClient(const RdpClient&) = delete; + RdpClient& operator=(const RdpClient&) = delete; + virtual ~RdpClient(); // Sends Secure Attention Sequence to the session. @@ -55,8 +59,6 @@ scoped_refptr<Core> core_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(RdpClient); }; } // namespace remoting
diff --git a/remoting/host/win/rdp_client_unittest.cc b/remoting/host/win/rdp_client_unittest.cc index 1aa6acf0..2ac0440 100644 --- a/remoting/host/win/rdp_client_unittest.cc +++ b/remoting/host/win/rdp_client_unittest.cc
@@ -42,13 +42,15 @@ class MockRdpClientEventHandler : public RdpClient::EventHandler { public: MockRdpClientEventHandler() {} + + MockRdpClientEventHandler(const MockRdpClientEventHandler&) = delete; + MockRdpClientEventHandler& operator=(const MockRdpClientEventHandler&) = + delete; + virtual ~MockRdpClientEventHandler() {} MOCK_METHOD0(OnRdpConnected, void()); MOCK_METHOD0(OnRdpClosed, void()); - - private: - DISALLOW_COPY_AND_ASSIGN(MockRdpClientEventHandler); }; // a14498c6-7f3b-4e42-9605-6c4a20d53c87
diff --git a/remoting/host/win/session_action_executor.h b/remoting/host/win/session_action_executor.h index dc4351b..70d30b8 100644 --- a/remoting/host/win/session_action_executor.h +++ b/remoting/host/win/session_action_executor.h
@@ -24,6 +24,10 @@ scoped_refptr<base::SingleThreadTaskRunner> execute_action_task_runner, const base::RepeatingClosure& inject_sas, const base::RepeatingClosure& lock_workstation); + + SessionActionExecutor(const SessionActionExecutor&) = delete; + SessionActionExecutor& operator=(const SessionActionExecutor&) = delete; + ~SessionActionExecutor() override; // ActionExecutor implementation. @@ -37,8 +41,6 @@ // Locks the current session. base::RepeatingClosure lock_workstation_; - - DISALLOW_COPY_AND_ASSIGN(SessionActionExecutor); }; } // namespace remoting
diff --git a/remoting/host/win/session_desktop_environment.h b/remoting/host/win/session_desktop_environment.h index 662c92e..8634cea 100644 --- a/remoting/host/win/session_desktop_environment.h +++ b/remoting/host/win/session_desktop_environment.h
@@ -18,6 +18,10 @@ // with Windows sessions. class SessionDesktopEnvironment : public Me2MeDesktopEnvironment { public: + SessionDesktopEnvironment(const SessionDesktopEnvironment&) = delete; + SessionDesktopEnvironment& operator=(const SessionDesktopEnvironment&) = + delete; + ~SessionDesktopEnvironment() override; // DesktopEnvironment implementation. @@ -41,8 +45,6 @@ // Used to lock the workstation for the current session. base::RepeatingClosure lock_workstation_; - - DISALLOW_COPY_AND_ASSIGN(SessionDesktopEnvironment); }; // Used to create |SessionDesktopEnvironment| instances. @@ -55,6 +57,12 @@ scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, const base::RepeatingClosure& inject_sas, const base::RepeatingClosure& lock_workstation); + + SessionDesktopEnvironmentFactory(const SessionDesktopEnvironmentFactory&) = + delete; + SessionDesktopEnvironmentFactory& operator=( + const SessionDesktopEnvironmentFactory&) = delete; + ~SessionDesktopEnvironmentFactory() override; // DesktopEnvironmentFactory implementation. @@ -68,8 +76,6 @@ // Used to lock the workstation for the current session. base::RepeatingClosure lock_workstation_; - - DISALLOW_COPY_AND_ASSIGN(SessionDesktopEnvironmentFactory); }; } // namespace remoting
diff --git a/remoting/host/win/session_input_injector.h b/remoting/host/win/session_input_injector.h index 2823d5d..61d90b5 100644 --- a/remoting/host/win/session_input_injector.h +++ b/remoting/host/win/session_input_injector.h
@@ -30,6 +30,10 @@ scoped_refptr<base::SingleThreadTaskRunner> execute_action_task_runner, const base::RepeatingClosure& inject_sas, const base::RepeatingClosure& lock_workstation); + + SessionInputInjectorWin(const SessionInputInjectorWin&) = delete; + SessionInputInjectorWin& operator=(const SessionInputInjectorWin&) = delete; + ~SessionInputInjectorWin() override; // InputInjector implementation. @@ -50,8 +54,6 @@ // The actual implementation resides in SessionInputInjectorWin::Core class. class Core; scoped_refptr<Core> core_; - - DISALLOW_COPY_AND_ASSIGN(SessionInputInjectorWin); }; } // namespace remoting
diff --git a/remoting/host/win/unprivileged_process_delegate.h b/remoting/host/win/unprivileged_process_delegate.h index 0d9ce9c..cb26513a 100644 --- a/remoting/host/win/unprivileged_process_delegate.h +++ b/remoting/host/win/unprivileged_process_delegate.h
@@ -37,6 +37,11 @@ UnprivilegedProcessDelegate( scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, std::unique_ptr<base::CommandLine> target_command); + + UnprivilegedProcessDelegate(const UnprivilegedProcessDelegate&) = delete; + UnprivilegedProcessDelegate& operator=(const UnprivilegedProcessDelegate&) = + delete; + ~UnprivilegedProcessDelegate() override; // WorkerProcessLauncher::Delegate implementation. @@ -70,8 +75,6 @@ base::win::ScopedHandle worker_process_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(UnprivilegedProcessDelegate); }; } // namespace remoting
diff --git a/remoting/host/win/window_station_and_desktop.h b/remoting/host/win/window_station_and_desktop.h index 21c28b0..939e5d3 100644 --- a/remoting/host/win/window_station_and_desktop.h +++ b/remoting/host/win/window_station_and_desktop.h
@@ -16,6 +16,10 @@ class WindowStationAndDesktop { public: WindowStationAndDesktop(); + + WindowStationAndDesktop(const WindowStationAndDesktop&) = delete; + WindowStationAndDesktop& operator=(const WindowStationAndDesktop&) = delete; + ~WindowStationAndDesktop(); HDESK desktop() const { return desktop_; } @@ -34,8 +38,6 @@ private: HDESK desktop_; HWINSTA window_station_; - - DISALLOW_COPY_AND_ASSIGN(WindowStationAndDesktop); }; } // namespace remoting
diff --git a/remoting/host/win/worker_process_launcher.h b/remoting/host/win/worker_process_launcher.h index 7e7cda3..439d332 100644 --- a/remoting/host/win/worker_process_launcher.h +++ b/remoting/host/win/worker_process_launcher.h
@@ -63,6 +63,10 @@ // |ipc_handler| must outlive this object. WorkerProcessLauncher(std::unique_ptr<Delegate> launcher_delegate, WorkerProcessIpcDelegate* ipc_handler); + + WorkerProcessLauncher(const WorkerProcessLauncher&) = delete; + WorkerProcessLauncher& operator=(const WorkerProcessLauncher&) = delete; + ~WorkerProcessLauncher() override; // Asks the worker process to crash and generate a dump, and closes the IPC @@ -159,8 +163,6 @@ base::win::ScopedHandle worker_process_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(WorkerProcessLauncher); }; } // namespace remoting
diff --git a/remoting/host/win/worker_process_launcher_unittest.cc b/remoting/host/win/worker_process_launcher_unittest.cc index 378e7fc..cfe4b2a6 100644 --- a/remoting/host/win/worker_process_launcher_unittest.cc +++ b/remoting/host/win/worker_process_launcher_unittest.cc
@@ -44,6 +44,11 @@ class MockProcessLauncherDelegate : public WorkerProcessLauncher::Delegate { public: MockProcessLauncherDelegate() {} + + MockProcessLauncherDelegate(const MockProcessLauncherDelegate&) = delete; + MockProcessLauncherDelegate& operator=(const MockProcessLauncherDelegate&) = + delete; + ~MockProcessLauncherDelegate() override {} // WorkerProcessLauncher::Delegate interface. @@ -51,14 +56,15 @@ MOCK_METHOD1(Send, void(IPC::Message*)); MOCK_METHOD0(CloseChannel, void()); MOCK_METHOD0(KillProcess, void()); - - private: - DISALLOW_COPY_AND_ASSIGN(MockProcessLauncherDelegate); }; class MockIpcDelegate : public WorkerProcessIpcDelegate { public: MockIpcDelegate() {} + + MockIpcDelegate(const MockIpcDelegate&) = delete; + MockIpcDelegate& operator=(const MockIpcDelegate&) = delete; + ~MockIpcDelegate() override {} // WorkerProcessIpcDelegate interface. @@ -66,23 +72,21 @@ MOCK_METHOD1(OnMessageReceived, bool(const IPC::Message&)); MOCK_METHOD1(OnPermanentError, void(int)); MOCK_METHOD0(OnWorkerProcessStopped, void()); - - private: - DISALLOW_COPY_AND_ASSIGN(MockIpcDelegate); }; class MockWorkerListener : public IPC::Listener { public: MockWorkerListener() {} + + MockWorkerListener(const MockWorkerListener&) = delete; + MockWorkerListener& operator=(const MockWorkerListener&) = delete; + ~MockWorkerListener() override {} MOCK_METHOD3(OnCrash, void(const std::string&, const std::string&, int)); // IPC::Listener implementation bool OnMessageReceived(const IPC::Message& message) override; - - private: - DISALLOW_COPY_AND_ASSIGN(MockWorkerListener); }; bool MockWorkerListener::OnMessageReceived(const IPC::Message& message) {
diff --git a/remoting/host/win/wts_session_process_delegate.h b/remoting/host/win/wts_session_process_delegate.h index f170c5c..b0f8cba 100644 --- a/remoting/host/win/wts_session_process_delegate.h +++ b/remoting/host/win/wts_session_process_delegate.h
@@ -35,6 +35,11 @@ std::unique_ptr<base::CommandLine> target, bool launch_elevated, const std::string& channel_security); + + WtsSessionProcessDelegate(const WtsSessionProcessDelegate&) = delete; + WtsSessionProcessDelegate& operator=(const WtsSessionProcessDelegate&) = + delete; + ~WtsSessionProcessDelegate() override; // Initializes the object returning true on success. @@ -52,8 +57,6 @@ scoped_refptr<Core> core_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(WtsSessionProcessDelegate); }; } // namespace remoting
diff --git a/remoting/host/win/wts_terminal_monitor.h b/remoting/host/win/wts_terminal_monitor.h index c5a355e..3601f74b 100644 --- a/remoting/host/win/wts_terminal_monitor.h +++ b/remoting/host/win/wts_terminal_monitor.h
@@ -24,6 +24,9 @@ // The console terminal ID. static const char kConsole[]; + WtsTerminalMonitor(const WtsTerminalMonitor&) = delete; + WtsTerminalMonitor& operator=(const WtsTerminalMonitor&) = delete; + virtual ~WtsTerminalMonitor(); // Registers an observer to receive notifications about a particular WTS @@ -51,9 +54,6 @@ protected: WtsTerminalMonitor(); - - private: - DISALLOW_COPY_AND_ASSIGN(WtsTerminalMonitor); }; } // namespace remoting
diff --git a/remoting/host/win/wts_terminal_observer.h b/remoting/host/win/wts_terminal_observer.h index 9da1620..2ac554c 100644 --- a/remoting/host/win/wts_terminal_observer.h +++ b/remoting/host/win/wts_terminal_observer.h
@@ -15,6 +15,9 @@ // Provides callbacks for monitoring events on a WTS terminal. class WtsTerminalObserver { public: + WtsTerminalObserver(const WtsTerminalObserver&) = delete; + WtsTerminalObserver& operator=(const WtsTerminalObserver&) = delete; + virtual ~WtsTerminalObserver() {} // Called when |session_id| attaches to the console. @@ -25,9 +28,6 @@ protected: WtsTerminalObserver() {} - - private: - DISALLOW_COPY_AND_ASSIGN(WtsTerminalObserver); }; } // namespace remoting
diff --git a/remoting/host/xmpp_register_support_host_request.h b/remoting/host/xmpp_register_support_host_request.h index 48eb22ff..e9dd5b1a 100644 --- a/remoting/host/xmpp_register_support_host_request.h +++ b/remoting/host/xmpp_register_support_host_request.h
@@ -41,6 +41,12 @@ // received from the server. Callback is never called if the bot // malfunctions and doesn't respond to the request. explicit XmppRegisterSupportHostRequest(const std::string& directory_bot_jid); + + XmppRegisterSupportHostRequest(const XmppRegisterSupportHostRequest&) = + delete; + XmppRegisterSupportHostRequest& operator=( + const XmppRegisterSupportHostRequest&) = delete; + ~XmppRegisterSupportHostRequest() override; // RegisterSupportHostRequest implementation. @@ -79,8 +85,6 @@ std::unique_ptr<IqSender> iq_sender_; std::unique_ptr<IqRequest> request_; - - DISALLOW_COPY_AND_ASSIGN(XmppRegisterSupportHostRequest); }; } // namespace remoting
diff --git a/remoting/ios/audio/audio_playback_sink_ios.h b/remoting/ios/audio/audio_playback_sink_ios.h index 524b897..19791ef 100644 --- a/remoting/ios/audio/audio_playback_sink_ios.h +++ b/remoting/ios/audio/audio_playback_sink_ios.h
@@ -18,6 +18,10 @@ class AudioPlaybackSinkIos : public AudioPlaybackSink { public: AudioPlaybackSinkIos(); + + AudioPlaybackSinkIos(const AudioPlaybackSinkIos&) = delete; + AudioPlaybackSinkIos& operator=(const AudioPlaybackSinkIos&) = delete; + ~AudioPlaybackSinkIos() override; // AudioPlaybackSink implementations. @@ -90,8 +94,6 @@ State state_ = State::STOPPED; base::WeakPtrFactory<AudioPlaybackSinkIos> weak_factory_; - - DISALLOW_COPY_AND_ASSIGN(AudioPlaybackSinkIos); }; } // namespace remoting
diff --git a/remoting/ios/display/gl_demo_screen.h b/remoting/ios/display/gl_demo_screen.h index 82045bc..602069e 100644 --- a/remoting/ios/display/gl_demo_screen.h +++ b/remoting/ios/display/gl_demo_screen.h
@@ -16,6 +16,10 @@ class GlDemoScreen : public Drawable { public: GlDemoScreen(); + + GlDemoScreen(const GlDemoScreen&) = delete; + GlDemoScreen& operator=(const GlDemoScreen&) = delete; + ~GlDemoScreen() override; // Drawable implementation. @@ -31,8 +35,6 @@ base::ThreadChecker thread_checker_; base::WeakPtrFactory<Drawable> weak_factory_; - - DISALLOW_COPY_AND_ASSIGN(GlDemoScreen); }; } // namespace remoting
diff --git a/remoting/ios/display/gl_display_handler.mm b/remoting/ios/display/gl_display_handler.mm index f1a2d6e..01fd9f6aa 100644 --- a/remoting/ios/display/gl_display_handler.mm +++ b/remoting/ios/display/gl_display_handler.mm
@@ -39,6 +39,10 @@ class Core : public protocol::CursorShapeStub, public GlRendererDelegate { public: Core(); + + Core(const Core&) = delete; + Core& operator=(const Core&) = delete; + ~Core() override; void Initialize(); @@ -87,8 +91,6 @@ // Used on display thread. base::WeakPtr<Core> weak_ptr_; base::WeakPtrFactory<Core> weak_factory_; - - DISALLOW_COPY_AND_ASSIGN(Core); }; Core::Core() : weak_factory_(this) {
diff --git a/remoting/ios/facade/host_list_service.h b/remoting/ios/facade/host_list_service.h index 395a33b..b9ba2fe 100644 --- a/remoting/ios/facade/host_list_service.h +++ b/remoting/ios/facade/host_list_service.h
@@ -49,6 +49,9 @@ // Returns the singleton instance. static HostListService* GetInstance(); + HostListService(const HostListService&) = delete; + HostListService& operator=(const HostListService&) = delete; + ~HostListService(); // Registers callback to be called when the host list state is changed. @@ -109,7 +112,6 @@ std::unique_ptr<FetchFailureInfo> last_fetch_failure_; base::WeakPtrFactory<HostListService> weak_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(HostListService); }; } // namespace remoting
diff --git a/remoting/ios/facade/ios_client_runtime_delegate.h b/remoting/ios/facade/ios_client_runtime_delegate.h index 595c7e3..03519fea 100644 --- a/remoting/ios/facade/ios_client_runtime_delegate.h +++ b/remoting/ios/facade/ios_client_runtime_delegate.h
@@ -18,6 +18,10 @@ class IosClientRuntimeDelegate : public ChromotingClientRuntime::Delegate { public: IosClientRuntimeDelegate(); + + IosClientRuntimeDelegate(const IosClientRuntimeDelegate&) = delete; + IosClientRuntimeDelegate& operator=(const IosClientRuntimeDelegate&) = delete; + ~IosClientRuntimeDelegate() override; // remoting::ChromotingClientRuntime::Delegate overrides. @@ -32,8 +36,6 @@ ChromotingClientRuntime* runtime_; base::WeakPtrFactory<IosClientRuntimeDelegate> weak_factory_; - - DISALLOW_COPY_AND_ASSIGN(IosClientRuntimeDelegate); }; } // namespace remoting
diff --git a/remoting/ios/facade/ios_oauth_token_getter.h b/remoting/ios/facade/ios_oauth_token_getter.h index 684f25d..8255f06 100644 --- a/remoting/ios/facade/ios_oauth_token_getter.h +++ b/remoting/ios/facade/ios_oauth_token_getter.h
@@ -17,6 +17,10 @@ class IosOauthTokenGetter : public OAuthTokenGetter { public: IosOauthTokenGetter(); + + IosOauthTokenGetter(const IosOauthTokenGetter&) = delete; + IosOauthTokenGetter& operator=(const IosOauthTokenGetter&) = delete; + ~IosOauthTokenGetter() override; // OAuthTokenGetter overrides. @@ -28,7 +32,6 @@ private: base::WeakPtr<IosOauthTokenGetter> weak_ptr_; base::WeakPtrFactory<IosOauthTokenGetter> weak_factory_; - DISALLOW_COPY_AND_ASSIGN(IosOauthTokenGetter); }; } // namespace remoting
diff --git a/remoting/ios/persistence/fake_keychain.h b/remoting/ios/persistence/fake_keychain.h index 8d200b9..34a510f 100644 --- a/remoting/ios/persistence/fake_keychain.h +++ b/remoting/ios/persistence/fake_keychain.h
@@ -17,6 +17,10 @@ class FakeKeychain : public Keychain { public: FakeKeychain(); + + FakeKeychain(const FakeKeychain&) = delete; + FakeKeychain& operator=(const FakeKeychain&) = delete; + ~FakeKeychain() override; size_t GetNumberOfEntries() const; @@ -30,8 +34,6 @@ private: std::map<std::string, std::string> entries_; - - DISALLOW_COPY_AND_ASSIGN(FakeKeychain); }; } // namespace remoting
diff --git a/remoting/ios/persistence/mock_keychain.h b/remoting/ios/persistence/mock_keychain.h index cfc353c..aaa3514 100644 --- a/remoting/ios/persistence/mock_keychain.h +++ b/remoting/ios/persistence/mock_keychain.h
@@ -15,6 +15,10 @@ class MockKeychain : public Keychain { public: MockKeychain(); + + MockKeychain(const MockKeychain&) = delete; + MockKeychain& operator=(const MockKeychain&) = delete; + ~MockKeychain() override; void ExpectAndCaptureSetData(Key key, @@ -28,9 +32,6 @@ MOCK_METHOD3(SetData, void(Key, const std::string&, const std::string&)); MOCK_METHOD2(RemoveData, void(Key, const std::string&)); MOCK_CONST_METHOD2(GetData, std::string(Key, const std::string&)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockKeychain); }; } // namespace remoting
diff --git a/remoting/ios/persistence/remoting_keychain.h b/remoting/ios/persistence/remoting_keychain.h index a17aa73..df0a987 100644 --- a/remoting/ios/persistence/remoting_keychain.h +++ b/remoting/ios/persistence/remoting_keychain.h
@@ -14,6 +14,10 @@ class RemotingKeychain : public Keychain { public: RemotingKeychain(); + + RemotingKeychain(const RemotingKeychain&) = delete; + RemotingKeychain& operator=(const RemotingKeychain&) = delete; + ~RemotingKeychain() override; static RemotingKeychain* GetInstance(); @@ -31,8 +35,6 @@ std::string KeyToService(Key key) const; std::string service_prefix_; - - DISALLOW_COPY_AND_ASSIGN(RemotingKeychain); }; } // namespace remoting
diff --git a/remoting/ios/session/remoting_client_session_delegate.h b/remoting/ios/session/remoting_client_session_delegate.h index 754b4f7a..7eed76d 100644 --- a/remoting/ios/session/remoting_client_session_delegate.h +++ b/remoting/ios/session/remoting_client_session_delegate.h
@@ -19,6 +19,11 @@ class RemotingClientSessonDelegate : public ChromotingSession::Delegate { public: RemotingClientSessonDelegate(RemotingClient* client); + + RemotingClientSessonDelegate(const RemotingClientSessonDelegate&) = delete; + RemotingClientSessonDelegate& operator=(const RemotingClientSessonDelegate&) = + delete; + ~RemotingClientSessonDelegate() override; // ChromotingSession::Delegate implementation @@ -46,8 +51,6 @@ __weak id client_; base::WeakPtrFactory<RemotingClientSessonDelegate> weak_factory_; - - DISALLOW_COPY_AND_ASSIGN(RemotingClientSessonDelegate); }; } // namespace remoting
diff --git a/remoting/protocol/audio_decode_scheduler.h b/remoting/protocol/audio_decode_scheduler.h index d7d17c1..ff03111 100644 --- a/remoting/protocol/audio_decode_scheduler.h +++ b/remoting/protocol/audio_decode_scheduler.h
@@ -32,6 +32,10 @@ AudioDecodeScheduler( scoped_refptr<base::SingleThreadTaskRunner> audio_decode_task_runner, base::WeakPtr<AudioStub> audio_consumer); + + AudioDecodeScheduler(const AudioDecodeScheduler&) = delete; + AudioDecodeScheduler& operator=(const AudioDecodeScheduler&) = delete; + ~AudioDecodeScheduler() override; // Initializes decoder with the information from the protocol config. @@ -54,8 +58,6 @@ base::ThreadChecker thread_checker_; base::WeakPtrFactory<AudioDecodeScheduler> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(AudioDecodeScheduler); }; } // namespace protocol
diff --git a/remoting/protocol/audio_decode_scheduler_unittest.cc b/remoting/protocol/audio_decode_scheduler_unittest.cc index 1d6adb0..5d8b68b 100644 --- a/remoting/protocol/audio_decode_scheduler_unittest.cc +++ b/remoting/protocol/audio_decode_scheduler_unittest.cc
@@ -28,6 +28,10 @@ class FakeAudioConsumer : public AudioStub { public: FakeAudioConsumer() {} + + FakeAudioConsumer(const FakeAudioConsumer&) = delete; + FakeAudioConsumer& operator=(const FakeAudioConsumer&) = delete; + ~FakeAudioConsumer() override = default; base::WeakPtr<FakeAudioConsumer> GetWeakPtr(){ @@ -43,8 +47,6 @@ private: base::WeakPtrFactory<FakeAudioConsumer> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeAudioConsumer); }; } // namespace
diff --git a/remoting/protocol/audio_pump.cc b/remoting/protocol/audio_pump.cc index 5caf16f..a8cd493 100644 --- a/remoting/protocol/audio_pump.cc +++ b/remoting/protocol/audio_pump.cc
@@ -95,6 +95,10 @@ Core(base::WeakPtr<AudioPump> pump, std::unique_ptr<AudioSource> audio_source, std::unique_ptr<AudioEncoder> audio_encoder); + + Core(const Core&) = delete; + Core& operator=(const Core&) = delete; + ~Core(); void Start(); @@ -124,8 +128,6 @@ std::unique_ptr<media::ChannelMixer> mixer_; media::ChannelLayout mixer_input_layout_ = media::CHANNEL_LAYOUT_NONE; - - DISALLOW_COPY_AND_ASSIGN(Core); }; AudioPump::Core::Core(base::WeakPtr<AudioPump> pump,
diff --git a/remoting/protocol/audio_pump.h b/remoting/protocol/audio_pump.h index 1722fb8c..a7c75e6 100644 --- a/remoting/protocol/audio_pump.h +++ b/remoting/protocol/audio_pump.h
@@ -40,6 +40,10 @@ std::unique_ptr<AudioSource> audio_source, std::unique_ptr<AudioEncoder> audio_encoder, AudioStub* audio_stub); + + AudioPump(const AudioPump&) = delete; + AudioPump& operator=(const AudioPump&) = delete; + ~AudioPump() override; // AudioStream interface. @@ -62,8 +66,6 @@ std::unique_ptr<Core> core_; base::WeakPtrFactory<AudioPump> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(AudioPump); }; } // namespace protocol
diff --git a/remoting/protocol/audio_pump_unittest.cc b/remoting/protocol/audio_pump_unittest.cc index 9ab4514..0352b47e 100644 --- a/remoting/protocol/audio_pump_unittest.cc +++ b/remoting/protocol/audio_pump_unittest.cc
@@ -42,6 +42,10 @@ class FakeAudioEncoder : public AudioEncoder { public: FakeAudioEncoder() = default; + + FakeAudioEncoder(const FakeAudioEncoder&) = delete; + FakeAudioEncoder& operator=(const FakeAudioEncoder&) = delete; + ~FakeAudioEncoder() override = default; std::unique_ptr<AudioPacket> Encode( @@ -54,9 +58,6 @@ return packet; } int GetBitrate() override { return 160000; } - - private: - DISALLOW_COPY_AND_ASSIGN(FakeAudioEncoder); }; class AudioPumpTest : public testing::Test, public protocol::AudioStub {
diff --git a/remoting/protocol/audio_reader.h b/remoting/protocol/audio_reader.h index 79ce53b..358a21f 100644 --- a/remoting/protocol/audio_reader.h +++ b/remoting/protocol/audio_reader.h
@@ -17,14 +17,16 @@ class AudioReader : public ChannelDispatcherBase { public: explicit AudioReader(AudioStub* audio_stub); + + AudioReader(const AudioReader&) = delete; + AudioReader& operator=(const AudioReader&) = delete; + ~AudioReader() override; private: void OnIncomingMessage(std::unique_ptr<CompoundBuffer> message) override; AudioStub* audio_stub_; - - DISALLOW_COPY_AND_ASSIGN(AudioReader); }; } // namespace protocol
diff --git a/remoting/protocol/audio_stub.h b/remoting/protocol/audio_stub.h index 11de49a..2a89e6c 100644 --- a/remoting/protocol/audio_stub.h +++ b/remoting/protocol/audio_stub.h
@@ -18,6 +18,9 @@ class AudioStub { public: + AudioStub(const AudioStub&) = delete; + AudioStub& operator=(const AudioStub&) = delete; + virtual ~AudioStub() { } virtual void ProcessAudioPacket(std::unique_ptr<AudioPacket> audio_packet, @@ -25,9 +28,6 @@ protected: AudioStub() { } - - private: - DISALLOW_COPY_AND_ASSIGN(AudioStub); }; } // namespace protocol
diff --git a/remoting/protocol/audio_writer.h b/remoting/protocol/audio_writer.h index 7719905f..a8dc7ab 100644 --- a/remoting/protocol/audio_writer.h +++ b/remoting/protocol/audio_writer.h
@@ -26,6 +26,9 @@ // should be used to initialize it for the session. static std::unique_ptr<AudioWriter> Create(const SessionConfig& config); + AudioWriter(const AudioWriter&) = delete; + AudioWriter& operator=(const AudioWriter&) = delete; + ~AudioWriter() override; // AudioStub interface. @@ -36,8 +39,6 @@ AudioWriter(); void OnIncomingMessage(std::unique_ptr<CompoundBuffer> message) override; - - DISALLOW_COPY_AND_ASSIGN(AudioWriter); }; } // namespace protocol
diff --git a/remoting/protocol/authenticator_test_base.h b/remoting/protocol/authenticator_test_base.h index f3de383..48bc9f9 100644 --- a/remoting/protocol/authenticator_test_base.h +++ b/remoting/protocol/authenticator_test_base.h
@@ -28,6 +28,10 @@ class AuthenticatorTestBase : public testing::Test { public: AuthenticatorTestBase(); + + AuthenticatorTestBase(const AuthenticatorTestBase&) = delete; + AuthenticatorTestBase& operator=(const AuthenticatorTestBase&) = delete; + ~AuthenticatorTestBase() override; protected: @@ -66,8 +70,6 @@ private: base::test::SingleThreadTaskEnvironment task_environment_; - - DISALLOW_COPY_AND_ASSIGN(AuthenticatorTestBase); }; } // namespace protocol
diff --git a/remoting/protocol/capture_scheduler.h b/remoting/protocol/capture_scheduler.h index f7b149c..ffc07715 100644 --- a/remoting/protocol/capture_scheduler.h +++ b/remoting/protocol/capture_scheduler.h
@@ -35,6 +35,10 @@ class CaptureScheduler : public VideoFeedbackStub { public: explicit CaptureScheduler(const base::RepeatingClosure& capture_closure); + + CaptureScheduler(const CaptureScheduler&) = delete; + CaptureScheduler& operator=(const CaptureScheduler&) = delete; + ~CaptureScheduler() override; // Starts the scheduler. @@ -109,8 +113,6 @@ uint32_t next_frame_id_; base::ThreadChecker thread_checker_; - - DISALLOW_COPY_AND_ASSIGN(CaptureScheduler); }; } // namespace protocol
diff --git a/remoting/protocol/channel_dispatcher_base.h b/remoting/protocol/channel_dispatcher_base.h index 52e3e5d..8722afe 100644 --- a/remoting/protocol/channel_dispatcher_base.h +++ b/remoting/protocol/channel_dispatcher_base.h
@@ -40,6 +40,9 @@ virtual void OnChannelClosed(ChannelDispatcherBase* channel_dispatcher) = 0; }; + ChannelDispatcherBase(const ChannelDispatcherBase&) = delete; + ChannelDispatcherBase& operator=(const ChannelDispatcherBase&) = delete; + ~ChannelDispatcherBase() override; // Creates and connects the channel using |channel_factory|. @@ -77,8 +80,6 @@ bool is_connected_ = false; std::unique_ptr<MessagePipe> message_pipe_; - - DISALLOW_COPY_AND_ASSIGN(ChannelDispatcherBase); }; } // namespace protocol
diff --git a/remoting/protocol/channel_multiplexer.cc b/remoting/protocol/channel_multiplexer.cc index 61ffcc91..46e7f45 100644 --- a/remoting/protocol/channel_multiplexer.cc +++ b/remoting/protocol/channel_multiplexer.cc
@@ -32,6 +32,10 @@ public: PendingPacket(std::unique_ptr<MultiplexPacket> packet) : packet(std::move(packet)) {} + + PendingPacket(const PendingPacket&) = delete; + PendingPacket& operator=(const PendingPacket&) = delete; + ~PendingPacket() = default; bool is_empty() { return pos >= packet->data().size(); } @@ -46,8 +50,6 @@ private: std::unique_ptr<MultiplexPacket> packet; size_t pos = 0U; - - DISALLOW_COPY_AND_ASSIGN(PendingPacket); }; } // namespace @@ -65,6 +67,10 @@ public: MuxChannel(ChannelMultiplexer* multiplexer, const std::string& name, int send_id); + + MuxChannel(const MuxChannel&) = delete; + MuxChannel& operator=(const MuxChannel&) = delete; + ~MuxChannel(); const std::string& name() { return name_; } @@ -91,13 +97,15 @@ int receive_id_; MuxSocket* socket_; std::list<std::unique_ptr<PendingPacket>> pending_packets_; - - DISALLOW_COPY_AND_ASSIGN(MuxChannel); }; class ChannelMultiplexer::MuxSocket : public P2PStreamSocket { public: MuxSocket(MuxChannel* channel); + + MuxSocket(const MuxSocket&) = delete; + MuxSocket& operator=(const MuxSocket&) = delete; + ~MuxSocket() override; void OnWriteComplete(); @@ -130,8 +138,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<MuxSocket> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(MuxSocket); }; ChannelMultiplexer::MuxChannel::MuxChannel(ChannelMultiplexer* multiplexer,
diff --git a/remoting/protocol/channel_multiplexer.h b/remoting/protocol/channel_multiplexer.h index c7fe545..1c52efe8 100644 --- a/remoting/protocol/channel_multiplexer.h +++ b/remoting/protocol/channel_multiplexer.h
@@ -25,6 +25,10 @@ // |factory| is used to create the channel upon which to multiplex. ChannelMultiplexer(StreamChannelFactory* factory, const std::string& base_channel_name); + + ChannelMultiplexer(const ChannelMultiplexer&) = delete; + ChannelMultiplexer& operator=(const ChannelMultiplexer&) = delete; + ~ChannelMultiplexer() override; // StreamChannelFactory interface. @@ -86,8 +90,6 @@ MessageReader reader_; base::WeakPtrFactory<ChannelMultiplexer> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ChannelMultiplexer); }; } // namespace protocol
diff --git a/remoting/protocol/channel_socket_adapter.h b/remoting/protocol/channel_socket_adapter.h index 9daa96e..c148885 100644 --- a/remoting/protocol/channel_socket_adapter.h +++ b/remoting/protocol/channel_socket_adapter.h
@@ -37,6 +37,11 @@ // this adapter. explicit TransportChannelSocketAdapter( cricket::IceTransportInternal* ice_transport); + + TransportChannelSocketAdapter(const TransportChannelSocketAdapter&) = delete; + TransportChannelSocketAdapter& operator=( + const TransportChannelSocketAdapter&) = delete; + ~TransportChannelSocketAdapter() override; // Sets callback that should be called when the adapter is being @@ -81,8 +86,6 @@ int write_buffer_size_; int closed_error_code_; - - DISALLOW_COPY_AND_ASSIGN(TransportChannelSocketAdapter); }; } // namespace protocol
diff --git a/remoting/protocol/chromium_port_allocator_factory.h b/remoting/protocol/chromium_port_allocator_factory.h index b422a6c..68e5d87 100644 --- a/remoting/protocol/chromium_port_allocator_factory.h +++ b/remoting/protocol/chromium_port_allocator_factory.h
@@ -18,15 +18,17 @@ class ChromiumPortAllocatorFactory : public PortAllocatorFactory { public: ChromiumPortAllocatorFactory(); + + ChromiumPortAllocatorFactory(const ChromiumPortAllocatorFactory&) = delete; + ChromiumPortAllocatorFactory& operator=(const ChromiumPortAllocatorFactory&) = + delete; + ~ChromiumPortAllocatorFactory() override; // PortAllocatorFactory interface. std::unique_ptr<cricket::PortAllocator> CreatePortAllocator( scoped_refptr<TransportContext> transport_context, base::WeakPtr<SessionOptionsProvider> session_options_provider) override; - - private: - DISALLOW_COPY_AND_ASSIGN(ChromiumPortAllocatorFactory); }; } // namespace protocol
diff --git a/remoting/protocol/chromium_socket_factory.cc b/remoting/protocol/chromium_socket_factory.cc index e3d4465..6313aa2 100644 --- a/remoting/protocol/chromium_socket_factory.cc +++ b/remoting/protocol/chromium_socket_factory.cc
@@ -63,6 +63,10 @@ class UdpPacketSocket : public rtc::AsyncPacketSocket { public: UdpPacketSocket(); + + UdpPacketSocket(const UdpPacketSocket&) = delete; + UdpPacketSocket& operator=(const UdpPacketSocket&) = delete; + ~UdpPacketSocket() override; bool Init(const rtc::SocketAddress& local_address, @@ -122,8 +126,6 @@ bool send_pending_; std::list<PendingPacket> send_queue_; int send_queue_size_; - - DISALLOW_COPY_AND_ASSIGN(UdpPacketSocket); }; UdpPacketSocket::PendingPacket::PendingPacket(const void* buffer,
diff --git a/remoting/protocol/chromium_socket_factory.h b/remoting/protocol/chromium_socket_factory.h index 1534404b..5caf6b4 100644 --- a/remoting/protocol/chromium_socket_factory.h +++ b/remoting/protocol/chromium_socket_factory.h
@@ -21,6 +21,11 @@ public: explicit ChromiumPacketSocketFactory( base::WeakPtr<SessionOptionsProvider> session_options_provider); + + ChromiumPacketSocketFactory(const ChromiumPacketSocketFactory&) = delete; + ChromiumPacketSocketFactory& operator=(const ChromiumPacketSocketFactory&) = + delete; + ~ChromiumPacketSocketFactory() override; rtc::AsyncPacketSocket* CreateUdpSocket( @@ -42,8 +47,6 @@ private: base::WeakPtr<SessionOptionsProvider> session_options_provider_; - - DISALLOW_COPY_AND_ASSIGN(ChromiumPacketSocketFactory); }; } // namespace protocol
diff --git a/remoting/protocol/client_control_dispatcher.h b/remoting/protocol/client_control_dispatcher.h index a04e229..89931a49 100644 --- a/remoting/protocol/client_control_dispatcher.h +++ b/remoting/protocol/client_control_dispatcher.h
@@ -25,6 +25,10 @@ public HostStub { public: ClientControlDispatcher(); + + ClientControlDispatcher(const ClientControlDispatcher&) = delete; + ClientControlDispatcher& operator=(const ClientControlDispatcher&) = delete; + ~ClientControlDispatcher() override; // ClipboardStub implementation. @@ -57,8 +61,6 @@ ClientStub* client_stub_ = nullptr; ClipboardStub* clipboard_stub_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(ClientControlDispatcher); }; } // namespace protocol
diff --git a/remoting/protocol/client_event_dispatcher.h b/remoting/protocol/client_event_dispatcher.h index 577e12d..7d73f68 100644 --- a/remoting/protocol/client_event_dispatcher.h +++ b/remoting/protocol/client_event_dispatcher.h
@@ -18,6 +18,10 @@ class ClientEventDispatcher : public ChannelDispatcherBase, public InputStub { public: ClientEventDispatcher(); + + ClientEventDispatcher(const ClientEventDispatcher&) = delete; + ClientEventDispatcher& operator=(const ClientEventDispatcher&) = delete; + ~ClientEventDispatcher() override; // InputStub implementation. @@ -28,8 +32,6 @@ private: void OnIncomingMessage(std::unique_ptr<CompoundBuffer> message) override; - - DISALLOW_COPY_AND_ASSIGN(ClientEventDispatcher); }; } // namespace protocol
diff --git a/remoting/protocol/client_stub.h b/remoting/protocol/client_stub.h index 28c42a35..9e9a605 100644 --- a/remoting/protocol/client_stub.h +++ b/remoting/protocol/client_stub.h
@@ -29,6 +29,10 @@ public KeyboardLayoutStub { public: ClientStub() {} + + ClientStub(const ClientStub&) = delete; + ClientStub& operator=(const ClientStub&) = delete; + ~ClientStub() override {} // Passes the set of capabilities supported by the host to the client. @@ -45,9 +49,6 @@ // Passes the host's transport info to the client. virtual void SetTransportInfo(const TransportInfo& transport_info) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(ClientStub); }; } // namespace protocol
diff --git a/remoting/protocol/client_video_dispatcher.h b/remoting/protocol/client_video_dispatcher.h index 1a057a6..1e533827 100644 --- a/remoting/protocol/client_video_dispatcher.h +++ b/remoting/protocol/client_video_dispatcher.h
@@ -23,6 +23,10 @@ class ClientVideoDispatcher : public ChannelDispatcherBase { public: ClientVideoDispatcher(VideoStub* video_stub, ClientStub* client_stub); + + ClientVideoDispatcher(const ClientVideoDispatcher&) = delete; + ClientVideoDispatcher& operator=(const ClientVideoDispatcher&) = delete; + ~ClientVideoDispatcher() override; private: @@ -44,8 +48,6 @@ webrtc::DesktopVector(kDefaultDpi, kDefaultDpi); base::WeakPtrFactory<ClientVideoDispatcher> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ClientVideoDispatcher); }; } // namespace protocol
diff --git a/remoting/protocol/client_video_stats_dispatcher.h b/remoting/protocol/client_video_stats_dispatcher.h index 1d70324a..376f807 100644 --- a/remoting/protocol/client_video_stats_dispatcher.h +++ b/remoting/protocol/client_video_stats_dispatcher.h
@@ -23,14 +23,17 @@ public: ClientVideoStatsDispatcher(const std::string& stream_name, VideoStatsStub* video_stats_stub); + + ClientVideoStatsDispatcher(const ClientVideoStatsDispatcher&) = delete; + ClientVideoStatsDispatcher& operator=(const ClientVideoStatsDispatcher&) = + delete; + ~ClientVideoStatsDispatcher() override; private: void OnIncomingMessage(std::unique_ptr<CompoundBuffer> message) override; VideoStatsStub* video_stats_stub_; - - DISALLOW_COPY_AND_ASSIGN(ClientVideoStatsDispatcher); }; } // namespace protocol
diff --git a/remoting/protocol/clipboard_echo_filter.h b/remoting/protocol/clipboard_echo_filter.h index e3777a6..c248199 100644 --- a/remoting/protocol/clipboard_echo_filter.h +++ b/remoting/protocol/clipboard_echo_filter.h
@@ -20,6 +20,10 @@ class ClipboardEchoFilter { public: ClipboardEchoFilter(); + + ClipboardEchoFilter(const ClipboardEchoFilter&) = delete; + ClipboardEchoFilter& operator=(const ClipboardEchoFilter&) = delete; + ~ClipboardEchoFilter(); // Sets the ClipboardStub that sends events to the client. @@ -66,8 +70,6 @@ // The latest item received from the client. std::string client_latest_mime_type_; std::string client_latest_data_; - - DISALLOW_COPY_AND_ASSIGN(ClipboardEchoFilter); }; } // namespace protocol
diff --git a/remoting/protocol/clipboard_filter.h b/remoting/protocol/clipboard_filter.h index c2c5215..d9bfe11 100644 --- a/remoting/protocol/clipboard_filter.h +++ b/remoting/protocol/clipboard_filter.h
@@ -19,6 +19,10 @@ public: ClipboardFilter(); explicit ClipboardFilter(ClipboardStub* clipboard_stub); + + ClipboardFilter(const ClipboardFilter&) = delete; + ClipboardFilter& operator=(const ClipboardFilter&) = delete; + ~ClipboardFilter() override; // Set the ClipboardStub that events will be forwarded to. @@ -34,8 +38,6 @@ private: ClipboardStub* clipboard_stub_; bool enabled_; - - DISALLOW_COPY_AND_ASSIGN(ClipboardFilter); }; } // namespace protocol
diff --git a/remoting/protocol/clipboard_stub.h b/remoting/protocol/clipboard_stub.h index 1c6b8fb..90e2f4a7 100644 --- a/remoting/protocol/clipboard_stub.h +++ b/remoting/protocol/clipboard_stub.h
@@ -18,14 +18,15 @@ class ClipboardStub { public: ClipboardStub() {} + + ClipboardStub(const ClipboardStub&) = delete; + ClipboardStub& operator=(const ClipboardStub&) = delete; + virtual ~ClipboardStub() {} // Implementations must not assume the presence of |event|'s fields, nor that // |event.data| is correctly encoded according to the specified MIME-type. virtual void InjectClipboardEvent(const ClipboardEvent& event) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(ClipboardStub); }; } // namespace protocol
diff --git a/remoting/protocol/clipboard_thread_proxy.h b/remoting/protocol/clipboard_thread_proxy.h index 7c4c6e3f..137d096 100644 --- a/remoting/protocol/clipboard_thread_proxy.h +++ b/remoting/protocol/clipboard_thread_proxy.h
@@ -18,6 +18,9 @@ class ClipboardThreadProxy : public ClipboardStub { public: + ClipboardThreadProxy(const ClipboardThreadProxy&) = delete; + ClipboardThreadProxy& operator=(const ClipboardThreadProxy&) = delete; + ~ClipboardThreadProxy() override; // Constructs a proxy for |clipboard_stub| which will trampoline invocations @@ -38,8 +41,6 @@ base::WeakPtr<ClipboardStub> clipboard_stub_; scoped_refptr<base::TaskRunner> clipboard_stub_task_runner_; - - DISALLOW_COPY_AND_ASSIGN(ClipboardThreadProxy); }; } // namespace protocol
diff --git a/remoting/protocol/cursor_shape_stub.h b/remoting/protocol/cursor_shape_stub.h index b59d2ad..805e0b9 100644 --- a/remoting/protocol/cursor_shape_stub.h +++ b/remoting/protocol/cursor_shape_stub.h
@@ -17,12 +17,13 @@ class CursorShapeStub { public: CursorShapeStub() {} + + CursorShapeStub(const CursorShapeStub&) = delete; + CursorShapeStub& operator=(const CursorShapeStub&) = delete; + virtual ~CursorShapeStub() {} virtual void SetCursorShape(const CursorShapeInfo& cursor_shape) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(CursorShapeStub); }; } // namespace protocol
diff --git a/remoting/protocol/fake_audio_source.h b/remoting/protocol/fake_audio_source.h index 4465b291..c3b6fea 100644 --- a/remoting/protocol/fake_audio_source.h +++ b/remoting/protocol/fake_audio_source.h
@@ -14,6 +14,10 @@ class FakeAudioSource : public AudioSource { public: FakeAudioSource(); + + FakeAudioSource(const FakeAudioSource&) = delete; + FakeAudioSource& operator=(const FakeAudioSource&) = delete; + ~FakeAudioSource() override; // AudioSource interface. @@ -23,8 +27,6 @@ private: PacketCapturedCallback callback_; - - DISALLOW_COPY_AND_ASSIGN(FakeAudioSource); }; } // namespace protocol
diff --git a/remoting/protocol/fake_authenticator.h b/remoting/protocol/fake_authenticator.h index eeb2475..55e2495 100644 --- a/remoting/protocol/fake_authenticator.h +++ b/remoting/protocol/fake_authenticator.h
@@ -17,6 +17,10 @@ class FakeChannelAuthenticator : public ChannelAuthenticator { public: FakeChannelAuthenticator(bool accept, bool async); + + FakeChannelAuthenticator(const FakeChannelAuthenticator&) = delete; + FakeChannelAuthenticator& operator=(const FakeChannelAuthenticator&) = delete; + ~FakeChannelAuthenticator() override; // ChannelAuthenticator interface. @@ -39,8 +43,6 @@ bool did_write_bytes_ = false; base::WeakPtrFactory<FakeChannelAuthenticator> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeChannelAuthenticator); }; class FakeAuthenticator : public Authenticator { @@ -75,6 +77,9 @@ // don't exchange any messages. FakeAuthenticator(Action action); + FakeAuthenticator(const FakeAuthenticator&) = delete; + FakeAuthenticator& operator=(const FakeAuthenticator&) = delete; + ~FakeAuthenticator() override; // Set the number of messages that the authenticator needs to process before @@ -120,14 +125,17 @@ base::OnceClosure resume_closure_; std::string auth_key_; - - DISALLOW_COPY_AND_ASSIGN(FakeAuthenticator); }; class FakeHostAuthenticatorFactory : public AuthenticatorFactory { public: FakeHostAuthenticatorFactory(int messages_till_start, FakeAuthenticator::Config config); + + FakeHostAuthenticatorFactory(const FakeHostAuthenticatorFactory&) = delete; + FakeHostAuthenticatorFactory& operator=(const FakeHostAuthenticatorFactory&) = + delete; + ~FakeHostAuthenticatorFactory() override; // AuthenticatorFactory interface. @@ -138,8 +146,6 @@ private: const int messages_till_started_; const FakeAuthenticator::Config config_; - - DISALLOW_COPY_AND_ASSIGN(FakeHostAuthenticatorFactory); }; } // namespace protocol
diff --git a/remoting/protocol/fake_connection_to_client.h b/remoting/protocol/fake_connection_to_client.h index 9181292..02becb8 100644 --- a/remoting/protocol/fake_connection_to_client.h +++ b/remoting/protocol/fake_connection_to_client.h
@@ -23,6 +23,10 @@ class FakeVideoStream : public protocol::VideoStream { public: FakeVideoStream(); + + FakeVideoStream(const FakeVideoStream&) = delete; + FakeVideoStream& operator=(const FakeVideoStream&) = delete; + ~FakeVideoStream() override; // protocol::VideoStream interface. @@ -42,13 +46,15 @@ Observer* observer_ = nullptr; base::WeakPtrFactory<FakeVideoStream> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeVideoStream); }; class FakeConnectionToClient : public ConnectionToClient { public: FakeConnectionToClient(std::unique_ptr<Session> session); + + FakeConnectionToClient(const FakeConnectionToClient&) = delete; + FakeConnectionToClient& operator=(const FakeConnectionToClient&) = delete; + ~FakeConnectionToClient() override; void SetEventHandler(EventHandler* event_handler) override; @@ -113,8 +119,6 @@ bool is_connected_ = true; ErrorCode disconnect_error_ = OK; - - DISALLOW_COPY_AND_ASSIGN(FakeConnectionToClient); }; } // namespace protocol
diff --git a/remoting/protocol/fake_connection_to_host.h b/remoting/protocol/fake_connection_to_host.h index 74f8d91..6f26054f 100644 --- a/remoting/protocol/fake_connection_to_host.h +++ b/remoting/protocol/fake_connection_to_host.h
@@ -18,6 +18,10 @@ class FakeConnectionToHost : public protocol::ConnectionToHost { public: FakeConnectionToHost(); + + FakeConnectionToHost(const FakeConnectionToHost&) = delete; + FakeConnectionToHost& operator=(const FakeConnectionToHost&) = delete; + ~FakeConnectionToHost() override; // ConnectionToHost interface. @@ -56,8 +60,6 @@ testing::NiceMock<protocol::MockHostStub> mock_host_stub_; testing::NiceMock<protocol::MockInputStub> mock_input_stub_; std::unique_ptr<protocol::SessionConfig> session_config_; - - DISALLOW_COPY_AND_ASSIGN(FakeConnectionToHost); }; } // namespace test
diff --git a/remoting/protocol/fake_datagram_socket.h b/remoting/protocol/fake_datagram_socket.h index 9456bdcf..e5e54ed 100644 --- a/remoting/protocol/fake_datagram_socket.h +++ b/remoting/protocol/fake_datagram_socket.h
@@ -36,6 +36,10 @@ class FakeDatagramSocket : public P2PDatagramSocket { public: FakeDatagramSocket(); + + FakeDatagramSocket(const FakeDatagramSocket&) = delete; + FakeDatagramSocket& operator=(const FakeDatagramSocket&) = delete; + ~FakeDatagramSocket() override; const std::vector<std::string>& written_packets() const { @@ -93,13 +97,16 @@ scoped_refptr<base::SingleThreadTaskRunner> task_runner_; base::WeakPtrFactory<FakeDatagramSocket> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeDatagramSocket); }; class FakeDatagramChannelFactory : public DatagramChannelFactory { public: FakeDatagramChannelFactory(); + + FakeDatagramChannelFactory(const FakeDatagramChannelFactory&) = delete; + FakeDatagramChannelFactory& operator=(const FakeDatagramChannelFactory&) = + delete; + ~FakeDatagramChannelFactory() override; void set_asynchronous_create(bool asynchronous_create) { @@ -139,8 +146,6 @@ bool fail_create_; base::WeakPtrFactory<FakeDatagramChannelFactory> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeDatagramChannelFactory); }; } // namespace protocol
diff --git a/remoting/protocol/fake_desktop_capturer.h b/remoting/protocol/fake_desktop_capturer.h index c6f25bf..0f942a1 100644 --- a/remoting/protocol/fake_desktop_capturer.h +++ b/remoting/protocol/fake_desktop_capturer.h
@@ -32,6 +32,10 @@ webrtc::SharedMemoryFactory* shared_memory_factory)>; FakeDesktopCapturer(); + + FakeDesktopCapturer(const FakeDesktopCapturer&) = delete; + FakeDesktopCapturer& operator=(const FakeDesktopCapturer&) = delete; + ~FakeDesktopCapturer() override; void set_frame_generator(FrameGenerator frame_generator); @@ -50,8 +54,6 @@ Callback* callback_; std::unique_ptr<webrtc::SharedMemoryFactory> shared_memory_factory_; - - DISALLOW_COPY_AND_ASSIGN(FakeDesktopCapturer); }; } // namespace protocol
diff --git a/remoting/protocol/fake_session.h b/remoting/protocol/fake_session.h index 010262e..424cf71 100644 --- a/remoting/protocol/fake_session.h +++ b/remoting/protocol/fake_session.h
@@ -28,6 +28,10 @@ class FakeSession : public Session { public: FakeSession(); + + FakeSession(const FakeSession&) = delete; + FakeSession& operator=(const FakeSession&) = delete; + ~FakeSession() override; void SimulateConnection(FakeSession* peer); @@ -79,8 +83,6 @@ std::vector<std::unique_ptr<jingle_xmpp::XmlElement>> attachments_; base::WeakPtrFactory<FakeSession> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeSession); }; } // namespace protocol
diff --git a/remoting/protocol/fake_stream_socket.h b/remoting/protocol/fake_stream_socket.h index e15902b..9ba1ecd 100644 --- a/remoting/protocol/fake_stream_socket.h +++ b/remoting/protocol/fake_stream_socket.h
@@ -36,6 +36,10 @@ class FakeStreamSocket : public P2PStreamSocket { public: FakeStreamSocket(); + + FakeStreamSocket(const FakeStreamSocket&) = delete; + FakeStreamSocket& operator=(const FakeStreamSocket&) = delete; + ~FakeStreamSocket() override; // Returns all data written to the socket. @@ -103,14 +107,16 @@ scoped_refptr<base::SingleThreadTaskRunner> task_runner_; base::WeakPtrFactory<FakeStreamSocket> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeStreamSocket); }; // StreamChannelFactory that creates FakeStreamSocket. class FakeStreamChannelFactory : public StreamChannelFactory { public: FakeStreamChannelFactory(); + + FakeStreamChannelFactory(const FakeStreamChannelFactory&) = delete; + FakeStreamChannelFactory& operator=(const FakeStreamChannelFactory&) = delete; + ~FakeStreamChannelFactory() override; void set_asynchronous_create(bool asynchronous_create) { @@ -148,8 +154,6 @@ base::WeakPtr<FakeStreamChannelFactory> peer_factory_; base::WeakPtrFactory<FakeStreamChannelFactory> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeStreamChannelFactory); }; } // namespace protocol
diff --git a/remoting/protocol/frame_consumer.h b/remoting/protocol/frame_consumer.h index a5247fc8..43807660 100644 --- a/remoting/protocol/frame_consumer.h +++ b/remoting/protocol/frame_consumer.h
@@ -20,6 +20,9 @@ class FrameConsumer { public: + FrameConsumer(const FrameConsumer&) = delete; + FrameConsumer& operator=(const FrameConsumer&) = delete; + virtual ~FrameConsumer() {} // List of supported pixel formats needed by various platforms. @@ -39,9 +42,6 @@ protected: FrameConsumer() {} - - private: - DISALLOW_COPY_AND_ASSIGN(FrameConsumer); }; } // namespace protocol
diff --git a/remoting/protocol/host_control_dispatcher.h b/remoting/protocol/host_control_dispatcher.h index 9753c9d..a8604e4 100644 --- a/remoting/protocol/host_control_dispatcher.h +++ b/remoting/protocol/host_control_dispatcher.h
@@ -27,6 +27,10 @@ public ClientStub { public: HostControlDispatcher(); + + HostControlDispatcher(const HostControlDispatcher&) = delete; + HostControlDispatcher& operator=(const HostControlDispatcher&) = delete; + ~HostControlDispatcher() override; // ClientStub implementation. @@ -72,8 +76,6 @@ // 64 KiB is the default message size expected to be supported in absence of // a higher value negotiated via SDP. std::size_t max_message_size_ = 64 * 1024; - - DISALLOW_COPY_AND_ASSIGN(HostControlDispatcher); }; } // namespace protocol
diff --git a/remoting/protocol/host_event_dispatcher.h b/remoting/protocol/host_event_dispatcher.h index 9d4a559..8d4791ab 100644 --- a/remoting/protocol/host_event_dispatcher.h +++ b/remoting/protocol/host_event_dispatcher.h
@@ -21,6 +21,10 @@ class HostEventDispatcher : public ChannelDispatcherBase { public: HostEventDispatcher(); + + HostEventDispatcher(const HostEventDispatcher&) = delete; + HostEventDispatcher& operator=(const HostEventDispatcher&) = delete; + ~HostEventDispatcher() override; // Set InputStub that will be called for each incoming input @@ -46,8 +50,6 @@ scoped_refptr<InputEventTimestampsSourceImpl> event_timestamps_source_; InputStub* input_stub_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(HostEventDispatcher); }; } // namespace protocol
diff --git a/remoting/protocol/host_video_dispatcher.h b/remoting/protocol/host_video_dispatcher.h index 0d1c046..7e9a4e8 100644 --- a/remoting/protocol/host_video_dispatcher.h +++ b/remoting/protocol/host_video_dispatcher.h
@@ -18,6 +18,10 @@ class HostVideoDispatcher : public ChannelDispatcherBase, public VideoStub { public: HostVideoDispatcher(); + + HostVideoDispatcher(const HostVideoDispatcher&) = delete; + HostVideoDispatcher& operator=(const HostVideoDispatcher&) = delete; + ~HostVideoDispatcher() override; void set_video_feedback_stub(VideoFeedbackStub* video_feedback_stub) { @@ -32,8 +36,6 @@ void OnIncomingMessage(std::unique_ptr<CompoundBuffer> message) override; VideoFeedbackStub* video_feedback_stub_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(HostVideoDispatcher); }; } // namespace protocol
diff --git a/remoting/protocol/host_video_stats_dispatcher.h b/remoting/protocol/host_video_stats_dispatcher.h index 9b9e083..187e87b 100644 --- a/remoting/protocol/host_video_stats_dispatcher.h +++ b/remoting/protocol/host_video_stats_dispatcher.h
@@ -17,6 +17,10 @@ public VideoStatsStub { public: explicit HostVideoStatsDispatcher(const std::string& stream_name); + + HostVideoStatsDispatcher(const HostVideoStatsDispatcher&) = delete; + HostVideoStatsDispatcher& operator=(const HostVideoStatsDispatcher&) = delete; + ~HostVideoStatsDispatcher() override; // VideoStatsStub interface. @@ -25,8 +29,6 @@ private: void OnIncomingMessage(std::unique_ptr<CompoundBuffer> message) override; - - DISALLOW_COPY_AND_ASSIGN(HostVideoStatsDispatcher); }; } // namespace protocol
diff --git a/remoting/protocol/ice_connection_to_client.h b/remoting/protocol/ice_connection_to_client.h index 66402f0f..8211b6b 100644 --- a/remoting/protocol/ice_connection_to_client.h +++ b/remoting/protocol/ice_connection_to_client.h
@@ -40,6 +40,10 @@ scoped_refptr<TransportContext> transport_context, scoped_refptr<base::SingleThreadTaskRunner> video_encode_task_runner, scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner); + + IceConnectionToClient(const IceConnectionToClient&) = delete; + IceConnectionToClient& operator=(const IceConnectionToClient&) = delete; + ~IceConnectionToClient() override; // ConnectionToClient interface. @@ -94,8 +98,6 @@ std::unique_ptr<HostEventDispatcher> event_dispatcher_; std::unique_ptr<HostVideoDispatcher> video_dispatcher_; std::unique_ptr<AudioWriter> audio_writer_; - - DISALLOW_COPY_AND_ASSIGN(IceConnectionToClient); }; } // namespace protocol
diff --git a/remoting/protocol/ice_connection_to_host.h b/remoting/protocol/ice_connection_to_host.h index ea3fab9..5ba0356 100644 --- a/remoting/protocol/ice_connection_to_host.h +++ b/remoting/protocol/ice_connection_to_host.h
@@ -40,6 +40,10 @@ public ChannelDispatcherBase::EventHandler { public: IceConnectionToHost(); + + IceConnectionToHost(const IceConnectionToHost&) = delete; + IceConnectionToHost& operator=(const IceConnectionToHost&) = delete; + ~IceConnectionToHost() override; // ConnectionToHost interface. @@ -108,8 +112,6 @@ private: SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(IceConnectionToHost); }; } // namespace protocol
diff --git a/remoting/protocol/ice_transport.h b/remoting/protocol/ice_transport.h index 21b6df2..32b23d72 100644 --- a/remoting/protocol/ice_transport.h +++ b/remoting/protocol/ice_transport.h
@@ -41,6 +41,10 @@ // |transport_context| must outlive the session. IceTransport(scoped_refptr<TransportContext> transport_context, EventHandler* event_handler); + + IceTransport(const IceTransport&) = delete; + IceTransport& operator=(const IceTransport&) = delete; + ~IceTransport() override; MessageChannelFactory* GetChannelFactory(); @@ -107,12 +111,9 @@ base::OneShotTimer transport_info_timer_; base::WeakPtrFactory<IceTransport> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(IceTransport); }; } // namespace protocol } // namespace remoting #endif // REMOTING_PROTOCOL_ICE_TRANSPORT_H_ -
diff --git a/remoting/protocol/ice_transport_channel.h b/remoting/protocol/ice_transport_channel.h index c89f2773..bc9169c 100644 --- a/remoting/protocol/ice_transport_channel.h +++ b/remoting/protocol/ice_transport_channel.h
@@ -70,6 +70,10 @@ explicit IceTransportChannel( scoped_refptr<TransportContext> transport_context); + + IceTransportChannel(const IceTransportChannel&) = delete; + IceTransportChannel& operator=(const IceTransportChannel&) = delete; + ~IceTransportChannel() override; // Connects the channel and calls the |callback| after that. @@ -132,8 +136,6 @@ base::ThreadChecker thread_checker_; base::WeakPtrFactory<IceTransportChannel> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(IceTransportChannel); }; } // namespace protocol
diff --git a/remoting/protocol/ice_transport_unittest.cc b/remoting/protocol/ice_transport_unittest.cc index 73f7c57..8b48036 100644 --- a/remoting/protocol/ice_transport_unittest.cc +++ b/remoting/protocol/ice_transport_unittest.cc
@@ -60,6 +60,11 @@ typedef base::RepeatingCallback<void(ErrorCode error)> ErrorCallback; TestTransportEventHandler() = default; + + TestTransportEventHandler(const TestTransportEventHandler&) = delete; + TestTransportEventHandler& operator=(const TestTransportEventHandler&) = + delete; + ~TestTransportEventHandler() = default; void set_error_callback(const ErrorCallback& callback) { @@ -75,8 +80,6 @@ private: ErrorCallback error_callback_; - - DISALLOW_COPY_AND_ASSIGN(TestTransportEventHandler); }; } // namespace
diff --git a/remoting/protocol/input_event_tracker.h b/remoting/protocol/input_event_tracker.h index 1511fa5..8988d749 100644 --- a/remoting/protocol/input_event_tracker.h +++ b/remoting/protocol/input_event_tracker.h
@@ -25,6 +25,10 @@ public: InputEventTracker(); explicit InputEventTracker(InputStub* input_stub); + + InputEventTracker(const InputEventTracker&) = delete; + InputEventTracker& operator=(const InputEventTracker&) = delete; + ~InputEventTracker() override; void set_input_stub(InputStub* input_stub) { @@ -62,8 +66,6 @@ uint32_t mouse_button_state_ = 0; std::set<uint32_t> touch_point_ids_; - - DISALLOW_COPY_AND_ASSIGN(InputEventTracker); }; } // namespace protocol
diff --git a/remoting/protocol/input_filter.h b/remoting/protocol/input_filter.h index 8bb9aa8..02fd24fc 100644 --- a/remoting/protocol/input_filter.h +++ b/remoting/protocol/input_filter.h
@@ -19,6 +19,10 @@ public: InputFilter(); explicit InputFilter(InputStub* input_stub); + + InputFilter(const InputFilter&) = delete; + InputFilter& operator=(const InputFilter&) = delete; + ~InputFilter() override; // Set the InputStub that events will be forwarded to. @@ -43,8 +47,6 @@ private: InputStub* input_stub_; bool enabled_; - - DISALLOW_COPY_AND_ASSIGN(InputFilter); }; } // namespace protocol
diff --git a/remoting/protocol/input_stub.h b/remoting/protocol/input_stub.h index d73d3ff..8b0c2046 100644 --- a/remoting/protocol/input_stub.h +++ b/remoting/protocol/input_stub.h
@@ -21,6 +21,10 @@ class InputStub { public: InputStub() {} + + InputStub(const InputStub&) = delete; + InputStub& operator=(const InputStub&) = delete; + virtual ~InputStub() {} // Implementations must never assume the presence of any |event| fields, @@ -29,9 +33,6 @@ virtual void InjectTextEvent(const TextEvent& event) = 0; virtual void InjectMouseEvent(const MouseEvent& event) = 0; virtual void InjectTouchEvent(const TouchEvent& event) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(InputStub); }; } // namespace protocol
diff --git a/remoting/protocol/it2me_host_authenticator_factory.h b/remoting/protocol/it2me_host_authenticator_factory.h index 1be5683..725bee3 100644 --- a/remoting/protocol/it2me_host_authenticator_factory.h +++ b/remoting/protocol/it2me_host_authenticator_factory.h
@@ -29,6 +29,11 @@ scoped_refptr<RsaKeyPair> key_pair, const std::string& access_code, const ValidatingAuthenticator::ValidationCallback& callback); + + It2MeHostAuthenticatorFactory(const It2MeHostAuthenticatorFactory&) = delete; + It2MeHostAuthenticatorFactory& operator=( + const It2MeHostAuthenticatorFactory&) = delete; + ~It2MeHostAuthenticatorFactory() override; // AuthenticatorFactory interface. @@ -41,8 +46,6 @@ scoped_refptr<RsaKeyPair> key_pair_; std::string access_code_hash_; ValidatingAuthenticator::ValidationCallback validation_callback_; - - DISALLOW_COPY_AND_ASSIGN(It2MeHostAuthenticatorFactory); }; } // namespace protocol
diff --git a/remoting/protocol/jingle_session.cc b/remoting/protocol/jingle_session.cc index 27aa5fa..ba7fb2a 100644 --- a/remoting/protocol/jingle_session.cc +++ b/remoting/protocol/jingle_session.cc
@@ -115,6 +115,10 @@ class JingleSession::OrderedMessageQueue { public: OrderedMessageQueue() = default; + + OrderedMessageQueue(const OrderedMessageQueue&) = delete; + OrderedMessageQueue& operator=(const OrderedMessageQueue&) = delete; + ~OrderedMessageQueue() = default; // Returns the list of messages ordered by their sequential IDs. @@ -131,8 +135,6 @@ std::map<int, PendingMessage> queue_; int next_incoming_ = kAny; - - DISALLOW_COPY_AND_ASSIGN(OrderedMessageQueue); }; std::vector<JingleSession::PendingMessage>
diff --git a/remoting/protocol/jingle_session.h b/remoting/protocol/jingle_session.h index 09ec5405..d6f0b5b 100644 --- a/remoting/protocol/jingle_session.h +++ b/remoting/protocol/jingle_session.h
@@ -33,6 +33,9 @@ // created by the JingleSessionManager. class JingleSession : public Session { public: + JingleSession(const JingleSession&) = delete; + JingleSession& operator=(const JingleSession&) = delete; + ~JingleSession() override; // Session interface. @@ -183,8 +186,6 @@ std::vector<SessionPlugin*> plugins_; base::WeakPtrFactory<JingleSession> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(JingleSession); }; } // namespace protocol
diff --git a/remoting/protocol/jingle_session_manager.h b/remoting/protocol/jingle_session_manager.h index 1c65ba0..3159d22 100644 --- a/remoting/protocol/jingle_session_manager.h +++ b/remoting/protocol/jingle_session_manager.h
@@ -34,6 +34,10 @@ public SignalStrategy::Listener { public: explicit JingleSessionManager(SignalStrategy* signal_strategy); + + JingleSessionManager(const JingleSessionManager&) = delete; + JingleSessionManager& operator=(const JingleSessionManager&) = delete; + ~JingleSessionManager() override; // SessionManager interface. @@ -73,8 +77,6 @@ SessionsMap sessions_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(JingleSessionManager); }; } // namespace protocol
diff --git a/remoting/protocol/me2me_host_authenticator_factory.h b/remoting/protocol/me2me_host_authenticator_factory.h index b80d774..60b65d01 100644 --- a/remoting/protocol/me2me_host_authenticator_factory.h +++ b/remoting/protocol/me2me_host_authenticator_factory.h
@@ -44,6 +44,11 @@ scoped_refptr<TokenValidatorFactory> token_validator_factory); Me2MeHostAuthenticatorFactory(); + + Me2MeHostAuthenticatorFactory(const Me2MeHostAuthenticatorFactory&) = delete; + Me2MeHostAuthenticatorFactory& operator=( + const Me2MeHostAuthenticatorFactory&) = delete; + ~Me2MeHostAuthenticatorFactory() override; // AuthenticatorFactory interface. @@ -66,8 +71,6 @@ // Used only for pairing host authenticators. scoped_refptr<PairingRegistry> pairing_registry_; - - DISALLOW_COPY_AND_ASSIGN(Me2MeHostAuthenticatorFactory); }; } // namespace protocol
diff --git a/remoting/protocol/message_reader.h b/remoting/protocol/message_reader.h index 6a62b99..8032600e 100644 --- a/remoting/protocol/message_reader.h +++ b/remoting/protocol/message_reader.h
@@ -41,6 +41,10 @@ typedef base::OnceCallback<void(int)> ReadFailedCallback; MessageReader(); + + MessageReader(const MessageReader&) = delete; + MessageReader& operator=(const MessageReader&) = delete; + virtual ~MessageReader(); // Starts reading from |socket|. @@ -77,8 +81,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<MessageReader> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(MessageReader); }; } // namespace protocol
diff --git a/remoting/protocol/monitored_video_stub.h b/remoting/protocol/monitored_video_stub.h index 9d894cf..39c530b 100644 --- a/remoting/protocol/monitored_video_stub.h +++ b/remoting/protocol/monitored_video_stub.h
@@ -38,6 +38,10 @@ VideoStub* video_stub, base::TimeDelta connectivity_check_delay, const ChannelStateCallback& callback); + + MonitoredVideoStub(const MonitoredVideoStub&) = delete; + MonitoredVideoStub& operator=(const MonitoredVideoStub&) = delete; + ~MonitoredVideoStub() override; // VideoStub implementation. @@ -53,8 +57,6 @@ base::ThreadChecker thread_checker_; bool is_connected_; base::DelayTimer connectivity_check_timer_; - - DISALLOW_COPY_AND_ASSIGN(MonitoredVideoStub); }; } // namespace protocol
diff --git a/remoting/protocol/mouse_input_filter.h b/remoting/protocol/mouse_input_filter.h index 359234a..8e553f0 100644 --- a/remoting/protocol/mouse_input_filter.h +++ b/remoting/protocol/mouse_input_filter.h
@@ -21,6 +21,10 @@ public: MouseInputFilter(); explicit MouseInputFilter(InputStub* input_stub); + + MouseInputFilter(const MouseInputFilter&) = delete; + MouseInputFilter& operator=(const MouseInputFilter&) = delete; + ~MouseInputFilter() override; // Specify the input dimensions (DIPs or pixels) for mouse events. @@ -48,8 +52,6 @@ webrtc::DesktopVector input_bounds_; webrtc::DesktopVector output_bounds_; webrtc::DesktopVector output_offset_; - - DISALLOW_COPY_AND_ASSIGN(MouseInputFilter); }; } // namespace protocol
diff --git a/remoting/protocol/negotiating_authenticator_base.h b/remoting/protocol/negotiating_authenticator_base.h index 0002c16..53815c92 100644 --- a/remoting/protocol/negotiating_authenticator_base.h +++ b/remoting/protocol/negotiating_authenticator_base.h
@@ -89,6 +89,10 @@ THIRD_PARTY_SPAKE2_CURVE25519, }; + NegotiatingAuthenticatorBase(const NegotiatingAuthenticatorBase&) = delete; + NegotiatingAuthenticatorBase& operator=(const NegotiatingAuthenticatorBase&) = + delete; + ~NegotiatingAuthenticatorBase() override; // Authenticator interface. @@ -138,9 +142,6 @@ std::unique_ptr<Authenticator> current_authenticator_; State state_; RejectionReason rejection_reason_ = INVALID_CREDENTIALS; - - private: - DISALLOW_COPY_AND_ASSIGN(NegotiatingAuthenticatorBase); }; } // namespace protocol
diff --git a/remoting/protocol/negotiating_authenticator_unittest.cc b/remoting/protocol/negotiating_authenticator_unittest.cc index 223ddba..9692cae1 100644 --- a/remoting/protocol/negotiating_authenticator_unittest.cc +++ b/remoting/protocol/negotiating_authenticator_unittest.cc
@@ -53,6 +53,11 @@ class NegotiatingAuthenticatorTest : public AuthenticatorTestBase { public: NegotiatingAuthenticatorTest() = default; + + NegotiatingAuthenticatorTest(const NegotiatingAuthenticatorTest&) = delete; + NegotiatingAuthenticatorTest& operator=(const NegotiatingAuthenticatorTest&) = + delete; + ~NegotiatingAuthenticatorTest() override = default; protected: @@ -158,8 +163,6 @@ private: scoped_refptr<PairingRegistry> pairing_registry_; - - DISALLOW_COPY_AND_ASSIGN(NegotiatingAuthenticatorTest); }; struct PairingTestParameters {
diff --git a/remoting/protocol/negotiating_client_authenticator.h b/remoting/protocol/negotiating_client_authenticator.h index af00212..92878819 100644 --- a/remoting/protocol/negotiating_client_authenticator.h +++ b/remoting/protocol/negotiating_client_authenticator.h
@@ -27,6 +27,12 @@ const std::string& local_id, const std::string& remote_id, const ClientAuthenticationConfig& config); + + NegotiatingClientAuthenticator(const NegotiatingClientAuthenticator&) = + delete; + NegotiatingClientAuthenticator& operator=( + const NegotiatingClientAuthenticator&) = delete; + ~NegotiatingClientAuthenticator() override; // NegotiatingAuthenticatorBase: @@ -70,8 +76,6 @@ // Internal NegotiatingClientAuthenticator data. bool method_set_by_host_ = false; base::WeakPtrFactory<NegotiatingClientAuthenticator> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(NegotiatingClientAuthenticator); }; } // namespace protocol
diff --git a/remoting/protocol/negotiating_host_authenticator.h b/remoting/protocol/negotiating_host_authenticator.h index c02d91e2..e637398e 100644 --- a/remoting/protocol/negotiating_host_authenticator.h +++ b/remoting/protocol/negotiating_host_authenticator.h
@@ -28,6 +28,10 @@ // See comments in negotiating_authenticator_base.h for a general explanation. class NegotiatingHostAuthenticator : public NegotiatingAuthenticatorBase { public: + NegotiatingHostAuthenticator(const NegotiatingHostAuthenticator&) = delete; + NegotiatingHostAuthenticator& operator=(const NegotiatingHostAuthenticator&) = + delete; + ~NegotiatingHostAuthenticator() override; // Creates a host authenticator, using a PIN or access code. If @@ -82,8 +86,6 @@ scoped_refptr<PairingRegistry> pairing_registry_; std::string client_id_; - - DISALLOW_COPY_AND_ASSIGN(NegotiatingHostAuthenticator); }; } // namespace protocol
diff --git a/remoting/protocol/pairing_authenticator_base.h b/remoting/protocol/pairing_authenticator_base.h index 6201465..93d9b9f 100644 --- a/remoting/protocol/pairing_authenticator_base.h +++ b/remoting/protocol/pairing_authenticator_base.h
@@ -40,6 +40,10 @@ class PairingAuthenticatorBase : public Authenticator { public: PairingAuthenticatorBase(); + + PairingAuthenticatorBase(const PairingAuthenticatorBase&) = delete; + PairingAuthenticatorBase& operator=(const PairingAuthenticatorBase&) = delete; + ~PairingAuthenticatorBase() override; // Authenticator interface. @@ -81,8 +85,6 @@ void CheckForFailedSpakeExchange(base::OnceClosure resume_callback); base::WeakPtrFactory<PairingAuthenticatorBase> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PairingAuthenticatorBase); }; } // namespace protocol
diff --git a/remoting/protocol/pairing_client_authenticator.h b/remoting/protocol/pairing_client_authenticator.h index a3fc79d..f415fee 100644 --- a/remoting/protocol/pairing_client_authenticator.h +++ b/remoting/protocol/pairing_client_authenticator.h
@@ -19,6 +19,11 @@ const ClientAuthenticationConfig& client_auth_config, const CreateBaseAuthenticatorCallback& create_base_authenticator_callback); + + PairingClientAuthenticator(const PairingClientAuthenticator&) = delete; + PairingClientAuthenticator& operator=(const PairingClientAuthenticator&) = + delete; + ~PairingClientAuthenticator() override; // Start() or StartPaired() must be called after the authenticator is created. @@ -52,8 +57,6 @@ bool waiting_for_pin_ = false; base::WeakPtrFactory<PairingClientAuthenticator> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PairingClientAuthenticator); }; } // namespace protocol
diff --git a/remoting/protocol/pairing_host_authenticator.h b/remoting/protocol/pairing_host_authenticator.h index c85e53e..b86beddd 100644 --- a/remoting/protocol/pairing_host_authenticator.h +++ b/remoting/protocol/pairing_host_authenticator.h
@@ -21,6 +21,10 @@ scoped_refptr<PairingRegistry> pairing_registry, const CreateBaseAuthenticatorCallback& create_base_authenticator_callback, const std::string& pin); + + PairingHostAuthenticator(const PairingHostAuthenticator&) = delete; + PairingHostAuthenticator& operator=(const PairingHostAuthenticator&) = delete; + ~PairingHostAuthenticator() override; // Initialize the authenticator with the given |client_id| in @@ -53,8 +57,6 @@ bool waiting_for_paired_secret_ = false; base::WeakPtrFactory<PairingHostAuthenticator> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PairingHostAuthenticator); }; } // namespace protocol
diff --git a/remoting/protocol/pairing_registry_unittest.cc b/remoting/protocol/pairing_registry_unittest.cc index 8866d96..f448dc1c 100644 --- a/remoting/protocol/pairing_registry_unittest.cc +++ b/remoting/protocol/pairing_registry_unittest.cc
@@ -30,6 +30,11 @@ class MockPairingRegistryCallbacks { public: MockPairingRegistryCallbacks() = default; + + MockPairingRegistryCallbacks(const MockPairingRegistryCallbacks&) = delete; + MockPairingRegistryCallbacks& operator=(const MockPairingRegistryCallbacks&) = + delete; + virtual ~MockPairingRegistryCallbacks() = default; MOCK_METHOD1(DoneCallback, void(bool)); @@ -39,9 +44,6 @@ void GetAllPairingsCallback(std::unique_ptr<base::ListValue> pairings) { GetAllPairingsCallbackPtr(pairings.get()); } - - private: - DISALLOW_COPY_AND_ASSIGN(MockPairingRegistryCallbacks); }; // Verify that a pairing Dictionary has correct entries, but doesn't include
diff --git a/remoting/protocol/performance_tracker.h b/remoting/protocol/performance_tracker.h index a8acc33..741c4f7 100644 --- a/remoting/protocol/performance_tracker.h +++ b/remoting/protocol/performance_tracker.h
@@ -35,6 +35,10 @@ UpdateUmaEnumHistogramCallback; PerformanceTracker(); + + PerformanceTracker(const PerformanceTracker&) = delete; + PerformanceTracker& operator=(const PerformanceTracker&) = delete; + ~PerformanceTracker() override; // Constant used to calculate the average for rate metrics and used by the @@ -98,8 +102,6 @@ bool is_paused_ = false; base::RepeatingTimer upload_uma_stats_timer_; - - DISALLOW_COPY_AND_ASSIGN(PerformanceTracker); }; } // namespace protocol
diff --git a/remoting/protocol/protocol_mock_objects.h b/remoting/protocol/protocol_mock_objects.h index 8ec2e81..ac19807f 100644 --- a/remoting/protocol/protocol_mock_objects.h +++ b/remoting/protocol/protocol_mock_objects.h
@@ -42,6 +42,10 @@ class MockAuthenticator : public Authenticator { public: MockAuthenticator(); + + MockAuthenticator(const MockAuthenticator&) = delete; + MockAuthenticator& operator=(const MockAuthenticator&) = delete; + ~MockAuthenticator() override; MOCK_CONST_METHOD0(state, Authenticator::State()); @@ -62,15 +66,18 @@ std::unique_ptr<jingle_xmpp::XmlElement> GetNextMessage() override { return base::WrapUnique(GetNextMessagePtr()); } - - private: - DISALLOW_COPY_AND_ASSIGN(MockAuthenticator); }; class MockConnectionToClientEventHandler : public ConnectionToClient::EventHandler { public: MockConnectionToClientEventHandler(); + + MockConnectionToClientEventHandler( + const MockConnectionToClientEventHandler&) = delete; + MockConnectionToClientEventHandler& operator=( + const MockConnectionToClientEventHandler&) = delete; + ~MockConnectionToClientEventHandler() override; MOCK_METHOD0(OnConnectionAuthenticating, void()); @@ -89,39 +96,42 @@ std::unique_ptr<MessagePipe> pipe) override { OnIncomingDataChannelPtr(channel_name, pipe.get()); } - - private: - DISALLOW_COPY_AND_ASSIGN(MockConnectionToClientEventHandler); }; class MockClipboardStub : public ClipboardStub { public: MockClipboardStub(); + + MockClipboardStub(const MockClipboardStub&) = delete; + MockClipboardStub& operator=(const MockClipboardStub&) = delete; + ~MockClipboardStub() override; MOCK_METHOD1(InjectClipboardEvent, void(const ClipboardEvent& event)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockClipboardStub); }; class MockInputStub : public InputStub { public: MockInputStub(); + + MockInputStub(const MockInputStub&) = delete; + MockInputStub& operator=(const MockInputStub&) = delete; + ~MockInputStub() override; MOCK_METHOD1(InjectKeyEvent, void(const KeyEvent& event)); MOCK_METHOD1(InjectTextEvent, void(const TextEvent& event)); MOCK_METHOD1(InjectMouseEvent, void(const MouseEvent& event)); MOCK_METHOD1(InjectTouchEvent, void(const TouchEvent& event)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockInputStub); }; class MockHostStub : public HostStub { public: MockHostStub(); + + MockHostStub(const MockHostStub&) = delete; + MockHostStub& operator=(const MockHostStub&) = delete; + ~MockHostStub() override; MOCK_METHOD1(NotifyClientResolution, @@ -135,14 +145,15 @@ MOCK_METHOD1(DeliverClientMessage, void(const ExtensionMessage& message)); MOCK_METHOD1(SelectDesktopDisplay, void(const SelectDesktopDisplayRequest& message)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockHostStub); }; class MockClientStub : public ClientStub { public: MockClientStub(); + + MockClientStub(const MockClientStub&) = delete; + MockClientStub& operator=(const MockClientStub&) = delete; + ~MockClientStub() override; // ClientStub mock implementation. @@ -161,25 +172,27 @@ // KeyboardLayoutStub mock implementation. MOCK_METHOD1(SetKeyboardLayout, void(const KeyboardLayout& layout)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockClientStub); }; class MockCursorShapeStub : public CursorShapeStub { public: MockCursorShapeStub(); + + MockCursorShapeStub(const MockCursorShapeStub&) = delete; + MockCursorShapeStub& operator=(const MockCursorShapeStub&) = delete; + ~MockCursorShapeStub() override; MOCK_METHOD1(SetCursorShape, void(const CursorShapeInfo& cursor_shape)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockCursorShapeStub); }; class MockVideoStub : public VideoStub { public: MockVideoStub(); + + MockVideoStub(const MockVideoStub&) = delete; + MockVideoStub& operator=(const MockVideoStub&) = delete; + ~MockVideoStub() override; MOCK_METHOD2(ProcessVideoPacketPtr, @@ -188,14 +201,15 @@ base::OnceClosure done) override { ProcessVideoPacketPtr(video_packet.get(), &done); } - - private: - DISALLOW_COPY_AND_ASSIGN(MockVideoStub); }; class MockSession : public Session { public: MockSession(); + + MockSession(const MockSession&) = delete; + MockSession& operator=(const MockSession&) = delete; + ~MockSession() override; MOCK_METHOD1(SetEventHandler, void(Session::EventHandler* event_handler)); @@ -205,14 +219,15 @@ MOCK_METHOD0(config, const SessionConfig&()); MOCK_METHOD1(Close, void(ErrorCode error)); MOCK_METHOD1(AddPlugin, void(SessionPlugin* plugin)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockSession); }; class MockSessionManager : public SessionManager { public: MockSessionManager(); + + MockSessionManager(const MockSessionManager&) = delete; + MockSessionManager& operator=(const MockSessionManager&) = delete; + ~MockSessionManager() override; MOCK_METHOD1(AcceptIncoming, void(const IncomingSessionCallback&)); @@ -233,9 +248,6 @@ std::unique_ptr<AuthenticatorFactory> authenticator_factory) override { set_authenticator_factory_ptr(authenticator_factory.release()); } - - private: - DISALLOW_COPY_AND_ASSIGN(MockSessionManager); }; // Simple delegate that caches information on paired clients in memory.
diff --git a/remoting/protocol/pseudotcp_adapter.h b/remoting/protocol/pseudotcp_adapter.h index 54725c5d..9ea5d60 100644 --- a/remoting/protocol/pseudotcp_adapter.h +++ b/remoting/protocol/pseudotcp_adapter.h
@@ -31,6 +31,10 @@ class PseudoTcpAdapter : public P2PStreamSocket { public: explicit PseudoTcpAdapter(std::unique_ptr<P2PDatagramSocket> socket); + + PseudoTcpAdapter(const PseudoTcpAdapter&) = delete; + PseudoTcpAdapter& operator=(const PseudoTcpAdapter&) = delete; + ~PseudoTcpAdapter() override; // P2PStreamSocket implementation. @@ -84,8 +88,6 @@ net::NetLogWithSource net_log_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(PseudoTcpAdapter); }; } // namespace protocol
diff --git a/remoting/protocol/pseudotcp_channel_factory.h b/remoting/protocol/pseudotcp_channel_factory.h index bf21d3b..1a61cea8 100644 --- a/remoting/protocol/pseudotcp_channel_factory.h +++ b/remoting/protocol/pseudotcp_channel_factory.h
@@ -23,6 +23,10 @@ // |datagram_channel_factory| must outlive this object. explicit PseudoTcpChannelFactory( DatagramChannelFactory* datagram_channel_factory); + + PseudoTcpChannelFactory(const PseudoTcpChannelFactory&) = delete; + PseudoTcpChannelFactory& operator=(const PseudoTcpChannelFactory&) = delete; + ~PseudoTcpChannelFactory() override; // StreamChannelFactory interface. @@ -43,8 +47,6 @@ DatagramChannelFactory* datagram_channel_factory_; PendingSocketsMap pending_sockets_; - - DISALLOW_COPY_AND_ASSIGN(PseudoTcpChannelFactory); }; } // namespace protocol
diff --git a/remoting/protocol/rejecting_authenticator.h b/remoting/protocol/rejecting_authenticator.h index 3d78c7ac..c1d1a91 100644 --- a/remoting/protocol/rejecting_authenticator.h +++ b/remoting/protocol/rejecting_authenticator.h
@@ -17,6 +17,10 @@ class RejectingAuthenticator : public Authenticator { public: RejectingAuthenticator(RejectionReason rejection_reason); + + RejectingAuthenticator(const RejectingAuthenticator&) = delete; + RejectingAuthenticator& operator=(const RejectingAuthenticator&) = delete; + ~RejectingAuthenticator() override; // Authenticator interface @@ -34,8 +38,6 @@ RejectionReason rejection_reason_; State state_ = WAITING_MESSAGE; std::string auth_key_; - - DISALLOW_COPY_AND_ASSIGN(RejectingAuthenticator); }; } // namespace protocol
diff --git a/remoting/protocol/remoting_ice_config_request.h b/remoting/protocol/remoting_ice_config_request.h index 03055018..87f30cae 100644 --- a/remoting/protocol/remoting_ice_config_request.h +++ b/remoting/protocol/remoting_ice_config_request.h
@@ -37,6 +37,10 @@ RemotingIceConfigRequest( scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory, OAuthTokenGetter* oauth_token_getter); + + RemotingIceConfigRequest(const RemotingIceConfigRequest&) = delete; + RemotingIceConfigRequest& operator=(const RemotingIceConfigRequest&) = delete; + ~RemotingIceConfigRequest() override; // IceConfigRequest implementation. @@ -51,8 +55,6 @@ bool make_authenticated_requests_ = false; OnIceConfigCallback on_ice_config_callback_; ProtobufHttpClient http_client_; - - DISALLOW_COPY_AND_ASSIGN(RemotingIceConfigRequest); }; } // namespace protocol
diff --git a/remoting/protocol/secure_channel_factory.h b/remoting/protocol/secure_channel_factory.h index 0212e2c37..b9b606a 100644 --- a/remoting/protocol/secure_channel_factory.h +++ b/remoting/protocol/secure_channel_factory.h
@@ -27,6 +27,10 @@ // Both parameters must outlive the object. SecureChannelFactory(StreamChannelFactory* channel_factory, Authenticator* authenticator); + + SecureChannelFactory(const SecureChannelFactory&) = delete; + SecureChannelFactory& operator=(const SecureChannelFactory&) = delete; + ~SecureChannelFactory() override; // StreamChannelFactory interface. @@ -50,8 +54,6 @@ Authenticator* authenticator_; AuthenticatorMap channel_authenticators_; - - DISALLOW_COPY_AND_ASSIGN(SecureChannelFactory); }; } // namespace protocol
diff --git a/remoting/protocol/session.h b/remoting/protocol/session.h index 3fef3a4..d45ec00 100644 --- a/remoting/protocol/session.h +++ b/remoting/protocol/session.h
@@ -62,6 +62,10 @@ }; Session() {} + + Session(const Session&) = delete; + Session& operator=(const Session&) = delete; + virtual ~Session() {} // Set event handler for this session. |event_handler| must outlive @@ -92,9 +96,6 @@ // called immediately after SessionManager::Connect() for outgoing connections // or in the IncomingSessionCallback handler for incoming connections. virtual void AddPlugin(SessionPlugin* plugin) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(Session); }; } // namespace protocol
diff --git a/remoting/protocol/session_manager.h b/remoting/protocol/session_manager.h index cd13359..5e03367 100644 --- a/remoting/protocol/session_manager.h +++ b/remoting/protocol/session_manager.h
@@ -97,6 +97,10 @@ IncomingSessionCallback; SessionManager() {} + + SessionManager(const SessionManager&) = delete; + SessionManager& operator=(const SessionManager&) = delete; + virtual ~SessionManager() {} // Starts accepting incoming connections. @@ -123,9 +127,6 @@ // factory before all authenticators it created are deleted. virtual void set_authenticator_factory( std::unique_ptr<AuthenticatorFactory> authenticator_factory) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(SessionManager); }; } // namespace protocol
diff --git a/remoting/protocol/spake2_authenticator.h b/remoting/protocol/spake2_authenticator.h index 30d4122..4096754 100644 --- a/remoting/protocol/spake2_authenticator.h +++ b/remoting/protocol/spake2_authenticator.h
@@ -40,6 +40,9 @@ const std::string& shared_secret, State initial_state); + Spake2Authenticator(const Spake2Authenticator&) = delete; + Spake2Authenticator& operator=(const Spake2Authenticator&) = delete; + ~Spake2Authenticator() override; // Authenticator interface. @@ -90,8 +93,6 @@ std::string outgoing_verification_hash_; std::string auth_key_; std::string expected_verification_hash_; - - DISALLOW_COPY_AND_ASSIGN(Spake2Authenticator); }; } // namespace protocol
diff --git a/remoting/protocol/spake2_authenticator_unittest.cc b/remoting/protocol/spake2_authenticator_unittest.cc index d55df5c..a00cdc2 100644 --- a/remoting/protocol/spake2_authenticator_unittest.cc +++ b/remoting/protocol/spake2_authenticator_unittest.cc
@@ -39,6 +39,10 @@ class Spake2AuthenticatorTest : public AuthenticatorTestBase { public: Spake2AuthenticatorTest() = default; + + Spake2AuthenticatorTest(const Spake2AuthenticatorTest&) = delete; + Spake2AuthenticatorTest& operator=(const Spake2AuthenticatorTest&) = delete; + ~Spake2AuthenticatorTest() override = default; protected: @@ -50,8 +54,6 @@ client_ = Spake2Authenticator::CreateForClient( kClientId, kHostId, client_secret, Authenticator::MESSAGE_READY); } - - DISALLOW_COPY_AND_ASSIGN(Spake2AuthenticatorTest); }; TEST_F(Spake2AuthenticatorTest, SuccessfulAuth) {
diff --git a/remoting/protocol/ssl_hmac_channel_authenticator.h b/remoting/protocol/ssl_hmac_channel_authenticator.h index 0a7700a..53eba44 100644 --- a/remoting/protocol/ssl_hmac_channel_authenticator.h +++ b/remoting/protocol/ssl_hmac_channel_authenticator.h
@@ -59,6 +59,10 @@ scoped_refptr<RsaKeyPair> key_pair, const std::string& auth_key); + SslHmacChannelAuthenticator(const SslHmacChannelAuthenticator&) = delete; + SslHmacChannelAuthenticator& operator=(const SslHmacChannelAuthenticator&) = + delete; + ~SslHmacChannelAuthenticator() override; // ChannelAuthenticator interface. @@ -123,8 +127,6 @@ scoped_refptr<net::GrowableIOBuffer> auth_read_buf_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(SslHmacChannelAuthenticator); }; } // namespace protocol
diff --git a/remoting/protocol/ssl_hmac_channel_authenticator_unittest.cc b/remoting/protocol/ssl_hmac_channel_authenticator_unittest.cc index 9197a536..713a7e0 100644 --- a/remoting/protocol/ssl_hmac_channel_authenticator_unittest.cc +++ b/remoting/protocol/ssl_hmac_channel_authenticator_unittest.cc
@@ -58,6 +58,12 @@ class SslHmacChannelAuthenticatorTest : public testing::Test { public: SslHmacChannelAuthenticatorTest() = default; + + SslHmacChannelAuthenticatorTest(const SslHmacChannelAuthenticatorTest&) = + delete; + SslHmacChannelAuthenticatorTest& operator=( + const SslHmacChannelAuthenticatorTest&) = delete; + ~SslHmacChannelAuthenticatorTest() override = default; protected: @@ -150,8 +156,6 @@ MockChannelDoneCallback host_callback_; std::unique_ptr<P2PStreamSocket> client_socket_; std::unique_ptr<P2PStreamSocket> host_socket_; - - DISALLOW_COPY_AND_ASSIGN(SslHmacChannelAuthenticatorTest); }; // Verify that a channel can be connected using a valid shared secret.
diff --git a/remoting/protocol/stream_message_pipe_adapter.h b/remoting/protocol/stream_message_pipe_adapter.h index ebdd2ec..2b8e4743 100644 --- a/remoting/protocol/stream_message_pipe_adapter.h +++ b/remoting/protocol/stream_message_pipe_adapter.h
@@ -26,6 +26,10 @@ StreamMessagePipeAdapter(std::unique_ptr<P2PStreamSocket> socket, ErrorCallback error_callback); + + StreamMessagePipeAdapter(const StreamMessagePipeAdapter&) = delete; + StreamMessagePipeAdapter& operator=(const StreamMessagePipeAdapter&) = delete; + ~StreamMessagePipeAdapter() override; // MessagePipe interface. @@ -43,8 +47,6 @@ std::unique_ptr<MessageReader> reader_; std::unique_ptr<BufferedSocketWriter> writer_; - - DISALLOW_COPY_AND_ASSIGN(StreamMessagePipeAdapter); }; class StreamMessageChannelFactoryAdapter : public MessageChannelFactory { @@ -54,6 +56,12 @@ StreamMessageChannelFactoryAdapter( StreamChannelFactory* stream_channel_factory, const ErrorCallback& error_callback); + + StreamMessageChannelFactoryAdapter( + const StreamMessageChannelFactoryAdapter&) = delete; + StreamMessageChannelFactoryAdapter& operator=( + const StreamMessageChannelFactoryAdapter&) = delete; + ~StreamMessageChannelFactoryAdapter() override; // MessageChannelFactory interface. @@ -67,8 +75,6 @@ StreamChannelFactory* stream_channel_factory_; ErrorCallback error_callback_; - - DISALLOW_COPY_AND_ASSIGN(StreamMessageChannelFactoryAdapter); }; } // namespace protocol
diff --git a/remoting/protocol/third_party_authenticator_base.h b/remoting/protocol/third_party_authenticator_base.h index 63548fe..3175724 100644 --- a/remoting/protocol/third_party_authenticator_base.h +++ b/remoting/protocol/third_party_authenticator_base.h
@@ -33,6 +33,10 @@ // an authentication key, which is used to establish the connection. class ThirdPartyAuthenticatorBase : public Authenticator { public: + ThirdPartyAuthenticatorBase(const ThirdPartyAuthenticatorBase&) = delete; + ThirdPartyAuthenticatorBase& operator=(const ThirdPartyAuthenticatorBase&) = + delete; + ~ThirdPartyAuthenticatorBase() override; // Authenticator interface. @@ -69,9 +73,6 @@ State token_state_; bool started_; RejectionReason rejection_reason_; - - private: - DISALLOW_COPY_AND_ASSIGN(ThirdPartyAuthenticatorBase); }; } // namespace protocol
diff --git a/remoting/protocol/third_party_authenticator_unittest.cc b/remoting/protocol/third_party_authenticator_unittest.cc index 244f324c..cf3c69f 100644 --- a/remoting/protocol/third_party_authenticator_unittest.cc +++ b/remoting/protocol/third_party_authenticator_unittest.cc
@@ -110,6 +110,11 @@ public: ThirdPartyAuthenticatorTest() = default; + + ThirdPartyAuthenticatorTest(const ThirdPartyAuthenticatorTest&) = delete; + ThirdPartyAuthenticatorTest& operator=(const ThirdPartyAuthenticatorTest&) = + delete; + ~ThirdPartyAuthenticatorTest() override = default; protected: @@ -127,9 +132,6 @@ FakeTokenFetcher token_fetcher_; FakeTokenValidator* token_validator_; - - private: - DISALLOW_COPY_AND_ASSIGN(ThirdPartyAuthenticatorTest); }; TEST_F(ThirdPartyAuthenticatorTest, SuccessfulAuth) {
diff --git a/remoting/protocol/third_party_client_authenticator.h b/remoting/protocol/third_party_client_authenticator.h index 90deaa56..478e05ec 100644 --- a/remoting/protocol/third_party_client_authenticator.h +++ b/remoting/protocol/third_party_client_authenticator.h
@@ -34,6 +34,11 @@ ThirdPartyClientAuthenticator( const CreateBaseAuthenticatorCallback& create_base_authenticator_callback, const FetchThirdPartyTokenCallback& fetch_token_callback); + + ThirdPartyClientAuthenticator(const ThirdPartyClientAuthenticator&) = delete; + ThirdPartyClientAuthenticator& operator=( + const ThirdPartyClientAuthenticator&) = delete; + ~ThirdPartyClientAuthenticator() override; protected: @@ -53,8 +58,6 @@ std::string token_; base::WeakPtrFactory<ThirdPartyClientAuthenticator> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ThirdPartyClientAuthenticator); };
diff --git a/remoting/protocol/third_party_host_authenticator.h b/remoting/protocol/third_party_host_authenticator.h index 57d292c2..414fefb 100644 --- a/remoting/protocol/third_party_host_authenticator.h +++ b/remoting/protocol/third_party_host_authenticator.h
@@ -32,6 +32,11 @@ ThirdPartyHostAuthenticator( const CreateBaseAuthenticatorCallback& create_base_authenticator_callback, std::unique_ptr<TokenValidator> token_validator); + + ThirdPartyHostAuthenticator(const ThirdPartyHostAuthenticator&) = delete; + ThirdPartyHostAuthenticator& operator=(const ThirdPartyHostAuthenticator&) = + delete; + ~ThirdPartyHostAuthenticator() override; protected: @@ -48,8 +53,6 @@ CreateBaseAuthenticatorCallback create_base_authenticator_callback_; std::unique_ptr<TokenValidator> token_validator_; - - DISALLOW_COPY_AND_ASSIGN(ThirdPartyHostAuthenticator); }; } // namespace protocol
diff --git a/remoting/protocol/v2_authenticator.h b/remoting/protocol/v2_authenticator.h index d78cb40..8b7fde7 100644 --- a/remoting/protocol/v2_authenticator.h +++ b/remoting/protocol/v2_authenticator.h
@@ -36,6 +36,9 @@ const std::string& shared_secret, State initial_state); + V2Authenticator(const V2Authenticator&) = delete; + V2Authenticator& operator=(const V2Authenticator&) = delete; + ~V2Authenticator() override; // Authenticator interface. @@ -75,8 +78,6 @@ RejectionReason rejection_reason_; base::queue<std::string> pending_messages_; std::string auth_key_; - - DISALLOW_COPY_AND_ASSIGN(V2Authenticator); }; } // namespace protocol
diff --git a/remoting/protocol/v2_authenticator_unittest.cc b/remoting/protocol/v2_authenticator_unittest.cc index 4ac0d48..5c504af 100644 --- a/remoting/protocol/v2_authenticator_unittest.cc +++ b/remoting/protocol/v2_authenticator_unittest.cc
@@ -37,6 +37,10 @@ class V2AuthenticatorTest : public AuthenticatorTestBase { public: V2AuthenticatorTest() = default; + + V2AuthenticatorTest(const V2AuthenticatorTest&) = delete; + V2AuthenticatorTest& operator=(const V2AuthenticatorTest&) = delete; + ~V2AuthenticatorTest() override = default; protected: @@ -48,8 +52,6 @@ client_ = V2Authenticator::CreateForClient( client_secret, Authenticator::MESSAGE_READY); } - - DISALLOW_COPY_AND_ASSIGN(V2AuthenticatorTest); }; TEST_F(V2AuthenticatorTest, SuccessfulAuth) {
diff --git a/remoting/protocol/validating_authenticator.h b/remoting/protocol/validating_authenticator.h index 3801717..e5015e6 100644 --- a/remoting/protocol/validating_authenticator.h +++ b/remoting/protocol/validating_authenticator.h
@@ -40,6 +40,10 @@ ValidatingAuthenticator(const std::string& remote_jid, const ValidationCallback& validation_callback, std::unique_ptr<Authenticator> current_authenticator); + + ValidatingAuthenticator(const ValidatingAuthenticator&) = delete; + ValidatingAuthenticator& operator=(const ValidatingAuthenticator&) = delete; + ~ValidatingAuthenticator() override; // Authenticator interface. @@ -79,8 +83,6 @@ std::unique_ptr<jingle_xmpp::XmlElement> pending_auth_message_; base::WeakPtrFactory<ValidatingAuthenticator> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ValidatingAuthenticator); }; } // namespace protocol
diff --git a/remoting/protocol/validating_authenticator_unittest.cc b/remoting/protocol/validating_authenticator_unittest.cc index 1378c18..7a17881e 100644 --- a/remoting/protocol/validating_authenticator_unittest.cc +++ b/remoting/protocol/validating_authenticator_unittest.cc
@@ -46,6 +46,11 @@ class ValidatingAuthenticatorTest : public testing::Test { public: ValidatingAuthenticatorTest(); + + ValidatingAuthenticatorTest(const ValidatingAuthenticatorTest&) = delete; + ValidatingAuthenticatorTest& operator=(const ValidatingAuthenticatorTest&) = + delete; + ~ValidatingAuthenticatorTest() override; void ValidateCallback(const std::string& remote_jid, @@ -77,8 +82,6 @@ private: base::test::SingleThreadTaskEnvironment task_environment_; - - DISALLOW_COPY_AND_ASSIGN(ValidatingAuthenticatorTest); }; ValidatingAuthenticatorTest::ValidatingAuthenticatorTest() = default;
diff --git a/remoting/protocol/video_frame_pump.h b/remoting/protocol/video_frame_pump.h index ebd57815..95b174a0 100644 --- a/remoting/protocol/video_frame_pump.h +++ b/remoting/protocol/video_frame_pump.h
@@ -77,6 +77,10 @@ std::unique_ptr<webrtc::DesktopCapturer> capturer, std::unique_ptr<VideoEncoder> encoder, protocol::VideoStub* video_stub); + + VideoFramePump(const VideoFramePump&) = delete; + VideoFramePump& operator=(const VideoFramePump&) = delete; + ~VideoFramePump() override; // VideoStream interface. @@ -185,8 +189,6 @@ base::ThreadChecker thread_checker_; base::WeakPtrFactory<VideoFramePump> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(VideoFramePump); }; } // namespace protocol
diff --git a/remoting/protocol/video_frame_pump_unittest.cc b/remoting/protocol/video_frame_pump_unittest.cc index 911d42a..1ab40c2 100644 --- a/remoting/protocol/video_frame_pump_unittest.cc +++ b/remoting/protocol/video_frame_pump_unittest.cc
@@ -79,6 +79,10 @@ scoped_refptr<base::SingleThreadTaskRunner> task_runner) : task_runner_(task_runner) { } + + ThreadCheckVideoEncoder(const ThreadCheckVideoEncoder&) = delete; + ThreadCheckVideoEncoder& operator=(const ThreadCheckVideoEncoder&) = delete; + ~ThreadCheckVideoEncoder() override { EXPECT_TRUE(task_runner_->BelongsToCurrentThread()); } @@ -90,8 +94,6 @@ private: scoped_refptr<base::SingleThreadTaskRunner> task_runner_; - - DISALLOW_COPY_AND_ASSIGN(ThreadCheckVideoEncoder); }; class ThreadCheckDesktopCapturer : public webrtc::DesktopCapturer { @@ -99,6 +101,11 @@ ThreadCheckDesktopCapturer( scoped_refptr<base::SingleThreadTaskRunner> task_runner) : task_runner_(task_runner), callback_(nullptr) {} + + ThreadCheckDesktopCapturer(const ThreadCheckDesktopCapturer&) = delete; + ThreadCheckDesktopCapturer& operator=(const ThreadCheckDesktopCapturer&) = + delete; + ~ThreadCheckDesktopCapturer() override { EXPECT_TRUE(task_runner_->BelongsToCurrentThread()); } @@ -135,8 +142,6 @@ private: scoped_refptr<base::SingleThreadTaskRunner> task_runner_; webrtc::DesktopCapturer::Callback* callback_; - - DISALLOW_COPY_AND_ASSIGN(ThreadCheckDesktopCapturer); }; class VideoFramePumpTest : public testing::Test {
diff --git a/remoting/protocol/webrtc_audio_source_adapter.h b/remoting/protocol/webrtc_audio_source_adapter.h index 248d4ca3..4e6dd3d5 100644 --- a/remoting/protocol/webrtc_audio_source_adapter.h +++ b/remoting/protocol/webrtc_audio_source_adapter.h
@@ -26,6 +26,10 @@ public: explicit WebrtcAudioSourceAdapter( scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner); + + WebrtcAudioSourceAdapter(const WebrtcAudioSourceAdapter&) = delete; + WebrtcAudioSourceAdapter& operator=(const WebrtcAudioSourceAdapter&) = delete; + ~WebrtcAudioSourceAdapter() override; void Start(std::unique_ptr<AudioSource> audio_source); @@ -50,8 +54,6 @@ // Core running on |audio_task_runner_|. std::unique_ptr<Core> core_; - - DISALLOW_COPY_AND_ASSIGN(WebrtcAudioSourceAdapter); }; } // namespace protocol
diff --git a/remoting/protocol/webrtc_audio_stream.h b/remoting/protocol/webrtc_audio_stream.h index 0865f01..ddf9a8e 100644 --- a/remoting/protocol/webrtc_audio_stream.h +++ b/remoting/protocol/webrtc_audio_stream.h
@@ -30,6 +30,10 @@ class WebrtcAudioStream : public AudioStream { public: WebrtcAudioStream(); + + WebrtcAudioStream(const WebrtcAudioStream&) = delete; + WebrtcAudioStream& operator=(const WebrtcAudioStream&) = delete; + ~WebrtcAudioStream() override; void Start(scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner, @@ -43,8 +47,6 @@ scoped_refptr<WebrtcAudioSourceAdapter> source_adapter_; scoped_refptr<webrtc::PeerConnectionInterface> peer_connection_; - - DISALLOW_COPY_AND_ASSIGN(WebrtcAudioStream); }; } // namespace protocol
diff --git a/remoting/protocol/webrtc_connection_to_client.h b/remoting/protocol/webrtc_connection_to_client.h index 75ac49f..3e28adad 100644 --- a/remoting/protocol/webrtc_connection_to_client.h +++ b/remoting/protocol/webrtc_connection_to_client.h
@@ -36,6 +36,10 @@ scoped_refptr<protocol::TransportContext> transport_context, scoped_refptr<base::SingleThreadTaskRunner> video_encode_task_runner, scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner); + + WebrtcConnectionToClient(const WebrtcConnectionToClient&) = delete; + WebrtcConnectionToClient& operator=(const WebrtcConnectionToClient&) = delete; + ~WebrtcConnectionToClient() override; // ConnectionToClient interface. @@ -98,8 +102,6 @@ std::unique_ptr<HostControlDispatcher> control_dispatcher_; std::unique_ptr<HostEventDispatcher> event_dispatcher_; base::WeakPtrFactory<WebrtcConnectionToClient> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(WebrtcConnectionToClient); }; } // namespace protocol
diff --git a/remoting/protocol/webrtc_connection_to_host.h b/remoting/protocol/webrtc_connection_to_host.h index 4924928..1c826f0a 100644 --- a/remoting/protocol/webrtc_connection_to_host.h +++ b/remoting/protocol/webrtc_connection_to_host.h
@@ -33,6 +33,10 @@ public ChannelDispatcherBase::EventHandler { public: WebrtcConnectionToHost(); + + WebrtcConnectionToHost(const WebrtcConnectionToHost&) = delete; + WebrtcConnectionToHost& operator=(const WebrtcConnectionToHost&) = delete; + ~WebrtcConnectionToHost() override; // ConnectionToHost interface. @@ -110,8 +114,6 @@ // Internal state of the connection. State state_ = INITIALIZING; ErrorCode error_ = OK; - - DISALLOW_COPY_AND_ASSIGN(WebrtcConnectionToHost); }; } // namespace protocol
diff --git a/remoting/protocol/webrtc_data_stream_adapter.h b/remoting/protocol/webrtc_data_stream_adapter.h index ce98c15e..df506db 100644 --- a/remoting/protocol/webrtc_data_stream_adapter.h +++ b/remoting/protocol/webrtc_data_stream_adapter.h
@@ -25,6 +25,10 @@ public: explicit WebrtcDataStreamAdapter( rtc::scoped_refptr<webrtc::DataChannelInterface> channel); + + WebrtcDataStreamAdapter(const WebrtcDataStreamAdapter&) = delete; + WebrtcDataStreamAdapter& operator=(const WebrtcDataStreamAdapter&) = delete; + ~WebrtcDataStreamAdapter() override; std::string name() { return channel_->label(); } @@ -74,8 +78,6 @@ base::queue<PendingMessage> pending_messages_; base::WeakPtrFactory<WebrtcDataStreamAdapter> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(WebrtcDataStreamAdapter); }; } // namespace protocol
diff --git a/remoting/protocol/webrtc_transport.cc b/remoting/protocol/webrtc_transport.cc index e01a8dad6..ef6a417f 100644 --- a/remoting/protocol/webrtc_transport.cc +++ b/remoting/protocol/webrtc_transport.cc
@@ -325,6 +325,9 @@ thread_join_watchdog_ = std::make_unique<ThreadJoinWatchdog>(); } + PeerConnectionWrapper(const PeerConnectionWrapper&) = delete; + PeerConnectionWrapper& operator=(const PeerConnectionWrapper&) = delete; + ~PeerConnectionWrapper() override { thread_join_watchdog_->Arm(); @@ -426,8 +429,6 @@ base::OnceClosure before_disarm_thread_join_watchdog_callback_; base::WeakPtr<WebrtcTransport> transport_; - - DISALLOW_COPY_AND_ASSIGN(PeerConnectionWrapper); }; WebrtcTransport::WebrtcTransport(
diff --git a/remoting/protocol/webrtc_transport.h b/remoting/protocol/webrtc_transport.h index 09a72c07..a7e62b6 100644 --- a/remoting/protocol/webrtc_transport.h +++ b/remoting/protocol/webrtc_transport.h
@@ -90,6 +90,10 @@ scoped_refptr<TransportContext> transport_context, std::unique_ptr<webrtc::VideoEncoderFactory> video_encoder_factory, EventHandler* event_handler); + + WebrtcTransport(const WebrtcTransport&) = delete; + WebrtcTransport& operator=(const WebrtcTransport&) = delete; + ~WebrtcTransport() override; webrtc::PeerConnectionInterface* peer_connection(); @@ -271,8 +275,6 @@ WebrtcEventLogData rtc_event_log_; base::WeakPtrFactory<WebrtcTransport> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(WebrtcTransport); }; } // namespace protocol
diff --git a/remoting/protocol/webrtc_transport_unittest.cc b/remoting/protocol/webrtc_transport_unittest.cc index d7f54f65..7f6a0418 100644 --- a/remoting/protocol/webrtc_transport_unittest.cc +++ b/remoting/protocol/webrtc_transport_unittest.cc
@@ -52,6 +52,11 @@ IncomingChannelCallback; TestTransportEventHandler() = default; + + TestTransportEventHandler(const TestTransportEventHandler&) = delete; + TestTransportEventHandler& operator=(const TestTransportEventHandler&) = + delete; + ~TestTransportEventHandler() override = default; // All callbacks must be set before the test handler is passed to a Transport @@ -102,13 +107,16 @@ base::RepeatingClosure connected_callback_; ErrorCallback error_callback_; IncomingChannelCallback incoming_channel_callback_; - - DISALLOW_COPY_AND_ASSIGN(TestTransportEventHandler); }; class TestMessagePipeEventHandler : public MessagePipe::EventHandler { public: TestMessagePipeEventHandler() = default; + + TestMessagePipeEventHandler(const TestMessagePipeEventHandler&) = delete; + TestMessagePipeEventHandler& operator=(const TestMessagePipeEventHandler&) = + delete; + ~TestMessagePipeEventHandler() override = default; void set_open_callback(const base::RepeatingClosure& callback) { @@ -152,8 +160,6 @@ base::RepeatingClosure closed_callback_; std::list<std::unique_ptr<CompoundBuffer>> received_messages_; - - DISALLOW_COPY_AND_ASSIGN(TestMessagePipeEventHandler); }; class FakeThreadJoinWatchdog : public base::Watchdog {
diff --git a/remoting/protocol/webrtc_video_renderer_adapter.h b/remoting/protocol/webrtc_video_renderer_adapter.h index 5ad91510..fec28e37 100644 --- a/remoting/protocol/webrtc_video_renderer_adapter.h +++ b/remoting/protocol/webrtc_video_renderer_adapter.h
@@ -40,6 +40,11 @@ public: WebrtcVideoRendererAdapter(const std::string& label, VideoRenderer* video_renderer); + + WebrtcVideoRendererAdapter(const WebrtcVideoRendererAdapter&) = delete; + WebrtcVideoRendererAdapter& operator=(const WebrtcVideoRendererAdapter&) = + delete; + ~WebrtcVideoRendererAdapter() override; std::string label() const { return label_; } @@ -81,8 +86,6 @@ std::list<std::pair<uint32_t, HostFrameStats>> host_stats_queue_; base::WeakPtrFactory<WebrtcVideoRendererAdapter> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(WebrtcVideoRendererAdapter); }; } // namespace remoting
diff --git a/remoting/protocol/webrtc_video_stream.h b/remoting/protocol/webrtc_video_stream.h index 99ef48d..a86a3e2 100644 --- a/remoting/protocol/webrtc_video_stream.h +++ b/remoting/protocol/webrtc_video_stream.h
@@ -45,6 +45,10 @@ public VideoChannelStateObserver { public: explicit WebrtcVideoStream(const SessionOptions& options); + + WebrtcVideoStream(const WebrtcVideoStream&) = delete; + WebrtcVideoStream& operator=(const WebrtcVideoStream&) = delete; + ~WebrtcVideoStream() override; void Start(std::unique_ptr<webrtc::DesktopCapturer> desktop_capturer, @@ -147,8 +151,6 @@ bool recreate_encoder_ = false; base::WeakPtrFactory<WebrtcVideoStream> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(WebrtcVideoStream); }; } // namespace protocol
diff --git a/remoting/signaling/delegating_signal_strategy.h b/remoting/signaling/delegating_signal_strategy.h index 80462f59..cbd25c2f 100644 --- a/remoting/signaling/delegating_signal_strategy.h +++ b/remoting/signaling/delegating_signal_strategy.h
@@ -39,6 +39,10 @@ const SignalingAddress& local_address, scoped_refptr<base::SingleThreadTaskRunner> client_task_runner, const IqCallback& send_iq_callback); + + DelegatingSignalStrategy(const DelegatingSignalStrategy&) = delete; + DelegatingSignalStrategy& operator=(const DelegatingSignalStrategy&) = delete; + ~DelegatingSignalStrategy() override; IqCallback GetIncomingMessageCallback(); @@ -73,8 +77,6 @@ base::ObserverList<Listener> listeners_; base::WeakPtrFactory<DelegatingSignalStrategy> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DelegatingSignalStrategy); }; } // namespace remoting
diff --git a/remoting/signaling/fake_signal_strategy.h b/remoting/signaling/fake_signal_strategy.h index 70d11e5..b81cb087 100644 --- a/remoting/signaling/fake_signal_strategy.h +++ b/remoting/signaling/fake_signal_strategy.h
@@ -34,6 +34,10 @@ static void Connect(FakeSignalStrategy* peer1, FakeSignalStrategy* peer2); FakeSignalStrategy(const SignalingAddress& address); + + FakeSignalStrategy(const FakeSignalStrategy&) = delete; + FakeSignalStrategy& operator=(const FakeSignalStrategy&) = delete; + ~FakeSignalStrategy() override; const std::vector<std::unique_ptr<jingle_xmpp::XmlElement>>& received_messages() { @@ -115,8 +119,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<FakeSignalStrategy> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeSignalStrategy); }; } // namespace remoting
diff --git a/remoting/signaling/ftl_message_reception_channel.h b/remoting/signaling/ftl_message_reception_channel.h index 22d948b..c56754b 100644 --- a/remoting/signaling/ftl_message_reception_channel.h +++ b/remoting/signaling/ftl_message_reception_channel.h
@@ -27,6 +27,11 @@ // |signaling_tracker| is nullable. explicit FtlMessageReceptionChannel(SignalingTracker* signaling_tracker); + + FtlMessageReceptionChannel(const FtlMessageReceptionChannel&) = delete; + FtlMessageReceptionChannel& operator=(const FtlMessageReceptionChannel&) = + delete; + ~FtlMessageReceptionChannel() override; // MessageReceptionChannel implementations. @@ -79,7 +84,6 @@ SignalingTracker* signaling_tracker_; // nullable. base::WeakPtrFactory<FtlMessageReceptionChannel> weak_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(FtlMessageReceptionChannel); }; } // namespace remoting
diff --git a/remoting/signaling/ftl_message_reception_channel_unittest.cc b/remoting/signaling/ftl_message_reception_channel_unittest.cc index 0a20360..67e6c13 100644 --- a/remoting/signaling/ftl_message_reception_channel_unittest.cc +++ b/remoting/signaling/ftl_message_reception_channel_unittest.cc
@@ -51,6 +51,11 @@ public: FakeScopedProtobufHttpRequest() : ScopedProtobufHttpRequest(base::DoNothing::Once()) {} + + FakeScopedProtobufHttpRequest(const FakeScopedProtobufHttpRequest&) = delete; + FakeScopedProtobufHttpRequest& operator=( + const FakeScopedProtobufHttpRequest&) = delete; + ~FakeScopedProtobufHttpRequest() override = default; base::WeakPtr<FakeScopedProtobufHttpRequest> GetWeakPtr() { @@ -59,7 +64,6 @@ private: base::WeakPtrFactory<FakeScopedProtobufHttpRequest> weak_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(FakeScopedProtobufHttpRequest); }; std::unique_ptr<FakeScopedProtobufHttpRequest> CreateFakeServerStream() {
diff --git a/remoting/signaling/ftl_messaging_client.h b/remoting/signaling/ftl_messaging_client.h index c8b3b5a..20fccaad 100644 --- a/remoting/signaling/ftl_messaging_client.h +++ b/remoting/signaling/ftl_messaging_client.h
@@ -46,6 +46,10 @@ scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory, RegistrationManager* registration_manager, SignalingTracker* signaling_tracker = nullptr); + + FtlMessagingClient(const FtlMessagingClient&) = delete; + FtlMessagingClient& operator=(const FtlMessagingClient&) = delete; + ~FtlMessagingClient() override; // MessagingClient implementations. @@ -101,8 +105,6 @@ std::unique_ptr<MessageReceptionChannel> reception_channel_; MessageCallbackList callback_list_; MessageTracker message_tracker_; - - DISALLOW_COPY_AND_ASSIGN(FtlMessagingClient); }; } // namespace remoting
diff --git a/remoting/signaling/ftl_messaging_client_unittest.cc b/remoting/signaling/ftl_messaging_client_unittest.cc index 792dae12..7a00273 100644 --- a/remoting/signaling/ftl_messaging_client_unittest.cc +++ b/remoting/signaling/ftl_messaging_client_unittest.cc
@@ -100,6 +100,11 @@ class MockMessageReceptionChannel : public MessageReceptionChannel { public: MockMessageReceptionChannel() = default; + + MockMessageReceptionChannel(const MockMessageReceptionChannel&) = delete; + MockMessageReceptionChannel& operator=(const MockMessageReceptionChannel&) = + delete; + ~MockMessageReceptionChannel() override = default; // MessageReceptionChannel implementations. @@ -120,8 +125,6 @@ private: StreamOpener stream_opener_; MessageCallback on_incoming_msg_; - - DISALLOW_COPY_AND_ASSIGN(MockMessageReceptionChannel); }; class MockRegistrationManager : public RegistrationManager {
diff --git a/remoting/signaling/ftl_registration_manager.cc b/remoting/signaling/ftl_registration_manager.cc index b1c9ce6..f6730ee 100644 --- a/remoting/signaling/ftl_registration_manager.cc +++ b/remoting/signaling/ftl_registration_manager.cc
@@ -72,6 +72,10 @@ RegistrationClientImpl( OAuthTokenGetter* token_getter, scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory); + + RegistrationClientImpl(const RegistrationClientImpl&) = delete; + RegistrationClientImpl& operator=(const RegistrationClientImpl&) = delete; + ~RegistrationClientImpl() override; // RegistrationClient implementations. @@ -81,8 +85,6 @@ private: ProtobufHttpClient http_client_; - - DISALLOW_COPY_AND_ASSIGN(RegistrationClientImpl); }; FtlRegistrationManager::RegistrationClientImpl::RegistrationClientImpl(
diff --git a/remoting/signaling/ftl_registration_manager.h b/remoting/signaling/ftl_registration_manager.h index 5dc02323..661283af 100644 --- a/remoting/signaling/ftl_registration_manager.h +++ b/remoting/signaling/ftl_registration_manager.h
@@ -39,6 +39,10 @@ OAuthTokenGetter* token_getter, scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory, std::unique_ptr<FtlDeviceIdProvider> device_id_provider); + + FtlRegistrationManager(const FtlRegistrationManager&) = delete; + FtlRegistrationManager& operator=(const FtlRegistrationManager&) = delete; + ~FtlRegistrationManager() override; // RegistrationManager implementations. @@ -80,8 +84,6 @@ std::string registration_id_; std::string ftl_auth_token_; net::BackoffEntry sign_in_backoff_; - - DISALLOW_COPY_AND_ASSIGN(FtlRegistrationManager); }; } // namespace remoting
diff --git a/remoting/signaling/ftl_signal_strategy.cc b/remoting/signaling/ftl_signal_strategy.cc index f4d131a..9029f3a0 100644 --- a/remoting/signaling/ftl_signal_strategy.cc +++ b/remoting/signaling/ftl_signal_strategy.cc
@@ -33,6 +33,10 @@ Core(std::unique_ptr<OAuthTokenGetter> oauth_token_getter, std::unique_ptr<RegistrationManager> registration_manager, std::unique_ptr<MessagingClient> messaging_client); + + Core(const Core&) = delete; + Core& operator=(const Core&) = delete; + ~Core(); void Connect(); @@ -92,7 +96,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<Core> weak_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(Core); }; FtlSignalStrategy::Core::Core(
diff --git a/remoting/signaling/ftl_signal_strategy.h b/remoting/signaling/ftl_signal_strategy.h index 57e904c0..b2c2b02 100644 --- a/remoting/signaling/ftl_signal_strategy.h +++ b/remoting/signaling/ftl_signal_strategy.h
@@ -37,6 +37,9 @@ std::unique_ptr<FtlDeviceIdProvider> device_id_provider, SignalingTracker* signaling_tracker = nullptr); + FtlSignalStrategy(const FtlSignalStrategy&) = delete; + FtlSignalStrategy& operator=(const FtlSignalStrategy&) = delete; + // Note that pending outgoing messages will be silently dropped when the // signal strategy is being deleted. If you want to send last minute messages, // consider calling Disconnect() then posting a delayed task to delete the @@ -73,8 +76,6 @@ class Core; std::unique_ptr<Core> core_; - - DISALLOW_COPY_AND_ASSIGN(FtlSignalStrategy); }; } // namespace remoting
diff --git a/remoting/signaling/iq_sender.h b/remoting/signaling/iq_sender.h index 54746ca..0336f6f 100644 --- a/remoting/signaling/iq_sender.h +++ b/remoting/signaling/iq_sender.h
@@ -39,6 +39,10 @@ const jingle_xmpp::XmlElement* response)>; explicit IqSender(SignalStrategy* signal_strategy); + + IqSender(const IqSender&) = delete; + IqSender& operator=(const IqSender&) = delete; + ~IqSender() override; // Send an iq stanza. Returns an IqRequest object that represends @@ -76,8 +80,6 @@ SignalStrategy* signal_strategy_; IqRequestMap requests_; - - DISALLOW_COPY_AND_ASSIGN(IqSender); }; // This call must only be used on the thread it was created on. @@ -86,6 +88,10 @@ IqRequest(IqSender* sender, IqSender::ReplyCallback callback, const std::string& addressee); + + IqRequest(const IqRequest&) = delete; + IqRequest& operator=(const IqRequest&) = delete; + ~IqRequest(); // Sets timeout for the request. When the timeout expires the @@ -108,8 +114,6 @@ std::string addressee_; base::WeakPtrFactory<IqRequest> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(IqRequest); }; } // namespace remoting
diff --git a/remoting/signaling/message_reception_channel.h b/remoting/signaling/message_reception_channel.h index a7bf4bfd..8e1cefc 100644 --- a/remoting/signaling/message_reception_channel.h +++ b/remoting/signaling/message_reception_channel.h
@@ -34,6 +34,10 @@ base::OnceCallback<void(const ProtobufHttpStatus& status)>; MessageReceptionChannel() = default; + + MessageReceptionChannel(const MessageReceptionChannel&) = delete; + MessageReceptionChannel& operator=(const MessageReceptionChannel&) = delete; + virtual ~MessageReceptionChannel() = default; virtual void Initialize(const StreamOpener& stream_opener, @@ -54,9 +58,6 @@ // Returns true if the streaming channel is open. virtual bool IsReceivingMessages() const = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(MessageReceptionChannel); }; } // namespace remoting
diff --git a/remoting/signaling/message_tracker.h b/remoting/signaling/message_tracker.h index 02d967f6..909a3fe2 100644 --- a/remoting/signaling/message_tracker.h +++ b/remoting/signaling/message_tracker.h
@@ -19,6 +19,10 @@ class MessageTracker final { public: MessageTracker(); + + MessageTracker(const MessageTracker&) = delete; + MessageTracker& operator=(const MessageTracker&) = delete; + ~MessageTracker(); // Tracks |id|. If |id| is already tracked then it will update its tracking @@ -42,7 +46,6 @@ std::map<std::string, base::Time> tracked_ids_; base::OneShotTimer cleanup_timer_; - DISALLOW_COPY_AND_ASSIGN(MessageTracker); }; } // namespace remoting
diff --git a/remoting/signaling/remoting_log_to_server.cc b/remoting/signaling/remoting_log_to_server.cc index c0a35b86d..5e2d535 100644 --- a/remoting/signaling/remoting_log_to_server.cc +++ b/remoting/signaling/remoting_log_to_server.cc
@@ -82,6 +82,10 @@ TelemetryClient( OAuthTokenGetter* token_getter, scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory); + + TelemetryClient(const TelemetryClient&) = delete; + TelemetryClient& operator=(const TelemetryClient&) = delete; + ~TelemetryClient(); void CreateLogEntry(const apis::v1::CreateLogEntryRequest& request, @@ -89,7 +93,6 @@ private: ProtobufHttpClient http_client_; - DISALLOW_COPY_AND_ASSIGN(TelemetryClient); }; TelemetryClient::TelemetryClient(
diff --git a/remoting/signaling/remoting_log_to_server.h b/remoting/signaling/remoting_log_to_server.h index 8d21f15..c4fc318 100644 --- a/remoting/signaling/remoting_log_to_server.h +++ b/remoting/signaling/remoting_log_to_server.h
@@ -38,6 +38,10 @@ ServerLogEntry::Mode mode, std::unique_ptr<OAuthTokenGetter> token_getter, scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory); + + RemotingLogToServer(const RemotingLogToServer&) = delete; + RemotingLogToServer& operator=(const RemotingLogToServer&) = delete; + ~RemotingLogToServer() override; // LogToServer interface. @@ -76,8 +80,6 @@ CreateLogEntryCallback create_log_entry_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(RemotingLogToServer); }; } // namespace remoting
diff --git a/remoting/signaling/signal_strategy.h b/remoting/signaling/signal_strategy.h index 4eadcad..ff03b1d 100644 --- a/remoting/signaling/signal_strategy.h +++ b/remoting/signaling/signal_strategy.h
@@ -80,6 +80,10 @@ }; SignalStrategy() {} + + SignalStrategy(const SignalStrategy&) = delete; + SignalStrategy& operator=(const SignalStrategy&) = delete; + virtual ~SignalStrategy() {} // Starts connection attempt. If connection is currently active @@ -124,9 +128,6 @@ // to sign in. You can get back the actual error by calling GetError(). // The default implementation always returns false. virtual bool IsSignInError() const; - - private: - DISALLOW_COPY_AND_ASSIGN(SignalStrategy); }; } // namespace remoting
diff --git a/remoting/signaling/xmpp_log_to_server.h b/remoting/signaling/xmpp_log_to_server.h index 98cf5ed..b62915f 100644 --- a/remoting/signaling/xmpp_log_to_server.h +++ b/remoting/signaling/xmpp_log_to_server.h
@@ -37,6 +37,10 @@ SignalStrategy* signal_strategy, const std::string& directory_bot_jid, scoped_refptr<base::SequencedTaskRunner> caller_task_runner = {}); + + XmppLogToServer(const XmppLogToServer&) = delete; + XmppLogToServer& operator=(const XmppLogToServer&) = delete; + ~XmppLogToServer() override; // SignalStrategy::Listener interface. @@ -62,7 +66,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<XmppLogToServer> weak_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(XmppLogToServer); }; } // namespace remoting
diff --git a/remoting/test/fake_connection_event_logger.h b/remoting/test/fake_connection_event_logger.h index f7724e7..ff39e1a 100644 --- a/remoting/test/fake_connection_event_logger.h +++ b/remoting/test/fake_connection_event_logger.h
@@ -22,6 +22,11 @@ public: explicit FakeConnectionEventLogger( protocol::FakeConnectionToClient* connection = nullptr); + + FakeConnectionEventLogger(const FakeConnectionEventLogger&) = delete; + FakeConnectionEventLogger& operator=(const FakeConnectionEventLogger&) = + delete; + virtual ~FakeConnectionEventLogger(); protocol::ClientStub* client_stub(); @@ -41,9 +46,6 @@ std::unique_ptr<CounterHostStub> host_stub_; std::unique_ptr<CounterAudioStub> audio_stub_; std::unique_ptr<CounterVideoStub> video_stub_; - - // Counter*Stub are not copyable and assignable. - DISALLOW_COPY_AND_ASSIGN(FakeConnectionEventLogger); }; } // namespace test
diff --git a/remoting/test/fake_ice_connection.h b/remoting/test/fake_ice_connection.h index a7421ec..807976a 100644 --- a/remoting/test/fake_ice_connection.h +++ b/remoting/test/fake_ice_connection.h
@@ -18,6 +18,10 @@ public: FakeIceConnection(scoped_refptr<protocol::TransportContext> transport_context, base::OnceClosure on_closed); + + FakeIceConnection(const FakeIceConnection&) = delete; + FakeIceConnection& operator=(const FakeIceConnection&) = delete; + ~FakeIceConnection() override; void OnAuthenticated(); @@ -41,7 +45,6 @@ std::unique_ptr<protocol::IceTransport> transport_; std::unique_ptr<protocol::ChannelDispatcherBase> control_dispatcher_; base::OnceClosure on_closed_; - DISALLOW_COPY_AND_ASSIGN(FakeIceConnection); }; } // namespace test
diff --git a/remoting/test/fake_port_allocator.cc b/remoting/test/fake_port_allocator.cc index 618a55e..52cb1db 100644 --- a/remoting/test/fake_port_allocator.cc +++ b/remoting/test/fake_port_allocator.cc
@@ -24,10 +24,11 @@ int component, const std::string& ice_username_fragment, const std::string& ice_password); - ~FakePortAllocatorSession() override; - private: - DISALLOW_COPY_AND_ASSIGN(FakePortAllocatorSession); + FakePortAllocatorSession(const FakePortAllocatorSession&) = delete; + FakePortAllocatorSession& operator=(const FakePortAllocatorSession&) = delete; + + ~FakePortAllocatorSession() override; }; FakePortAllocatorSession::FakePortAllocatorSession(
diff --git a/remoting/test/fake_port_allocator.h b/remoting/test/fake_port_allocator.h index 73b7cfd..44ceffcf 100644 --- a/remoting/test/fake_port_allocator.h +++ b/remoting/test/fake_port_allocator.h
@@ -24,6 +24,10 @@ rtc::NetworkManager* network_manager, rtc::PacketSocketFactory* socket_factory, scoped_refptr<protocol::TransportContext> transport_context_); + + FakePortAllocator(const FakePortAllocator&) = delete; + FakePortAllocator& operator=(const FakePortAllocator&) = delete; + ~FakePortAllocator() override; // cricket::BasicPortAllocator overrides. @@ -35,14 +39,16 @@ private: scoped_refptr<protocol::TransportContext> transport_context_; - - DISALLOW_COPY_AND_ASSIGN(FakePortAllocator); }; class FakePortAllocatorFactory : public protocol::PortAllocatorFactory { public: FakePortAllocatorFactory( scoped_refptr<FakeNetworkDispatcher> fake_network_dispatcher); + + FakePortAllocatorFactory(const FakePortAllocatorFactory&) = delete; + FakePortAllocatorFactory& operator=(const FakePortAllocatorFactory&) = delete; + ~FakePortAllocatorFactory() override; FakePacketSocketFactory* socket_factory() { return socket_factory_.get(); } @@ -56,8 +62,6 @@ private: std::unique_ptr<rtc::NetworkManager> network_manager_; std::unique_ptr<FakePacketSocketFactory> socket_factory_; - - DISALLOW_COPY_AND_ASSIGN(FakePortAllocatorFactory); }; } // namespace remoting
diff --git a/remoting/test/fake_socket_factory.cc b/remoting/test/fake_socket_factory.cc index f51f133..b4d9457 100644 --- a/remoting/test/fake_socket_factory.cc +++ b/remoting/test/fake_socket_factory.cc
@@ -48,6 +48,10 @@ FakeUdpSocket(FakePacketSocketFactory* factory, scoped_refptr<FakeNetworkDispatcher> dispatcher, const rtc::SocketAddress& local_address); + + FakeUdpSocket(const FakeUdpSocket&) = delete; + FakeUdpSocket& operator=(const FakeUdpSocket&) = delete; + ~FakeUdpSocket() override; void ReceivePacket(const rtc::SocketAddress& from, @@ -77,8 +81,6 @@ scoped_refptr<FakeNetworkDispatcher> dispatcher_; rtc::SocketAddress local_address_; State state_; - - DISALLOW_COPY_AND_ASSIGN(FakeUdpSocket); }; FakeUdpSocket::FakeUdpSocket(FakePacketSocketFactory* factory,
diff --git a/remoting/test/fake_socket_factory.h b/remoting/test/fake_socket_factory.h index eb24f3f..c53a6ba 100644 --- a/remoting/test/fake_socket_factory.h +++ b/remoting/test/fake_socket_factory.h
@@ -28,6 +28,10 @@ public: // |dispatcher| must outlive the factory. explicit FakePacketSocketFactory(FakeNetworkDispatcher* dispatcher); + + FakePacketSocketFactory(const FakePacketSocketFactory&) = delete; + FakePacketSocketFactory& operator=(const FakePacketSocketFactory&) = delete; + ~FakePacketSocketFactory() override; void OnSocketDestroyed(int port); @@ -140,8 +144,6 @@ base::TimeDelta max_buffer_delay_; base::WeakPtrFactory<FakePacketSocketFactory> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakePacketSocketFactory); }; } // namespace remoting
diff --git a/remoting/test/fake_test_token_storage.h b/remoting/test/fake_test_token_storage.h index b7763e9..ce981d0 100644 --- a/remoting/test/fake_test_token_storage.h +++ b/remoting/test/fake_test_token_storage.h
@@ -18,6 +18,10 @@ class FakeTestTokenStorage : public TestTokenStorage { public: FakeTestTokenStorage(); + + FakeTestTokenStorage(const FakeTestTokenStorage&) = delete; + FakeTestTokenStorage& operator=(const FakeTestTokenStorage&) = delete; + ~FakeTestTokenStorage() override; // TestTokenStorage interface. @@ -54,8 +58,6 @@ // Verification members to observe the value of the data being written. bool refresh_token_write_attempted_; std::string stored_refresh_token_value_; - - DISALLOW_COPY_AND_ASSIGN(FakeTestTokenStorage); }; } // namespace test
diff --git a/remoting/test/fake_webrtc_connection.h b/remoting/test/fake_webrtc_connection.h index f7951d3..82ee38ae 100644 --- a/remoting/test/fake_webrtc_connection.h +++ b/remoting/test/fake_webrtc_connection.h
@@ -19,6 +19,10 @@ FakeWebrtcConnection( scoped_refptr<protocol::TransportContext> transport_context, base::OnceClosure on_closed); + + FakeWebrtcConnection(const FakeWebrtcConnection&) = delete; + FakeWebrtcConnection& operator=(const FakeWebrtcConnection&) = delete; + ~FakeWebrtcConnection() override; protocol::Transport* transport() { return transport_.get(); } @@ -41,7 +45,6 @@ std::unique_ptr<protocol::WebrtcTransport> transport_; base::OnceClosure on_closed_; - DISALLOW_COPY_AND_ASSIGN(FakeWebrtcConnection); }; } // namespace test
diff --git a/remoting/test/ftl_services_playground.h b/remoting/test/ftl_services_playground.h index 9c995a9..dfe4379 100644 --- a/remoting/test/ftl_services_playground.h +++ b/remoting/test/ftl_services_playground.h
@@ -31,6 +31,10 @@ class FtlServicesPlayground { public: FtlServicesPlayground(); + + FtlServicesPlayground(const FtlServicesPlayground&) = delete; + FtlServicesPlayground& operator=(const FtlServicesPlayground&) = delete; + ~FtlServicesPlayground(); bool ShouldPrintHelp(); @@ -77,7 +81,6 @@ base::OnceClosure receive_messages_done_callback_; base::WeakPtrFactory<FtlServicesPlayground> weak_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(FtlServicesPlayground); }; } // namespace remoting
diff --git a/remoting/test/ftl_signaling_playground.h b/remoting/test/ftl_signaling_playground.h index 7c5b310..8aef004 100644 --- a/remoting/test/ftl_signaling_playground.h +++ b/remoting/test/ftl_signaling_playground.h
@@ -36,6 +36,10 @@ public protocol::Session::EventHandler { public: FtlSignalingPlayground(); + + FtlSignalingPlayground(const FtlSignalingPlayground&) = delete; + FtlSignalingPlayground& operator=(const FtlSignalingPlayground&) = delete; + ~FtlSignalingPlayground() override; bool ShouldPrintHelp(); @@ -87,8 +91,6 @@ base::OnceClosure on_signaling_connected_callback_; base::OneShotTimer tear_down_timer_; - - DISALLOW_COPY_AND_ASSIGN(FtlSignalingPlayground); }; } // namespace remoting
diff --git a/remoting/test/it2me_cli_host.h b/remoting/test/it2me_cli_host.h index 9e54f0042..335d4d7c 100644 --- a/remoting/test/it2me_cli_host.h +++ b/remoting/test/it2me_cli_host.h
@@ -30,6 +30,10 @@ static void PrintHelp(); It2MeCliHost(); + + It2MeCliHost(const It2MeCliHost&) = delete; + It2MeCliHost& operator=(const It2MeCliHost&) = delete; + ~It2MeCliHost() override; void Start(); @@ -80,7 +84,6 @@ bool remote_connected_; base::WeakPtrFactory<It2MeCliHost> weak_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(It2MeCliHost); }; } // namespace remoting
diff --git a/remoting/test/protocol_perftest.cc b/remoting/test/protocol_perftest.cc index 8cf971e..759758d 100644 --- a/remoting/test/protocol_perftest.cc +++ b/remoting/test/protocol_perftest.cc
@@ -129,6 +129,9 @@ capture_thread_.task_runner()); } + ProtocolPerfTest(const ProtocolPerfTest&) = delete; + ProtocolPerfTest& operator=(const ProtocolPerfTest&) = delete; + virtual ~ProtocolPerfTest() { host_thread_.task_runner()->DeleteSoon(FROM_HERE, host_.release()); host_thread_.task_runner()->DeleteSoon(FROM_HERE, @@ -430,9 +433,6 @@ std::vector<protocol::FrameStats> frame_stats_; std::unique_ptr<net::NetworkChangeNotifier> network_change_notifier_; - - private: - DISALLOW_COPY_AND_ASSIGN(ProtocolPerfTest); }; INSTANTIATE_TEST_SUITE_P(
diff --git a/remoting/test/remote_connection_observer.h b/remoting/test/remote_connection_observer.h index 528debf..26c8464 100644 --- a/remoting/test/remote_connection_observer.h +++ b/remoting/test/remote_connection_observer.h
@@ -24,6 +24,10 @@ class RemoteConnectionObserver { public: RemoteConnectionObserver() {} + + RemoteConnectionObserver(const RemoteConnectionObserver&) = delete; + RemoteConnectionObserver& operator=(const RemoteConnectionObserver&) = delete; + virtual ~RemoteConnectionObserver() {} // Called when the connection state has changed. @@ -47,9 +51,6 @@ // Called when we have received an ExtensionMessage from the host. virtual void HostMessageReceived(const protocol::ExtensionMessage& message) {} - - private: - DISALLOW_COPY_AND_ASSIGN(RemoteConnectionObserver); }; } // namespace test
diff --git a/remoting/test/test_device_id_provider.h b/remoting/test/test_device_id_provider.h index 5d2f81b..a3d50f64 100644 --- a/remoting/test/test_device_id_provider.h +++ b/remoting/test/test_device_id_provider.h
@@ -28,6 +28,10 @@ }; explicit TestDeviceIdProvider(TokenStorage* token_storage); + + TestDeviceIdProvider(const TestDeviceIdProvider&) = delete; + TestDeviceIdProvider& operator=(const TestDeviceIdProvider&) = delete; + ~TestDeviceIdProvider() override; // FtlDeviceIdProvider implementations. @@ -35,7 +39,6 @@ private: TokenStorage* token_storage_; - DISALLOW_COPY_AND_ASSIGN(TestDeviceIdProvider); }; } // namespace test
diff --git a/remoting/test/test_oauth_token_getter.h b/remoting/test/test_oauth_token_getter.h index 7b2f90a..dd0cd062 100644 --- a/remoting/test/test_oauth_token_getter.h +++ b/remoting/test/test_oauth_token_getter.h
@@ -35,6 +35,10 @@ // |token_storage| must outlive |this|. explicit TestOAuthTokenGetter(TestTokenStorage* token_storage); + + TestOAuthTokenGetter(const TestOAuthTokenGetter&) = delete; + TestOAuthTokenGetter& operator=(const TestOAuthTokenGetter&) = delete; + ~TestOAuthTokenGetter() override; // Initializes the token getter and runs the authentication flow on the @@ -77,7 +81,6 @@ base::queue<base::OnceClosure> on_authentication_done_; base::WeakPtrFactory<TestOAuthTokenGetter> weak_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(TestOAuthTokenGetter); }; } // namespace test
diff --git a/remoting/test/test_token_storage.cc b/remoting/test/test_token_storage.cc index 812f3d2..58309ff1 100644 --- a/remoting/test/test_token_storage.cc +++ b/remoting/test/test_token_storage.cc
@@ -37,6 +37,10 @@ public: TestTokenStorageOnDisk(const std::string& user_name, const base::FilePath& tokens_file_path); + + TestTokenStorageOnDisk(const TestTokenStorageOnDisk&) = delete; + TestTokenStorageOnDisk& operator=(const TestTokenStorageOnDisk&) = delete; + ~TestTokenStorageOnDisk() override; // TestTokenStorage interface. @@ -62,8 +66,6 @@ // Path used to retrieve the tokens file. base::FilePath file_path_; - - DISALLOW_COPY_AND_ASSIGN(TestTokenStorageOnDisk); }; TestTokenStorageOnDisk::TestTokenStorageOnDisk(const std::string& user_name,
diff --git a/remoting/test/video_frame_writer.h b/remoting/test/video_frame_writer.h index afedab2b..128a66e 100644 --- a/remoting/test/video_frame_writer.h +++ b/remoting/test/video_frame_writer.h
@@ -24,6 +24,10 @@ class VideoFrameWriter { public: VideoFrameWriter(); + + VideoFrameWriter(const VideoFrameWriter&) = delete; + VideoFrameWriter& operator=(const VideoFrameWriter&) = delete; + ~VideoFrameWriter(); // Save video frame to a local path. @@ -57,8 +61,6 @@ // Used to append before file extension to create unique file name. int frame_name_unique_number_; - - DISALLOW_COPY_AND_ASSIGN(VideoFrameWriter); }; } // namespace test
diff --git a/services/audio/debug_recording.h b/services/audio/debug_recording.h index a053449..653cd6d2 100644 --- a/services/audio/debug_recording.h +++ b/services/audio/debug_recording.h
@@ -24,6 +24,9 @@ DebugRecording(mojo::PendingReceiver<mojom::DebugRecording> receiver, media::AudioManager* audio_manager); + DebugRecording(const DebugRecording&) = delete; + DebugRecording& operator=(const DebugRecording&) = delete; + // Disables audio debug recording if Enable() was called before. ~DebugRecording() override; @@ -48,7 +51,6 @@ mojo::Remote<mojom::DebugRecordingFileProvider> file_provider_; base::WeakPtrFactory<DebugRecording> weak_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(DebugRecording); }; } // namespace audio
diff --git a/services/audio/debug_recording_unittest.cc b/services/audio/debug_recording_unittest.cc index a07b723..3c821ac 100644 --- a/services/audio/debug_recording_unittest.cc +++ b/services/audio/debug_recording_unittest.cc
@@ -60,6 +60,10 @@ class DebugRecordingTest : public media::AudioDebugRecordingTest { public: DebugRecordingTest() = default; + + DebugRecordingTest(const DebugRecordingTest&) = delete; + DebugRecordingTest& operator=(const DebugRecordingTest&) = delete; + ~DebugRecordingTest() override = default; void SetUp() override { @@ -93,9 +97,6 @@ std::unique_ptr<DebugRecording> debug_recording_; mojo::Remote<mojom::DebugRecording> remote_debug_recording_; - - private: - DISALLOW_COPY_AND_ASSIGN(DebugRecordingTest); }; TEST_F(DebugRecordingTest, EnableResetEnablesDisablesDebugRecording) {
diff --git a/services/audio/delay_buffer.h b/services/audio/delay_buffer.h index 2d1482c..833a4b8 100644 --- a/services/audio/delay_buffer.h +++ b/services/audio/delay_buffer.h
@@ -45,6 +45,9 @@ // recorded. explicit DelayBuffer(int history_size); + DelayBuffer(const DelayBuffer&) = delete; + DelayBuffer& operator=(const DelayBuffer&) = delete; + ~DelayBuffer(); // Inserts a copy of the given audio into the buffer. |position| must be @@ -100,8 +103,6 @@ // always in-order, chronologically increasing by InputChunk::position, and do // not overlap. base::circular_deque<InputChunk> chunks_; - - DISALLOW_COPY_AND_ASSIGN(DelayBuffer); }; } // namespace audio
diff --git a/services/audio/device_notifier.h b/services/audio/device_notifier.h index b013d4eb..35d74df 100644 --- a/services/audio/device_notifier.h +++ b/services/audio/device_notifier.h
@@ -24,6 +24,10 @@ public mojom::DeviceNotifier { public: DeviceNotifier(); + + DeviceNotifier(const DeviceNotifier&) = delete; + DeviceNotifier& operator=(const DeviceNotifier&) = delete; + ~DeviceNotifier() final; void Bind(mojo::PendingReceiver<mojom::DeviceNotifier> receiver); @@ -44,8 +48,6 @@ mojo::ReceiverSet<mojom::DeviceNotifier> receivers_; const scoped_refptr<base::SequencedTaskRunner> task_runner_; base::WeakPtrFactory<DeviceNotifier> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DeviceNotifier); }; } // namespace audio
diff --git a/services/audio/group_coordinator_unittest.cc b/services/audio/group_coordinator_unittest.cc index 48edc86..ac0f97e 100644 --- a/services/audio/group_coordinator_unittest.cc +++ b/services/audio/group_coordinator_unittest.cc
@@ -34,13 +34,14 @@ class MockGroupObserver : public TestGroupCoordinator::Observer { public: MockGroupObserver() = default; + + MockGroupObserver(const MockGroupObserver&) = delete; + MockGroupObserver& operator=(const MockGroupObserver&) = delete; + ~MockGroupObserver() override = default; MOCK_METHOD1(OnMemberJoinedGroup, void(MockGroupMember* member)); MOCK_METHOD1(OnMemberLeftGroup, void(MockGroupMember* member)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockGroupObserver); }; TEST(GroupCoordinatorTest, NeverUsed) {
diff --git a/services/audio/in_process_audio_manager_accessor.h b/services/audio/in_process_audio_manager_accessor.h index 9b3d6db..16f9b0fb 100644 --- a/services/audio/in_process_audio_manager_accessor.h +++ b/services/audio/in_process_audio_manager_accessor.h
@@ -22,6 +22,11 @@ : public Service::AudioManagerAccessor { public: explicit InProcessAudioManagerAccessor(media::AudioManager* audio_manager); + + InProcessAudioManagerAccessor(const InProcessAudioManagerAccessor&) = delete; + InProcessAudioManagerAccessor& operator=( + const InProcessAudioManagerAccessor&) = delete; + ~InProcessAudioManagerAccessor() final; void Shutdown() final {} // AudioManager must be shut down by its owner. @@ -32,7 +37,6 @@ private: media::AudioManager* const audio_manager_; - DISALLOW_COPY_AND_ASSIGN(InProcessAudioManagerAccessor); }; } // namespace audio
diff --git a/services/audio/input_controller.h b/services/audio/input_controller.h index a53872bf..88acc11 100644 --- a/services/audio/input_controller.h +++ b/services/audio/input_controller.h
@@ -128,6 +128,9 @@ FAKE = 3, }; + InputController(const InputController&) = delete; + InputController& operator=(const InputController&) = delete; + ~InputController() final; media::AudioInputStream* stream_for_testing() { return stream_; } @@ -300,8 +303,6 @@ // InputController that has already been closed. // All outstanding weak pointers, are invalidated at the end of DoClose. base::WeakPtrFactory<InputController> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(InputController); }; } // namespace audio
diff --git a/services/audio/input_controller_unittest.cc b/services/audio/input_controller_unittest.cc index c56c680..b1adc06 100644 --- a/services/audio/input_controller_unittest.cc +++ b/services/audio/input_controller_unittest.cc
@@ -127,6 +127,10 @@ kSampleRate, kSamplesPerPacket) {} + TimeSourceInputControllerTest(const TimeSourceInputControllerTest&) = delete; + TimeSourceInputControllerTest& operator=( + const TimeSourceInputControllerTest&) = delete; + ~TimeSourceInputControllerTest() override { audio_manager_->Shutdown(); task_environment_.RunUntilIdle(); @@ -152,9 +156,6 @@ media::AudioParameters params_; MockAudioInputStream stream_; base::test::ScopedFeatureList audio_processing_feature_; - - private: - DISALLOW_COPY_AND_ASSIGN(TimeSourceInputControllerTest); }; using SystemTimeInputControllerTest = TimeSourceInputControllerTest<
diff --git a/services/audio/input_stream.h b/services/audio/input_stream.h index cebb1d2..dac4597 100644 --- a/services/audio/input_stream.h +++ b/services/audio/input_stream.h
@@ -57,6 +57,10 @@ const media::AudioParameters& params, uint32_t shared_memory_count, bool enable_agc); + + InputStream(const InputStream&) = delete; + InputStream& operator=(const InputStream&) = delete; + ~InputStream() override; const base::UnguessableToken& id() const { return id_; } @@ -101,8 +105,6 @@ SEQUENCE_CHECKER(owning_sequence_); base::WeakPtrFactory<InputStream> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(InputStream); }; } // namespace audio
diff --git a/services/audio/input_stream_unittest.cc b/services/audio/input_stream_unittest.cc index b829e1f5..bbb49aa6a 100644 --- a/services/audio/input_stream_unittest.cc +++ b/services/audio/input_stream_unittest.cc
@@ -126,6 +126,10 @@ &stream_factory_, remote_stream_factory_.BindNewPipeAndPassReceiver()) {} + AudioServiceInputStreamTest(const AudioServiceInputStreamTest&) = delete; + AudioServiceInputStreamTest& operator=(const AudioServiceInputStreamTest&) = + delete; + ~AudioServiceInputStreamTest() override { audio_manager_.Shutdown(); } void SetUp() override { @@ -205,8 +209,6 @@ StrictMock<MockStreamClient> client_; StrictMock<MockStreamObserver> observer_; NiceMock<MockLog> log_; - - DISALLOW_COPY_AND_ASSIGN(AudioServiceInputStreamTest); }; TEST_F(AudioServiceInputStreamTest, ConstructDestruct) {
diff --git a/services/audio/input_sync_writer_unittest.cc b/services/audio/input_sync_writer_unittest.cc index beb7aaf8..d4cb081f 100644 --- a/services/audio/input_sync_writer_unittest.cc +++ b/services/audio/input_sync_writer_unittest.cc
@@ -124,6 +124,9 @@ audio_bus_ = media::AudioBus::Create(audio_params); } + InputSyncWriterTest(const InputSyncWriterTest&) = delete; + InputSyncWriterTest& operator=(const InputSyncWriterTest&) = delete; + ~InputSyncWriterTest() override {} // Get total number of expected log calls. On non-Android we expect one log @@ -160,9 +163,6 @@ std::unique_ptr<InputSyncWriter> writer_; MockCancelableSyncSocket* socket_; std::unique_ptr<media::AudioBus> audio_bus_; - - private: - DISALLOW_COPY_AND_ASSIGN(InputSyncWriterTest); }; TEST_F(InputSyncWriterTest, SingleWriteAndRead) {
diff --git a/services/audio/local_muter.h b/services/audio/local_muter.h index fba3b95..d7d6709 100644 --- a/services/audio/local_muter.h +++ b/services/audio/local_muter.h
@@ -27,6 +27,9 @@ LocalMuter(LoopbackCoordinator* coordinator, const base::UnguessableToken& group_id); + LocalMuter(const LocalMuter&) = delete; + LocalMuter& operator=(const LocalMuter&) = delete; + ~LocalMuter() final; const base::UnguessableToken& group_id() const { return group_id_; } @@ -52,8 +55,6 @@ base::OnceClosure all_bindings_lost_callback_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(LocalMuter); }; } // namespace audio
diff --git a/services/audio/log_adapter.h b/services/audio/log_adapter.h index 54bd7384..381eac4 100644 --- a/services/audio/log_adapter.h +++ b/services/audio/log_adapter.h
@@ -21,6 +21,10 @@ class LogAdapter : public media::AudioLog { public: explicit LogAdapter(mojo::PendingRemote<media::mojom::AudioLog> audio_log); + + LogAdapter(const LogAdapter&) = delete; + LogAdapter& operator=(const LogAdapter&) = delete; + ~LogAdapter() override; // media::AudioLog implementation. @@ -36,8 +40,6 @@ private: mojo::Remote<media::mojom::AudioLog> audio_log_; - - DISALLOW_COPY_AND_ASSIGN(LogAdapter); }; } // namespace audio
diff --git a/services/audio/log_factory_adapter.h b/services/audio/log_factory_adapter.h index b39e3ef..467205a 100644 --- a/services/audio/log_factory_adapter.h +++ b/services/audio/log_factory_adapter.h
@@ -27,6 +27,10 @@ class LogFactoryAdapter final : public media::AudioLogFactory { public: LogFactoryAdapter(); + + LogFactoryAdapter(const LogFactoryAdapter&) = delete; + LogFactoryAdapter& operator=(const LogFactoryAdapter&) = delete; + ~LogFactoryAdapter() final; void SetLogFactory( @@ -42,8 +46,6 @@ mojo::Remote<media::mojom::AudioLogFactory> log_factory_; base::queue<PendingLogRequest> pending_requests_; media::FakeAudioLogFactory fake_log_factory_; - - DISALLOW_COPY_AND_ASSIGN(LogFactoryAdapter); }; } // namespace audio
diff --git a/services/audio/log_factory_manager.h b/services/audio/log_factory_manager.h index dd662be..bd243c5 100644 --- a/services/audio/log_factory_manager.h +++ b/services/audio/log_factory_manager.h
@@ -22,6 +22,10 @@ class LogFactoryManager final : public mojom::LogFactoryManager { public: LogFactoryManager(); + + LogFactoryManager(const LogFactoryManager&) = delete; + LogFactoryManager& operator=(const LogFactoryManager&) = delete; + ~LogFactoryManager() final; void Bind(mojo::PendingReceiver<mojom::LogFactoryManager> receiver); @@ -35,8 +39,6 @@ mojo::ReceiverSet<mojom::LogFactoryManager> receivers_; LogFactoryAdapter log_factory_adapter_; SEQUENCE_CHECKER(owning_sequence_); - - DISALLOW_COPY_AND_ASSIGN(LogFactoryManager); }; } // namespace audio
diff --git a/services/audio/loopback_stream.h b/services/audio/loopback_stream.h index 4fe92aa..f48ba7b 100644 --- a/services/audio/loopback_stream.h +++ b/services/audio/loopback_stream.h
@@ -74,6 +74,9 @@ LoopbackCoordinator* coordinator, const base::UnguessableToken& group_id); + LoopbackStream(const LoopbackStream&) = delete; + LoopbackStream& operator=(const LoopbackStream&) = delete; + ~LoopbackStream() final; bool is_recording() const { return network_ && network_->is_started(); } @@ -241,8 +244,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<LoopbackStream> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(LoopbackStream); }; } // namespace audio
diff --git a/services/audio/loopback_stream_unittest.cc b/services/audio/loopback_stream_unittest.cc index 299315f8..af54a9e 100644 --- a/services/audio/loopback_stream_unittest.cc +++ b/services/audio/loopback_stream_unittest.cc
@@ -129,6 +129,9 @@ public: LoopbackStreamTest() : group_id_(base::UnguessableToken::Create()) {} + LoopbackStreamTest(const LoopbackStreamTest&) = delete; + LoopbackStreamTest& operator=(const LoopbackStreamTest&) = delete; + ~LoopbackStreamTest() override = default; void TearDown() override { @@ -260,8 +263,6 @@ FakeSyncWriter* consumer_ = nullptr; // Owned by |stream_|. mojo::Remote<media::mojom::AudioInputStream> remote_input_stream_; - - DISALLOW_COPY_AND_ASSIGN(LoopbackStreamTest); }; TEST_F(LoopbackStreamTest, ShutsDownStreamWhenInterfacePtrIsClosed) {
diff --git a/services/audio/output_controller.h b/services/audio/output_controller.h index 88b3f0ac..55b31d57 100644 --- a/services/audio/output_controller.h +++ b/services/audio/output_controller.h
@@ -121,6 +121,10 @@ const media::AudioParameters& params, const std::string& output_device_id, SyncReader* sync_reader); + + OutputController(const OutputController&) = delete; + OutputController& operator=(const OutputController&) = delete; + ~OutputController() override; // Indicates whether audio power level analysis will be performed. If false, @@ -333,8 +337,6 @@ // stream is closed. base::WeakPtr<OutputController> weak_this_for_stream_; base::WeakPtrFactory<OutputController> weak_factory_for_stream_{this}; - - DISALLOW_COPY_AND_ASSIGN(OutputController); }; } // namespace audio
diff --git a/services/audio/output_controller_unittest.cc b/services/audio/output_controller_unittest.cc index 1f51b7d2..705aec3 100644 --- a/services/audio/output_controller_unittest.cc +++ b/services/audio/output_controller_unittest.cc
@@ -239,6 +239,10 @@ class MockSnooper : public Snoopable::Snooper { public: MockSnooper() = default; + + MockSnooper(const MockSnooper&) = delete; + MockSnooper& operator=(const MockSnooper&) = delete; + ~MockSnooper() override = default; MOCK_METHOD0(DidProvideData, void()); @@ -263,8 +267,6 @@ private: base::TimeTicks last_reference_time_; - - DISALLOW_COPY_AND_ASSIGN(MockSnooper); }; // A FakeAudioManager that produces MockAudioOutputStreams, and tracks the last @@ -330,6 +332,9 @@ public: OutputControllerTest() : group_id_(base::UnguessableToken::Create()) {} + OutputControllerTest(const OutputControllerTest&) = delete; + OutputControllerTest& operator=(const OutputControllerTest&) = delete; + ~OutputControllerTest() override { audio_manager_.Shutdown(); } void SetUp() override { @@ -492,8 +497,6 @@ base::UnguessableToken group_id_; StrictMock<MockOutputControllerSyncReader> mock_sync_reader_; absl::optional<OutputController> controller_; - - DISALLOW_COPY_AND_ASSIGN(OutputControllerTest); }; TEST_F(OutputControllerTest, CreateAndClose) {
diff --git a/services/audio/output_stream.h b/services/audio/output_stream.h index efb3a2f..b13c3bb 100644 --- a/services/audio/output_stream.h +++ b/services/audio/output_stream.h
@@ -63,6 +63,9 @@ LoopbackCoordinator* coordinator, const base::UnguessableToken& loopback_group_id); + OutputStream(const OutputStream&) = delete; + OutputStream& operator=(const OutputStream&) = delete; + ~OutputStream() final; // media::mojom::AudioOutputStream implementation. @@ -114,8 +117,6 @@ bool is_audible_ = false; base::WeakPtrFactory<OutputStream> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(OutputStream); }; } // namespace audio
diff --git a/services/audio/output_stream_unittest.cc b/services/audio/output_stream_unittest.cc index 3b51c2e..904339e 100644 --- a/services/audio/output_stream_unittest.cc +++ b/services/audio/output_stream_unittest.cc
@@ -126,6 +126,9 @@ mojo::SetDefaultProcessErrorHandler(bad_message_callback_.Get()); } + TestEnvironment(const TestEnvironment&) = delete; + TestEnvironment& operator=(const TestEnvironment&) = delete; + ~TestEnvironment() { audio_manager_.Shutdown(); mojo::SetDefaultProcessErrorHandler(base::NullCallback()); @@ -189,8 +192,6 @@ NiceMock<MockLog> log_; StrictMock<MockCreatedCallback> created_callback_; StrictMock<MockBadMessageCallback> bad_message_callback_; - - DISALLOW_COPY_AND_ASSIGN(TestEnvironment); }; TEST(AudioServiceOutputStreamTest, ConstructDestruct) {
diff --git a/services/audio/owning_audio_manager_accessor.cc b/services/audio/owning_audio_manager_accessor.cc index a483820d8..62701b6 100644 --- a/services/audio/owning_audio_manager_accessor.cc +++ b/services/audio/owning_audio_manager_accessor.cc
@@ -58,6 +58,10 @@ class MainThread final : public media::AudioThread { public: MainThread(); + + MainThread(const MainThread&) = delete; + MainThread& operator=(const MainThread&) = delete; + ~MainThread() final; // AudioThread implementation. @@ -74,8 +78,6 @@ scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner_; media::AudioThreadHangMonitor::Ptr hang_monitor_; - - DISALLOW_COPY_AND_ASSIGN(MainThread); }; MainThread::MainThread()
diff --git a/services/audio/owning_audio_manager_accessor.h b/services/audio/owning_audio_manager_accessor.h index 03f2c94c..08829380 100644 --- a/services/audio/owning_audio_manager_accessor.h +++ b/services/audio/owning_audio_manager_accessor.h
@@ -36,6 +36,11 @@ explicit OwningAudioManagerAccessor( AudioManagerFactoryCallback audio_manager_factory_cb); + + OwningAudioManagerAccessor(const OwningAudioManagerAccessor&) = delete; + OwningAudioManagerAccessor& operator=(const OwningAudioManagerAccessor&) = + delete; + ~OwningAudioManagerAccessor() override; media::AudioManager* GetAudioManager() final; @@ -53,7 +58,6 @@ media::AudioLogFactory* log_factory_ = nullptr; // not owned. THREAD_CHECKER(thread_checker_); - DISALLOW_COPY_AND_ASSIGN(OwningAudioManagerAccessor); }; } // namespace audio
diff --git a/services/audio/public/cpp/audio_system_to_service_adapter.h b/services/audio/public/cpp/audio_system_to_service_adapter.h index 3ef42985..2fc71c9 100644 --- a/services/audio/public/cpp/audio_system_to_service_adapter.h +++ b/services/audio/public/cpp/audio_system_to_service_adapter.h
@@ -35,6 +35,11 @@ AudioSystemToServiceAdapter(SystemInfoBinder system_info_binder, base::TimeDelta disconnect_timeout); explicit AudioSystemToServiceAdapter(SystemInfoBinder system_info_binder); + + AudioSystemToServiceAdapter(const AudioSystemToServiceAdapter&) = delete; + AudioSystemToServiceAdapter& operator=(const AudioSystemToServiceAdapter&) = + delete; + ~AudioSystemToServiceAdapter() override; // AudioSystem implementation. @@ -68,7 +73,6 @@ const base::TimeDelta disconnect_timeout_; THREAD_CHECKER(thread_checker_); - DISALLOW_COPY_AND_ASSIGN(AudioSystemToServiceAdapter); }; } // namespace audio
diff --git a/services/audio/public/cpp/debug_recording_session.h b/services/audio/public/cpp/debug_recording_session.h index 4d6e55d8..975f10c 100644 --- a/services/audio/public/cpp/debug_recording_session.h +++ b/services/audio/public/cpp/debug_recording_session.h
@@ -35,6 +35,11 @@ DebugRecordingFileProvider( mojo::PendingReceiver<mojom::DebugRecordingFileProvider> receiver, const base::FilePath& file_name_base); + + DebugRecordingFileProvider(const DebugRecordingFileProvider&) = delete; + DebugRecordingFileProvider& operator=(const DebugRecordingFileProvider&) = + delete; + ~DebugRecordingFileProvider() override; // Creates file with name "|file_name_base_|.<stream_type_str>.|id|.wav", @@ -47,8 +52,6 @@ private: mojo::Receiver<mojom::DebugRecordingFileProvider> receiver_; base::FilePath file_name_base_; - - DISALLOW_COPY_AND_ASSIGN(DebugRecordingFileProvider); }; DebugRecordingSession(
diff --git a/services/audio/public/cpp/fake_stream_factory.h b/services/audio/public/cpp/fake_stream_factory.h index 282daa1b..2603a57 100644 --- a/services/audio/public/cpp/fake_stream_factory.h +++ b/services/audio/public/cpp/fake_stream_factory.h
@@ -20,6 +20,10 @@ class FakeStreamFactory : public media::mojom::AudioStreamFactory { public: FakeStreamFactory(); + + FakeStreamFactory(const FakeStreamFactory&) = delete; + FakeStreamFactory& operator=(const FakeStreamFactory&) = delete; + ~FakeStreamFactory() override; mojo::PendingRemote<media::mojom::AudioStreamFactory> MakeRemote() { @@ -81,8 +85,6 @@ private: absl::optional<base::RunLoop> disconnect_loop_; - - DISALLOW_COPY_AND_ASSIGN(FakeStreamFactory); }; static_assert(
diff --git a/services/audio/public/cpp/fake_system_info.h b/services/audio/public/cpp/fake_system_info.h index da11ad233..e3c24e7d 100644 --- a/services/audio/public/cpp/fake_system_info.h +++ b/services/audio/public/cpp/fake_system_info.h
@@ -21,6 +21,10 @@ class FakeSystemInfo : public mojom::SystemInfo { public: FakeSystemInfo(); + + FakeSystemInfo(const FakeSystemInfo&) = delete; + FakeSystemInfo& operator=(const FakeSystemInfo&) = delete; + ~FakeSystemInfo() override; static void OverrideGlobalBinderForAudioService( @@ -51,7 +55,6 @@ void Bind(mojo::PendingReceiver<mojom::SystemInfo> receiver); mojo::ReceiverSet<mojom::SystemInfo> receivers_; - DISALLOW_COPY_AND_ASSIGN(FakeSystemInfo); }; } // namespace audio
diff --git a/services/audio/public/cpp/input_ipc.h b/services/audio/public/cpp/input_ipc.h index dc8bc362..458f8b3 100644 --- a/services/audio/public/cpp/input_ipc.h +++ b/services/audio/public/cpp/input_ipc.h
@@ -31,6 +31,10 @@ InputIPC(mojo::PendingRemote<media::mojom::AudioStreamFactory> stream_factory, const std::string& device_id, mojo::PendingRemote<media::mojom::AudioLog> log); + + InputIPC(const InputIPC&) = delete; + InputIPC& operator=(const InputIPC&) = delete; + ~InputIPC() override; // AudioInputIPC implementation @@ -71,8 +75,6 @@ mojo::Remote<media::mojom::AudioLog> log_; base::WeakPtrFactory<InputIPC> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(InputIPC); }; } // namespace audio
diff --git a/services/audio/public/cpp/output_device.h b/services/audio/public/cpp/output_device.h index bd896369..eb80965 100644 --- a/services/audio/public/cpp/output_device.h +++ b/services/audio/public/cpp/output_device.h
@@ -30,6 +30,9 @@ media::AudioRendererSink::RenderCallback* callback, const std::string& device_id); + OutputDevice(const OutputDevice&) = delete; + OutputDevice& operator=(const OutputDevice&) = delete; + // Blocking call; see base/threading/thread_restrictions.h. ~OutputDevice(); @@ -52,8 +55,6 @@ mojo::Remote<media::mojom::AudioStreamFactory> stream_factory_; base::WeakPtrFactory<OutputDevice> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(OutputDevice); }; } // namespace audio
diff --git a/services/audio/public/cpp/output_device_unittest.cc b/services/audio/public/cpp/output_device_unittest.cc index f1a8910..9ff04e6e 100644 --- a/services/audio/public/cpp/output_device_unittest.cc +++ b/services/audio/public/cpp/output_device_unittest.cc
@@ -47,6 +47,10 @@ class MockRenderCallback : public media::AudioRendererSink::RenderCallback { public: MockRenderCallback() = default; + + MockRenderCallback(const MockRenderCallback&) = delete; + MockRenderCallback& operator=(const MockRenderCallback&) = delete; + ~MockRenderCallback() override = default; MOCK_METHOD4(Render, @@ -55,23 +59,21 @@ int prior_frames_skipped, media::AudioBus* dest)); void OnRenderError() {} - - private: - DISALLOW_COPY_AND_ASSIGN(MockRenderCallback); }; class MockStream : public media::mojom::AudioOutputStream { public: MockStream() = default; + + MockStream(const MockStream&) = delete; + MockStream& operator=(const MockStream&) = delete; + ~MockStream() override = default; MOCK_METHOD0(Play, void()); MOCK_METHOD0(Pause, void()); MOCK_METHOD1(SetVolume, void(double)); MOCK_METHOD0(Flush, void()); - - private: - DISALLOW_COPY_AND_ASSIGN(MockStream); }; class MockAudioOutputIPC : public media::AudioOutputIPC { @@ -98,6 +100,10 @@ class FakeOutputStreamFactory final : public audio::FakeStreamFactory { public: FakeOutputStreamFactory() : stream_(), stream_receiver_(&stream_) {} + + FakeOutputStreamFactory(const FakeOutputStreamFactory&) = delete; + FakeOutputStreamFactory& operator=(const FakeOutputStreamFactory&) = delete; + ~FakeOutputStreamFactory() override {} void CreateOutputStream( @@ -128,7 +134,6 @@ private: mojo::Receiver<media::mojom::AudioOutputStream> stream_receiver_; - DISALLOW_COPY_AND_ASSIGN(FakeOutputStreamFactory); }; struct DataFlowTestEnvironment { @@ -170,6 +175,10 @@ stream_factory_ = std::make_unique<FakeOutputStreamFactory>(); } + AudioServiceOutputDeviceTest(const AudioServiceOutputDeviceTest&) = delete; + AudioServiceOutputDeviceTest& operator=(const AudioServiceOutputDeviceTest&) = + delete; + ~AudioServiceOutputDeviceTest() override { if (!stream_factory_->created_callback_) return; @@ -183,9 +192,6 @@ base::test::TaskEnvironment task_env_; std::unique_ptr<FakeOutputStreamFactory> stream_factory_; - - private: - DISALLOW_COPY_AND_ASSIGN(AudioServiceOutputDeviceTest); }; TEST_F(AudioServiceOutputDeviceTest, CreatePlayPause) {
diff --git a/services/audio/public/cpp/sounds/audio_stream_handler.cc b/services/audio/public/cpp/sounds/audio_stream_handler.cc index 44ddf41..54978f7 100644 --- a/services/audio/public/cpp/sounds/audio_stream_handler.cc +++ b/services/audio/public/cpp/sounds/audio_stream_handler.cc
@@ -55,6 +55,9 @@ task_runner_ = base::SequencedTaskRunnerHandle::Get(); } + AudioStreamContainer(const AudioStreamContainer&) = delete; + AudioStreamContainer& operator=(const AudioStreamContainer&) = delete; + ~AudioStreamContainer() override { DCHECK(task_runner_->RunsTasksInCurrentSequence()); } @@ -166,8 +169,6 @@ bool delayed_stop_posted_; std::unique_ptr<media::WavAudioHandler> wav_audio_; base::CancelableRepeatingClosure stop_closure_; - - DISALLOW_COPY_AND_ASSIGN(AudioStreamContainer); }; AudioStreamHandler::AudioStreamHandler(
diff --git a/services/audio/public/cpp/sounds/audio_stream_handler.h b/services/audio/public/cpp/sounds/audio_stream_handler.h index b8e6d7f..c401dfb 100644 --- a/services/audio/public/cpp/sounds/audio_stream_handler.h +++ b/services/audio/public/cpp/sounds/audio_stream_handler.h
@@ -47,6 +47,10 @@ explicit AudioStreamHandler( SoundsManager::StreamFactoryBinder stream_factory_binder, const base::StringPiece& wav_data); + + AudioStreamHandler(const AudioStreamHandler&) = delete; + AudioStreamHandler& operator=(const AudioStreamHandler&) = delete; + virtual ~AudioStreamHandler(); // Returns true iff AudioStreamHandler is correctly initialized; @@ -77,8 +81,6 @@ base::TimeDelta duration_; std::unique_ptr<AudioStreamContainer> stream_; scoped_refptr<base::SequencedTaskRunner> task_runner_; - - DISALLOW_COPY_AND_ASSIGN(AudioStreamHandler); }; } // namespace audio
diff --git a/services/audio/public/cpp/sounds/sounds_manager.cc b/services/audio/public/cpp/sounds/sounds_manager.cc index 3d08eb89..fe185c3 100644 --- a/services/audio/public/cpp/sounds/sounds_manager.cc +++ b/services/audio/public/cpp/sounds/sounds_manager.cc
@@ -25,6 +25,10 @@ public: SoundsManagerImpl(StreamFactoryBinder stream_factory_binder) : stream_factory_binder_(std::move(stream_factory_binder)) {} + + SoundsManagerImpl(const SoundsManagerImpl&) = delete; + SoundsManagerImpl& operator=(const SoundsManagerImpl&) = delete; + ~SoundsManagerImpl() override { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); } @@ -45,8 +49,6 @@ }; std::vector<StreamEntry> handlers_; StreamFactoryBinder stream_factory_binder_; - - DISALLOW_COPY_AND_ASSIGN(SoundsManagerImpl); }; bool SoundsManagerImpl::Initialize(SoundKey key,
diff --git a/services/audio/public/cpp/sounds/test_data.h b/services/audio/public/cpp/sounds/test_data.h index 6cfa9e4..cd6fc35 100644 --- a/services/audio/public/cpp/sounds/test_data.h +++ b/services/audio/public/cpp/sounds/test_data.h
@@ -29,6 +29,10 @@ class TestObserver : public AudioStreamHandler::TestObserver { public: TestObserver(const base::RepeatingClosure& quit); + + TestObserver(const TestObserver&) = delete; + TestObserver& operator=(const TestObserver&) = delete; + ~TestObserver() override; // AudioStreamHandler::TestObserver implementation: @@ -52,8 +56,6 @@ int is_playing; media::AudioRendererSink::RenderCallback* callback_; std::unique_ptr<media::AudioBus> bus_; - - DISALLOW_COPY_AND_ASSIGN(TestObserver); }; } // namespace audio
diff --git a/services/audio/service.h b/services/audio/service.h index f8b181dd..598ee2f6 100644 --- a/services/audio/service.h +++ b/services/audio/service.h
@@ -68,6 +68,10 @@ Service(std::unique_ptr<AudioManagerAccessor> audio_manager_accessor, bool enable_remote_client_support, mojo::PendingReceiver<mojom::AudioService> receiver); + + Service(const Service&) = delete; + Service& operator=(const Service&) = delete; + ~Service() final; // Returns a DeferredSequencedTaskRunner to be used to run the audio service @@ -123,8 +127,6 @@ std::unique_ptr<DeviceNotifier> device_notifier_; std::unique_ptr<LogFactoryManager> log_factory_manager_; std::unique_ptr<ServiceMetrics> metrics_; - - DISALLOW_COPY_AND_ASSIGN(Service); }; } // namespace audio
diff --git a/services/audio/service_metrics.h b/services/audio/service_metrics.h index fc7c27a..5955f07b 100644 --- a/services/audio/service_metrics.h +++ b/services/audio/service_metrics.h
@@ -17,6 +17,10 @@ class ServiceMetrics { public: explicit ServiceMetrics(const base::TickClock* clock); + + ServiceMetrics(const ServiceMetrics&) = delete; + ServiceMetrics& operator=(const ServiceMetrics&) = delete; + ~ServiceMetrics(); void HasConnections(); @@ -28,8 +32,6 @@ const base::TickClock* clock_; base::TimeTicks has_connections_start_; base::TimeTicks has_no_connections_start_; - - DISALLOW_COPY_AND_ASSIGN(ServiceMetrics); }; } // namespace audio
diff --git a/services/audio/snooper_node.h b/services/audio/snooper_node.h index 70b6136..5b8a2fd 100644 --- a/services/audio/snooper_node.h +++ b/services/audio/snooper_node.h
@@ -65,6 +65,9 @@ SnooperNode(const media::AudioParameters& input_params, const media::AudioParameters& output_params); + SnooperNode(const SnooperNode&) = delete; + SnooperNode& operator=(const SnooperNode&) = delete; + ~SnooperNode() final; // GroupMember::Snooper implementation. Inserts more data into the delay @@ -170,8 +173,6 @@ // The frame position where recording into the delay buffer always starts. static constexpr FrameTicks kWriteStartPosition = 0; - - DISALLOW_COPY_AND_ASSIGN(SnooperNode); }; } // namespace audio
diff --git a/services/audio/stream_factory.h b/services/audio/stream_factory.h index 37a373d..40ff786 100644 --- a/services/audio/stream_factory.h +++ b/services/audio/stream_factory.h
@@ -46,6 +46,10 @@ class StreamFactory final : public media::mojom::AudioStreamFactory { public: explicit StreamFactory(media::AudioManager* audio_manager); + + StreamFactory(const StreamFactory&) = delete; + StreamFactory& operator=(const StreamFactory&) = delete; + ~StreamFactory() final; void Bind(mojo::PendingReceiver<media::mojom::AudioStreamFactory> receiver); @@ -116,7 +120,6 @@ OutputStreamSet output_streams_; base::WeakPtrFactory<StreamFactory> weak_ptr_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(StreamFactory); }; } // namespace audio
diff --git a/services/audio/sync_reader.h b/services/audio/sync_reader.h index e475441..5fdcc4a55 100644 --- a/services/audio/sync_reader.h +++ b/services/audio/sync_reader.h
@@ -40,6 +40,9 @@ const media::AudioParameters& params, base::CancelableSyncSocket* foreign_socket); + SyncReader(const SyncReader&) = delete; + SyncReader& operator=(const SyncReader&) = delete; + ~SyncReader() override; // Returns true if the SyncReader initialized successfully, and @@ -100,8 +103,6 @@ // The index of the audio buffer we're expecting to be sent from the renderer; // used to block with timeout for audio data. uint32_t buffer_index_; - - DISALLOW_COPY_AND_ASSIGN(SyncReader); }; } // namespace audio
diff --git a/services/audio/system_info.h b/services/audio/system_info.h index a997143..c65f07b 100644 --- a/services/audio/system_info.h +++ b/services/audio/system_info.h
@@ -24,6 +24,10 @@ class SystemInfo : public mojom::SystemInfo { public: explicit SystemInfo(media::AudioManager* audio_manager); + + SystemInfo(const SystemInfo&) = delete; + SystemInfo& operator=(const SystemInfo&) = delete; + ~SystemInfo() override; void Bind(mojo::PendingReceiver<mojom::SystemInfo> receiver); @@ -55,8 +59,6 @@ // Validates thread-safe access to |bindings_| only. |helper_| takes care of // its thread safety/affinity itself. SEQUENCE_CHECKER(binding_sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(SystemInfo); }; } // namespace audio
diff --git a/services/audio/test/audio_system_to_service_adapter_test.cc b/services/audio/test/audio_system_to_service_adapter_test.cc index 9ecc4177..a0ea8d32 100644 --- a/services/audio/test/audio_system_to_service_adapter_test.cc +++ b/services/audio/test/audio_system_to_service_adapter_test.cc
@@ -28,6 +28,11 @@ public: AudioSystemToServiceAdapterTestBase() {} + AudioSystemToServiceAdapterTestBase( + const AudioSystemToServiceAdapterTestBase&) = delete; + AudioSystemToServiceAdapterTestBase& operator=( + const AudioSystemToServiceAdapterTestBase&) = delete; + ~AudioSystemToServiceAdapterTestBase() override {} void SetUp() override { @@ -75,8 +80,6 @@ system_info_bind_requested_.Call(); system_info_receiver_->Bind(std::move(receiver)); } - - DISALLOW_COPY_AND_ASSIGN(AudioSystemToServiceAdapterTestBase); }; // Base fixture for connection loss tests. @@ -85,6 +88,11 @@ public: AudioSystemToServiceAdapterConnectionLossTest() {} + AudioSystemToServiceAdapterConnectionLossTest( + const AudioSystemToServiceAdapterConnectionLossTest&) = delete; + AudioSystemToServiceAdapterConnectionLossTest& operator=( + const AudioSystemToServiceAdapterConnectionLossTest&) = delete; + ~AudioSystemToServiceAdapterConnectionLossTest() override {} void SetUp() override { @@ -209,8 +217,6 @@ media::AudioParameters params_; media::AudioDeviceDescriptions device_descriptions_; media::AudioSystemCallbackExpectations expectations_; - - DISALLOW_COPY_AND_ASSIGN(AudioSystemToServiceAdapterConnectionLossTest); }; // This test covers various scenarios of connection loss/restore, and the
diff --git a/services/audio/test/debug_recording_session_unittest.cc b/services/audio/test/debug_recording_session_unittest.cc index 12980c79..15fb673 100644 --- a/services/audio/test/debug_recording_session_unittest.cc +++ b/services/audio/test/debug_recording_session_unittest.cc
@@ -45,6 +45,12 @@ class DebugRecordingFileProviderTest : public testing::Test { public: DebugRecordingFileProviderTest() = default; + + DebugRecordingFileProviderTest(const DebugRecordingFileProviderTest&) = + delete; + DebugRecordingFileProviderTest& operator=( + const DebugRecordingFileProviderTest&) = delete; + ~DebugRecordingFileProviderTest() override = default; void SetUp() override { @@ -76,13 +82,16 @@ file_provider_; base::ScopedTempDir temp_dir_; base::FilePath file_path_; - - DISALLOW_COPY_AND_ASSIGN(DebugRecordingFileProviderTest); }; class DebugRecordingSessionTest : public media::AudioDebugRecordingTest { public: DebugRecordingSessionTest() = default; + + DebugRecordingSessionTest(const DebugRecordingSessionTest&) = delete; + DebugRecordingSessionTest& operator=(const DebugRecordingSessionTest&) = + delete; + ~DebugRecordingSessionTest() override = default; void SetUp() override { @@ -119,8 +128,6 @@ private: mojo::Remote<mojom::AudioService> service_remote_; std::unique_ptr<Service> service_; - - DISALLOW_COPY_AND_ASSIGN(DebugRecordingSessionTest); }; TEST_F(DebugRecordingFileProviderTest, CreateFileForInputStream) {
diff --git a/services/audio/test/fake_consumer.h b/services/audio/test/fake_consumer.h index 8c4ec03..d40c6f37 100644 --- a/services/audio/test/fake_consumer.h +++ b/services/audio/test/fake_consumer.h
@@ -22,6 +22,9 @@ public: FakeConsumer(int channels, int sample_rate); + FakeConsumer(const FakeConsumer&) = delete; + FakeConsumer& operator=(const FakeConsumer&) = delete; + ~FakeConsumer(); // Returns the total number of frames recorded (the end position of the @@ -55,8 +58,6 @@ private: const int sample_rate_; std::vector<std::vector<float>> recorded_channel_data_; - - DISALLOW_COPY_AND_ASSIGN(FakeConsumer); }; } // namespace audio
diff --git a/services/audio/test/fake_loopback_group_member.h b/services/audio/test/fake_loopback_group_member.h index 4b4383f..eb4c4ef7 100644 --- a/services/audio/test/fake_loopback_group_member.h +++ b/services/audio/test/fake_loopback_group_member.h
@@ -30,6 +30,9 @@ public: explicit FakeLoopbackGroupMember(const media::AudioParameters& params); + FakeLoopbackGroupMember(const FakeLoopbackGroupMember&) = delete; + FakeLoopbackGroupMember& operator=(const FakeLoopbackGroupMember&) = delete; + ~FakeLoopbackGroupMember() override; // Sets the sine wave |frequency| rendered into channel |ch|. Note that @@ -66,8 +69,6 @@ int64_t at_frame_ = 0; Snooper* snooper_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakeLoopbackGroupMember); }; } // namespace audio
diff --git a/services/audio/test/in_process_service_test.cc b/services/audio/test/in_process_service_test.cc index 0eba84a..949a8c8 100644 --- a/services/audio/test/in_process_service_test.cc +++ b/services/audio/test/in_process_service_test.cc
@@ -98,6 +98,10 @@ audio_system_(std::make_unique<AudioSystemToServiceAdapter>( base::BindRepeating(&InProcessServiceTest::BindSystemInfo, base::Unretained(this)))) {} + + InProcessServiceTest(const InProcessServiceTest&) = delete; + InProcessServiceTest& operator=(const InProcessServiceTest&) = delete; + ~InProcessServiceTest() override = default; protected: @@ -126,8 +130,6 @@ media::MockAudioManager audio_manager_; std::unique_ptr<ServiceTestHelper> helper_; std::unique_ptr<media::AudioSystem> audio_system_; - - DISALLOW_COPY_AND_ASSIGN(InProcessServiceTest); }; // Tests for FakeSystemInfo overriding the global binder. @@ -135,6 +137,10 @@ public FakeSystemInfo { public: FakeSystemInfoTest() = default; + + FakeSystemInfoTest(const FakeSystemInfoTest&) = delete; + FakeSystemInfoTest& operator=(const FakeSystemInfoTest&) = delete; + ~FakeSystemInfoTest() override = default; protected: @@ -145,8 +151,6 @@ std::move(callback).Run(true); MethodCalled(); } - - DISALLOW_COPY_AND_ASSIGN(FakeSystemInfoTest); }; TEST_F(FakeSystemInfoTest, HasInputDevicesCalledOnGlobalBinderOverride) {
diff --git a/services/audio/test/mock_group_member.h b/services/audio/test/mock_group_member.h index fcf0741..18a1b2c 100644 --- a/services/audio/test/mock_group_member.h +++ b/services/audio/test/mock_group_member.h
@@ -17,6 +17,10 @@ class MockGroupMember : public LoopbackGroupMember { public: MockGroupMember(); + + MockGroupMember(const MockGroupMember&) = delete; + MockGroupMember& operator=(const MockGroupMember&) = delete; + ~MockGroupMember() override; MOCK_CONST_METHOD0(GetAudioParameters, const media::AudioParameters&()); @@ -25,8 +29,6 @@ MOCK_METHOD0(StartMuting, void()); MOCK_METHOD0(StopMuting, void()); MOCK_METHOD0(IsMuting, bool()); - - DISALLOW_COPY_AND_ASSIGN(MockGroupMember); }; } // namespace audio
diff --git a/services/audio/test/mock_log.h b/services/audio/test/mock_log.h index 00d9512..04cdc36b 100644 --- a/services/audio/test/mock_log.h +++ b/services/audio/test/mock_log.h
@@ -19,6 +19,10 @@ class MockLog : public media::mojom::AudioLog { public: MockLog(); + + MockLog(const MockLog&) = delete; + MockLog& operator=(const MockLog&) = delete; + ~MockLog() override; // Should only be called once. @@ -47,8 +51,6 @@ private: mojo::Receiver<media::mojom::AudioLog> receiver_; - - DISALLOW_COPY_AND_ASSIGN(MockLog); }; } // namespace audio
diff --git a/services/audio/user_input_monitor.h b/services/audio/user_input_monitor.h index a9739d2..316e5d4 100644 --- a/services/audio/user_input_monitor.h +++ b/services/audio/user_input_monitor.h
@@ -17,6 +17,10 @@ class UserInputMonitor : public media::UserInputMonitor { public: explicit UserInputMonitor(base::ReadOnlySharedMemoryMapping memory_mapping); + + UserInputMonitor(const UserInputMonitor&) = delete; + UserInputMonitor& operator=(const UserInputMonitor&) = delete; + ~UserInputMonitor() override; // Returns nullptr for invalid handle. @@ -29,8 +33,6 @@ private: base::ReadOnlySharedMemoryMapping key_press_count_mapping_; - - DISALLOW_COPY_AND_ASSIGN(UserInputMonitor); }; } // namespace audio
diff --git a/services/cert_verifier/cert_net_url_loader/cert_net_fetcher_url_loader.cc b/services/cert_verifier/cert_net_url_loader/cert_net_fetcher_url_loader.cc index b268ff5..c9ab70a 100644 --- a/services/cert_verifier/cert_net_url_loader/cert_net_fetcher_url_loader.cc +++ b/services/cert_verifier/cert_net_url_loader/cert_net_fetcher_url_loader.cc
@@ -141,6 +141,10 @@ factory_pending_remote, BindNewURLLoaderFactoryCallback bind_new_url_loader_factory_cb); + AsyncCertNetFetcherURLLoader(const AsyncCertNetFetcherURLLoader&) = delete; + AsyncCertNetFetcherURLLoader& operator=(const AsyncCertNetFetcherURLLoader&) = + delete; + // The AsyncCertNetFetcherURLLoader is expected to be kept alive until all // requests have completed or Shutdown() is called. ~AsyncCertNetFetcherURLLoader(); @@ -187,8 +191,6 @@ BindNewURLLoaderFactoryCallback bind_new_url_loader_factory_cb_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(AsyncCertNetFetcherURLLoader); }; namespace { @@ -344,6 +346,10 @@ public: Job(std::unique_ptr<CertNetFetcherURLLoader::RequestParams> request_params, CertNetFetcherURLLoader::AsyncCertNetFetcherURLLoader* parent); + + Job(const Job&) = delete; + Job& operator=(const Job&) = delete; + ~Job(); const CertNetFetcherURLLoader::RequestParams& request_params() const { @@ -406,8 +412,6 @@ // Non-owned pointer to the AsyncCertNetFetcherURLLoader that created this // job. CertNetFetcherURLLoader::AsyncCertNetFetcherURLLoader* parent_; - - DISALLOW_COPY_AND_ASSIGN(Job); }; } // namespace
diff --git a/services/cert_verifier/trial_comparison_cert_verifier_mojo.h b/services/cert_verifier/trial_comparison_cert_verifier_mojo.h index 15793e3..cd6fc5d 100644 --- a/services/cert_verifier/trial_comparison_cert_verifier_mojo.h +++ b/services/cert_verifier/trial_comparison_cert_verifier_mojo.h
@@ -47,6 +47,12 @@ report_client, scoped_refptr<net::CertVerifyProc> primary_verify_proc, scoped_refptr<net::CertVerifyProc> trial_verify_proc); + + TrialComparisonCertVerifierMojo(const TrialComparisonCertVerifierMojo&) = + delete; + TrialComparisonCertVerifierMojo& operator=( + const TrialComparisonCertVerifierMojo&) = delete; + ~TrialComparisonCertVerifierMojo() override; // CertVerifier implementation @@ -82,8 +88,6 @@ std::unique_ptr<net::TrialComparisonCertVerifier> trial_comparison_cert_verifier_; - - DISALLOW_COPY_AND_ASSIGN(TrialComparisonCertVerifierMojo); }; } // namespace cert_verifier
diff --git a/services/data_decoder/ble_scan_parser_impl.h b/services/data_decoder/ble_scan_parser_impl.h index fa9ec78..ea9ffff6 100644 --- a/services/data_decoder/ble_scan_parser_impl.h +++ b/services/data_decoder/ble_scan_parser_impl.h
@@ -31,6 +31,10 @@ class BleScanParserImpl : public mojom::BleScanParser { public: BleScanParserImpl(); + + BleScanParserImpl(const BleScanParserImpl&) = delete; + BleScanParserImpl& operator=(const BleScanParserImpl&) = delete; + ~BleScanParserImpl() override; // mojom::BleScanParser: @@ -47,9 +51,6 @@ base::span<const uint8_t> bytes, UuidFormat format, std::vector<device::BluetoothUUID>* service_uuids); - - private: - DISALLOW_COPY_AND_ASSIGN(BleScanParserImpl); }; } // namespace data_decoder
diff --git a/services/data_decoder/data_decoder_service.h b/services/data_decoder/data_decoder_service.h index 5f93cb7..0650f94 100644 --- a/services/data_decoder/data_decoder_service.h +++ b/services/data_decoder/data_decoder_service.h
@@ -28,6 +28,10 @@ DataDecoderService(); explicit DataDecoderService( mojo::PendingReceiver<mojom::DataDecoderService> receiver); + + DataDecoderService(const DataDecoderService&) = delete; + DataDecoderService& operator=(const DataDecoderService&) = delete; + ~DataDecoderService() override; // May be used to establish a latent DataDecoderService binding for this @@ -94,8 +98,6 @@ web_bundle_parser_factory_binder_; base::RepeatingCallback<void(mojo::PendingReceiver<mojom::WebBundler>)> web_bundler_binder_; - - DISALLOW_COPY_AND_ASSIGN(DataDecoderService); }; } // namespace data_decoder
diff --git a/services/data_decoder/image_decoder_impl.h b/services/data_decoder/image_decoder_impl.h index 5ab5bd2..2357adf 100644 --- a/services/data_decoder/image_decoder_impl.h +++ b/services/data_decoder/image_decoder_impl.h
@@ -16,6 +16,10 @@ class ImageDecoderImpl : public mojom::ImageDecoder { public: ImageDecoderImpl(); + + ImageDecoderImpl(const ImageDecoderImpl&) = delete; + ImageDecoderImpl& operator=(const ImageDecoderImpl&) = delete; + ~ImageDecoderImpl() override; // Overridden from mojom::ImageDecoder: @@ -29,9 +33,6 @@ bool shrink_to_fit, int64_t max_size_in_bytes, DecodeAnimationCallback callback) override; - - private: - DISALLOW_COPY_AND_ASSIGN(ImageDecoderImpl); }; } // namespace data_decoder
diff --git a/services/data_decoder/image_decoder_impl_unittest.cc b/services/data_decoder/image_decoder_impl_unittest.cc index 89db08d..9127d4c 100644 --- a/services/data_decoder/image_decoder_impl_unittest.cc +++ b/services/data_decoder/image_decoder_impl_unittest.cc
@@ -92,10 +92,10 @@ blink::CreateMainThreadAndInitialize(this, &binders); } - ~BlinkInitializer() override = default; + BlinkInitializer(const BlinkInitializer&) = delete; + BlinkInitializer& operator=(const BlinkInitializer&) = delete; - private: - DISALLOW_COPY_AND_ASSIGN(BlinkInitializer); + ~BlinkInitializer() override = default; }; base::LazyInstance<BlinkInitializer>::Leaky g_blink_initializer =
diff --git a/services/data_decoder/json_parser_impl.h b/services/data_decoder/json_parser_impl.h index b70660d..4bf8c9f 100644 --- a/services/data_decoder/json_parser_impl.h +++ b/services/data_decoder/json_parser_impl.h
@@ -15,13 +15,15 @@ class JsonParserImpl : public mojom::JsonParser { public: JsonParserImpl(); + + JsonParserImpl(const JsonParserImpl&) = delete; + JsonParserImpl& operator=(const JsonParserImpl&) = delete; + ~JsonParserImpl() override; private: // mojom::JsonParser implementation. void Parse(const std::string& json, ParseCallback callback) override; - - DISALLOW_COPY_AND_ASSIGN(JsonParserImpl); }; } // namespace data_decoder
diff --git a/services/data_decoder/public/cpp/data_decoder.h b/services/data_decoder/public/cpp/data_decoder.h index f0f0080..dc85410c 100644 --- a/services/data_decoder/public/cpp/data_decoder.h +++ b/services/data_decoder/public/cpp/data_decoder.h
@@ -50,6 +50,10 @@ DataDecoder(); // Creates a DataDecoder with the specified timeout. explicit DataDecoder(base::TimeDelta idle_timeout); + + DataDecoder(const DataDecoder&) = delete; + DataDecoder& operator=(const DataDecoder&) = delete; + ~DataDecoder(); // The result of a service call that can return either a value of type T or an @@ -145,8 +149,6 @@ // This instance's connection to the service. This connection is lazily // established and may be reset after long periods of idle time. mojo::Remote<mojom::DataDecoderService> service_; - - DISALLOW_COPY_AND_ASSIGN(DataDecoder); }; } // namespace data_decoder
diff --git a/services/data_decoder/public/cpp/safe_web_bundle_parser.h b/services/data_decoder/public/cpp/safe_web_bundle_parser.h index aa830d232..4edcbec3 100644 --- a/services/data_decoder/public/cpp/safe_web_bundle_parser.h +++ b/services/data_decoder/public/cpp/safe_web_bundle_parser.h
@@ -20,6 +20,10 @@ class SafeWebBundleParser { public: SafeWebBundleParser(); + + SafeWebBundleParser(const SafeWebBundleParser&) = delete; + SafeWebBundleParser& operator=(const SafeWebBundleParser&) = delete; + // Remaining callbacks on flight will be dropped. ~SafeWebBundleParser(); @@ -67,8 +71,6 @@ base::OnceClosure disconnect_callback_; size_t response_callback_next_id_ = 0; bool disconnected_ = true; - - DISALLOW_COPY_AND_ASSIGN(SafeWebBundleParser); }; } // namespace data_decoder
diff --git a/services/data_decoder/public/cpp/test_support/in_process_data_decoder.h b/services/data_decoder/public/cpp/test_support/in_process_data_decoder.h index 9e0b5cf..c59166d7 100644 --- a/services/data_decoder/public/cpp/test_support/in_process_data_decoder.h +++ b/services/data_decoder/public/cpp/test_support/in_process_data_decoder.h
@@ -23,6 +23,10 @@ class InProcessDataDecoder : public ServiceProvider { public: InProcessDataDecoder(); + + InProcessDataDecoder(const InProcessDataDecoder&) = delete; + InProcessDataDecoder& operator=(const InProcessDataDecoder&) = delete; + ~InProcessDataDecoder() override; DataDecoderService& service() { return service_; } @@ -40,8 +44,6 @@ DataDecoderService service_; mojo::ReceiverSet<mojom::DataDecoderService> receivers_; base::WeakPtrFactory<InProcessDataDecoder> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(InProcessDataDecoder); }; } // namespace test
diff --git a/services/data_decoder/xml_parser.h b/services/data_decoder/xml_parser.h index 53ee659c..c73ed54 100644 --- a/services/data_decoder/xml_parser.h +++ b/services/data_decoder/xml_parser.h
@@ -16,13 +16,15 @@ class XmlParser : public mojom::XmlParser { public: XmlParser(); + + XmlParser(const XmlParser&) = delete; + XmlParser& operator=(const XmlParser&) = delete; + ~XmlParser() override; private: // mojom::XmlParser implementation. void Parse(const std::string& xml, ParseCallback callback) override; - - DISALLOW_COPY_AND_ASSIGN(XmlParser); }; } // namespace data_decoder
diff --git a/services/device/battery/battery_monitor_impl.h b/services/device/battery/battery_monitor_impl.h index 1dbd546..57efb2d55 100644 --- a/services/device/battery/battery_monitor_impl.h +++ b/services/device/battery/battery_monitor_impl.h
@@ -18,6 +18,10 @@ static void Create(mojo::PendingReceiver<mojom::BatteryMonitor> receiver); BatteryMonitorImpl(); + + BatteryMonitorImpl(const BatteryMonitorImpl&) = delete; + BatteryMonitorImpl& operator=(const BatteryMonitorImpl&) = delete; + ~BatteryMonitorImpl() override; private: @@ -33,8 +37,6 @@ QueryNextStatusCallback callback_; mojom::BatteryStatus status_; bool status_to_report_; - - DISALLOW_COPY_AND_ASSIGN(BatteryMonitorImpl); }; } // namespace device
diff --git a/services/device/battery/battery_monitor_impl_unittest.cc b/services/device/battery/battery_monitor_impl_unittest.cc index 2c9782ed6..279774b 100644 --- a/services/device/battery/battery_monitor_impl_unittest.cc +++ b/services/device/battery/battery_monitor_impl_unittest.cc
@@ -44,6 +44,10 @@ explicit FakeBatteryStatusManager( const BatteryStatusService::BatteryUpdateCallback& callback) : callback_(callback), battery_status_available_(true), started_(false) {} + + FakeBatteryStatusManager(const FakeBatteryStatusManager&) = delete; + FakeBatteryStatusManager& operator=(const FakeBatteryStatusManager&) = delete; + ~FakeBatteryStatusManager() override {} // Methods from BatteryStatusManager. @@ -77,13 +81,15 @@ bool battery_status_available_; bool started_; mojom::BatteryStatus status_; - - DISALLOW_COPY_AND_ASSIGN(FakeBatteryStatusManager); }; class BatteryMonitorImplTest : public DeviceServiceTestBase { public: BatteryMonitorImplTest() = default; + + BatteryMonitorImplTest(const BatteryMonitorImplTest&) = delete; + BatteryMonitorImplTest& operator=(const BatteryMonitorImplTest&) = delete; + ~BatteryMonitorImplTest() override = default; protected: @@ -115,8 +121,6 @@ private: FakeBatteryStatusManager* battery_manager_; - - DISALLOW_COPY_AND_ASSIGN(BatteryMonitorImplTest); }; TEST_F(BatteryMonitorImplTest, BatteryManagerDefaultValues) {
diff --git a/services/device/battery/battery_status_manager_chromeos.cc b/services/device/battery/battery_status_manager_chromeos.cc index 6fd17171..21aefcf 100644 --- a/services/device/battery/battery_status_manager_chromeos.cc +++ b/services/device/battery/battery_status_manager_chromeos.cc
@@ -127,6 +127,10 @@ const BatteryStatusService::BatteryUpdateCallback& callback) : observer_(base::MakeRefCounted<PowerManagerObserver>(callback)) {} + BatteryStatusManagerChromeOS(const BatteryStatusManagerChromeOS&) = delete; + BatteryStatusManagerChromeOS& operator=(const BatteryStatusManagerChromeOS&) = + delete; + ~BatteryStatusManagerChromeOS() override { observer_->Stop(); } private: @@ -139,8 +143,6 @@ void StopListeningBatteryChange() override { observer_->Stop(); } scoped_refptr<PowerManagerObserver> observer_; - - DISALLOW_COPY_AND_ASSIGN(BatteryStatusManagerChromeOS); }; } // namespace
diff --git a/services/device/battery/battery_status_manager_default.cc b/services/device/battery/battery_status_manager_default.cc index 35268761..fe24b5a 100644 --- a/services/device/battery/battery_status_manager_default.cc +++ b/services/device/battery/battery_status_manager_default.cc
@@ -17,6 +17,11 @@ public: explicit BatteryStatusManagerDefault( const BatteryStatusService::BatteryUpdateCallback& callback) {} + + BatteryStatusManagerDefault(const BatteryStatusManagerDefault&) = delete; + BatteryStatusManagerDefault& operator=(const BatteryStatusManagerDefault&) = + delete; + ~BatteryStatusManagerDefault() override {} private: @@ -27,8 +32,6 @@ } void StopListeningBatteryChange() override { NOTIMPLEMENTED(); } - - DISALLOW_COPY_AND_ASSIGN(BatteryStatusManagerDefault); }; } // namespace
diff --git a/services/device/battery/battery_status_manager_linux.cc b/services/device/battery/battery_status_manager_linux.cc index 1243d9b..467717f4 100644 --- a/services/device/battery/battery_status_manager_linux.cc +++ b/services/device/battery/battery_status_manager_linux.cc
@@ -37,14 +37,16 @@ public: UPowerProperties(dbus::ObjectProxy* object_proxy, const PropertyChangedCallback callback); + + UPowerProperties(const UPowerProperties&) = delete; + UPowerProperties& operator=(const UPowerProperties&) = delete; + ~UPowerProperties() override; base::Version daemon_version(); private: dbus::Property<std::string> daemon_version_; - - DISALLOW_COPY_AND_ASSIGN(UPowerProperties); }; UPowerProperties::UPowerProperties(dbus::ObjectProxy* object_proxy, @@ -67,6 +69,10 @@ UPowerObject(dbus::Bus* dbus, const PropertyChangedCallback property_changed_callback); + + UPowerObject(const UPowerObject&) = delete; + UPowerObject& operator=(const UPowerObject&) = delete; + ~UPowerObject(); std::vector<dbus::ObjectPath> EnumerateDevices(); @@ -79,8 +85,6 @@ dbus::Bus* dbus_; // Owned by the BatteryStatusNotificationThread. dbus::ObjectProxy* proxy_; // Owned by the dbus. std::unique_ptr<UPowerProperties> properties_; - - DISALLOW_COPY_AND_ASSIGN(UPowerObject); }; UPowerObject::UPowerObject( @@ -134,6 +138,10 @@ public: BatteryProperties(dbus::ObjectProxy* object_proxy, const PropertyChangedCallback callback); + + BatteryProperties(const BatteryProperties&) = delete; + BatteryProperties& operator=(const BatteryProperties&) = delete; + ~BatteryProperties() override; void ConnectSignals() override; @@ -155,8 +163,6 @@ dbus::Property<int64_t> time_to_empty_; dbus::Property<int64_t> time_to_full_; dbus::Property<uint32_t> type_; - - DISALLOW_COPY_AND_ASSIGN(BatteryProperties); }; BatteryProperties::BatteryProperties(dbus::ObjectProxy* object_proxy, @@ -229,6 +235,10 @@ BatteryObject(dbus::Bus* dbus, const dbus::ObjectPath& device_path, const PropertyChangedCallback& property_changed_callback); + + BatteryObject(const BatteryObject&) = delete; + BatteryObject& operator=(const BatteryObject&) = delete; + ~BatteryObject(); bool IsValid() const; @@ -240,8 +250,6 @@ dbus::Bus* dbus_; // Owned by the BatteryStatusNotificationThread, dbus::ObjectProxy* proxy_; // Owned by the dbus. std::unique_ptr<BatteryProperties> properties_; - - DISALLOW_COPY_AND_ASSIGN(BatteryObject); }; BatteryObject::BatteryObject( @@ -316,6 +324,11 @@ const BatteryStatusService::BatteryUpdateCallback& callback) : base::Thread(kBatteryNotifierThreadName), callback_(callback) {} + BatteryStatusNotificationThread(const BatteryStatusNotificationThread&) = + delete; + BatteryStatusNotificationThread& operator=( + const BatteryStatusNotificationThread&) = delete; + ~BatteryStatusNotificationThread() override { // Make sure to shutdown the dbus connection if it is still open in the very // end. It needs to happen on the BatteryStatusNotificationThread. @@ -564,8 +577,6 @@ std::unique_ptr<UPowerObject> upower_; std::unique_ptr<BatteryObject> battery_; bool notifying_battery_status_ = false; - - DISALLOW_COPY_AND_ASSIGN(BatteryStatusNotificationThread); }; BatteryStatusManagerLinux::BatteryStatusManagerLinux(
diff --git a/services/device/battery/battery_status_manager_linux.h b/services/device/battery/battery_status_manager_linux.h index 2e4b7da..cd7d69c5 100644 --- a/services/device/battery/battery_status_manager_linux.h +++ b/services/device/battery/battery_status_manager_linux.h
@@ -46,6 +46,11 @@ public: explicit BatteryStatusManagerLinux( const BatteryStatusService::BatteryUpdateCallback& callback); + + BatteryStatusManagerLinux(const BatteryStatusManagerLinux&) = delete; + BatteryStatusManagerLinux& operator=(const BatteryStatusManagerLinux&) = + delete; + ~BatteryStatusManagerLinux() override; private: @@ -67,8 +72,6 @@ BatteryStatusService::BatteryUpdateCallback callback_; std::unique_ptr<BatteryStatusNotificationThread> notifier_thread_; - - DISALLOW_COPY_AND_ASSIGN(BatteryStatusManagerLinux); }; } // namespace device
diff --git a/services/device/battery/battery_status_manager_mac.cc b/services/device/battery/battery_status_manager_mac.cc index 82a240e..3f22ecd 100644 --- a/services/device/battery/battery_status_manager_mac.cc +++ b/services/device/battery/battery_status_manager_mac.cc
@@ -162,6 +162,9 @@ explicit BatteryStatusObserver(const BatteryCallback& callback) : callback_(callback) {} + BatteryStatusObserver(const BatteryStatusObserver&) = delete; + BatteryStatusObserver& operator=(const BatteryStatusObserver&) = delete; + ~BatteryStatusObserver() { DCHECK(!notifier_run_loop_source_); } void Start() { @@ -198,8 +201,6 @@ BatteryCallback callback_; base::ScopedCFTypeRef<CFRunLoopSourceRef> notifier_run_loop_source_; - - DISALLOW_COPY_AND_ASSIGN(BatteryStatusObserver); }; class BatteryStatusManagerMac : public BatteryStatusManager { @@ -207,6 +208,9 @@ explicit BatteryStatusManagerMac(const BatteryCallback& callback) : notifier_(std::make_unique<BatteryStatusObserver>(callback)) {} + BatteryStatusManagerMac(const BatteryStatusManagerMac&) = delete; + BatteryStatusManagerMac& operator=(const BatteryStatusManagerMac&) = delete; + ~BatteryStatusManagerMac() override { notifier_->Stop(); } // BatteryStatusManager: @@ -219,8 +223,6 @@ private: std::unique_ptr<BatteryStatusObserver> notifier_; - - DISALLOW_COPY_AND_ASSIGN(BatteryStatusManagerMac); }; } // namespace
diff --git a/services/device/battery/battery_status_manager_win.cc b/services/device/battery/battery_status_manager_win.cc index e4d69ac..d191154 100644 --- a/services/device/battery/battery_status_manager_win.cc +++ b/services/device/battery/battery_status_manager_win.cc
@@ -28,6 +28,9 @@ battery_change_handle_(nullptr), callback_(callback) {} + BatteryStatusObserver(const BatteryStatusObserver&) = delete; + BatteryStatusObserver& operator=(const BatteryStatusObserver&) = delete; + ~BatteryStatusObserver() { DCHECK(!window_); } void Start() { @@ -113,14 +116,16 @@ HPOWERNOTIFY battery_change_handle_; BatteryCallback callback_; std::unique_ptr<base::win::MessageWindow> window_; - - DISALLOW_COPY_AND_ASSIGN(BatteryStatusObserver); }; class BatteryStatusManagerWin : public BatteryStatusManager { public: explicit BatteryStatusManagerWin(const BatteryCallback& callback) : battery_observer_(std::make_unique<BatteryStatusObserver>(callback)) {} + + BatteryStatusManagerWin(const BatteryStatusManagerWin&) = delete; + BatteryStatusManagerWin& operator=(const BatteryStatusManagerWin&) = delete; + ~BatteryStatusManagerWin() override { battery_observer_->Stop(); } public: @@ -134,8 +139,6 @@ private: std::unique_ptr<BatteryStatusObserver> battery_observer_; - - DISALLOW_COPY_AND_ASSIGN(BatteryStatusManagerWin); }; } // namespace
diff --git a/services/device/battery/battery_status_service.h b/services/device/battery/battery_status_service.h index be4e1f9..e44279b 100644 --- a/services/device/battery/battery_status_service.h +++ b/services/device/battery/battery_status_service.h
@@ -32,6 +32,10 @@ // BatteryStatusService object in an std::unique_ptr. Clients should use only // the static GetInstance() method above. BatteryStatusService(); + + BatteryStatusService(const BatteryStatusService&) = delete; + BatteryStatusService& operator=(const BatteryStatusService&) = delete; + virtual ~BatteryStatusService(); // Adds a callback to receive battery status updates. Must be called on the @@ -66,8 +70,6 @@ mojom::BatteryStatus status_; bool status_updated_; bool is_shutdown_; - - DISALLOW_COPY_AND_ASSIGN(BatteryStatusService); }; } // namespace device
diff --git a/services/device/battery/battery_status_service_unittest.cc b/services/device/battery/battery_status_service_unittest.cc index b3c946d..f5674cf 100644 --- a/services/device/battery/battery_status_service_unittest.cc +++ b/services/device/battery/battery_status_service_unittest.cc
@@ -23,6 +23,10 @@ explicit FakeBatteryManager( const BatteryStatusService::BatteryUpdateCallback& callback) : callback_(callback), start_invoked_count_(0), stop_invoked_count_(0) {} + + FakeBatteryManager(const FakeBatteryManager&) = delete; + FakeBatteryManager& operator=(const FakeBatteryManager&) = delete; + ~FakeBatteryManager() override {} // Methods from Battery Status Manager @@ -44,8 +48,6 @@ BatteryStatusService::BatteryUpdateCallback callback_; int start_invoked_count_; int stop_invoked_count_; - - DISALLOW_COPY_AND_ASSIGN(FakeBatteryManager); }; } // namespace @@ -56,6 +58,10 @@ : battery_manager_(nullptr), callback1_invoked_count_(0), callback2_invoked_count_(0) {} + + BatteryStatusServiceTest(const BatteryStatusServiceTest&) = delete; + BatteryStatusServiceTest& operator=(const BatteryStatusServiceTest&) = delete; + ~BatteryStatusServiceTest() override {} protected: @@ -116,8 +122,6 @@ int callback1_invoked_count_; int callback2_invoked_count_; mojom::BatteryStatus battery_status_; - - DISALLOW_COPY_AND_ASSIGN(BatteryStatusServiceTest); }; TEST_F(BatteryStatusServiceTest, AddFirstCallback) {
diff --git a/services/device/bluetooth/bluetooth_system.h b/services/device/bluetooth/bluetooth_system.h index 5415ed3..15074d7 100644 --- a/services/device/bluetooth/bluetooth_system.h +++ b/services/device/bluetooth/bluetooth_system.h
@@ -32,6 +32,10 @@ explicit BluetoothSystem( mojo::PendingRemote<mojom::BluetoothSystemClient> client); + + BluetoothSystem(const BluetoothSystem&) = delete; + BluetoothSystem& operator=(const BluetoothSystem&) = delete; + ~BluetoothSystem() override; // bluez::BluetoothAdapterClient::Observer @@ -78,8 +82,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<BluetoothSystem> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(BluetoothSystem); }; } // namespace device
diff --git a/services/device/bluetooth/bluetooth_system_factory.h b/services/device/bluetooth/bluetooth_system_factory.h index 2e2d45d7..1ddf9b7 100644 --- a/services/device/bluetooth/bluetooth_system_factory.h +++ b/services/device/bluetooth/bluetooth_system_factory.h
@@ -18,15 +18,16 @@ mojo::PendingReceiver<mojom::BluetoothSystemFactory> receiver); BluetoothSystemFactory(); + + BluetoothSystemFactory(const BluetoothSystemFactory&) = delete; + BluetoothSystemFactory& operator=(const BluetoothSystemFactory&) = delete; + ~BluetoothSystemFactory() override; // mojom::BluetoothSystemFactory void Create( mojo::PendingReceiver<mojom::BluetoothSystem> system_receiver, mojo::PendingRemote<mojom::BluetoothSystemClient> system_client) override; - - private: - DISALLOW_COPY_AND_ASSIGN(BluetoothSystemFactory); }; } // namespace device
diff --git a/services/device/bluetooth/bluetooth_system_unittest.cc b/services/device/bluetooth/bluetooth_system_unittest.cc index 62a61f6..d5cb8357 100644 --- a/services/device/bluetooth/bluetooth_system_unittest.cc +++ b/services/device/bluetooth/bluetooth_system_unittest.cc
@@ -648,6 +648,10 @@ public mojom::BluetoothSystemClient { public: BluetoothSystemTest() = default; + + BluetoothSystemTest(const BluetoothSystemTest&) = delete; + BluetoothSystemTest& operator=(const BluetoothSystemTest&) = delete; + ~BluetoothSystemTest() override = default; void SetUp() override { @@ -768,9 +772,6 @@ TestBluetoothDeviceClient* test_bluetooth_device_client_; mojo::Receiver<mojom::BluetoothSystemClient> system_client_receiver_{this}; - - private: - DISALLOW_COPY_AND_ASSIGN(BluetoothSystemTest); }; // Tests that the Create method for BluetoothSystemFactory works.
diff --git a/services/device/device_service.h b/services/device/device_service.h index 17dc3b52..a12af40e 100644 --- a/services/device/device_service.h +++ b/services/device/device_service.h
@@ -114,6 +114,10 @@ public: DeviceService(std::unique_ptr<DeviceServiceParams> params, mojo::PendingReceiver<mojom::DeviceService> receiver); + + DeviceService(const DeviceService&) = delete; + DeviceService& operator=(const DeviceService&) = delete; + ~DeviceService() override; void AddReceiver(mojo::PendingReceiver<mojom::DeviceService> receiver); @@ -250,8 +254,6 @@ #if BUILDFLAG(IS_CHROMEOS_ASH) std::unique_ptr<MtpDeviceManager> mtp_device_manager_; #endif - - DISALLOW_COPY_AND_ASSIGN(DeviceService); }; } // namespace device
diff --git a/services/device/device_service_test_base.h b/services/device/device_service_test_base.h index b9f8e3d..a7026e59 100644 --- a/services/device/device_service_test_base.h +++ b/services/device/device_service_test_base.h
@@ -25,6 +25,10 @@ class DeviceServiceTestBase : public testing::Test { public: DeviceServiceTestBase(); + + DeviceServiceTestBase(const DeviceServiceTestBase&) = delete; + DeviceServiceTestBase& operator=(const DeviceServiceTestBase&) = delete; + ~DeviceServiceTestBase() override; // NOTE: It's important to do service instantiation within SetUp instead of @@ -59,8 +63,6 @@ network_connection_tracker_; std::unique_ptr<DeviceService> service_; mojo::Remote<mojom::DeviceService> service_remote_; - - DISALLOW_COPY_AND_ASSIGN(DeviceServiceTestBase); }; } // namespace device
diff --git a/services/device/fingerprint/fingerprint_chromeos.h b/services/device/fingerprint/fingerprint_chromeos.h index 41894f87..2b5b2dd 100644 --- a/services/device/fingerprint/fingerprint_chromeos.h +++ b/services/device/fingerprint/fingerprint_chromeos.h
@@ -37,6 +37,10 @@ }; explicit FingerprintChromeOS(); + + FingerprintChromeOS(const FingerprintChromeOS&) = delete; + FingerprintChromeOS& operator=(const FingerprintChromeOS&) = delete; + ~FingerprintChromeOS() override; // mojom::Fingerprint: @@ -112,8 +116,6 @@ FingerprintSession opened_session_ = FingerprintSession::NONE; base::WeakPtrFactory<FingerprintChromeOS> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FingerprintChromeOS); }; } // namespace device
diff --git a/services/device/fingerprint/fingerprint_chromeos_unittest.cc b/services/device/fingerprint/fingerprint_chromeos_unittest.cc index c3b1abd..5a7dd822 100644 --- a/services/device/fingerprint/fingerprint_chromeos_unittest.cc +++ b/services/device/fingerprint/fingerprint_chromeos_unittest.cc
@@ -22,6 +22,10 @@ explicit FakeFingerprintObserver( mojo::PendingReceiver<mojom::FingerprintObserver> receiver) : receiver_(this, std::move(receiver)) {} + + FakeFingerprintObserver(const FakeFingerprintObserver&) = delete; + FakeFingerprintObserver& operator=(const FakeFingerprintObserver&) = delete; + ~FakeFingerprintObserver() override {} // mojom::FingerprintObserver @@ -54,14 +58,15 @@ int auth_scan_dones_ = 0; // Count of auth scan done signal received. int restarts_ = 0; // Count of restart signal received. int session_failures_ = 0; // Count of session failed signal received. - - DISALLOW_COPY_AND_ASSIGN(FakeFingerprintObserver); }; class FingerprintChromeOSTest : public testing::Test { public: FingerprintChromeOSTest() = default; + FingerprintChromeOSTest(const FingerprintChromeOSTest&) = delete; + FingerprintChromeOSTest& operator=(const FingerprintChromeOSTest&) = delete; + ~FingerprintChromeOSTest() override = default; void SetUp() override { @@ -132,8 +137,6 @@ base::test::SingleThreadTaskEnvironment task_environment_; std::unique_ptr<FingerprintChromeOS> fingerprint_; int get_records_results_ = 0; - - DISALLOW_COPY_AND_ASSIGN(FingerprintChromeOSTest); }; TEST_F(FingerprintChromeOSTest, FingerprintObserverTest) {
diff --git a/services/device/generic_sensor/fake_platform_sensor_and_provider.h b/services/device/generic_sensor/fake_platform_sensor_and_provider.h index c9e7aba1..34ffbc7 100644 --- a/services/device/generic_sensor/fake_platform_sensor_and_provider.h +++ b/services/device/generic_sensor/fake_platform_sensor_and_provider.h
@@ -49,6 +49,11 @@ class FakePlatformSensorProvider : public PlatformSensorProvider { public: FakePlatformSensorProvider(); + + FakePlatformSensorProvider(const FakePlatformSensorProvider&) = delete; + FakePlatformSensorProvider& operator=(const FakePlatformSensorProvider&) = + delete; + ~FakePlatformSensorProvider() override; MOCK_METHOD0(FreeResources, void()); @@ -63,8 +68,6 @@ void CreateSensorInternal(mojom::SensorType type, SensorReadingSharedBuffer* reading_buffer, CreateSensorCallback callback) override; - - DISALLOW_COPY_AND_ASSIGN(FakePlatformSensorProvider); }; // Mock for PlatformSensor's client interface that is used to deliver @@ -75,6 +78,10 @@ // For the given |sensor| this client will be automatically // added in the costructor and removed in the destructor. explicit MockPlatformSensorClient(scoped_refptr<PlatformSensor> sensor); + + MockPlatformSensorClient(const MockPlatformSensorClient&) = delete; + MockPlatformSensorClient& operator=(const MockPlatformSensorClient&) = delete; + ~MockPlatformSensorClient() override; // PlatformSensor::Client: @@ -84,8 +91,6 @@ private: scoped_refptr<PlatformSensor> sensor_; - - DISALLOW_COPY_AND_ASSIGN(MockPlatformSensorClient); }; } // namespace device
diff --git a/services/device/generic_sensor/gravity_fusion_algorithm_using_accelerometer.h b/services/device/generic_sensor/gravity_fusion_algorithm_using_accelerometer.h index 02b1a7f..348ddb0 100644 --- a/services/device/generic_sensor/gravity_fusion_algorithm_using_accelerometer.h +++ b/services/device/generic_sensor/gravity_fusion_algorithm_using_accelerometer.h
@@ -16,6 +16,12 @@ : public PlatformSensorFusionAlgorithm { public: GravityFusionAlgorithmUsingAccelerometer(); + + GravityFusionAlgorithmUsingAccelerometer( + const GravityFusionAlgorithmUsingAccelerometer&) = delete; + GravityFusionAlgorithmUsingAccelerometer& operator=( + const GravityFusionAlgorithmUsingAccelerometer&) = delete; + ~GravityFusionAlgorithmUsingAccelerometer() override; void SetFrequency(double frequency) override; @@ -33,8 +39,6 @@ double gravity_x_; double gravity_y_; double gravity_z_; - - DISALLOW_COPY_AND_ASSIGN(GravityFusionAlgorithmUsingAccelerometer); }; } // namespace device
diff --git a/services/device/generic_sensor/linear_acceleration_fusion_algorithm_using_accelerometer.h b/services/device/generic_sensor/linear_acceleration_fusion_algorithm_using_accelerometer.h index 9fc6d0f..2cbea94 100644 --- a/services/device/generic_sensor/linear_acceleration_fusion_algorithm_using_accelerometer.h +++ b/services/device/generic_sensor/linear_acceleration_fusion_algorithm_using_accelerometer.h
@@ -17,6 +17,12 @@ : public PlatformSensorFusionAlgorithm { public: LinearAccelerationFusionAlgorithmUsingAccelerometer(); + + LinearAccelerationFusionAlgorithmUsingAccelerometer( + const LinearAccelerationFusionAlgorithmUsingAccelerometer&) = delete; + LinearAccelerationFusionAlgorithmUsingAccelerometer& operator=( + const LinearAccelerationFusionAlgorithmUsingAccelerometer&) = delete; + ~LinearAccelerationFusionAlgorithmUsingAccelerometer() override; void SetFrequency(double frequency) override; @@ -34,8 +40,6 @@ double gravity_x_; double gravity_y_; double gravity_z_; - - DISALLOW_COPY_AND_ASSIGN(LinearAccelerationFusionAlgorithmUsingAccelerometer); }; } // namespace device
diff --git a/services/device/generic_sensor/platform_sensor_and_provider_unittest_linux.cc b/services/device/generic_sensor/platform_sensor_and_provider_unittest_linux.cc index 05b36db..4af5f19 100644 --- a/services/device/generic_sensor/platform_sensor_and_provider_unittest_linux.cc +++ b/services/device/generic_sensor/platform_sensor_and_provider_unittest_linux.cc
@@ -90,6 +90,9 @@ // to SensorDeviceManager. class MockSensorDeviceManager : public SensorDeviceManager { public: + MockSensorDeviceManager(const MockSensorDeviceManager&) = delete; + MockSensorDeviceManager& operator=(const MockSensorDeviceManager&) = delete; + ~MockSensorDeviceManager() override = default; // static @@ -159,8 +162,6 @@ private: base::ScopedTempDir sensors_dir_; - - DISALLOW_COPY_AND_ASSIGN(MockSensorDeviceManager); }; // Mock for PlatformSensor's client interface that is used to deliver @@ -175,6 +176,10 @@ ON_CALL(*this, IsSuspended()).WillByDefault(Return(false)); } + LinuxMockPlatformSensorClient(const LinuxMockPlatformSensorClient&) = delete; + LinuxMockPlatformSensorClient& operator=( + const LinuxMockPlatformSensorClient&) = delete; + ~LinuxMockPlatformSensorClient() override { if (sensor_) sensor_->RemoveClient(this); @@ -187,8 +192,6 @@ private: scoped_refptr<PlatformSensor> sensor_; - - DISALLOW_COPY_AND_ASSIGN(LinuxMockPlatformSensorClient); }; class PlatformSensorAndProviderLinuxTest : public ::testing::Test {
diff --git a/services/device/generic_sensor/platform_sensor_fusion_algorithm.h b/services/device/generic_sensor/platform_sensor_fusion_algorithm.h index 01422d1..30d9d93 100644 --- a/services/device/generic_sensor/platform_sensor_fusion_algorithm.h +++ b/services/device/generic_sensor/platform_sensor_fusion_algorithm.h
@@ -18,6 +18,10 @@ // Base class for platform sensor fusion algorithm. class PlatformSensorFusionAlgorithm { public: + PlatformSensorFusionAlgorithm(const PlatformSensorFusionAlgorithm&) = delete; + PlatformSensorFusionAlgorithm& operator=( + const PlatformSensorFusionAlgorithm&) = delete; + virtual ~PlatformSensorFusionAlgorithm(); void set_threshold(double threshold) { threshold_ = threshold; } @@ -66,8 +70,6 @@ mojom::SensorType fused_type_; std::vector<mojom::SensorType> source_types_; - - DISALLOW_COPY_AND_ASSIGN(PlatformSensorFusionAlgorithm); }; } // namespace device
diff --git a/services/device/generic_sensor/platform_sensor_provider.h b/services/device/generic_sensor/platform_sensor_provider.h index 9e2c5e5..2b2319f 100644 --- a/services/device/generic_sensor/platform_sensor_provider.h +++ b/services/device/generic_sensor/platform_sensor_provider.h
@@ -20,6 +20,9 @@ // the current platform. static std::unique_ptr<PlatformSensorProvider> Create(); + PlatformSensorProvider(const PlatformSensorProvider&) = delete; + PlatformSensorProvider& operator=(const PlatformSensorProvider&) = delete; + ~PlatformSensorProvider() override = default; protected: @@ -28,8 +31,6 @@ // Determines if the ISensor or Windows.Devices.Sensors implementation // should be used on Windows. static bool UseWindowsWinrt(); - - DISALLOW_COPY_AND_ASSIGN(PlatformSensorProvider); }; } // namespace device
diff --git a/services/device/generic_sensor/platform_sensor_provider_android.h b/services/device/generic_sensor/platform_sensor_provider_android.h index 28546c9..dcbbdf9 100644 --- a/services/device/generic_sensor/platform_sensor_provider_android.h +++ b/services/device/generic_sensor/platform_sensor_provider_android.h
@@ -14,6 +14,11 @@ class PlatformSensorProviderAndroid : public PlatformSensorProvider { public: PlatformSensorProviderAndroid(); + + PlatformSensorProviderAndroid(const PlatformSensorProviderAndroid&) = delete; + PlatformSensorProviderAndroid& operator=( + const PlatformSensorProviderAndroid&) = delete; + ~PlatformSensorProviderAndroid() override; void SetSensorManagerToNullForTesting(); @@ -45,8 +50,6 @@ // Java object org.chromium.device.sensors.PlatformSensorProvider base::android::ScopedJavaGlobalRef<jobject> j_object_; - - DISALLOW_COPY_AND_ASSIGN(PlatformSensorProviderAndroid); }; } // namespace device
diff --git a/services/device/generic_sensor/platform_sensor_provider_base.cc b/services/device/generic_sensor/platform_sensor_provider_base.cc index 0a7414a..eda3fe7 100644 --- a/services/device/generic_sensor/platform_sensor_provider_base.cc +++ b/services/device/generic_sensor/platform_sensor_provider_base.cc
@@ -43,14 +43,11 @@ return; } - auto it = requests_map_.find(type); - if (it != requests_map_.end()) { - it->second.push_back(std::move(callback)); - } else { // This is the first CreateSensor call. - auto& requests = requests_map_[type]; - requests.clear(); - requests.push_back(std::move(callback)); - + auto& requests = requests_map_[type]; + const bool callback_queue_was_empty = requests.empty(); + requests.push_back(std::move(callback)); + if (callback_queue_was_empty) { + // This is the first CreateSensor call. CreateSensorInternal( type, reading_buffer, base::BindOnce(&PlatformSensorProviderBase::NotifySensorCreated,
diff --git a/services/device/generic_sensor/platform_sensor_provider_linux.h b/services/device/generic_sensor/platform_sensor_provider_linux.h index 9130a86..24dfe0a8 100644 --- a/services/device/generic_sensor/platform_sensor_provider_linux.h +++ b/services/device/generic_sensor/platform_sensor_provider_linux.h
@@ -19,6 +19,11 @@ public SensorDeviceManager::Delegate { public: PlatformSensorProviderLinux(); + + PlatformSensorProviderLinux(const PlatformSensorProviderLinux&) = delete; + PlatformSensorProviderLinux& operator=(const PlatformSensorProviderLinux&) = + delete; + ~PlatformSensorProviderLinux() override; // Sets another service provided by tests. @@ -82,8 +87,6 @@ sensor_device_manager_; base::WeakPtrFactory<PlatformSensorProviderLinux> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PlatformSensorProviderLinux); }; } // namespace device
diff --git a/services/device/generic_sensor/platform_sensor_provider_mac.h b/services/device/generic_sensor/platform_sensor_provider_mac.h index 1a7282d..9d6cbc6 100644 --- a/services/device/generic_sensor/platform_sensor_provider_mac.h +++ b/services/device/generic_sensor/platform_sensor_provider_mac.h
@@ -12,15 +12,17 @@ class PlatformSensorProviderMac : public PlatformSensorProvider { public: PlatformSensorProviderMac(); + + PlatformSensorProviderMac(const PlatformSensorProviderMac&) = delete; + PlatformSensorProviderMac& operator=(const PlatformSensorProviderMac&) = + delete; + ~PlatformSensorProviderMac() override; protected: void CreateSensorInternal(mojom::SensorType type, SensorReadingSharedBuffer* reading_buffer, CreateSensorCallback callback) override; - - private: - DISALLOW_COPY_AND_ASSIGN(PlatformSensorProviderMac); }; } // namespace device
diff --git a/services/device/generic_sensor/platform_sensor_provider_win.h b/services/device/generic_sensor/platform_sensor_provider_win.h index d4a1c95..ff02f73 100644 --- a/services/device/generic_sensor/platform_sensor_provider_win.h +++ b/services/device/generic_sensor/platform_sensor_provider_win.h
@@ -22,6 +22,11 @@ class PlatformSensorProviderWin final : public PlatformSensorProvider { public: PlatformSensorProviderWin(); + + PlatformSensorProviderWin(const PlatformSensorProviderWin&) = delete; + PlatformSensorProviderWin& operator=(const PlatformSensorProviderWin&) = + delete; + ~PlatformSensorProviderWin() override; // Overrides ISensorManager COM interface provided by the system, used @@ -52,8 +57,6 @@ scoped_refptr<base::SingleThreadTaskRunner> com_sta_task_runner_; Microsoft::WRL::ComPtr<ISensorManager> sensor_manager_; - - DISALLOW_COPY_AND_ASSIGN(PlatformSensorProviderWin); }; } // namespace device
diff --git a/services/device/generic_sensor/platform_sensor_reader_linux.cc b/services/device/generic_sensor/platform_sensor_reader_linux.cc index 4866266..697b745 100644 --- a/services/device/generic_sensor/platform_sensor_reader_linux.cc +++ b/services/device/generic_sensor/platform_sensor_reader_linux.cc
@@ -26,6 +26,10 @@ public: PollingSensorReader(const SensorInfoLinux& sensor_info, base::WeakPtr<PlatformSensorLinux> sensor); + + PollingSensorReader(const PollingSensorReader&) = delete; + PollingSensorReader& operator=(const PollingSensorReader&) = delete; + ~PollingSensorReader() override; // SensorReader overrides @@ -42,6 +46,11 @@ BlockingTaskRunnerHelper( base::WeakPtr<PollingSensorReader> polling_sensor_reader, const SensorInfoLinux& sensor_info); + + BlockingTaskRunnerHelper(const BlockingTaskRunnerHelper&) = delete; + BlockingTaskRunnerHelper& operator=(const BlockingTaskRunnerHelper&) = + delete; + ~BlockingTaskRunnerHelper(); // Starts polling for data at a given |frequency|, and stops if there is an @@ -72,8 +81,6 @@ const SensorInfoLinux sensor_info_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(BlockingTaskRunnerHelper); }; // Receives a reading from the platform sensor and forwards it to |sensor_|. @@ -95,8 +102,6 @@ blocking_task_helper_; base::WeakPtrFactory<PollingSensorReader> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PollingSensorReader); }; PollingSensorReader::BlockingTaskRunnerHelper::BlockingTaskRunnerHelper(
diff --git a/services/device/generic_sensor/platform_sensor_reader_linux.h b/services/device/generic_sensor/platform_sensor_reader_linux.h index 1f631616..6f78ea0 100644 --- a/services/device/generic_sensor/platform_sensor_reader_linux.h +++ b/services/device/generic_sensor/platform_sensor_reader_linux.h
@@ -26,6 +26,9 @@ const SensorInfoLinux& sensor_info, base::WeakPtr<PlatformSensorLinux> sensor); + SensorReader(const SensorReader&) = delete; + SensorReader& operator=(const SensorReader&) = delete; + virtual ~SensorReader(); // Starts fetching data based on strategy this reader has chosen. @@ -48,8 +51,6 @@ // Indicates if reading is active. bool is_reading_active_; - - DISALLOW_COPY_AND_ASSIGN(SensorReader); }; } // namespace device
diff --git a/services/device/generic_sensor/platform_sensor_reader_win.h b/services/device/generic_sensor/platform_sensor_reader_win.h index 2dfc29b..a21a446 100644 --- a/services/device/generic_sensor/platform_sensor_reader_win.h +++ b/services/device/generic_sensor/platform_sensor_reader_win.h
@@ -39,6 +39,10 @@ WARN_UNUSED_RESULT; void StopSensor() override; + PlatformSensorReaderWin32(const PlatformSensorReaderWin32&) = delete; + PlatformSensorReaderWin32& operator=(const PlatformSensorReaderWin32&) = + delete; + // Must be destructed on the same thread that was used during construction. ~PlatformSensorReaderWin32() override; @@ -71,8 +75,6 @@ Microsoft::WRL::ComPtr<ISensor> sensor_; Microsoft::WRL::ComPtr<ISensorEvents> event_listener_; base::WeakPtrFactory<PlatformSensorReaderWin32> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PlatformSensorReaderWin32); }; } // namespace device
diff --git a/services/device/generic_sensor/sensor_impl.h b/services/device/generic_sensor/sensor_impl.h index 73586e83..5f68282b 100644 --- a/services/device/generic_sensor/sensor_impl.h +++ b/services/device/generic_sensor/sensor_impl.h
@@ -18,6 +18,10 @@ class SensorImpl final : public mojom::Sensor, public PlatformSensor::Client { public: explicit SensorImpl(scoped_refptr<PlatformSensor> sensor); + + SensorImpl(const SensorImpl&) = delete; + SensorImpl& operator=(const SensorImpl&) = delete; + ~SensorImpl() override; mojo::PendingReceiver<mojom::SensorClient> GetClient(); @@ -44,8 +48,6 @@ mojo::Remote<mojom::SensorClient> client_; bool reading_notification_enabled_; bool suspended_; - - DISALLOW_COPY_AND_ASSIGN(SensorImpl); }; } // namespace device
diff --git a/services/device/generic_sensor/sensor_provider_impl.h b/services/device/generic_sensor/sensor_provider_impl.h index 7fcc137..ce179e9b 100644 --- a/services/device/generic_sensor/sensor_provider_impl.h +++ b/services/device/generic_sensor/sensor_provider_impl.h
@@ -24,6 +24,10 @@ class SensorProviderImpl final : public mojom::SensorProvider { public: explicit SensorProviderImpl(std::unique_ptr<PlatformSensorProvider> provider); + + SensorProviderImpl(const SensorProviderImpl&) = delete; + SensorProviderImpl& operator=(const SensorProviderImpl&) = delete; + ~SensorProviderImpl() override; void Bind(mojo::PendingReceiver<mojom::SensorProvider> receiver); @@ -43,8 +47,6 @@ mojo::ReceiverSet<mojom::SensorProvider> receivers_; mojo::UniqueReceiverSet<mojom::Sensor> sensor_receivers_; base::WeakPtrFactory<SensorProviderImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SensorProviderImpl); }; } // namespace device
diff --git a/services/device/geolocation/fake_location_provider.h b/services/device/geolocation/fake_location_provider.h index 54d7c5a7d..bb16c37d 100644 --- a/services/device/geolocation/fake_location_provider.h +++ b/services/device/geolocation/fake_location_provider.h
@@ -21,6 +21,10 @@ enum State { STOPPED, LOW_ACCURACY, HIGH_ACCURACY } state_ = STOPPED; FakeLocationProvider(); + + FakeLocationProvider(const FakeLocationProvider&) = delete; + FakeLocationProvider& operator=(const FakeLocationProvider&) = delete; + ~FakeLocationProvider() override; // Updates listeners with the new position. @@ -43,8 +47,6 @@ bool is_permission_granted_ = false; mojom::Geoposition position_; LocationProviderUpdateCallback callback_; - - DISALLOW_COPY_AND_ASSIGN(FakeLocationProvider); }; } // namespace device
diff --git a/services/device/geolocation/fake_position_cache.h b/services/device/geolocation/fake_position_cache.h index 998f12a..c2d6952d 100644 --- a/services/device/geolocation/fake_position_cache.h +++ b/services/device/geolocation/fake_position_cache.h
@@ -17,6 +17,10 @@ class FakePositionCache : public PositionCache { public: FakePositionCache(); + + FakePositionCache(const FakePositionCache&) = delete; + FakePositionCache& operator=(const FakePositionCache&) = delete; + ~FakePositionCache() override; void CachePosition(const WifiData& wifi_data, @@ -30,7 +34,6 @@ private: std::vector<std::pair<WifiData, mojom::Geoposition>> data; mojom::Geoposition last_used_position; - DISALLOW_COPY_AND_ASSIGN(FakePositionCache); }; } // namespace device
diff --git a/services/device/geolocation/geolocation_config.h b/services/device/geolocation/geolocation_config.h index 20f15cd..423011a3 100644 --- a/services/device/geolocation/geolocation_config.h +++ b/services/device/geolocation/geolocation_config.h
@@ -16,15 +16,16 @@ class GeolocationConfig : public mojom::GeolocationConfig { public: GeolocationConfig(); + + GeolocationConfig(const GeolocationConfig&) = delete; + GeolocationConfig& operator=(const GeolocationConfig&) = delete; + ~GeolocationConfig() override; static void Create(mojo::PendingReceiver<mojom::GeolocationConfig> receiver); void IsHighAccuracyLocationBeingCaptured( IsHighAccuracyLocationBeingCapturedCallback callback) override; - - private: - DISALLOW_COPY_AND_ASSIGN(GeolocationConfig); }; } // namespace device
diff --git a/services/device/geolocation/geolocation_context.h b/services/device/geolocation/geolocation_context.h index b7c65a6..ffba32c 100644 --- a/services/device/geolocation/geolocation_context.h +++ b/services/device/geolocation/geolocation_context.h
@@ -24,6 +24,10 @@ class GeolocationContext : public mojom::GeolocationContext { public: GeolocationContext(); + + GeolocationContext(const GeolocationContext&) = delete; + GeolocationContext& operator=(const GeolocationContext&) = delete; + ~GeolocationContext() override; // Creates GeolocationContext that is strongly bound to |receiver|. @@ -43,8 +47,6 @@ std::vector<std::unique_ptr<GeolocationImpl>> impls_; mojom::GeopositionPtr geoposition_override_; - - DISALLOW_COPY_AND_ASSIGN(GeolocationContext); }; } // namespace device
diff --git a/services/device/geolocation/geolocation_impl.h b/services/device/geolocation/geolocation_impl.h index 11c8e5d..dda37eb 100644 --- a/services/device/geolocation/geolocation_impl.h +++ b/services/device/geolocation/geolocation_impl.h
@@ -21,6 +21,10 @@ // |context| must outlive this object. GeolocationImpl(mojo::PendingReceiver<mojom::Geolocation> receiver, GeolocationContext* context); + + GeolocationImpl(const GeolocationImpl&) = delete; + GeolocationImpl& operator=(const GeolocationImpl&) = delete; + ~GeolocationImpl() override; // Starts listening for updates. @@ -67,8 +71,6 @@ bool high_accuracy_; bool has_position_to_report_; - - DISALLOW_COPY_AND_ASSIGN(GeolocationImpl); }; } // namespace device
diff --git a/services/device/geolocation/geolocation_service_unittest.cc b/services/device/geolocation/geolocation_service_unittest.cc index 8d515058..757a18f7 100644 --- a/services/device/geolocation/geolocation_service_unittest.cc +++ b/services/device/geolocation/geolocation_service_unittest.cc
@@ -41,6 +41,11 @@ class GeolocationServiceUnitTest : public DeviceServiceTestBase { public: GeolocationServiceUnitTest() = default; + + GeolocationServiceUnitTest(const GeolocationServiceUnitTest&) = delete; + GeolocationServiceUnitTest& operator=(const GeolocationServiceUnitTest&) = + delete; + ~GeolocationServiceUnitTest() override = default; protected: @@ -91,8 +96,6 @@ mojo::Remote<mojom::GeolocationContext> geolocation_context_; mojo::Remote<mojom::Geolocation> geolocation_; mojo::Remote<mojom::GeolocationConfig> geolocation_config_; - - DISALLOW_COPY_AND_ASSIGN(GeolocationServiceUnitTest); }; #if BUILDFLAG(IS_CHROMEOS_ASH) || defined(OS_ANDROID)
diff --git a/services/device/geolocation/network_location_provider.h b/services/device/geolocation/network_location_provider.h index 79f4676..dda1dbf 100644 --- a/services/device/geolocation/network_location_provider.h +++ b/services/device/geolocation/network_location_provider.h
@@ -36,6 +36,10 @@ const scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, const std::string& api_key, PositionCache* position_cache); + + NetworkLocationProvider(const NetworkLocationProvider&) = delete; + NetworkLocationProvider& operator=(const NetworkLocationProvider&) = delete; + ~NetworkLocationProvider() override; // LocationProvider implementation @@ -106,8 +110,6 @@ bool is_awaiting_initial_permission_status_ = true; base::WeakPtrFactory<NetworkLocationProvider> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(NetworkLocationProvider); }; } // namespace device
diff --git a/services/device/geolocation/network_location_request.h b/services/device/geolocation/network_location_request.h index 9c3746c..e04a533 100644 --- a/services/device/geolocation/network_location_request.h +++ b/services/device/geolocation/network_location_request.h
@@ -42,6 +42,10 @@ scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory, const std::string& api_key, LocationResponseCallback callback); + + NetworkLocationRequest(const NetworkLocationRequest&) = delete; + NetworkLocationRequest& operator=(const NetworkLocationRequest&) = delete; + ~NetworkLocationRequest(); // Makes a new request using the specified |wifi_data|. Returns true if the @@ -69,8 +73,6 @@ // when the response arrives. WifiData wifi_data_; base::Time wifi_timestamp_; - - DISALLOW_COPY_AND_ASSIGN(NetworkLocationRequest); }; } // namespace device
diff --git a/services/device/geolocation/position_cache_impl.h b/services/device/geolocation/position_cache_impl.h index b8de389..4f39a8a 100644 --- a/services/device/geolocation/position_cache_impl.h +++ b/services/device/geolocation/position_cache_impl.h
@@ -36,6 +36,10 @@ // |clock| is used to measure time left until kMaximumLifetime. explicit PositionCacheImpl(const base::TickClock* clock); + + PositionCacheImpl(const PositionCacheImpl&) = delete; + PositionCacheImpl& operator=(const PositionCacheImpl&) = delete; + ~PositionCacheImpl() override; void CachePosition(const WifiData& wifi_data, @@ -63,6 +67,10 @@ CacheEntry(const Hash& hash, const mojom::Geoposition& position, std::unique_ptr<base::OneShotTimer> eviction_timer); + + CacheEntry(const CacheEntry&) = delete; + CacheEntry& operator=(const CacheEntry&) = delete; + ~CacheEntry(); CacheEntry(CacheEntry&&); CacheEntry& operator=(CacheEntry&&); @@ -74,7 +82,6 @@ Hash hash_; mojom::Geoposition position_; std::unique_ptr<base::OneShotTimer> eviction_timer_; - DISALLOW_COPY_AND_ASSIGN(CacheEntry); }; static Hash MakeKey(const WifiData& wifi_data); @@ -83,7 +90,6 @@ const base::TickClock* clock_; std::vector<CacheEntry> data_; mojom::Geoposition last_used_position_; - DISALLOW_COPY_AND_ASSIGN(PositionCacheImpl); }; } // namespace device
diff --git a/services/device/geolocation/public_ip_address_geolocation_provider.h b/services/device/geolocation/public_ip_address_geolocation_provider.h index bbbd53b..e19868d 100644 --- a/services/device/geolocation/public_ip_address_geolocation_provider.h +++ b/services/device/geolocation/public_ip_address_geolocation_provider.h
@@ -38,6 +38,12 @@ scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory, network::NetworkConnectionTracker* network_connection_tracker, const std::string& api_key); + + PublicIpAddressGeolocationProvider( + const PublicIpAddressGeolocationProvider&) = delete; + PublicIpAddressGeolocationProvider& operator=( + const PublicIpAddressGeolocationProvider&) = delete; + ~PublicIpAddressGeolocationProvider() override; // Binds a PublicIpAddressGeolocationProvider request to this instance. @@ -64,8 +70,6 @@ provider_receiver_set_; mojo::UniqueReceiverSet<mojom::Geolocation> geolocation_receiver_set_; - - DISALLOW_COPY_AND_ASSIGN(PublicIpAddressGeolocationProvider); }; } // namespace device
diff --git a/services/device/geolocation/public_ip_address_geolocator.h b/services/device/geolocation/public_ip_address_geolocator.h index 3bdc13dd..03f8609 100644 --- a/services/device/geolocation/public_ip_address_geolocator.h +++ b/services/device/geolocation/public_ip_address_geolocator.h
@@ -33,6 +33,11 @@ PublicIpAddressGeolocator(const net::PartialNetworkTrafficAnnotationTag tag, PublicIpAddressLocationNotifier* notifier, BadMessageCallback callback); + + PublicIpAddressGeolocator(const PublicIpAddressGeolocator&) = delete; + PublicIpAddressGeolocator& operator=(const PublicIpAddressGeolocator&) = + delete; + ~PublicIpAddressGeolocator() override; private: @@ -58,8 +63,6 @@ // Bad message callback. BadMessageCallback bad_message_callback_; - - DISALLOW_COPY_AND_ASSIGN(PublicIpAddressGeolocator); }; } // namespace device
diff --git a/services/device/geolocation/public_ip_address_geolocator_unittest.cc b/services/device/geolocation/public_ip_address_geolocator_unittest.cc index 9920fdb..2828f2b 100644 --- a/services/device/geolocation/public_ip_address_geolocator_unittest.cc +++ b/services/device/geolocation/public_ip_address_geolocator_unittest.cc
@@ -39,6 +39,10 @@ kTestGeolocationApiKey); } + PublicIpAddressGeolocatorTest(const PublicIpAddressGeolocatorTest&) = delete; + PublicIpAddressGeolocatorTest& operator=( + const PublicIpAddressGeolocatorTest&) = delete; + ~PublicIpAddressGeolocatorTest() override {} protected: @@ -112,8 +116,6 @@ // Test URLLoaderFactory for handling requests to the geolocation API. network::TestURLLoaderFactory test_url_loader_factory_; - - DISALLOW_COPY_AND_ASSIGN(PublicIpAddressGeolocatorTest); }; // Basic test of a client invoking QueryNextPosition.
diff --git a/services/device/geolocation/public_ip_address_location_notifier.h b/services/device/geolocation/public_ip_address_location_notifier.h index 19b3bdd..8047547 100644 --- a/services/device/geolocation/public_ip_address_location_notifier.h +++ b/services/device/geolocation/public_ip_address_location_notifier.h
@@ -37,6 +37,12 @@ scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory, network::NetworkConnectionTracker* network_connection_tracker, const std::string& api_key); + + PublicIpAddressLocationNotifier(const PublicIpAddressLocationNotifier&) = + delete; + PublicIpAddressLocationNotifier& operator=( + const PublicIpAddressLocationNotifier&) = delete; + ~PublicIpAddressLocationNotifier() override; using QueryNextPositionCallback = @@ -111,8 +117,6 @@ // Weak references to |this| for posted tasks. base::WeakPtrFactory<PublicIpAddressLocationNotifier> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PublicIpAddressLocationNotifier); }; } // namespace device
diff --git a/services/device/geolocation/wifi_data_provider_linux.cc b/services/device/geolocation/wifi_data_provider_linux.cc index ffb0cb0..d56c0e2 100644 --- a/services/device/geolocation/wifi_data_provider_linux.cc +++ b/services/device/geolocation/wifi_data_provider_linux.cc
@@ -49,6 +49,10 @@ class NetworkManagerWlanApi : public WifiDataProviderCommon::WlanApiInterface { public: NetworkManagerWlanApi(); + + NetworkManagerWlanApi(const NetworkManagerWlanApi&) = delete; + NetworkManagerWlanApi& operator=(const NetworkManagerWlanApi&) = delete; + ~NetworkManagerWlanApi() override; // Must be called before any other interface method. Will return false if the @@ -85,8 +89,6 @@ scoped_refptr<dbus::Bus> system_bus_; dbus::ObjectProxy* network_manager_proxy_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(NetworkManagerWlanApi); }; // Convert a wifi frequency to the corresponding channel. Adapted from
diff --git a/services/device/geolocation/wifi_polling_policy.h b/services/device/geolocation/wifi_polling_policy.h index 4d201b66..08ed9b54 100644 --- a/services/device/geolocation/wifi_polling_policy.h +++ b/services/device/geolocation/wifi_polling_policy.h
@@ -15,6 +15,9 @@ // Allows sharing and mocking of the update polling policy function. class WifiPollingPolicy { public: + WifiPollingPolicy(const WifiPollingPolicy&) = delete; + WifiPollingPolicy& operator=(const WifiPollingPolicy&) = delete; + virtual ~WifiPollingPolicy() = default; // Methods for managing the single instance of WifiPollingPolicy. The WiFi @@ -51,9 +54,6 @@ protected: WifiPollingPolicy() = default; - - private: - DISALLOW_COPY_AND_ASSIGN(WifiPollingPolicy); }; // Generic polling policy, constants are compile-time parameterized to allow
diff --git a/services/device/geolocation/win/fake_geocoordinate_winrt.h b/services/device/geolocation/win/fake_geocoordinate_winrt.h index 7f7c602..2bf04de 100644 --- a/services/device/geolocation/win/fake_geocoordinate_winrt.h +++ b/services/device/geolocation/win/fake_geocoordinate_winrt.h
@@ -35,6 +35,10 @@ public: explicit FakeGeocoordinate( std::unique_ptr<FakeGeocoordinateData> position_data); + + FakeGeocoordinate(const FakeGeocoordinate&) = delete; + FakeGeocoordinate& operator=(const FakeGeocoordinate&) = delete; + ~FakeGeocoordinate() override; IFACEMETHODIMP get_Latitude(DOUBLE* value) override; IFACEMETHODIMP get_Longitude(DOUBLE* value) override; @@ -52,8 +56,6 @@ private: std::unique_ptr<FakeGeocoordinateData> position_data_; - - DISALLOW_COPY_AND_ASSIGN(FakeGeocoordinate); }; } // namespace device
diff --git a/services/device/geolocation/win/fake_geolocator_winrt.h b/services/device/geolocation/win/fake_geolocator_winrt.h index fa6b8dc7..a58d905 100644 --- a/services/device/geolocation/win/fake_geolocator_winrt.h +++ b/services/device/geolocation/win/fake_geolocator_winrt.h
@@ -26,6 +26,10 @@ FakeGeolocatorWinrt( std::unique_ptr<FakeGeocoordinateData> position_data, ABI::Windows::Devices::Geolocation::PositionStatus position_status); + + FakeGeolocatorWinrt(const FakeGeolocatorWinrt&) = delete; + FakeGeolocatorWinrt& operator=(const FakeGeolocatorWinrt&) = delete; + ~FakeGeolocatorWinrt() override; // IGeolocator: @@ -81,8 +85,6 @@ const ABI::Windows::Devices::Geolocation::PositionStatus position_status_; base::WeakPtrFactory<FakeGeolocatorWinrt> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeGeolocatorWinrt); }; } // namespace device
diff --git a/services/device/geolocation/win/fake_geoposition_winrt.h b/services/device/geolocation/win/fake_geoposition_winrt.h index 1744a85..6c89fdaa 100644 --- a/services/device/geolocation/win/fake_geoposition_winrt.h +++ b/services/device/geolocation/win/fake_geoposition_winrt.h
@@ -25,6 +25,10 @@ public: explicit FakeGeoposition( std::unique_ptr<FakeGeocoordinateData> position_data); + + FakeGeoposition(const FakeGeoposition&) = delete; + FakeGeoposition& operator=(const FakeGeoposition&) = delete; + ~FakeGeoposition() override; IFACEMETHODIMP get_Coordinate( ABI::Windows::Devices::Geolocation::IGeocoordinate** value) override; @@ -33,7 +37,6 @@ private: std::unique_ptr<FakeGeocoordinateData> position_data_; - DISALLOW_COPY_AND_ASSIGN(FakeGeoposition); }; } // namespace device
diff --git a/services/device/geolocation/win/fake_position_changed_event_args_winrt.h b/services/device/geolocation/win/fake_position_changed_event_args_winrt.h index 64fb17e..61692ca 100644 --- a/services/device/geolocation/win/fake_position_changed_event_args_winrt.h +++ b/services/device/geolocation/win/fake_position_changed_event_args_winrt.h
@@ -25,14 +25,17 @@ public: explicit FakePositionChangedEventArgs( std::unique_ptr<FakeGeocoordinateData> position_data); + + FakePositionChangedEventArgs(const FakePositionChangedEventArgs&) = delete; + FakePositionChangedEventArgs& operator=(const FakePositionChangedEventArgs&) = + delete; + ~FakePositionChangedEventArgs() override; IFACEMETHODIMP get_Position( ABI::Windows::Devices::Geolocation::IGeoposition** value) override; private: std::unique_ptr<FakeGeocoordinateData> position_data_; - - DISALLOW_COPY_AND_ASSIGN(FakePositionChangedEventArgs); }; } // namespace device
diff --git a/services/device/geolocation/win/fake_status_changed_event_args_winrt.h b/services/device/geolocation/win/fake_status_changed_event_args_winrt.h index f238ec6a..e736e3a 100644 --- a/services/device/geolocation/win/fake_status_changed_event_args_winrt.h +++ b/services/device/geolocation/win/fake_status_changed_event_args_winrt.h
@@ -22,14 +22,17 @@ public: explicit FakeStatusChangedEventArgs( ABI::Windows::Devices::Geolocation::PositionStatus position_status); + + FakeStatusChangedEventArgs(const FakeStatusChangedEventArgs&) = delete; + FakeStatusChangedEventArgs& operator=(const FakeStatusChangedEventArgs&) = + delete; + ~FakeStatusChangedEventArgs() override; IFACEMETHODIMP get_Status( ABI::Windows::Devices::Geolocation::PositionStatus* value) override; private: const ABI::Windows::Devices::Geolocation::PositionStatus position_status_; - - DISALLOW_COPY_AND_ASSIGN(FakeStatusChangedEventArgs); }; } // namespace device
diff --git a/services/device/geolocation/win/location_provider_winrt.h b/services/device/geolocation/win/location_provider_winrt.h index cd9bc56..788fc47 100644 --- a/services/device/geolocation/win/location_provider_winrt.h +++ b/services/device/geolocation/win/location_provider_winrt.h
@@ -18,6 +18,10 @@ class LocationProviderWinrt : public LocationProvider { public: LocationProviderWinrt(); + + LocationProviderWinrt(const LocationProviderWinrt&) = delete; + LocationProviderWinrt& operator=(const LocationProviderWinrt&) = delete; + ~LocationProviderWinrt() override; // LocationProvider implementation. @@ -63,8 +67,6 @@ base::TimeTicks position_callback_initialized_time_; THREAD_CHECKER(thread_checker_); base::WeakPtrFactory<LocationProviderWinrt> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(LocationProviderWinrt); }; } // namespace device
diff --git a/services/device/hid/hid_connection_linux.cc b/services/device/hid/hid_connection_linux.cc index 539f58dd..18fa287 100644 --- a/services/device/hid/hid_connection_linux.cc +++ b/services/device/hid/hid_connection_linux.cc
@@ -46,6 +46,9 @@ has_report_id_ = device_info->has_report_id(); } + BlockingTaskRunnerHelper(const BlockingTaskRunnerHelper&) = delete; + BlockingTaskRunnerHelper& operator=(const BlockingTaskRunnerHelper&) = delete; + ~BlockingTaskRunnerHelper() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); } @@ -177,8 +180,6 @@ base::WeakPtr<HidConnectionLinux> connection_; const scoped_refptr<base::SequencedTaskRunner> origin_task_runner_; std::unique_ptr<base::FileDescriptorWatcher::Controller> file_watcher_; - - DISALLOW_COPY_AND_ASSIGN(BlockingTaskRunnerHelper); }; HidConnectionLinux::HidConnectionLinux(
diff --git a/services/device/hid/hid_service_linux.cc b/services/device/hid/hid_service_linux.cc index 1ad8af2d..1c684481 100644 --- a/services/device/hid/hid_service_linux.cc +++ b/services/device/hid/hid_service_linux.cc
@@ -221,6 +221,9 @@ DETACH_FROM_SEQUENCE(sequence_checker_); } + BlockingTaskRunnerHelper(const BlockingTaskRunnerHelper&) = delete; + BlockingTaskRunnerHelper& operator=(const BlockingTaskRunnerHelper&) = delete; + ~BlockingTaskRunnerHelper() override { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); } @@ -347,8 +350,6 @@ // This weak pointer is only valid when checked on this task runner. base::WeakPtr<HidServiceLinux> service_; scoped_refptr<base::SequencedTaskRunner> task_runner_; - - DISALLOW_COPY_AND_ASSIGN(BlockingTaskRunnerHelper); }; HidServiceLinux::HidServiceLinux()
diff --git a/services/device/hid/input_service_linux.h b/services/device/hid/input_service_linux.h index e81ebdf..dfa14c3 100644 --- a/services/device/hid/input_service_linux.h +++ b/services/device/hid/input_service_linux.h
@@ -29,6 +29,10 @@ using DeviceMap = std::map<std::string, mojom::InputDeviceInfoPtr>; InputServiceLinux(); + + InputServiceLinux(const InputServiceLinux&) = delete; + InputServiceLinux& operator=(const InputServiceLinux&) = delete; + ~InputServiceLinux() override; // Binds the |receiver| to an InputServiceLinux instance. @@ -69,8 +73,6 @@ base::ThreadChecker thread_checker_; mojo::ReceiverSet<mojom::InputDeviceManager> receivers_; mojo::AssociatedRemoteSet<mojom::InputDeviceManagerClient> clients_; - - DISALLOW_COPY_AND_ASSIGN(InputServiceLinux); }; } // namespace device
diff --git a/services/device/media_transfer_protocol/media_transfer_protocol_daemon_client.h b/services/device/media_transfer_protocol/media_transfer_protocol_daemon_client.h index 45f9a96..d85f52fd 100644 --- a/services/device/media_transfer_protocol/media_transfer_protocol_daemon_client.h +++ b/services/device/media_transfer_protocol/media_transfer_protocol_daemon_client.h
@@ -92,6 +92,11 @@ base::RepeatingCallback<void(bool is_attach, const std::string& storage_name)>; + MediaTransferProtocolDaemonClient(const MediaTransferProtocolDaemonClient&) = + delete; + MediaTransferProtocolDaemonClient& operator=( + const MediaTransferProtocolDaemonClient&) = delete; + virtual ~MediaTransferProtocolDaemonClient(); // Calls EnumerateStorages method. |callback| is called after the @@ -206,9 +211,6 @@ protected: // Create() should be used instead. MediaTransferProtocolDaemonClient(); - - private: - DISALLOW_COPY_AND_ASSIGN(MediaTransferProtocolDaemonClient); }; } // namespace device
diff --git a/services/device/media_transfer_protocol/mtp_device_manager.h b/services/device/media_transfer_protocol/mtp_device_manager.h index 03c8bfe..5476eaf 100644 --- a/services/device/media_transfer_protocol/mtp_device_manager.h +++ b/services/device/media_transfer_protocol/mtp_device_manager.h
@@ -39,6 +39,10 @@ class MtpDeviceManager : public mojom::MtpManager { public: MtpDeviceManager(); + + MtpDeviceManager(const MtpDeviceManager&) = delete; + MtpDeviceManager& operator=(const MtpDeviceManager&) = delete; + ~MtpDeviceManager() override; void AddReceiver(mojo::PendingReceiver<mojom::MtpManager> receiver); @@ -204,8 +208,6 @@ base::ThreadChecker thread_checker_; base::WeakPtrFactory<MtpDeviceManager> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(MtpDeviceManager); }; } // namespace device
diff --git a/services/device/power_monitor/power_monitor_message_broadcaster.h b/services/device/power_monitor/power_monitor_message_broadcaster.h index 2fb99222..75efec5 100644 --- a/services/device/power_monitor/power_monitor_message_broadcaster.h +++ b/services/device/power_monitor/power_monitor_message_broadcaster.h
@@ -22,6 +22,12 @@ public device::mojom::PowerMonitor { public: PowerMonitorMessageBroadcaster(); + + PowerMonitorMessageBroadcaster(const PowerMonitorMessageBroadcaster&) = + delete; + PowerMonitorMessageBroadcaster& operator=( + const PowerMonitorMessageBroadcaster&) = delete; + ~PowerMonitorMessageBroadcaster() override; void Bind(mojo::PendingReceiver<device::mojom::PowerMonitor> receiver); @@ -40,8 +46,6 @@ private: mojo::ReceiverSet<device::mojom::PowerMonitor> receivers_; mojo::RemoteSet<device::mojom::PowerMonitorClient> clients_; - - DISALLOW_COPY_AND_ASSIGN(PowerMonitorMessageBroadcaster); }; } // namespace device
diff --git a/services/device/public/cpp/generic_sensor/sensor_reading_shared_buffer_reader.h b/services/device/public/cpp/generic_sensor/sensor_reading_shared_buffer_reader.h index b91dd996..ed43fc1 100644 --- a/services/device/public/cpp/generic_sensor/sensor_reading_shared_buffer_reader.h +++ b/services/device/public/cpp/generic_sensor/sensor_reading_shared_buffer_reader.h
@@ -23,6 +23,11 @@ mojo::ScopedSharedBufferHandle reading_buffer_handle, uint64_t reading_buffer_offset); + SensorReadingSharedBufferReader(const SensorReadingSharedBufferReader&) = + delete; + SensorReadingSharedBufferReader& operator=( + const SensorReadingSharedBufferReader&) = delete; + ~SensorReadingSharedBufferReader(); // Get sensor reading from shared buffer. @@ -40,8 +45,6 @@ mojo::ScopedSharedBufferHandle shared_buffer_handle_; mojo::ScopedSharedBufferMapping shared_buffer_; - - DISALLOW_COPY_AND_ASSIGN(SensorReadingSharedBufferReader); }; } // namespace device
diff --git a/services/device/public/cpp/hid/fake_input_service_linux.h b/services/device/public/cpp/hid/fake_input_service_linux.h index 169fbac..6931ced 100644 --- a/services/device/public/cpp/hid/fake_input_service_linux.h +++ b/services/device/public/cpp/hid/fake_input_service_linux.h
@@ -21,6 +21,10 @@ using DeviceMap = std::map<std::string, mojom::InputDeviceInfoPtr>; FakeInputServiceLinux(); + + FakeInputServiceLinux(const FakeInputServiceLinux&) = delete; + FakeInputServiceLinux& operator=(const FakeInputServiceLinux&) = delete; + ~FakeInputServiceLinux() override; // mojom::InputDeviceManager implementation: @@ -38,8 +42,6 @@ private: mojo::ReceiverSet<mojom::InputDeviceManager> receivers_; mojo::AssociatedRemoteSet<mojom::InputDeviceManagerClient> clients_; - - DISALLOW_COPY_AND_ASSIGN(FakeInputServiceLinux); }; } // namespace device
diff --git a/services/device/public/cpp/power_monitor/power_monitor_broadcast_source.h b/services/device/public/cpp/power_monitor/power_monitor_broadcast_source.h index bd7a0d88..c767be3f 100644 --- a/services/device/public/cpp/power_monitor/power_monitor_broadcast_source.h +++ b/services/device/public/cpp/power_monitor/power_monitor_broadcast_source.h
@@ -27,6 +27,11 @@ public: PowerMonitorBroadcastSource( scoped_refptr<base::SequencedTaskRunner> task_runner); + + PowerMonitorBroadcastSource(const PowerMonitorBroadcastSource&) = delete; + PowerMonitorBroadcastSource& operator=(const PowerMonitorBroadcastSource&) = + delete; + ~PowerMonitorBroadcastSource() override; // Completes initialization by setting up the connection with the Device @@ -49,6 +54,10 @@ class Client : public device::mojom::PowerMonitorClient { public: Client(); + + Client(const Client&) = delete; + Client& operator=(const Client&) = delete; + ~Client() override; void Init(mojo::PendingRemote<mojom::PowerMonitor> remote_monitor); @@ -66,8 +75,6 @@ mojo::Receiver<device::mojom::PowerMonitorClient> receiver_{this}; bool last_reported_on_battery_power_state_ = false; - - DISALLOW_COPY_AND_ASSIGN(Client); }; // This constructor is used by test code to mock the Client class. @@ -81,8 +88,6 @@ std::unique_ptr<Client> client_; scoped_refptr<base::SequencedTaskRunner> task_runner_; - - DISALLOW_COPY_AND_ASSIGN(PowerMonitorBroadcastSource); }; } // namespace device
diff --git a/services/device/public/cpp/test/fake_sensor_and_provider.h b/services/device/public/cpp/test/fake_sensor_and_provider.h index dc1d022d..55e1975 100644 --- a/services/device/public/cpp/test/fake_sensor_and_provider.h +++ b/services/device/public/cpp/test/fake_sensor_and_provider.h
@@ -19,6 +19,10 @@ class FakeSensor : public mojom::Sensor { public: FakeSensor(mojom::SensorType sensor_type, SensorReadingSharedBuffer* buffer); + + FakeSensor(const FakeSensor&) = delete; + FakeSensor& operator=(const FakeSensor&) = delete; + ~FakeSensor() override; // mojom::Sensor: @@ -49,13 +53,15 @@ bool reading_notification_enabled_ = true; mojo::Remote<mojom::SensorClient> client_; SensorReading reading_; - - DISALLOW_COPY_AND_ASSIGN(FakeSensor); }; class FakeSensorProvider : public mojom::SensorProvider { public: FakeSensorProvider(); + + FakeSensorProvider(const FakeSensorProvider&) = delete; + FakeSensorProvider& operator=(const FakeSensorProvider&) = delete; + ~FakeSensorProvider() override; // mojom::sensorProvider: @@ -152,8 +158,6 @@ mojo::ReceiverSet<mojom::SensorProvider> receivers_{}; mojo::ScopedSharedBufferHandle shared_buffer_handle_; mojo::ScopedSharedBufferMapping shared_buffer_mapping_; - - DISALLOW_COPY_AND_ASSIGN(FakeSensorProvider); }; } // namespace device
diff --git a/services/device/public/cpp/test/fake_serial_port_manager.cc b/services/device/public/cpp/test/fake_serial_port_manager.cc index 83d3df5..2844e6e 100644 --- a/services/device/public/cpp/test/fake_serial_port_manager.cc +++ b/services/device/public/cpp/test/fake_serial_port_manager.cc
@@ -27,6 +27,9 @@ [](FakeSerialPort* self) { delete self; }, base::Unretained(this))); } + FakeSerialPort(const FakeSerialPort&) = delete; + FakeSerialPort& operator=(const FakeSerialPort&) = delete; + ~FakeSerialPort() override = default; mojo::PendingRemote<mojom::SerialPort> BindNewPipeAndPassRemote() { @@ -78,8 +81,6 @@ mojo::ScopedDataPipeConsumerHandle in_stream_; mojo::ScopedDataPipeProducerHandle out_stream_; mojo::Remote<mojom::SerialPortClient> client_; - - DISALLOW_COPY_AND_ASSIGN(FakeSerialPort); }; } // namespace
diff --git a/services/device/public/cpp/test/fake_serial_port_manager.h b/services/device/public/cpp/test/fake_serial_port_manager.h index 1b3b0ef9..954523e3 100644 --- a/services/device/public/cpp/test/fake_serial_port_manager.h +++ b/services/device/public/cpp/test/fake_serial_port_manager.h
@@ -20,6 +20,10 @@ class FakeSerialPortManager : public mojom::SerialPortManager { public: FakeSerialPortManager(); + + FakeSerialPortManager(const FakeSerialPortManager&) = delete; + FakeSerialPortManager& operator=(const FakeSerialPortManager&) = delete; + ~FakeSerialPortManager() override; void AddReceiver(mojo::PendingReceiver<mojom::SerialPortManager> receiver); @@ -46,8 +50,6 @@ mojo::ReceiverSet<mojom::SerialPortManager> receivers_; mojo::RemoteSet<mojom::SerialPortManagerClient> clients_; bool simulate_open_failure_ = false; - - DISALLOW_COPY_AND_ASSIGN(FakeSerialPortManager); }; } // namespace device
diff --git a/services/device/public/cpp/test/fake_usb_device.h b/services/device/public/cpp/test/fake_usb_device.h index 1bb9cad..451fd58 100644 --- a/services/device/public/cpp/test/fake_usb_device.h +++ b/services/device/public/cpp/test/fake_usb_device.h
@@ -35,6 +35,10 @@ base::span<const uint8_t> blocked_interface_classes, mojo::PendingReceiver<device::mojom::UsbDevice> receiver, mojo::PendingRemote<mojom::UsbDeviceClient> client); + + FakeUsbDevice(const FakeUsbDevice&) = delete; + FakeUsbDevice& operator=(const FakeUsbDevice&) = delete; + ~FakeUsbDevice() override; protected: @@ -106,8 +110,6 @@ // Recording the claimed interface_number list. std::set<uint8_t> claimed_interfaces_; mojo::Remote<device::mojom::UsbDeviceClient> client_; - - DISALLOW_COPY_AND_ASSIGN(FakeUsbDevice); }; } // namespace device
diff --git a/services/device/public/cpp/test/fake_usb_device_manager.h b/services/device/public/cpp/test/fake_usb_device_manager.h index 11e6067..c852093a 100644 --- a/services/device/public/cpp/test/fake_usb_device_manager.h +++ b/services/device/public/cpp/test/fake_usb_device_manager.h
@@ -33,6 +33,10 @@ std::unordered_map<std::string, scoped_refptr<FakeUsbDeviceInfo>>; FakeUsbDeviceManager(); + + FakeUsbDeviceManager(const FakeUsbDeviceManager&) = delete; + FakeUsbDeviceManager& operator=(const FakeUsbDeviceManager&) = delete; + ~FakeUsbDeviceManager() override; void AddReceiver(mojo::PendingReceiver<mojom::UsbDeviceManager> receiver); @@ -104,8 +108,6 @@ DeviceMap devices_; base::WeakPtrFactory<FakeUsbDeviceManager> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeUsbDeviceManager); }; } // namespace device
diff --git a/services/device/public/cpp/test/mock_usb_mojo_device.h b/services/device/public/cpp/test/mock_usb_mojo_device.h index 249f1c9e..8e322878 100644 --- a/services/device/public/cpp/test/mock_usb_mojo_device.h +++ b/services/device/public/cpp/test/mock_usb_mojo_device.h
@@ -21,6 +21,10 @@ class MockUsbMojoDevice : public mojom::UsbDevice { public: MockUsbMojoDevice(); + + MockUsbMojoDevice(const MockUsbMojoDevice&) = delete; + MockUsbMojoDevice& operator=(const MockUsbMojoDevice&) = delete; + ~MockUsbMojoDevice() override; // As current version of gmock in Chromium doesn't support move-only types, @@ -138,9 +142,6 @@ base::span<const uint8_t>, const std::vector<uint32_t>&, uint32_t)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockUsbMojoDevice); }; } // namespace device
diff --git a/services/device/public/cpp/test/test_wake_lock_provider.cc b/services/device/public/cpp/test/test_wake_lock_provider.cc index d6e9856f..5c0b15a8 100644 --- a/services/device/public/cpp/test/test_wake_lock_provider.cc +++ b/services/device/public/cpp/test/test_wake_lock_provider.cc
@@ -27,6 +27,9 @@ &TestWakeLock::OnConnectionError, base::Unretained(this))); } + TestWakeLock(const TestWakeLock&) = delete; + TestWakeLock& operator=(const TestWakeLock&) = delete; + ~TestWakeLock() override = default; mojom::WakeLockType type() const { return type_; } @@ -108,8 +111,6 @@ mojo::ReceiverSet<mojom::WakeLock, std::unique_ptr<bool>> receivers_; int num_lock_requests_ = 0; - - DISALLOW_COPY_AND_ASSIGN(TestWakeLock); }; // Holds the state associated with wake locks of a single type across the
diff --git a/services/device/public/cpp/test/test_wake_lock_provider.h b/services/device/public/cpp/test/test_wake_lock_provider.h index 26735e1..c934b448 100644 --- a/services/device/public/cpp/test/test_wake_lock_provider.h +++ b/services/device/public/cpp/test/test_wake_lock_provider.h
@@ -25,6 +25,10 @@ class TestWakeLockProvider : public mojom::WakeLockProvider { public: TestWakeLockProvider(); + + TestWakeLockProvider(const TestWakeLockProvider&) = delete; + TestWakeLockProvider& operator=(const TestWakeLockProvider&) = delete; + ~TestWakeLockProvider() override; // For internal use only. @@ -67,8 +71,6 @@ // Stores wake lock count and observers associated with each wake lock type. std::map<mojom::WakeLockType, std::unique_ptr<WakeLockDataPerType>> wake_lock_store_; - - DISALLOW_COPY_AND_ASSIGN(TestWakeLockProvider); }; } // namespace device
diff --git a/services/device/screen_orientation/screen_orientation_listener_android.h b/services/device/screen_orientation/screen_orientation_listener_android.h index bf663cad8..21edcc12 100644 --- a/services/device/screen_orientation/screen_orientation_listener_android.h +++ b/services/device/screen_orientation/screen_orientation_listener_android.h
@@ -17,6 +17,11 @@ static void Create( mojo::PendingReceiver<mojom::ScreenOrientationListener> receiver); + ScreenOrientationListenerAndroid(const ScreenOrientationListenerAndroid&) = + delete; + ScreenOrientationListenerAndroid& operator=( + const ScreenOrientationListenerAndroid&) = delete; + ~ScreenOrientationListenerAndroid() override; private: @@ -25,8 +30,6 @@ // mojom::ScreenOrientationListener: void IsAutoRotateEnabledByUser( IsAutoRotateEnabledByUserCallback callback) override; - - DISALLOW_COPY_AND_ASSIGN(ScreenOrientationListenerAndroid); }; } // namespace device
diff --git a/services/device/serial/fake_serial_device_enumerator.h b/services/device/serial/fake_serial_device_enumerator.h index 234c6b6..5904b42b 100644 --- a/services/device/serial/fake_serial_device_enumerator.h +++ b/services/device/serial/fake_serial_device_enumerator.h
@@ -16,6 +16,10 @@ class FakeSerialEnumerator : public SerialDeviceEnumerator { public: FakeSerialEnumerator(); + + FakeSerialEnumerator(const FakeSerialEnumerator&) = delete; + FakeSerialEnumerator& operator=(const FakeSerialEnumerator&) = delete; + ~FakeSerialEnumerator() override; void AddDevicePath(const base::FilePath& path); @@ -23,8 +27,6 @@ private: std::map<base::FilePath, base::UnguessableToken> paths_; - - DISALLOW_COPY_AND_ASSIGN(FakeSerialEnumerator); }; } // namespace device
diff --git a/services/device/serial/serial_device_enumerator_linux.h b/services/device/serial/serial_device_enumerator_linux.h index 17c0284..a7c4f3b 100644 --- a/services/device/serial/serial_device_enumerator_linux.h +++ b/services/device/serial/serial_device_enumerator_linux.h
@@ -23,6 +23,11 @@ explicit SerialDeviceEnumeratorLinux( const base::FilePath& tty_driver_info_path); + + SerialDeviceEnumeratorLinux(const SerialDeviceEnumeratorLinux&) = delete; + SerialDeviceEnumeratorLinux& operator=(const SerialDeviceEnumeratorLinux&) = + delete; + ~SerialDeviceEnumeratorLinux() override; // UdevWatcher::Observer @@ -36,8 +41,6 @@ std::unique_ptr<UdevWatcher> watcher_; const base::FilePath tty_driver_info_path_; std::map<std::string, base::UnguessableToken> paths_; - - DISALLOW_COPY_AND_ASSIGN(SerialDeviceEnumeratorLinux); }; } // namespace device
diff --git a/services/device/serial/serial_device_enumerator_mac.h b/services/device/serial/serial_device_enumerator_mac.h index 0c04c82..3c868f8 100644 --- a/services/device/serial/serial_device_enumerator_mac.h +++ b/services/device/serial/serial_device_enumerator_mac.h
@@ -23,6 +23,11 @@ class SerialDeviceEnumeratorMac : public SerialDeviceEnumerator { public: SerialDeviceEnumeratorMac(); + + SerialDeviceEnumeratorMac(const SerialDeviceEnumeratorMac&) = delete; + SerialDeviceEnumeratorMac& operator=(const SerialDeviceEnumeratorMac&) = + delete; + ~SerialDeviceEnumeratorMac() override; private: @@ -39,8 +44,6 @@ base::mac::ScopedIONotificationPortRef notify_port_; base::mac::ScopedIOObject<io_iterator_t> devices_added_iterator_; base::mac::ScopedIOObject<io_iterator_t> devices_removed_iterator_; - - DISALLOW_COPY_AND_ASSIGN(SerialDeviceEnumeratorMac); }; } // namespace device
diff --git a/services/device/serial/serial_device_enumerator_win.h b/services/device/serial/serial_device_enumerator_win.h index 83d6667..2909a53 100644 --- a/services/device/serial/serial_device_enumerator_win.h +++ b/services/device/serial/serial_device_enumerator_win.h
@@ -20,6 +20,11 @@ public: SerialDeviceEnumeratorWin( scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); + + SerialDeviceEnumeratorWin(const SerialDeviceEnumeratorWin&) = delete; + SerialDeviceEnumeratorWin& operator=(const SerialDeviceEnumeratorWin&) = + delete; + ~SerialDeviceEnumeratorWin() override; void OnPathAdded(const std::wstring& device_path); @@ -35,8 +40,6 @@ std::unique_ptr<UiThreadHelper, base::OnTaskRunnerDeleter> helper_; base::WeakPtrFactory<SerialDeviceEnumeratorWin> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SerialDeviceEnumeratorWin); }; } // namespace device
diff --git a/services/device/serial/serial_port_manager_impl.h b/services/device/serial/serial_port_manager_impl.h index 84eb998..492b5e26 100644 --- a/services/device/serial/serial_port_manager_impl.h +++ b/services/device/serial/serial_port_manager_impl.h
@@ -34,6 +34,10 @@ SerialPortManagerImpl( scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); + + SerialPortManagerImpl(const SerialPortManagerImpl&) = delete; + SerialPortManagerImpl& operator=(const SerialPortManagerImpl&) = delete; + ~SerialPortManagerImpl() override; void Bind(mojo::PendingReceiver<mojom::SerialPortManager> receiver); @@ -70,8 +74,6 @@ mojo::ReceiverSet<SerialPortManager> receivers_; mojo::RemoteSet<mojom::SerialPortManagerClient> clients_; - - DISALLOW_COPY_AND_ASSIGN(SerialPortManagerImpl); }; } // namespace device
diff --git a/services/device/serial/serial_port_manager_impl_unittest.cc b/services/device/serial/serial_port_manager_impl_unittest.cc index 75d998b..0b1d590 100644 --- a/services/device/serial/serial_port_manager_impl_unittest.cc +++ b/services/device/serial/serial_port_manager_impl_unittest.cc
@@ -84,6 +84,10 @@ manager_->SetSerialEnumeratorForTesting(std::move(enumerator)); } + SerialPortManagerImplTest(const SerialPortManagerImplTest&) = delete; + SerialPortManagerImplTest& operator=(const SerialPortManagerImplTest&) = + delete; + ~SerialPortManagerImplTest() override = default; // Since not all functions need to use a MockBluetoothAdapter, this function @@ -154,8 +158,6 @@ private: std::unique_ptr<SerialPortManagerImpl> manager_; - - DISALLOW_COPY_AND_ASSIGN(SerialPortManagerImplTest); }; // This is to simply test that we can enumerate devices on the platform without
diff --git a/services/device/test/usb_test_gadget.h b/services/device/test/usb_test_gadget.h index 515d569a..f8955c4 100644 --- a/services/device/test/usb_test_gadget.h +++ b/services/device/test/usb_test_gadget.h
@@ -32,6 +32,9 @@ ECHO, }; + UsbTestGadget(const UsbTestGadget&) = delete; + UsbTestGadget& operator=(const UsbTestGadget&) = delete; + virtual ~UsbTestGadget() {} static bool IsTestEnabled(); @@ -48,9 +51,6 @@ protected: UsbTestGadget() {} - - private: - DISALLOW_COPY_AND_ASSIGN(UsbTestGadget); }; } // namespace device
diff --git a/services/device/test/usb_test_gadget_impl.cc b/services/device/test/usb_test_gadget_impl.cc index 8ee4fb5..9e6cb15 100644 --- a/services/device/test/usb_test_gadget_impl.cc +++ b/services/device/test/usb_test_gadget_impl.cc
@@ -50,6 +50,10 @@ class UsbTestGadgetImpl : public UsbTestGadget { public: UsbTestGadgetImpl(UsbService* usb_service, scoped_refptr<UsbDevice> device); + + UsbTestGadgetImpl(const UsbTestGadgetImpl&) = delete; + UsbTestGadgetImpl& operator=(const UsbTestGadgetImpl&) = delete; + ~UsbTestGadgetImpl() override; bool Unclaim() override; @@ -62,8 +66,6 @@ std::string device_address_; scoped_refptr<UsbDevice> device_; UsbService* usb_service_; - - DISALLOW_COPY_AND_ASSIGN(UsbTestGadgetImpl); }; namespace { @@ -423,6 +425,10 @@ product_id_(product_id) { observation_.Observe(usb_service_); } + + DeviceAddListener(const DeviceAddListener&) = delete; + DeviceAddListener& operator=(const DeviceAddListener&) = delete; + ~DeviceAddListener() override = default; scoped_refptr<UsbDevice> WaitForAdd() { @@ -476,8 +482,6 @@ scoped_refptr<UsbDevice> device_; base::ScopedObservation<UsbService, UsbService::Observer> observation_{this}; base::WeakPtrFactory<DeviceAddListener> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DeviceAddListener); }; class DeviceRemoveListener : public UsbService::Observer { @@ -486,6 +490,10 @@ : usb_service_(usb_service), device_(device) { observation_.Observe(usb_service_); } + + DeviceRemoveListener(const DeviceRemoveListener&) = delete; + DeviceRemoveListener& operator=(const DeviceRemoveListener&) = delete; + ~DeviceRemoveListener() override = default; void WaitForRemove() { @@ -520,8 +528,6 @@ scoped_refptr<UsbDevice> device_; base::ScopedObservation<UsbService, UsbService::Observer> observation_{this}; base::WeakPtrFactory<DeviceRemoveListener> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DeviceRemoveListener); }; } // namespace
diff --git a/services/device/time_zone_monitor/time_zone_monitor_android.h b/services/device/time_zone_monitor/time_zone_monitor_android.h index 3ad8fcf1..d29822c 100644 --- a/services/device/time_zone_monitor/time_zone_monitor_android.h +++ b/services/device/time_zone_monitor/time_zone_monitor_android.h
@@ -17,6 +17,10 @@ class TimeZoneMonitorAndroid : public TimeZoneMonitor { public: TimeZoneMonitorAndroid(); + + TimeZoneMonitorAndroid(const TimeZoneMonitorAndroid&) = delete; + TimeZoneMonitorAndroid& operator=(const TimeZoneMonitorAndroid&) = delete; + ~TimeZoneMonitorAndroid() override; // Called by the Java implementation when the system time zone changes. @@ -27,8 +31,6 @@ private: // Java provider of system time zone change notifications. base::android::ScopedJavaGlobalRef<jobject> impl_; - - DISALLOW_COPY_AND_ASSIGN(TimeZoneMonitorAndroid); }; } // namespace device
diff --git a/services/device/time_zone_monitor/time_zone_monitor_chromeos.cc b/services/device/time_zone_monitor/time_zone_monitor_chromeos.cc index 1153241..5c57d73 100644 --- a/services/device/time_zone_monitor/time_zone_monitor_chromeos.cc +++ b/services/device/time_zone_monitor/time_zone_monitor_chromeos.cc
@@ -20,6 +20,9 @@ chromeos::system::TimezoneSettings::GetInstance()->AddObserver(this); } + TimeZoneMonitorChromeOS(const TimeZoneMonitorChromeOS&) = delete; + TimeZoneMonitorChromeOS& operator=(const TimeZoneMonitorChromeOS&) = delete; + ~TimeZoneMonitorChromeOS() override { chromeos::system::TimezoneSettings::GetInstance()->RemoveObserver(this); } @@ -30,9 +33,6 @@ // it with detectHostTimeZone() or to update ICU. NotifyClients(GetTimeZoneId(time_zone)); } - - private: - DISALLOW_COPY_AND_ASSIGN(TimeZoneMonitorChromeOS); }; // static
diff --git a/services/device/time_zone_monitor/time_zone_monitor_linux.cc b/services/device/time_zone_monitor/time_zone_monitor_linux.cc index da5b585f..91106e41 100644 --- a/services/device/time_zone_monitor/time_zone_monitor_linux.cc +++ b/services/device/time_zone_monitor/time_zone_monitor_linux.cc
@@ -32,6 +32,10 @@ public: TimeZoneMonitorLinux( scoped_refptr<base::SequencedTaskRunner> file_task_runner); + + TimeZoneMonitorLinux(const TimeZoneMonitorLinux&) = delete; + TimeZoneMonitorLinux& operator=(const TimeZoneMonitorLinux&) = delete; + ~TimeZoneMonitorLinux() override; void NotifyClientsFromImpl() { @@ -59,8 +63,6 @@ private: scoped_refptr<TimeZoneMonitorLinuxImpl> impl_; - - DISALLOW_COPY_AND_ASSIGN(TimeZoneMonitorLinux); }; namespace {
diff --git a/services/device/time_zone_monitor/time_zone_monitor_mac.mm b/services/device/time_zone_monitor/time_zone_monitor_mac.mm index 647ae5e7..8bff85f 100644 --- a/services/device/time_zone_monitor/time_zone_monitor_mac.mm +++ b/services/device/time_zone_monitor/time_zone_monitor_mac.mm
@@ -25,6 +25,9 @@ }]; } + TimeZoneMonitorMac(const TimeZoneMonitorMac&) = delete; + TimeZoneMonitorMac& operator=(const TimeZoneMonitorMac&) = delete; + ~TimeZoneMonitorMac() override { NSNotificationCenter* nc = [NSNotificationCenter defaultCenter]; [nc removeObserver:notification_observer_]; @@ -32,8 +35,6 @@ private: id notification_observer_; - - DISALLOW_COPY_AND_ASSIGN(TimeZoneMonitorMac); }; // static
diff --git a/services/device/usb/mojo/device_impl.h b/services/device/usb/mojo/device_impl.h index a4b2286..1a5c49e9 100644 --- a/services/device/usb/mojo/device_impl.h +++ b/services/device/usb/mojo/device_impl.h
@@ -37,6 +37,9 @@ base::span<const uint8_t> blocked_interface_classes, bool allow_security_key_requests); + DeviceImpl(const DeviceImpl&) = delete; + DeviceImpl& operator=(const DeviceImpl&) = delete; + ~DeviceImpl() override; private: @@ -124,8 +127,6 @@ mojo::SelfOwnedReceiverRef<mojom::UsbDevice> receiver_; mojo::Remote<device::mojom::UsbDeviceClient> client_; base::WeakPtrFactory<DeviceImpl> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DeviceImpl); }; } // namespace usb
diff --git a/services/device/usb/mojo/device_impl_unittest.cc b/services/device/usb/mojo/device_impl_unittest.cc index 8524e27..16b235896 100644 --- a/services/device/usb/mojo/device_impl_unittest.cc +++ b/services/device/usb/mojo/device_impl_unittest.cc
@@ -167,6 +167,9 @@ public: USBDeviceImplTest() : is_device_open_(false), allow_reset_(false) {} + USBDeviceImplTest(const USBDeviceImplTest&) = delete; + USBDeviceImplTest& operator=(const USBDeviceImplTest&) = delete; + ~USBDeviceImplTest() override = default; void TearDown() override { base::RunLoop().RunUntilIdle(); } @@ -467,8 +470,6 @@ base::queue<std::vector<UsbIsochronousPacketPtr>> mock_outbound_packets_; std::set<uint8_t> claimed_interfaces_; - - DISALLOW_COPY_AND_ASSIGN(USBDeviceImplTest); }; } // namespace
diff --git a/services/device/usb/mojo/device_manager_impl.h b/services/device/usb/mojo/device_manager_impl.h index b57cdee..b0784835 100644 --- a/services/device/usb/mojo/device_manager_impl.h +++ b/services/device/usb/mojo/device_manager_impl.h
@@ -40,6 +40,10 @@ DeviceManagerImpl(); // Mostly be used for testing. explicit DeviceManagerImpl(std::unique_ptr<UsbService> usb_service); + + DeviceManagerImpl(const DeviceManagerImpl&) = delete; + DeviceManagerImpl& operator=(const DeviceManagerImpl&) = delete; + ~DeviceManagerImpl() override; void AddReceiver(mojo::PendingReceiver<mojom::UsbDeviceManager> receiver); @@ -118,8 +122,6 @@ mojo::AssociatedRemoteSet<mojom::UsbDeviceManagerClient> clients_; base::WeakPtrFactory<DeviceManagerImpl> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DeviceManagerImpl); }; } // namespace usb
diff --git a/services/device/usb/mojo/device_manager_test.h b/services/device/usb/mojo/device_manager_test.h index 83486ef..44e9554 100644 --- a/services/device/usb/mojo/device_manager_test.h +++ b/services/device/usb/mojo/device_manager_test.h
@@ -22,6 +22,10 @@ // DeviceService and once created it will keep alive until the UsbService // is distroyed. explicit DeviceManagerTest(UsbService* usb_service); + + DeviceManagerTest(const DeviceManagerTest&) = delete; + DeviceManagerTest& operator=(const DeviceManagerTest&) = delete; + ~DeviceManagerTest() override; void BindReceiver( @@ -40,8 +44,6 @@ private: mojo::ReceiverSet<mojom::UsbDeviceManagerTest> receivers_; UsbService* usb_service_; - - DISALLOW_COPY_AND_ASSIGN(DeviceManagerTest); }; } // namespace usb
diff --git a/services/device/usb/scoped_libusb_device_handle.h b/services/device/usb/scoped_libusb_device_handle.h index 5164aaf8..bd5ba04 100644 --- a/services/device/usb/scoped_libusb_device_handle.h +++ b/services/device/usb/scoped_libusb_device_handle.h
@@ -22,6 +22,10 @@ ScopedLibusbDeviceHandle(libusb_device_handle* handle, scoped_refptr<UsbContext> context); ScopedLibusbDeviceHandle(ScopedLibusbDeviceHandle&& other); + + ScopedLibusbDeviceHandle(const ScopedLibusbDeviceHandle&) = delete; + ScopedLibusbDeviceHandle& operator=(const ScopedLibusbDeviceHandle&) = delete; + ~ScopedLibusbDeviceHandle(); libusb_device_handle* get() const { return handle_; } @@ -32,8 +36,6 @@ private: libusb_device_handle* handle_; scoped_refptr<UsbContext> context_; - - DISALLOW_COPY_AND_ASSIGN(ScopedLibusbDeviceHandle); }; } // namespace device
diff --git a/services/device/usb/scoped_libusb_device_ref.h b/services/device/usb/scoped_libusb_device_ref.h index d00d513c..2d1afc551 100644 --- a/services/device/usb/scoped_libusb_device_ref.h +++ b/services/device/usb/scoped_libusb_device_ref.h
@@ -22,6 +22,10 @@ ScopedLibusbDeviceRef(libusb_device* device, scoped_refptr<UsbContext> context); ScopedLibusbDeviceRef(ScopedLibusbDeviceRef&& other); + + ScopedLibusbDeviceRef(const ScopedLibusbDeviceRef&) = delete; + ScopedLibusbDeviceRef& operator=(const ScopedLibusbDeviceRef&) = delete; + ~ScopedLibusbDeviceRef(); libusb_device* get() const { return device_; } @@ -34,8 +38,6 @@ private: libusb_device* device_; scoped_refptr<UsbContext> context_; - - DISALLOW_COPY_AND_ASSIGN(ScopedLibusbDeviceRef); }; bool operator==(const ScopedLibusbDeviceRef& ref, libusb_device* device);
diff --git a/services/device/usb/usb_context.cc b/services/device/usb/usb_context.cc index 9378fbe4..9b6a74b 100644 --- a/services/device/usb/usb_context.cc +++ b/services/device/usb/usb_context.cc
@@ -23,6 +23,10 @@ class UsbContext::UsbEventHandler : public base::SimpleThread { public: explicit UsbEventHandler(libusb_context* context); + + UsbEventHandler(const UsbEventHandler&) = delete; + UsbEventHandler& operator=(const UsbEventHandler&) = delete; + ~UsbEventHandler() override; // base::SimpleThread @@ -33,7 +37,6 @@ private: base::subtle::Atomic32 running_; libusb_context* context_; - DISALLOW_COPY_AND_ASSIGN(UsbEventHandler); }; UsbContext::UsbEventHandler::UsbEventHandler(libusb_context* context)
diff --git a/services/device/usb/usb_device_handle_usbfs.cc b/services/device/usb/usb_device_handle_usbfs.cc index ea5eed61..801ce81 100644 --- a/services/device/usb/usb_device_handle_usbfs.cc +++ b/services/device/usb/usb_device_handle_usbfs.cc
@@ -144,6 +144,10 @@ base::ScopedFD lifeline_fd, scoped_refptr<UsbDeviceHandleUsbfs> device_handle, scoped_refptr<base::SequencedTaskRunner> task_runner); + + BlockingTaskRunnerHelper(const BlockingTaskRunnerHelper&) = delete; + BlockingTaskRunnerHelper& operator=(const BlockingTaskRunnerHelper&) = delete; + ~BlockingTaskRunnerHelper(); void Start(); @@ -168,8 +172,6 @@ scoped_refptr<base::SequencedTaskRunner> task_runner_; std::unique_ptr<base::FileDescriptorWatcher::Controller> watch_controller_; base::SequenceChecker sequence_checker_; - - DISALLOW_COPY_AND_ASSIGN(BlockingTaskRunnerHelper); }; struct UsbDeviceHandleUsbfs::Transfer final {
diff --git a/services/device/usb/usb_device_handle_win.cc b/services/device/usb/usb_device_handle_win.cc index 70e9f52..74f851d7 100644 --- a/services/device/usb/usb_device_handle_win.cc +++ b/services/device/usb/usb_device_handle_win.cc
@@ -146,6 +146,9 @@ overlapped_.hEvent = event_.Get(); } + Request(const Request&) = delete; + Request& operator=(const Request&) = delete; + ~Request() override = default; // Starts watching for completion of the overlapped event. @@ -193,8 +196,6 @@ base::win::ScopedHandle event_; base::win::ObjectWatcher watcher_; base::OnceCallback<void(Request*, DWORD, size_t)> callback_; - - DISALLOW_COPY_AND_ASSIGN(Request); }; UsbDeviceHandleWin::Interface::Interface() = default;
diff --git a/services/device/usb/usb_service.h b/services/device/usb/usb_service.h index 623f3cd3..ddccf37 100644 --- a/services/device/usb/usb_service.h +++ b/services/device/usb/usb_service.h
@@ -62,6 +62,9 @@ // Creates a SequencedTaskRunner with kBlockingTaskTraits. static scoped_refptr<base::SequencedTaskRunner> CreateBlockingTaskRunner(); + UsbService(const UsbService&) = delete; + UsbService& operator=(const UsbService&) = delete; + virtual ~UsbService(); scoped_refptr<UsbDevice> GetDevice(const std::string& guid); @@ -98,8 +101,6 @@ std::unordered_map<std::string, scoped_refptr<UsbDevice>> devices_; std::unordered_set<std::string> testing_devices_; base::ObserverList<Observer, true>::Unchecked observer_list_; - - DISALLOW_COPY_AND_ASSIGN(UsbService); }; } // namespace device
diff --git a/services/device/usb/usb_service_impl.h b/services/device/usb/usb_service_impl.h index 21edd890..50a6317b 100644 --- a/services/device/usb/usb_service_impl.h +++ b/services/device/usb/usb_service_impl.h
@@ -44,6 +44,10 @@ public UsbService { public: UsbServiceImpl(); + + UsbServiceImpl(const UsbServiceImpl&) = delete; + UsbServiceImpl& operator=(const UsbServiceImpl&) = delete; + ~UsbServiceImpl() override; private: @@ -129,8 +133,6 @@ base::WeakPtr<UsbServiceImpl> weak_self_; base::WeakPtrFactory<UsbServiceImpl> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(UsbServiceImpl); }; } // namespace device
diff --git a/services/device/usb/usb_service_linux.cc b/services/device/usb/usb_service_linux.cc index c4aa4e3..4370a47 100644 --- a/services/device/usb/usb_service_linux.cc +++ b/services/device/usb/usb_service_linux.cc
@@ -90,6 +90,10 @@ class UsbServiceLinux::BlockingTaskRunnerHelper : public UdevWatcher::Observer { public: explicit BlockingTaskRunnerHelper(base::WeakPtr<UsbServiceLinux> service); + + BlockingTaskRunnerHelper(const BlockingTaskRunnerHelper&) = delete; + BlockingTaskRunnerHelper& operator=(const BlockingTaskRunnerHelper&) = delete; + ~BlockingTaskRunnerHelper() override; void Start(); @@ -107,8 +111,6 @@ scoped_refptr<base::SequencedTaskRunner> task_runner_; base::SequenceChecker sequence_checker_; - - DISALLOW_COPY_AND_ASSIGN(BlockingTaskRunnerHelper); }; UsbServiceLinux::BlockingTaskRunnerHelper::BlockingTaskRunnerHelper(
diff --git a/services/device/usb/usb_service_linux.h b/services/device/usb/usb_service_linux.h index 00a2fb7..5830b654 100644 --- a/services/device/usb/usb_service_linux.h +++ b/services/device/usb/usb_service_linux.h
@@ -24,6 +24,10 @@ class UsbServiceLinux final : public UsbService { public: UsbServiceLinux(); + + UsbServiceLinux(const UsbServiceLinux&) = delete; + UsbServiceLinux& operator=(const UsbServiceLinux&) = delete; + ~UsbServiceLinux() override; // device::UsbService implementation @@ -59,8 +63,6 @@ DeviceMap devices_by_path_; base::WeakPtrFactory<UsbServiceLinux> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(UsbServiceLinux); }; } // namespace device
diff --git a/services/device/usb/usb_service_win.h b/services/device/usb/usb_service_win.h index 024db64..5c7dfab 100644 --- a/services/device/usb/usb_service_win.h +++ b/services/device/usb/usb_service_win.h
@@ -25,6 +25,10 @@ public UsbService { public: UsbServiceWin(); + + UsbServiceWin(const UsbServiceWin&) = delete; + UsbServiceWin& operator=(const UsbServiceWin&) = delete; + ~UsbServiceWin() override; private: @@ -75,8 +79,6 @@ device_observation_{this}; base::WeakPtrFactory<UsbServiceWin> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(UsbServiceWin); }; } // namespace device
diff --git a/services/device/vibration/vibration_manager_impl_unittest.cc b/services/device/vibration/vibration_manager_impl_unittest.cc index ce4781de..d53beea 100644 --- a/services/device/vibration/vibration_manager_impl_unittest.cc +++ b/services/device/vibration/vibration_manager_impl_unittest.cc
@@ -21,6 +21,10 @@ class VibrationManagerImplTest : public DeviceServiceTestBase { public: VibrationManagerImplTest() = default; + + VibrationManagerImplTest(const VibrationManagerImplTest&) = delete; + VibrationManagerImplTest& operator=(const VibrationManagerImplTest&) = delete; + ~VibrationManagerImplTest() override = default; protected: @@ -63,8 +67,6 @@ private: mojo::Remote<mojom::VibrationManager> vibration_manager_; - - DISALLOW_COPY_AND_ASSIGN(VibrationManagerImplTest); }; TEST_F(VibrationManagerImplTest, VibrateThenCancel) {
diff --git a/services/device/wake_lock/power_save_blocker/power_save_blocker.h b/services/device/wake_lock/power_save_blocker/power_save_blocker.h index 58b6a552..f29cbb7 100644 --- a/services/device/wake_lock/power_save_blocker/power_save_blocker.h +++ b/services/device/wake_lock/power_save_blocker/power_save_blocker.h
@@ -35,6 +35,10 @@ const std::string& description, scoped_refptr<base::SequencedTaskRunner> ui_task_runner, scoped_refptr<base::SingleThreadTaskRunner> blocking_task_runner); + + PowerSaveBlocker(const PowerSaveBlocker&) = delete; + PowerSaveBlocker& operator=(const PowerSaveBlocker&) = delete; + virtual ~PowerSaveBlocker(); #if defined(OS_ANDROID) @@ -63,8 +67,6 @@ scoped_refptr<base::SequencedTaskRunner> ui_task_runner_; scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; - - DISALLOW_COPY_AND_ASSIGN(PowerSaveBlocker); }; } // namespace device
diff --git a/services/device/wake_lock/wake_lock.h b/services/device/wake_lock/wake_lock.h index c2af1aa..9e08614b 100644 --- a/services/device/wake_lock/wake_lock.h +++ b/services/device/wake_lock/wake_lock.h
@@ -60,6 +60,10 @@ WakeLockContextCallback native_view_getter, scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, Observer* observer); + + WakeLock(const WakeLock&) = delete; + WakeLock& operator=(const WakeLock&) = delete; + ~WakeLock() override; // mojom::WakeLock implementation. @@ -105,8 +109,6 @@ // client is being added into the ReceiverSet, we create an unique_ptr<bool> // as its context, which records this client's request status. mojo::ReceiverSet<mojom::WakeLock, std::unique_ptr<bool>> receiver_set_; - - DISALLOW_COPY_AND_ASSIGN(WakeLock); }; } // namespace device
diff --git a/services/device/wake_lock/wake_lock_context.h b/services/device/wake_lock/wake_lock_context.h index 47586b0..66edc01 100644 --- a/services/device/wake_lock/wake_lock_context.h +++ b/services/device/wake_lock/wake_lock_context.h
@@ -27,6 +27,10 @@ WakeLockContext(int context_id, scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, const WakeLockContextCallback& native_view_getter); + + WakeLockContext(const WakeLockContext&) = delete; + WakeLockContext& operator=(const WakeLockContext&) = delete; + ~WakeLockContext() override; // mojom::WakeLockContext: @@ -52,8 +56,6 @@ // All wake locks acquired via this class are managed here. std::vector<std::unique_ptr<WakeLock>> wake_locks_; - - DISALLOW_COPY_AND_ASSIGN(WakeLockContext); }; } // namespace device
diff --git a/services/device/wake_lock/wake_lock_provider.h b/services/device/wake_lock/wake_lock_provider.h index 1b951ab0..c10f54f 100644 --- a/services/device/wake_lock/wake_lock_provider.h +++ b/services/device/wake_lock/wake_lock_provider.h
@@ -28,6 +28,10 @@ public: WakeLockProvider(scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, const WakeLockContextCallback& native_view_getter); + + WakeLockProvider(const WakeLockProvider&) = delete; + WakeLockProvider& operator=(const WakeLockProvider&) = delete; + ~WakeLockProvider() override; // Adds this receiver to |receiverss_|. @@ -71,8 +75,6 @@ // Stores wake lock count and observers associated with each wake lock type. std::map<mojom::WakeLockType, std::unique_ptr<WakeLockDataPerType>> wake_lock_store_; - - DISALLOW_COPY_AND_ASSIGN(WakeLockProvider); }; // namespace device } // namespace device
diff --git a/services/device/wake_lock/wake_lock_unittest.cc b/services/device/wake_lock/wake_lock_unittest.cc index ab282758..b393125 100644 --- a/services/device/wake_lock/wake_lock_unittest.cc +++ b/services/device/wake_lock/wake_lock_unittest.cc
@@ -39,6 +39,9 @@ mojom::WakeLockType::kPreventDisplaySleepAllowDimming, EventCount()); } + TestWakeLockObserver(const TestWakeLockObserver&) = delete; + TestWakeLockObserver& operator=(const TestWakeLockObserver&) = delete; + ~TestWakeLockObserver() override = default; void AddReceiver(mojo::PendingReceiver<mojom::WakeLockObserver> receiver) { @@ -65,13 +68,15 @@ mojo::ReceiverSet<mojom::WakeLockObserver> receivers_; std::map<mojom::WakeLockType, EventCount> wake_lock_events_; - - DISALLOW_COPY_AND_ASSIGN(TestWakeLockObserver); }; class WakeLockTest : public DeviceServiceTestBase { public: WakeLockTest() = default; + + WakeLockTest(const WakeLockTest&) = delete; + WakeLockTest& operator=(const WakeLockTest&) = delete; + ~WakeLockTest() override = default; protected: @@ -146,8 +151,6 @@ mojo::Remote<device::mojom::WakeLockProvider> wake_lock_provider_; mojo::Remote<mojom::WakeLock> wake_lock_; - - DISALLOW_COPY_AND_ASSIGN(WakeLockTest); }; // Request a wake lock, then cancel.
diff --git a/services/image_annotation/annotator.h b/services/image_annotation/annotator.h index 8fcfcf1..d1aa5e42 100644 --- a/services/image_annotation/annotator.h +++ b/services/image_annotation/annotator.h
@@ -92,6 +92,10 @@ double min_ocr_confidence, scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory, std::unique_ptr<Client> client); + + Annotator(const Annotator&) = delete; + Annotator& operator=(const Annotator&) = delete; + ~Annotator() override; // Start providing behavior for the given Mojo receiver. @@ -291,8 +295,6 @@ // Used for all callbacks. base::WeakPtrFactory<Annotator> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(Annotator); }; } // namespace image_annotation
diff --git a/services/image_annotation/image_annotation_service.h b/services/image_annotation/image_annotation_service.h index 456299a..b2e7d33 100644 --- a/services/image_annotation/image_annotation_service.h +++ b/services/image_annotation/image_annotation_service.h
@@ -31,6 +31,10 @@ std::string api_key, scoped_refptr<network::SharedURLLoaderFactory> shared_url_loader_factory, std::unique_ptr<Annotator::Client> annotator_client); + + ImageAnnotationService(const ImageAnnotationService&) = delete; + ImageAnnotationService& operator=(const ImageAnnotationService&) = delete; + ~ImageAnnotationService() override; private: @@ -60,8 +64,6 @@ mojo::Receiver<mojom::ImageAnnotationService> receiver_; Annotator annotator_; - - DISALLOW_COPY_AND_ASSIGN(ImageAnnotationService); }; } // namespace image_annotation
diff --git a/services/image_annotation/public/cpp/image_processor.h b/services/image_annotation/public/cpp/image_processor.h index 6fb4ce0e..7b22e363 100644 --- a/services/image_annotation/public/cpp/image_processor.h +++ b/services/image_annotation/public/cpp/image_processor.h
@@ -28,6 +28,10 @@ // pixels; this will be required for iOS, where pixel // access entails a full image redownload. explicit ImageProcessor(base::RepeatingCallback<SkBitmap()> get_pixels); + + ImageProcessor(const ImageProcessor&) = delete; + ImageProcessor& operator=(const ImageProcessor&) = delete; + ~ImageProcessor() override; // Reencodes the image data for transmission to the service. Will be called by @@ -55,8 +59,6 @@ mojo::ReceiverSet<mojom::ImageProcessor> receivers_; FRIEND_TEST_ALL_PREFIXES(ImageProcessorTest, ImageContent); - - DISALLOW_COPY_AND_ASSIGN(ImageProcessor); }; } // namespace image_annotation
diff --git a/services/media_session/audio_focus_manager.cc b/services/media_session/audio_focus_manager.cc index 74ba0f5..15103718 100644 --- a/services/media_session/audio_focus_manager.cc +++ b/services/media_session/audio_focus_manager.cc
@@ -43,6 +43,9 @@ base::PowerMonitor::AddPowerSuspendObserver(this); } + MediaPowerDelegate(const MediaPowerDelegate&) = delete; + MediaPowerDelegate& operator=(const MediaPowerDelegate&) = delete; + ~MediaPowerDelegate() override { base::PowerMonitor::RemovePowerSuspendObserver(this); } @@ -55,8 +58,6 @@ private: const base::WeakPtr<AudioFocusManager> owner_; - - DISALLOW_COPY_AND_ASSIGN(MediaPowerDelegate); }; class AudioFocusManager::SourceObserverHolder { @@ -71,6 +72,9 @@ &AudioFocusManager::CleanupSourceObservers, base::Unretained(owner))); } + SourceObserverHolder(const SourceObserverHolder&) = delete; + SourceObserverHolder& operator=(const SourceObserverHolder&) = delete; + ~SourceObserverHolder() = default; bool is_valid() const { return observer_.is_connected(); } @@ -92,8 +96,6 @@ private: const base::UnguessableToken identity_; mojo::Remote<mojom::AudioFocusObserver> observer_; - - DISALLOW_COPY_AND_ASSIGN(SourceObserverHolder); }; void AudioFocusManager::RequestAudioFocus(
diff --git a/services/media_session/audio_focus_manager.h b/services/media_session/audio_focus_manager.h index bba3381c..74dce21 100644 --- a/services/media_session/audio_focus_manager.h +++ b/services/media_session/audio_focus_manager.h
@@ -43,6 +43,10 @@ public mojom::MediaControllerManager { public: AudioFocusManager(); + + AudioFocusManager(const AudioFocusManager&) = delete; + AudioFocusManager& operator=(const AudioFocusManager&) = delete; + ~AudioFocusManager() override; // TODO(beccahughes): Remove this. @@ -188,8 +192,6 @@ THREAD_CHECKER(thread_checker_); base::WeakPtrFactory<AudioFocusManager> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(AudioFocusManager); }; } // namespace media_session
diff --git a/services/media_session/audio_focus_request.h b/services/media_session/audio_focus_request.h index dc6acc1..7dc3a53c 100644 --- a/services/media_session/audio_focus_request.h +++ b/services/media_session/audio_focus_request.h
@@ -34,6 +34,9 @@ const base::UnguessableToken& group_id, const base::UnguessableToken& identity); + AudioFocusRequest(const AudioFocusRequest&) = delete; + AudioFocusRequest& operator=(const AudioFocusRequest&) = delete; + ~AudioFocusRequest() override; // mojom::AudioFocusRequestClient. @@ -119,8 +122,6 @@ // Weak pointer to the owning |AudioFocusManager| instance. const base::WeakPtr<AudioFocusManager> owner_; - - DISALLOW_COPY_AND_ASSIGN(AudioFocusRequest); }; } // namespace media_session
diff --git a/services/media_session/media_controller.cc b/services/media_session/media_controller.cc index a07d15e9..6ee69305 100644 --- a/services/media_session/media_controller.cc +++ b/services/media_session/media_controller.cc
@@ -41,6 +41,9 @@ ImagesChanged(current_images); } + ImageObserverHolder(const ImageObserverHolder&) = delete; + ImageObserverHolder& operator=(const ImageObserverHolder&) = delete; + ~ImageObserverHolder() = default; bool is_valid() const { return observer_.is_connected(); } @@ -93,8 +96,6 @@ bool did_send_image_last_ = false; base::WeakPtrFactory<ImageObserverHolder> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ImageObserverHolder); }; MediaController::MediaController() {
diff --git a/services/media_session/media_controller.h b/services/media_session/media_controller.h index 3e3ece08..8c4d743 100644 --- a/services/media_session/media_controller.h +++ b/services/media_session/media_controller.h
@@ -31,6 +31,10 @@ public mojom::MediaSessionObserver { public: MediaController(); + + MediaController(const MediaController&) = delete; + MediaController& operator=(const MediaController&) = delete; + ~MediaController() override; // mojom::MediaController overrides. @@ -121,8 +125,6 @@ // Protects |session_| as it is not thread safe. SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(MediaController); }; } // namespace media_session
diff --git a/services/media_session/media_session_service_impl_unittest.cc b/services/media_session/media_session_service_impl_unittest.cc index f889e7e..6b5fa83 100644 --- a/services/media_session/media_session_service_impl_unittest.cc +++ b/services/media_session/media_session_service_impl_unittest.cc
@@ -13,12 +13,14 @@ class MediaSessionImplTest : public testing::Test { public: MediaSessionImplTest() = default; + + MediaSessionImplTest(const MediaSessionImplTest&) = delete; + MediaSessionImplTest& operator=(const MediaSessionImplTest&) = delete; + ~MediaSessionImplTest() override = default; private: base::test::TaskEnvironment task_environment_; - - DISALLOW_COPY_AND_ASSIGN(MediaSessionImplTest); }; TEST_F(MediaSessionImplTest, InstantiateService) {
diff --git a/services/media_session/public/cpp/media_image_manager.h b/services/media_session/public/cpp/media_image_manager.h index 6b544aa3..a4accdf 100644 --- a/services/media_session/public/cpp/media_image_manager.h +++ b/services/media_session/public/cpp/media_image_manager.h
@@ -55,6 +55,9 @@ // |ideal_size| is the ideal size of the images to select in px. MediaImageManager(int min_size, int ideal_size); + MediaImageManager(const MediaImageManager&) = delete; + MediaImageManager& operator=(const MediaImageManager&) = delete; + ~MediaImageManager(); // Select the best image from the |images|. If an image could not be selected @@ -74,8 +77,6 @@ const int min_size_; const int ideal_size_; - - DISALLOW_COPY_AND_ASSIGN(MediaImageManager); }; } // namespace media_session
diff --git a/services/media_session/public/cpp/test/mock_media_session.h b/services/media_session/public/cpp/test/mock_media_session.h index 265ab41a..3b17f8a0 100644 --- a/services/media_session/public/cpp/test/mock_media_session.h +++ b/services/media_session/public/cpp/test/mock_media_session.h
@@ -139,6 +139,9 @@ MockMediaSession(); explicit MockMediaSession(bool force_duck); + MockMediaSession(const MockMediaSession&) = delete; + MockMediaSession& operator=(const MockMediaSession&) = delete; + ~MockMediaSession() override; // mojom::MediaSession overrides. @@ -248,8 +251,6 @@ mojo::ReceiverSet<mojom::MediaSession> receivers_; mojo::RemoteSet<mojom::MediaSessionObserver> observers_; - - DISALLOW_COPY_AND_ASSIGN(MockMediaSession); }; } // namespace test
diff --git a/services/media_session/public/cpp/test/test_media_controller.h b/services/media_session/public/cpp/test/test_media_controller.h index 9a89eb76..425c46bc0 100644 --- a/services/media_session/public/cpp/test/test_media_controller.h +++ b/services/media_session/public/cpp/test/test_media_controller.h
@@ -132,6 +132,10 @@ : public mojom::MediaController { public: TestMediaController(); + + TestMediaController(const TestMediaController&) = delete; + TestMediaController& operator=(const TestMediaController&) = delete; + ~TestMediaController() override; mojo::Remote<mojom::MediaController> CreateMediaControllerRemote(); @@ -200,8 +204,6 @@ mojo::RemoteSet<mojom::MediaControllerObserver> observers_; mojo::Receiver<mojom::MediaController> receiver_{this}; - - DISALLOW_COPY_AND_ASSIGN(TestMediaController); }; } // namespace test
diff --git a/services/metrics/public/cpp/delegating_ukm_recorder.h b/services/metrics/public/cpp/delegating_ukm_recorder.h index dd7fa18..e431f920a 100644 --- a/services/metrics/public/cpp/delegating_ukm_recorder.h +++ b/services/metrics/public/cpp/delegating_ukm_recorder.h
@@ -29,6 +29,10 @@ class METRICS_EXPORT DelegatingUkmRecorder : public UkmRecorder { public: DelegatingUkmRecorder(); + + DelegatingUkmRecorder(const DelegatingUkmRecorder&) = delete; + DelegatingUkmRecorder& operator=(const DelegatingUkmRecorder&) = delete; + ~DelegatingUkmRecorder() override; // Lazy global instance getter. @@ -85,8 +89,6 @@ mutable base::Lock lock_; std::unordered_map<UkmRecorder*, Delegate> delegates_; - - DISALLOW_COPY_AND_ASSIGN(DelegatingUkmRecorder); }; } // namespace ukm
diff --git a/services/metrics/public/cpp/mojo_ukm_recorder.h b/services/metrics/public/cpp/mojo_ukm_recorder.h index 9398011..3570bdd 100644 --- a/services/metrics/public/cpp/mojo_ukm_recorder.h +++ b/services/metrics/public/cpp/mojo_ukm_recorder.h
@@ -38,6 +38,10 @@ public: explicit MojoUkmRecorder( mojo::PendingRemote<mojom::UkmRecorderInterface> recorder_interface); + + MojoUkmRecorder(const MojoUkmRecorder&) = delete; + MojoUkmRecorder& operator=(const MojoUkmRecorder&) = delete; + ~MojoUkmRecorder() override; base::WeakPtr<MojoUkmRecorder> GetWeakPtr(); @@ -57,8 +61,6 @@ mojo::Remote<mojom::UkmRecorderInterface> interface_; base::WeakPtrFactory<MojoUkmRecorder> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(MojoUkmRecorder); }; } // namespace ukm
diff --git a/services/metrics/public/cpp/ukm_entry_builder.h b/services/metrics/public/cpp/ukm_entry_builder.h index 435fd74..f5b0845f9 100644 --- a/services/metrics/public/cpp/ukm_entry_builder.h +++ b/services/metrics/public/cpp/ukm_entry_builder.h
@@ -29,12 +29,13 @@ : public ukm::internal::UkmEntryBuilderBase { public: UkmEntryBuilder(SourceId source_id, base::StringPiece event_name); + + UkmEntryBuilder(const UkmEntryBuilder&) = delete; + UkmEntryBuilder& operator=(const UkmEntryBuilder&) = delete; + ~UkmEntryBuilder() override; void SetMetric(base::StringPiece metric_name, int64_t value); - - private: - DISALLOW_COPY_AND_ASSIGN(UkmEntryBuilder); }; } // namespace ukm
diff --git a/services/metrics/public/cpp/ukm_entry_builder_base.h b/services/metrics/public/cpp/ukm_entry_builder_base.h index b2d3b0c88..cc8cdb27 100644 --- a/services/metrics/public/cpp/ukm_entry_builder_base.h +++ b/services/metrics/public/cpp/ukm_entry_builder_base.h
@@ -19,6 +19,9 @@ // This class should not be used directly. class METRICS_EXPORT UkmEntryBuilderBase { public: + UkmEntryBuilderBase(const UkmEntryBuilderBase&) = delete; + UkmEntryBuilderBase& operator=(const UkmEntryBuilderBase&) = delete; + virtual ~UkmEntryBuilderBase(); // Records the complete entry into the recorder. If recorder is null, the @@ -39,8 +42,6 @@ private: mojom::UkmEntryPtr entry_; - - DISALLOW_COPY_AND_ASSIGN(UkmEntryBuilderBase); }; } // namespace internal
diff --git a/services/metrics/public/cpp/ukm_recorder.h b/services/metrics/public/cpp/ukm_recorder.h index 55c201f..3853a00 100644 --- a/services/metrics/public/cpp/ukm_recorder.h +++ b/services/metrics/public/cpp/ukm_recorder.h
@@ -59,6 +59,10 @@ class METRICS_EXPORT UkmRecorder { public: UkmRecorder(); + + UkmRecorder(const UkmRecorder&) = delete; + UkmRecorder& operator=(const UkmRecorder&) = delete; + virtual ~UkmRecorder(); // Provides access to a global UkmRecorder instance for recording metrics. @@ -140,8 +144,6 @@ // SourceUrlRecorderWebContentsObserver when a browser tab or its WebContents // are no longer alive. Not to be used through mojo interface. virtual void MarkSourceForDeletion(ukm::SourceId source_id) = 0; - - DISALLOW_COPY_AND_ASSIGN(UkmRecorder); }; } // namespace ukm
diff --git a/services/metrics/public/cpp/ukm_source.h b/services/metrics/public/cpp/ukm_source.h index e78bf492..3ce2989 100644 --- a/services/metrics/public/cpp/ukm_source.h +++ b/services/metrics/public/cpp/ukm_source.h
@@ -110,6 +110,10 @@ UkmSource(SourceId id, const GURL& url); UkmSource(SourceId id, const NavigationData& data); + + UkmSource(const UkmSource&) = delete; + UkmSource& operator=(const UkmSource&) = delete; + ~UkmSource(); ukm::SourceId id() const { return id_; } @@ -151,8 +155,6 @@ // When this object was created. const base::TimeTicks creation_time_; - - DISALLOW_COPY_AND_ASSIGN(UkmSource); }; } // namespace ukm
diff --git a/services/metrics/ukm_recorder_interface.h b/services/metrics/ukm_recorder_interface.h index 8488879..19084b4 100644 --- a/services/metrics/ukm_recorder_interface.h +++ b/services/metrics/ukm_recorder_interface.h
@@ -17,6 +17,10 @@ class UkmRecorderInterface : public ukm::mojom::UkmRecorderInterface { public: UkmRecorderInterface(ukm::UkmRecorder* ukm_recorder); + + UkmRecorderInterface(const UkmRecorderInterface&) = delete; + UkmRecorderInterface& operator=(const UkmRecorderInterface&) = delete; + ~UkmRecorderInterface() override; static void Create( @@ -29,8 +33,6 @@ void UpdateSourceURL(int64_t source_id, const std::string& url) override; ukm::UkmRecorder* ukm_recorder_; - - DISALLOW_COPY_AND_ASSIGN(UkmRecorderInterface); }; } // namespace metrics
diff --git a/services/network/cert_verifier_with_trust_anchors.h b/services/network/cert_verifier_with_trust_anchors.h index 6e0c02a..26be41c5 100644 --- a/services/network/cert_verifier_with_trust_anchors.h +++ b/services/network/cert_verifier_with_trust_anchors.h
@@ -36,6 +36,11 @@ // used. explicit CertVerifierWithTrustAnchors( const base::RepeatingClosure& anchor_used_callback); + + CertVerifierWithTrustAnchors(const CertVerifierWithTrustAnchors&) = delete; + CertVerifierWithTrustAnchors& operator=(const CertVerifierWithTrustAnchors&) = + delete; + ~CertVerifierWithTrustAnchors() override; // TODO(jam): once the network service is the only path, rename or get rid of @@ -62,8 +67,6 @@ base::RepeatingClosure anchor_used_callback_; std::unique_ptr<CertVerifier> delegate_; THREAD_CHECKER(thread_checker_); - - DISALLOW_COPY_AND_ASSIGN(CertVerifierWithTrustAnchors); }; } // namespace network
diff --git a/services/network/chunked_data_pipe_upload_data_stream.h b/services/network/chunked_data_pipe_upload_data_stream.h index c54e4321..4eded02 100644 --- a/services/network/chunked_data_pipe_upload_data_stream.h +++ b/services/network/chunked_data_pipe_upload_data_stream.h
@@ -42,6 +42,11 @@ mojo::PendingRemote<mojom::ChunkedDataPipeGetter> chunked_data_pipe_getter); + ChunkedDataPipeUploadDataStream(const ChunkedDataPipeUploadDataStream&) = + delete; + ChunkedDataPipeUploadDataStream& operator=( + const ChunkedDataPipeUploadDataStream&) = delete; + ~ChunkedDataPipeUploadDataStream() override; bool AllowHTTP1() const override; @@ -107,8 +112,6 @@ CacheState cache_state_ = CacheState::kDisabled; size_t dst_window_size_ = kDefaultDestinationWindowSize; std::vector<char> cache_; - - DISALLOW_COPY_AND_ASSIGN(ChunkedDataPipeUploadDataStream); }; } // namespace network
diff --git a/services/network/conditional_cache_deletion_helper.h b/services/network/conditional_cache_deletion_helper.h index a0cde26..71d69d17 100644 --- a/services/network/conditional_cache_deletion_helper.h +++ b/services/network/conditional_cache_deletion_helper.h
@@ -35,6 +35,11 @@ const base::Time& end_time, base::OnceClosure completion_callback); + ConditionalCacheDeletionHelper(const ConditionalCacheDeletionHelper&) = + delete; + ConditionalCacheDeletionHelper& operator=( + const ConditionalCacheDeletionHelper&) = delete; + ~ConditionalCacheDeletionHelper(); private: @@ -55,8 +60,6 @@ disk_cache::Entry* previous_entry_ = nullptr; base::WeakPtrFactory<ConditionalCacheDeletionHelper> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ConditionalCacheDeletionHelper); }; } // namespace network
diff --git a/services/network/cookie_manager.h b/services/network/cookie_manager.h index 2a223d9..ce8709b 100644 --- a/services/network/cookie_manager.h +++ b/services/network/cookie_manager.h
@@ -44,6 +44,9 @@ scoped_refptr<SessionCleanupCookieStore> session_cleanup_cookie_store, mojom::CookieManagerParamsPtr params); + CookieManager(const CookieManager&) = delete; + CookieManager& operator=(const CookieManager&) = delete; + ~CookieManager() override; const CookieSettings& cookie_settings() const { return cookie_settings_; } @@ -136,8 +139,6 @@ // Note: RestrictedCookieManager and CookieAccessDelegate store pointers to // |cookie_settings_|. CookieSettings cookie_settings_; - - DISALLOW_COPY_AND_ASSIGN(CookieManager); }; COMPONENT_EXPORT(NETWORK_SERVICE)
diff --git a/services/network/cookie_manager_unittest.cc b/services/network/cookie_manager_unittest.cc index a8ebc94..0d8820b 100644 --- a/services/network/cookie_manager_unittest.cc +++ b/services/network/cookie_manager_unittest.cc
@@ -82,6 +82,9 @@ explicit SynchronousCookieManager(mojom::CookieManager* cookie_service) : cookie_service_(cookie_service), callback_counter_(0) {} + SynchronousCookieManager(const SynchronousCookieManager&) = delete; + SynchronousCookieManager& operator=(const SynchronousCookieManager&) = delete; + ~SynchronousCookieManager() = default; std::vector<net::CanonicalCookie> GetAllCookies() { @@ -296,8 +299,6 @@ private: mojom::CookieManager* cookie_service_; uint32_t callback_counter_; - - DISALLOW_COPY_AND_ASSIGN(SynchronousCookieManager); }; class CookieManagerTest : public testing::Test { @@ -307,6 +308,9 @@ InitializeCookieService(nullptr, nullptr); } + CookieManagerTest(const CookieManagerTest&) = delete; + CookieManagerTest& operator=(const CookieManagerTest&) = delete; + ~CookieManagerTest() override = default; // Tear down the remote service. @@ -426,8 +430,6 @@ std::unique_ptr<CookieManager> cookie_service_; mojo::Remote<mojom::CookieManager> cookie_service_remote_; std::unique_ptr<SynchronousCookieManager> service_wrapper_; - - DISALLOW_COPY_AND_ASSIGN(CookieManagerTest); }; bool CompareCanonicalCookies(const net::CanonicalCookie& c1,
diff --git a/services/network/cookie_settings.h b/services/network/cookie_settings.h index e901a04..d9f09bb0 100644 --- a/services/network/cookie_settings.h +++ b/services/network/cookie_settings.h
@@ -32,6 +32,10 @@ : public content_settings::CookieSettingsBase { public: CookieSettings(); + + CookieSettings(const CookieSettings&) = delete; + CookieSettings& operator=(const CookieSettings&) = delete; + ~CookieSettings() override; void set_content_settings(const ContentSettingsForOneType& content_settings) { @@ -200,8 +204,6 @@ const bool sameparty_cookies_considered_first_party_ = base::FeatureList::IsEnabled( net::features::kSamePartyCookiesConsideredFirstParty); - - DISALLOW_COPY_AND_ASSIGN(CookieSettings); }; } // namespace network
diff --git a/services/network/cors/cors_url_loader.h b/services/network/cors/cors_url_loader.h index fe3d9f6..c341afbe 100644 --- a/services/network/cors/cors_url_loader.h +++ b/services/network/cors/cors_url_loader.h
@@ -58,6 +58,9 @@ const net::IsolationInfo& isolation_info, mojo::PendingRemote<mojom::DevToolsObserver> devtools_observer); + CorsURLLoader(const CorsURLLoader&) = delete; + CorsURLLoader& operator=(const CorsURLLoader&) = delete; + ~CorsURLLoader() override; // Starts processing the request. This is expected to be called right after @@ -206,8 +209,6 @@ // Used to run asynchronous class instance bound callbacks safely. base::WeakPtrFactory<CorsURLLoader> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(CorsURLLoader); }; } // namespace cors
diff --git a/services/network/cors/cors_url_loader_factory.h b/services/network/cors/cors_url_loader_factory.h index 39b53d6..e89167f 100644 --- a/services/network/cors/cors_url_loader_factory.h +++ b/services/network/cors/cors_url_loader_factory.h
@@ -55,6 +55,10 @@ scoped_refptr<ResourceSchedulerClient> resource_scheduler_client, mojo::PendingReceiver<mojom::URLLoaderFactory> receiver, const OriginAccessList* origin_access_list); + + CorsURLLoaderFactory(const CorsURLLoaderFactory&) = delete; + CorsURLLoaderFactory& operator=(const CorsURLLoaderFactory&) = delete; + ~CorsURLLoaderFactory() override; void OnLoaderCreated(std::unique_ptr<mojom::URLLoader> loader); @@ -129,8 +133,6 @@ const OriginAccessList* const origin_access_list_; static bool allow_external_preflights_for_testing_; - - DISALLOW_COPY_AND_ASSIGN(CorsURLLoaderFactory); }; } // namespace cors
diff --git a/services/network/cors/cors_url_loader_unittest.cc b/services/network/cors/cors_url_loader_unittest.cc index 1d58a74..70c9013 100644 --- a/services/network/cors/cors_url_loader_unittest.cc +++ b/services/network/cors/cors_url_loader_unittest.cc
@@ -65,6 +65,10 @@ class TestURLLoaderFactory : public mojom::URLLoaderFactory { public: TestURLLoaderFactory() {} + + TestURLLoaderFactory(const TestURLLoaderFactory&) = delete; + TestURLLoaderFactory& operator=(const TestURLLoaderFactory&) = delete; + ~TestURLLoaderFactory() override = default; base::WeakPtr<TestURLLoaderFactory> GetWeakPtr() { @@ -159,8 +163,6 @@ base::RepeatingClosure on_create_loader_and_start_; base::WeakPtrFactory<TestURLLoaderFactory> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(TestURLLoaderFactory); }; class CorsURLLoaderTest : public testing::Test { @@ -473,6 +475,9 @@ &BadMessageTestHelper::OnBadMessage, base::Unretained(this))); } + BadMessageTestHelper(const BadMessageTestHelper&) = delete; + BadMessageTestHelper& operator=(const BadMessageTestHelper&) = delete; + ~BadMessageTestHelper() { mojo::SetDefaultProcessErrorHandler(base::NullCallback()); } @@ -490,8 +495,6 @@ mojo::Message dummy_message_; mojo::internal::MessageDispatchContext context_; - - DISALLOW_COPY_AND_ASSIGN(BadMessageTestHelper); }; TEST_F(CorsURLLoaderTest, NoCorsWithInvalidMethod) {
diff --git a/services/network/cors/preflight_cache.h b/services/network/cors/preflight_cache.h index a3a8d32..cb158274b 100644 --- a/services/network/cors/preflight_cache.h +++ b/services/network/cors/preflight_cache.h
@@ -35,6 +35,10 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) PreflightCache final { public: PreflightCache(); + + PreflightCache(const PreflightCache&) = delete; + PreflightCache& operator=(const PreflightCache&) = delete; + ~PreflightCache(); // Appends new |preflight_result| entry to the cache for a specified |origin| @@ -73,8 +77,6 @@ net::NetworkIsolationKey /* NIK */>, std::unique_ptr<PreflightResult>> cache_; - - DISALLOW_COPY_AND_ASSIGN(PreflightCache); }; } // namespace cors
diff --git a/services/network/cors/preflight_controller.h b/services/network/cors/preflight_controller.h index a9c61c1..8eebef0 100644 --- a/services/network/cors/preflight_controller.h +++ b/services/network/cors/preflight_controller.h
@@ -69,6 +69,10 @@ const absl::optional<std::string>& allow_external); explicit PreflightController(NetworkService* network_service); + + PreflightController(const PreflightController&) = delete; + PreflightController& operator=(const PreflightController&) = delete; + ~PreflightController(); // Determines if a CORS-preflight request is needed, and checks the cache, or @@ -103,8 +107,6 @@ loaders_; NetworkService* const network_service_; - - DISALLOW_COPY_AND_ASSIGN(PreflightController); }; } // namespace cors
diff --git a/services/network/cors/preflight_result.h b/services/network/cors/preflight_result.h index 25f2260a..8f9ab24 100644 --- a/services/network/cors/preflight_result.h +++ b/services/network/cors/preflight_result.h
@@ -50,6 +50,10 @@ const absl::optional<std::string>& allow_headers_header, const absl::optional<std::string>& max_age_header, absl::optional<mojom::CorsError>* detected_error); + + PreflightResult(const PreflightResult&) = delete; + PreflightResult& operator=(const PreflightResult&) = delete; + ~PreflightResult(); // Checks if the given |method| is allowed by the CORS-preflight response. @@ -125,8 +129,6 @@ bool credentials_; base::flat_set<std::string> methods_; base::flat_set<std::string> headers_; - - DISALLOW_COPY_AND_ASSIGN(PreflightResult); }; } // namespace cors
diff --git a/services/network/data_pipe_element_reader.h b/services/network/data_pipe_element_reader.h index 0a80d19..10436e7 100644 --- a/services/network/data_pipe_element_reader.h +++ b/services/network/data_pipe_element_reader.h
@@ -39,6 +39,9 @@ scoped_refptr<ResourceRequestBody> resource_request_body, mojo::PendingRemote<mojom::DataPipeGetter> data_pipe_getter); + DataPipeElementReader(const DataPipeElementReader&) = delete; + DataPipeElementReader& operator=(const DataPipeElementReader&) = delete; + ~DataPipeElementReader() override; // net::UploadElementReader implementation: @@ -82,8 +85,6 @@ net::CompletionOnceCallback read_callback_; base::WeakPtrFactory<DataPipeElementReader> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DataPipeElementReader); }; } // namespace network
diff --git a/services/network/dhcp_pac_file_fetcher_mojo.h b/services/network/dhcp_pac_file_fetcher_mojo.h index 388d6e1..1b5ac74d1 100644 --- a/services/network/dhcp_pac_file_fetcher_mojo.h +++ b/services/network/dhcp_pac_file_fetcher_mojo.h
@@ -38,6 +38,9 @@ mojo::PendingRemote<network::mojom::DhcpWpadUrlClient> dhcp_wpad_url_client); + DhcpPacFileFetcherMojo(const DhcpPacFileFetcherMojo&) = delete; + DhcpPacFileFetcherMojo& operator=(const DhcpPacFileFetcherMojo&) = delete; + ~DhcpPacFileFetcherMojo() override; // DhcpPacFileFetcher implementation @@ -68,8 +71,6 @@ mojo::Remote<network::mojom::DhcpWpadUrlClient> dhcp_wpad_url_client_; base::WeakPtrFactory<DhcpPacFileFetcherMojo> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DhcpPacFileFetcherMojo); }; } // namespace network
diff --git a/services/network/dns_config_change_manager.h b/services/network/dns_config_change_manager.h index 7afa4b9a..f225f9d 100644 --- a/services/network/dns_config_change_manager.h +++ b/services/network/dns_config_change_manager.h
@@ -20,6 +20,10 @@ public net::NetworkChangeNotifier::DNSObserver { public: DnsConfigChangeManager(); + + DnsConfigChangeManager(const DnsConfigChangeManager&) = delete; + DnsConfigChangeManager& operator=(const DnsConfigChangeManager&) = delete; + ~DnsConfigChangeManager() override; void AddReceiver( @@ -35,8 +39,6 @@ mojo::ReceiverSet<mojom::DnsConfigChangeManager> receivers_; mojo::RemoteSet<mojom::DnsConfigChangeManagerClient> clients_; - - DISALLOW_COPY_AND_ASSIGN(DnsConfigChangeManager); }; } // namespace network
diff --git a/services/network/expect_ct_reporter.h b/services/network/expect_ct_reporter.h index 484e085..8389544 100644 --- a/services/network/expect_ct_reporter.h +++ b/services/network/expect_ct_reporter.h
@@ -41,6 +41,10 @@ ExpectCTReporter(net::URLRequestContext* request_context, const base::RepeatingClosure& success_callback, const base::RepeatingClosure& failure_callback); + + ExpectCTReporter(const ExpectCTReporter&) = delete; + ExpectCTReporter& operator=(const ExpectCTReporter&) = delete; + ~ExpectCTReporter() override; // net::TransportSecurityState::ExpectCTReporter: @@ -117,8 +121,6 @@ // preflight's OnResponseStarted() is called. std::map<net::URLRequest*, std::unique_ptr<PreflightInProgress>> inflight_preflights_; - - DISALLOW_COPY_AND_ASSIGN(ExpectCTReporter); }; } // namespace network
diff --git a/services/network/host_resolver.h b/services/network/host_resolver.h index 056c5ca..7072d19 100644 --- a/services/network/host_resolver.h +++ b/services/network/host_resolver.h
@@ -49,6 +49,10 @@ // mojom::HostResolver pipe, eg because it is handling ResolveHost requests // made directly on NetworkContext. HostResolver(net::HostResolver* internal_resolver, net::NetLog* net_log); + + HostResolver(const HostResolver&) = delete; + HostResolver& operator=(const HostResolver&) = delete; + ~HostResolver() override; void ResolveHost( @@ -86,8 +90,6 @@ net::NetLog* const net_log_; base::WeakPtrFactory<HostResolver> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(HostResolver); }; } // namespace network
diff --git a/services/network/host_resolver_mdns_listener.h b/services/network/host_resolver_mdns_listener.h index 40c67c8..7d3933047 100644 --- a/services/network/host_resolver_mdns_listener.h +++ b/services/network/host_resolver_mdns_listener.h
@@ -31,6 +31,10 @@ HostResolverMdnsListener(net::HostResolver* resolver, const net::HostPortPair& host, net::DnsQueryType query_type); + + HostResolverMdnsListener(const HostResolverMdnsListener&) = delete; + HostResolverMdnsListener& operator=(const HostResolverMdnsListener&) = delete; + ~HostResolverMdnsListener() override; int Start(mojo::PendingRemote<mojom::MdnsListenClient> response_client, @@ -56,8 +60,6 @@ mojo::Remote<mojom::MdnsListenClient> response_client_; base::OnceClosure cancellation_callback_; - - DISALLOW_COPY_AND_ASSIGN(HostResolverMdnsListener); }; } // namespace network
diff --git a/services/network/http_auth_cache_copier.h b/services/network/http_auth_cache_copier.h index ed6374d..1961f6a 100644 --- a/services/network/http_auth_cache_copier.h +++ b/services/network/http_auth_cache_copier.h
@@ -24,6 +24,10 @@ class HttpAuthCacheCopier { public: HttpAuthCacheCopier(); + + HttpAuthCacheCopier(const HttpAuthCacheCopier&) = delete; + HttpAuthCacheCopier& operator=(const HttpAuthCacheCopier&) = delete; + ~HttpAuthCacheCopier(); // Saves the proxy entries of the given HttpAuthCache in an intermediate @@ -39,8 +43,6 @@ private: std::map<base::UnguessableToken, std::unique_ptr<net::HttpAuthCache>> caches_; - - DISALLOW_COPY_AND_ASSIGN(HttpAuthCacheCopier); }; } // namespace network
diff --git a/services/network/http_cache_data_counter.h b/services/network/http_cache_data_counter.h index ad3418d..050cdf46 100644 --- a/services/network/http_cache_data_counter.h +++ b/services/network/http_cache_data_counter.h
@@ -48,6 +48,9 @@ base::Time end_time, HttpCacheDataCounterCallback callback); + HttpCacheDataCounter(const HttpCacheDataCounter&) = delete; + HttpCacheDataCounter& operator=(const HttpCacheDataCounter&) = delete; + ~HttpCacheDataCounter(); private: @@ -68,8 +71,6 @@ HttpCacheDataCounterCallback callback_; base::WeakPtrFactory<HttpCacheDataCounter> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(HttpCacheDataCounter); }; } // namespace network
diff --git a/services/network/http_cache_data_remover.h b/services/network/http_cache_data_remover.h index 4d288845..82e669a 100644 --- a/services/network/http_cache_data_remover.h +++ b/services/network/http_cache_data_remover.h
@@ -45,6 +45,9 @@ base::Time delete_end, HttpCacheDataRemoverCallback done_callback); + HttpCacheDataRemover(const HttpCacheDataRemover&) = delete; + HttpCacheDataRemover& operator=(const HttpCacheDataRemover&) = delete; + ~HttpCacheDataRemover(); private: @@ -67,8 +70,6 @@ std::unique_ptr<ConditionalCacheDeletionHelper> deletion_helper_; base::WeakPtrFactory<HttpCacheDataRemover> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(HttpCacheDataRemover); }; } // namespace network
diff --git a/services/network/http_server_properties_pref_delegate.h b/services/network/http_server_properties_pref_delegate.h index 76357102..97b4325 100644 --- a/services/network/http_server_properties_pref_delegate.h +++ b/services/network/http_server_properties_pref_delegate.h
@@ -20,6 +20,12 @@ public: // The created object must be destroyed before |pref_service|. explicit HttpServerPropertiesPrefDelegate(PrefService* pref_service); + + HttpServerPropertiesPrefDelegate(const HttpServerPropertiesPrefDelegate&) = + delete; + HttpServerPropertiesPrefDelegate& operator=( + const HttpServerPropertiesPrefDelegate&) = delete; + ~HttpServerPropertiesPrefDelegate() override; static void RegisterPrefs(PrefRegistrySimple* pref_registry); @@ -33,8 +39,6 @@ private: PrefService* pref_service_; PrefChangeRegistrar pref_change_registrar_; - - DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesPrefDelegate); }; } // namespace network
diff --git a/services/network/ignore_errors_cert_verifier.h b/services/network/ignore_errors_cert_verifier.h index a6ea79d..c0990f29 100644 --- a/services/network/ignore_errors_cert_verifier.h +++ b/services/network/ignore_errors_cert_verifier.h
@@ -39,6 +39,9 @@ IgnoreErrorsCertVerifier(std::unique_ptr<net::CertVerifier> verifier, SPKIHashSet allowlist); + IgnoreErrorsCertVerifier(const IgnoreErrorsCertVerifier&) = delete; + IgnoreErrorsCertVerifier& operator=(const IgnoreErrorsCertVerifier&) = delete; + ~IgnoreErrorsCertVerifier() override; // Verify skips certificate verification and returns OK if any of the @@ -59,8 +62,6 @@ std::unique_ptr<net::CertVerifier> verifier_; SPKIHashSet allowlist_; - - DISALLOW_COPY_AND_ASSIGN(IgnoreErrorsCertVerifier); }; } // namespace network
diff --git a/services/network/keepalive_statistics_recorder.h b/services/network/keepalive_statistics_recorder.h index d436fcf..7bc4d26e 100644 --- a/services/network/keepalive_statistics_recorder.h +++ b/services/network/keepalive_statistics_recorder.h
@@ -28,6 +28,11 @@ }; KeepaliveStatisticsRecorder(); + + KeepaliveStatisticsRecorder(const KeepaliveStatisticsRecorder&) = delete; + KeepaliveStatisticsRecorder& operator=(const KeepaliveStatisticsRecorder&) = + delete; + ~KeepaliveStatisticsRecorder(); // Registers / Unregisters |top_level_frame| to this object. @@ -61,8 +66,6 @@ per_top_level_frame_records_; int num_inflight_requests_ = 0; int peak_inflight_requests_ = 0; - - DISALLOW_COPY_AND_ASSIGN(KeepaliveStatisticsRecorder); }; } // namespace network
diff --git a/services/network/mdns_responder.cc b/services/network/mdns_responder.cc index b87d706..549a0120 100644 --- a/services/network/mdns_responder.cc +++ b/services/network/mdns_responder.cc
@@ -413,6 +413,10 @@ responder_manager_(responder_manager), io_buffer_(base::MakeRefCounted<net::IOBufferWithSize>( net::dns_protocol::kMaxMulticastSize + 1)) {} + + SocketHandler(const SocketHandler&) = delete; + SocketHandler& operator=(const SocketHandler&) = delete; + ~SocketHandler() = default; int Start() { @@ -503,8 +507,6 @@ net::IPEndPoint multicast_addr_; base::WeakPtrFactory<SocketHandler> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SocketHandler); }; // Implements the rate limiting schemes for sending responses as defined by @@ -548,6 +550,10 @@ tick_clock_(base::DefaultTickClock::GetInstance()), dispatch_timer_(std::make_unique<base::OneShotTimer>(tick_clock_)), next_available_time_per_resp_sched_(tick_clock_->NowTicks()) {} + + ResponseScheduler(const ResponseScheduler&) = delete; + ResponseScheduler& operator=(const ResponseScheduler&) = delete; + ~ResponseScheduler() { dispatch_timer_->Stop(); } // Implements the rate limit scheme on the underlying interface managed by @@ -640,8 +646,6 @@ std::priority_queue<PendingPacket> send_queue_; base::WeakPtrFactory<ResponseScheduler> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ResponseScheduler); }; bool MdnsResponderManager::SocketHandler::Send(
diff --git a/services/network/mdns_responder.h b/services/network/mdns_responder.h index b2d24da..31c258f 100644 --- a/services/network/mdns_responder.h +++ b/services/network/mdns_responder.h
@@ -144,6 +144,10 @@ MdnsResponderManager(); explicit MdnsResponderManager(net::MDnsSocketFactory* socket_factory); + + MdnsResponderManager(const MdnsResponderManager&) = delete; + MdnsResponderManager& operator=(const MdnsResponderManager&) = delete; + ~MdnsResponderManager(); // Creates an instance of MdnsResponder for the receiver. @@ -265,8 +269,6 @@ base::TimeTicks throttled_start_end_; base::WeakPtrFactory<MdnsResponderManager> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(MdnsResponderManager); }; // Implementation of the mDNS service that can provide utilities of an mDNS @@ -276,6 +278,10 @@ public: MdnsResponder(mojo::PendingReceiver<mojom::MdnsResponder> receiver, MdnsResponderManager* manager); + + MdnsResponder(const MdnsResponder&) = delete; + MdnsResponder& operator=(const MdnsResponder&) = delete; + // When destroyed, clears all existing name-address associations owned by this // responder in the local network by sending out goodbye packets. See // SendGoodbyePacketForNameAddressMap below. @@ -333,8 +339,6 @@ std::map<std::string, net::IPAddress> name_addr_map_; std::map<std::string, uint16_t> name_refcount_map_; MdnsResponderManager::NameGenerator* name_generator_; - - DISALLOW_COPY_AND_ASSIGN(MdnsResponder); }; } // namespace network
diff --git a/services/network/mock_mojo_dhcp_wpad_url_client.h b/services/network/mock_mojo_dhcp_wpad_url_client.h index f94934d..63f9f293 100644 --- a/services/network/mock_mojo_dhcp_wpad_url_client.h +++ b/services/network/mock_mojo_dhcp_wpad_url_client.h
@@ -17,6 +17,11 @@ class MockMojoDhcpWpadUrlClient : public network::mojom::DhcpWpadUrlClient { public: MockMojoDhcpWpadUrlClient(const std::string& pac_url); + + MockMojoDhcpWpadUrlClient(const MockMojoDhcpWpadUrlClient&) = delete; + MockMojoDhcpWpadUrlClient& operator=(const MockMojoDhcpWpadUrlClient&) = + delete; + ~MockMojoDhcpWpadUrlClient() override; // Calls |callback| with |pac_url_|. @@ -30,7 +35,6 @@ private: std::string pac_url_; - DISALLOW_COPY_AND_ASSIGN(MockMojoDhcpWpadUrlClient); }; } // namespace network
diff --git a/services/network/mojo_host_resolver_impl.h b/services/network/mojo_host_resolver_impl.h index b5c6021..89259a7 100644 --- a/services/network/mojo_host_resolver_impl.h +++ b/services/network/mojo_host_resolver_impl.h
@@ -37,6 +37,10 @@ // |resolver| is expected to outlive |this|. MojoHostResolverImpl(net::HostResolver* resolver, const net::NetLogWithSource& net_log); + + MojoHostResolverImpl(const MojoHostResolverImpl&) = delete; + MojoHostResolverImpl& operator=(const MojoHostResolverImpl&) = delete; + ~MojoHostResolverImpl(); void Resolve( @@ -64,8 +68,6 @@ std::list<Job> pending_jobs_; base::ThreadChecker thread_checker_; - - DISALLOW_COPY_AND_ASSIGN(MojoHostResolverImpl); }; } // namespace network
diff --git a/services/network/mojo_socket_test_util.h b/services/network/mojo_socket_test_util.h index bfd526b..8f33e4c 100644 --- a/services/network/mojo_socket_test_util.h +++ b/services/network/mojo_socket_test_util.h
@@ -18,6 +18,10 @@ class TestSocketObserver : public mojom::SocketObserver { public: TestSocketObserver(); + + TestSocketObserver(const TestSocketObserver&) = delete; + TestSocketObserver& operator=(const TestSocketObserver&) = delete; + ~TestSocketObserver() override; // Returns a mojo pending remote. This can only be called once. @@ -37,8 +41,6 @@ base::RunLoop read_loop_; base::RunLoop write_loop_; mojo::Receiver<mojom::SocketObserver> receiver_{this}; - - DISALLOW_COPY_AND_ASSIGN(TestSocketObserver); }; } // namespace network
diff --git a/services/network/net_log_exporter.h b/services/network/net_log_exporter.h index f93ad64..3d9cca9 100644 --- a/services/network/net_log_exporter.h +++ b/services/network/net_log_exporter.h
@@ -31,6 +31,10 @@ // This expects to live on the same thread as NetworkContext, e.g. // IO thread or NetworkService main thread. explicit NetLogExporter(NetworkContext* network_context); + + NetLogExporter(const NetLogExporter&) = delete; + NetLogExporter& operator=(const NetLogExporter&) = delete; + ~NetLogExporter() override; void Start(base::File destination, @@ -80,8 +84,6 @@ scratch_dir_create_handler_for_tests_; THREAD_CHECKER(thread_checker_); - - DISALLOW_COPY_AND_ASSIGN(NetLogExporter); }; } // namespace network
diff --git a/services/network/network_change_manager.h b/services/network/network_change_manager.h index a84c806..abbe88f0 100644 --- a/services/network/network_change_manager.h +++ b/services/network/network_change_manager.h
@@ -32,6 +32,9 @@ explicit NetworkChangeManager( std::unique_ptr<net::NetworkChangeNotifier> network_change_notifier); + NetworkChangeManager(const NetworkChangeManager&) = delete; + NetworkChangeManager& operator=(const NetworkChangeManager&) = delete; + ~NetworkChangeManager() override; // Binds a NetworkChangeManager receiver to this object. Mojo messages @@ -67,8 +70,6 @@ mojo::ReceiverSet<mojom::NetworkChangeManager> receivers_; std::vector<mojo::Remote<mojom::NetworkChangeManagerClient>> clients_; mojom::ConnectionType connection_type_; - - DISALLOW_COPY_AND_ASSIGN(NetworkChangeManager); }; } // namespace network
diff --git a/services/network/network_change_manager_unittest.cc b/services/network/network_change_manager_unittest.cc index f1bfa0e..38d82fa8 100644 --- a/services/network/network_change_manager_unittest.cc +++ b/services/network/network_change_manager_unittest.cc
@@ -47,6 +47,11 @@ manager->RequestNotifications(std::move(client_remote)); } + TestNetworkChangeManagerClient(const TestNetworkChangeManagerClient&) = + delete; + TestNetworkChangeManagerClient& operator=( + const TestNetworkChangeManagerClient&) = delete; + ~TestNetworkChangeManagerClient() override {} // NetworkChangeManagerClient implementation: @@ -80,8 +85,6 @@ NotificationType notification_type_to_wait_; mojom::ConnectionType connection_type_; mojo::Receiver<mojom::NetworkChangeManagerClient> receiver_{this}; - - DISALLOW_COPY_AND_ASSIGN(TestNetworkChangeManagerClient); }; } // namespace @@ -96,6 +99,9 @@ network_change_manager_.get()); } + NetworkChangeManagerTest(const NetworkChangeManagerTest&) = delete; + NetworkChangeManagerTest& operator=(const NetworkChangeManagerTest&) = delete; + ~NetworkChangeManagerTest() override {} TestNetworkChangeManagerClient* network_change_manager_client() { @@ -115,8 +121,6 @@ std::unique_ptr<NetworkChangeManager> network_change_manager_; std::unique_ptr<TestNetworkChangeManagerClient> network_change_manager_client_; - - DISALLOW_COPY_AND_ASSIGN(NetworkChangeManagerTest); }; TEST_F(NetworkChangeManagerTest, ClientNotified) {
diff --git a/services/network/network_context.h b/services/network/network_context.h index 9339c55..45974ba 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h
@@ -153,6 +153,9 @@ net::URLRequestContext* url_request_context, const std::vector<std::string>& cors_exempt_header_list); + NetworkContext(const NetworkContext&) = delete; + NetworkContext& operator=(const NetworkContext&) = delete; + ~NetworkContext() override; // Sets a global CertVerifier to use when initializing all profiles. @@ -827,8 +830,6 @@ url_loader_factories_; base::WeakPtrFactory<NetworkContext> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(NetworkContext); }; } // namespace network
diff --git a/services/network/network_context_unittest.cc b/services/network/network_context_unittest.cc index 20de39c..3dde1ec 100644 --- a/services/network/network_context_unittest.cc +++ b/services/network/network_context_unittest.cc
@@ -252,6 +252,12 @@ public proxy_resolver::mojom::ProxyResolver { public: CapturingMojoProxyResolverFactory() {} + + CapturingMojoProxyResolverFactory(const CapturingMojoProxyResolverFactory&) = + delete; + CapturingMojoProxyResolverFactory& operator=( + const CapturingMojoProxyResolverFactory&) = delete; + ~CapturingMojoProxyResolverFactory() override {} mojo::PendingRemote<proxy_resolver::mojom::ProxyResolverFactory> @@ -307,8 +313,6 @@ GURL url_; net::NetworkIsolationKey network_isolation_key_; - - DISALLOW_COPY_AND_ASSIGN(CapturingMojoProxyResolverFactory); }; // ProxyLookupClient that drives proxy lookups and can wait for the responses to @@ -316,6 +320,10 @@ class TestProxyLookupClient : public mojom::ProxyLookupClient { public: TestProxyLookupClient() = default; + + TestProxyLookupClient(const TestProxyLookupClient&) = delete; + TestProxyLookupClient& operator=(const TestProxyLookupClient&) = delete; + ~TestProxyLookupClient() override = default; void StartLookUpProxyForURL( @@ -362,8 +370,6 @@ int32_t net_error_ = net::ERR_UNEXPECTED; base::RunLoop run_loop_; - - DISALLOW_COPY_AND_ASSIGN(TestProxyLookupClient); }; class MockP2PTrustedSocketManagerClient @@ -4120,6 +4126,9 @@ public: ConnectionListener() = default; + ConnectionListener(const ConnectionListener&) = delete; + ConnectionListener& operator=(const ConnectionListener&) = delete; + ~ConnectionListener() override = default; // Get called from the EmbeddedTestServer thread to be notified that @@ -4225,8 +4234,6 @@ // before invoking |on_done_accepting_connections_|. size_t num_accepted_connections_needed_ = 0; base::OnceClosure on_done_accepting_connections_; - - DISALLOW_COPY_AND_ASSIGN(ConnectionListener); }; TEST_F(NetworkContextTest, PreconnectOne) { @@ -5023,6 +5030,9 @@ TestProxyErrorClient() = default; + TestProxyErrorClient(const TestProxyErrorClient&) = delete; + TestProxyErrorClient& operator=(const TestProxyErrorClient&) = delete; + ~TestProxyErrorClient() override {} void OnPACScriptError(int32_t line_number, @@ -5075,8 +5085,6 @@ bool has_received_mojo_pipe_error_ = false; std::vector<int> on_request_maybe_failed_calls_; std::vector<PacScriptError> on_pac_script_error_calls_; - - DISALLOW_COPY_AND_ASSIGN(TestProxyErrorClient); }; // While in scope, all host resolutions will fail with ERR_NAME_NOT_RESOLVED,
diff --git a/services/network/network_qualities_pref_delegate.cc b/services/network/network_qualities_pref_delegate.cc index b129528..331e78d 100644 --- a/services/network/network_qualities_pref_delegate.cc +++ b/services/network/network_qualities_pref_delegate.cc
@@ -30,6 +30,10 @@ : pref_service_(pref_service), path_(net::nqe::kNetworkQualities) { DCHECK(pref_service_); } + + PrefDelegateImpl(const PrefDelegateImpl&) = delete; + PrefDelegateImpl& operator=(const PrefDelegateImpl&) = delete; + ~PrefDelegateImpl() override {} void SetDictionaryValue(const base::DictionaryValue& value) override { @@ -51,8 +55,6 @@ const std::string path_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(PrefDelegateImpl); }; // Returns true if |pref_service| has been initialized.
diff --git a/services/network/network_qualities_pref_delegate.h b/services/network/network_qualities_pref_delegate.h index 56547b3..f60ba74 100644 --- a/services/network/network_qualities_pref_delegate.h +++ b/services/network/network_qualities_pref_delegate.h
@@ -30,6 +30,11 @@ NetworkQualitiesPrefDelegate( PrefService* pref_service, net::NetworkQualityEstimator* network_quality_estimator); + + NetworkQualitiesPrefDelegate(const NetworkQualitiesPrefDelegate&) = delete; + NetworkQualitiesPrefDelegate& operator=(const NetworkQualitiesPrefDelegate&) = + delete; + ~NetworkQualitiesPrefDelegate(); // Registers the profile-specific network quality estimator prefs. @@ -58,8 +63,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<NetworkQualitiesPrefDelegate> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(NetworkQualitiesPrefDelegate); }; } // namespace network
diff --git a/services/network/network_qualities_pref_delegate_unittest.cc b/services/network/network_qualities_pref_delegate_unittest.cc index 348a480e..5e5d264f 100644 --- a/services/network/network_qualities_pref_delegate_unittest.cc +++ b/services/network/network_qualities_pref_delegate_unittest.cc
@@ -28,12 +28,15 @@ NetworkQualitiesPrefDelegateTest() : task_environment_(base::test::TaskEnvironment::MainThreadType::IO) {} + NetworkQualitiesPrefDelegateTest(const NetworkQualitiesPrefDelegateTest&) = + delete; + NetworkQualitiesPrefDelegateTest& operator=( + const NetworkQualitiesPrefDelegateTest&) = delete; + ~NetworkQualitiesPrefDelegateTest() override = default; private: base::test::TaskEnvironment task_environment_; - - DISALLOW_COPY_AND_ASSIGN(NetworkQualitiesPrefDelegateTest); }; // Verify that prefs are writen and read correctly.
diff --git a/services/network/network_quality_estimator_manager.h b/services/network/network_quality_estimator_manager.h index 5bd7d1d..28e4e9a 100644 --- a/services/network/network_quality_estimator_manager.h +++ b/services/network/network_quality_estimator_manager.h
@@ -39,6 +39,11 @@ public: explicit NetworkQualityEstimatorManager(net::NetLog* net_log); + NetworkQualityEstimatorManager(const NetworkQualityEstimatorManager&) = + delete; + NetworkQualityEstimatorManager& operator=( + const NetworkQualityEstimatorManager&) = delete; + ~NetworkQualityEstimatorManager() override; // Binds a NetworkQualityEstimatorManager receiver to this object. Mojo @@ -72,8 +77,6 @@ int32_t downstream_throughput_kbps_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimatorManager); }; } // namespace network
diff --git a/services/network/network_quality_estimator_manager_unittest.cc b/services/network/network_quality_estimator_manager_unittest.cc index a7ce4ef..7a99e26 100644 --- a/services/network/network_quality_estimator_manager_unittest.cc +++ b/services/network/network_quality_estimator_manager_unittest.cc
@@ -42,6 +42,11 @@ manager->RequestNotifications(receiver_.BindNewPipeAndPassRemote()); } + TestNetworkQualityEstimatorManagerClient( + const TestNetworkQualityEstimatorManagerClient&) = delete; + TestNetworkQualityEstimatorManagerClient& operator=( + const TestNetworkQualityEstimatorManagerClient&) = delete; + ~TestNetworkQualityEstimatorManagerClient() override {} void OnNetworkQualityChanged(net::EffectiveConnectionType type, @@ -89,8 +94,6 @@ base::TimeDelta transport_rtt_; int32_t downlink_bandwidth_kbps_; mojo::Receiver<mojom::NetworkQualityEstimatorManagerClient> receiver_{this}; - - DISALLOW_COPY_AND_ASSIGN(TestNetworkQualityEstimatorManagerClient); }; } // namespace @@ -110,6 +113,11 @@ network_quality_estimator_manager_.get()); } + NetworkQualityEstimatorManagerTest( + const NetworkQualityEstimatorManagerTest&) = delete; + NetworkQualityEstimatorManagerTest& operator=( + const NetworkQualityEstimatorManagerTest&) = delete; + ~NetworkQualityEstimatorManagerTest() override {} TestNetworkQualityEstimatorManagerClient* @@ -133,8 +141,6 @@ network_quality_estimator_manager_; std::unique_ptr<TestNetworkQualityEstimatorManagerClient> network_quality_estimator_manager_client_; - - DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimatorManagerTest); }; TEST_F(NetworkQualityEstimatorManagerTest, ClientNotified) {
diff --git a/services/network/network_service.h b/services/network/network_service.h index 1da4505..e8c984a 100644 --- a/services/network/network_service.h +++ b/services/network/network_service.h
@@ -82,6 +82,9 @@ mojo::NullReceiver(), bool delay_initialization_until_set_client = false); + NetworkService(const NetworkService&) = delete; + NetworkService& operator=(const NetworkService&) = delete; + ~NetworkService() override; // Call to inform the NetworkService that OSCrypt::SetConfig() has already @@ -388,8 +391,6 @@ // that renderer process (the renderer will proxy requests from PPAPI - such // requests should have their initiator origin within the set stored here). std::map<int, std::set<url::Origin>> plugin_origins_; - - DISALLOW_COPY_AND_ASSIGN(NetworkService); }; } // namespace network
diff --git a/services/network/network_service_network_delegate.h b/services/network/network_service_network_delegate.h index dd0f951..b0c2f3f 100644 --- a/services/network/network_service_network_delegate.h +++ b/services/network/network_service_network_delegate.h
@@ -32,6 +32,11 @@ bool validate_referrer_policy_on_initial_request, mojo::PendingRemote<mojom::ProxyErrorClient> proxy_error_client_remote, NetworkContext* network_context); + + NetworkServiceNetworkDelegate(const NetworkServiceNetworkDelegate&) = delete; + NetworkServiceNetworkDelegate& operator=( + const NetworkServiceNetworkDelegate&) = delete; + ~NetworkServiceNetworkDelegate() override; void set_enable_referrers(bool enable_referrers) { @@ -114,8 +119,6 @@ mutable base::WeakPtrFactory<NetworkServiceNetworkDelegate> weak_ptr_factory_{ this}; - - DISALLOW_COPY_AND_ASSIGN(NetworkServiceNetworkDelegate); }; } // namespace network
diff --git a/services/network/network_service_proxy_delegate.h b/services/network/network_service_proxy_delegate.h index 645be5a..21cd831 100644 --- a/services/network/network_service_proxy_delegate.h +++ b/services/network/network_service_proxy_delegate.h
@@ -34,6 +34,11 @@ config_client_receiver, mojo::PendingRemote<mojom::CustomProxyConnectionObserver> observer_remote); + + NetworkServiceProxyDelegate(const NetworkServiceProxyDelegate&) = delete; + NetworkServiceProxyDelegate& operator=(const NetworkServiceProxyDelegate&) = + delete; + ~NetworkServiceProxyDelegate() override; void SetProxyResolutionService( @@ -80,8 +85,6 @@ mojo::Remote<mojom::CustomProxyConnectionObserver> observer_; net::ProxyResolutionService* proxy_resolution_service_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(NetworkServiceProxyDelegate); }; } // namespace network
diff --git a/services/network/network_service_unittest.cc b/services/network/network_service_unittest.cc index bd8ed7a..5f23863 100644 --- a/services/network/network_service_unittest.cc +++ b/services/network/network_service_unittest.cc
@@ -920,6 +920,11 @@ public: NetworkServiceTestWithService() : task_environment_(base::test::TaskEnvironment::MainThreadType::IO) {} + + NetworkServiceTestWithService(const NetworkServiceTestWithService&) = delete; + NetworkServiceTestWithService& operator=( + const NetworkServiceTestWithService&) = delete; + ~NetworkServiceTestWithService() override {} void SetUp() override { @@ -988,8 +993,6 @@ mojo::Remote<mojom::NetworkService> network_service_; mojo::Remote<mojom::NetworkContext> network_context_; mojo::Remote<mojom::URLLoader> loader_; - - DISALLOW_COPY_AND_ASSIGN(NetworkServiceTestWithService); }; // Verifies that loading a URL through the network service's mojo interface @@ -1184,6 +1187,11 @@ manager_remote->RequestNotifications(std::move(client_remote)); } + TestNetworkChangeManagerClient(const TestNetworkChangeManagerClient&) = + delete; + TestNetworkChangeManagerClient& operator=( + const TestNetworkChangeManagerClient&) = delete; + ~TestNetworkChangeManagerClient() override {} // NetworkChangeManagerClient implementation: @@ -1209,8 +1217,6 @@ base::RunLoop run_loop_; mojom::ConnectionType connection_type_; mojo::Receiver<mojom::NetworkChangeManagerClient> receiver_{this}; - - DISALLOW_COPY_AND_ASSIGN(TestNetworkChangeManagerClient); }; class NetworkChangeTest : public testing::Test { @@ -1255,6 +1261,11 @@ service_->Bind(network_service_.BindNewPipeAndPassReceiver()); } + NetworkServiceNetworkChangeTest(const NetworkServiceNetworkChangeTest&) = + delete; + NetworkServiceNetworkChangeTest& operator=( + const NetworkServiceNetworkChangeTest&) = delete; + ~NetworkServiceNetworkChangeTest() override {} mojom::NetworkService* service() { return network_service_.get(); } @@ -1264,8 +1275,6 @@ std::unique_ptr<net::NetworkChangeNotifier> network_change_notifier_; mojo::Remote<mojom::NetworkService> network_service_; std::unique_ptr<NetworkService> service_; - - DISALLOW_COPY_AND_ASSIGN(NetworkServiceNetworkChangeTest); }; TEST_F(NetworkServiceNetworkChangeTest, MAYBE_NetworkChangeManagerRequest) { @@ -1287,6 +1296,12 @@ NetworkServiceNetworkDelegateTest() : NetworkServiceTest( base::test::TaskEnvironment::TimeSource::SYSTEM_TIME) {} + + NetworkServiceNetworkDelegateTest(const NetworkServiceNetworkDelegateTest&) = + delete; + NetworkServiceNetworkDelegateTest& operator=( + const NetworkServiceNetworkDelegateTest&) = delete; + ~NetworkServiceNetworkDelegateTest() override = default; void CreateNetworkContext() { @@ -1381,8 +1396,6 @@ std::unique_ptr<TestURLLoaderClient> client_; mojo::Remote<mojom::NetworkContext> network_context_; mojo::Remote<mojom::URLLoader> loader_; - - DISALLOW_COPY_AND_ASSIGN(NetworkServiceNetworkDelegateTest); }; class ClearSiteDataAuthCertObserver : public TestURLLoaderNetworkObserver {
diff --git a/services/network/nss_temp_certs_cache_chromeos.h b/services/network/nss_temp_certs_cache_chromeos.h index bda81c6..625b4f2 100644 --- a/services/network/nss_temp_certs_cache_chromeos.h +++ b/services/network/nss_temp_certs_cache_chromeos.h
@@ -17,6 +17,11 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NSSTempCertsCacheChromeOS { public: explicit NSSTempCertsCacheChromeOS(const net::CertificateList& certificates); + + NSSTempCertsCacheChromeOS(const NSSTempCertsCacheChromeOS&) = delete; + NSSTempCertsCacheChromeOS& operator=(const NSSTempCertsCacheChromeOS&) = + delete; + ~NSSTempCertsCacheChromeOS(); private: @@ -30,8 +35,6 @@ // However, this is not an issue, as these certificates are not imported into // permanent databases, nor are the trust settings mutated to trust them. net::ScopedCERTCertificateList temp_certs_; - - DISALLOW_COPY_AND_ASSIGN(NSSTempCertsCacheChromeOS); }; } // namespace network
diff --git a/services/network/nss_temp_certs_cache_chromeos_unittest.cc b/services/network/nss_temp_certs_cache_chromeos_unittest.cc index 787b7a83..d619b61 100644 --- a/services/network/nss_temp_certs_cache_chromeos_unittest.cc +++ b/services/network/nss_temp_certs_cache_chromeos_unittest.cc
@@ -30,6 +30,11 @@ class NSSTempCertsCacheChromeOSTest : public testing::Test { public: NSSTempCertsCacheChromeOSTest() {} + + NSSTempCertsCacheChromeOSTest(const NSSTempCertsCacheChromeOSTest&) = delete; + NSSTempCertsCacheChromeOSTest& operator=( + const NSSTempCertsCacheChromeOSTest&) = delete; + ~NSSTempCertsCacheChromeOSTest() override {} protected: @@ -90,9 +95,6 @@ net::ParseTbsCertificate(tbs_certificate_tlv, options, &tbs, nullptr)); *out_subject = tbs.subject_tlv; } - - private: - DISALLOW_COPY_AND_ASSIGN(NSSTempCertsCacheChromeOSTest); }; // Checks that a certificate made available through the
diff --git a/services/network/origin_policy/origin_policy_fetcher.h b/services/network/origin_policy/origin_policy_fetcher.h index f591dbe..639fa06 100644 --- a/services/network/origin_policy/origin_policy_fetcher.h +++ b/services/network/origin_policy/origin_policy_fetcher.h
@@ -34,6 +34,9 @@ mojom::URLLoaderFactory* factory, mojom::OriginPolicyManager::RetrieveOriginPolicyCallback callback); + OriginPolicyFetcher(const OriginPolicyFetcher&) = delete; + OriginPolicyFetcher& operator=(const OriginPolicyFetcher&) = delete; + ~OriginPolicyFetcher(); static GURL GetPolicyURL(const url::Origin& origin); @@ -59,8 +62,6 @@ // Called back with policy fetch result. mojom::OriginPolicyManager::RetrieveOriginPolicyCallback callback_; - - DISALLOW_COPY_AND_ASSIGN(OriginPolicyFetcher); }; } // namespace network
diff --git a/services/network/origin_policy/origin_policy_manager.h b/services/network/origin_policy/origin_policy_manager.h index bcf20d7..a2e1d58 100644 --- a/services/network/origin_policy/origin_policy_manager.h +++ b/services/network/origin_policy/origin_policy_manager.h
@@ -41,6 +41,10 @@ // The |owner_network_context| is the owner of this object and it needs to // always outlive this object. explicit OriginPolicyManager(NetworkContext* owner_network_context); + + OriginPolicyManager(const OriginPolicyManager&) = delete; + OriginPolicyManager& operator=(const OriginPolicyManager&) = delete; + ~OriginPolicyManager() override; // Bind a receiver to this object. Mojo messages coming through the @@ -95,8 +99,6 @@ // of origin_policy_fetchers_ will be destroyed before the receiver they are // on is destroyed. mojo::ReceiverSet<mojom::OriginPolicyManager> receivers_; - - DISALLOW_COPY_AND_ASSIGN(OriginPolicyManager); }; } // namespace network
diff --git a/services/network/p2p/socket_manager.h b/services/network/p2p/socket_manager.h index 79f6546..764070cc 100644 --- a/services/network/p2p/socket_manager.h +++ b/services/network/p2p/socket_manager.h
@@ -67,6 +67,10 @@ mojo::PendingReceiver<mojom::P2PSocketManager> socket_manager_receiver, DeleteCallback delete_callback, net::URLRequestContext* url_request_context); + + P2PSocketManager(const P2PSocketManager&) = delete; + P2PSocketManager& operator=(const P2PSocketManager&) = delete; + ~P2PSocketManager() override; // net::NetworkChangeNotifier::NetworkChangeObserver overrides. @@ -151,8 +155,6 @@ network_notification_client_; base::WeakPtrFactory<P2PSocketManager> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(P2PSocketManager); }; } // namespace network
diff --git a/services/network/p2p/socket_tcp.h b/services/network/p2p/socket_tcp.h index b086186..73988046 100644 --- a/services/network/p2p/socket_tcp.h +++ b/services/network/p2p/socket_tcp.h
@@ -39,6 +39,10 @@ mojo::PendingReceiver<mojom::P2PSocket> socket, P2PSocketType type, ProxyResolvingClientSocketFactory* proxy_resolving_socket_factory); + + P2PSocketTcpBase(const P2PSocketTcpBase&) = delete; + P2PSocketTcpBase& operator=(const P2PSocketTcpBase&) = delete; + ~P2PSocketTcpBase() override; void InitAccepted(const net::IPEndPoint& remote_address, @@ -118,8 +122,6 @@ bool connected_ = false; const P2PSocketType type_; ProxyResolvingClientSocketFactory* proxy_resolving_socket_factory_; - - DISALLOW_COPY_AND_ASSIGN(P2PSocketTcpBase); }; class COMPONENT_EXPORT(NETWORK_SERVICE) P2PSocketTcp : public P2PSocketTcpBase { @@ -131,6 +133,9 @@ P2PSocketType type, ProxyResolvingClientSocketFactory* proxy_resolving_socket_factory); + P2PSocketTcp(const P2PSocketTcp&) = delete; + P2PSocketTcp& operator=(const P2PSocketTcp&) = delete; + ~P2PSocketTcp() override; protected: @@ -142,9 +147,6 @@ const std::vector<int8_t>& data, const rtc::PacketOptions& options, const net::NetworkTrafficAnnotationTag traffic_annotation) override; - - private: - DISALLOW_COPY_AND_ASSIGN(P2PSocketTcp); }; // P2PSocketStunTcp class provides the framing of STUN messages when used @@ -161,6 +163,9 @@ P2PSocketType type, ProxyResolvingClientSocketFactory* proxy_resolving_socket_factory); + P2PSocketStunTcp(const P2PSocketStunTcp&) = delete; + P2PSocketStunTcp& operator=(const P2PSocketStunTcp&) = delete; + ~P2PSocketStunTcp() override; protected: @@ -175,8 +180,6 @@ private: int GetExpectedPacketSize(const uint8_t* data, int len, int* pad_bytes); - - DISALLOW_COPY_AND_ASSIGN(P2PSocketStunTcp); }; } // namespace network
diff --git a/services/network/p2p/socket_tcp_server.h b/services/network/p2p/socket_tcp_server.h index 527110e..572cc0f 100644 --- a/services/network/p2p/socket_tcp_server.h +++ b/services/network/p2p/socket_tcp_server.h
@@ -33,6 +33,10 @@ mojo::PendingRemote<mojom::P2PSocketClient> client, mojo::PendingReceiver<mojom::P2PSocket> socket, P2PSocketType client_type); + + P2PSocketTcpServer(const P2PSocketTcpServer&) = delete; + P2PSocketTcpServer& operator=(const P2PSocketTcpServer&) = delete; + ~P2PSocketTcpServer() override; // P2PSocket overrides. @@ -65,8 +69,6 @@ std::unique_ptr<net::StreamSocket> accept_socket_; const net::CompletionRepeatingCallback accept_callback_; - - DISALLOW_COPY_AND_ASSIGN(P2PSocketTcpServer); }; } // namespace network
diff --git a/services/network/p2p/socket_throttler.h b/services/network/p2p/socket_throttler.h index baefc44..a41d585 100644 --- a/services/network/p2p/socket_throttler.h +++ b/services/network/p2p/socket_throttler.h
@@ -25,6 +25,10 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) P2PMessageThrottler { public: P2PMessageThrottler(); + + P2PMessageThrottler(const P2PMessageThrottler&) = delete; + P2PMessageThrottler& operator=(const P2PMessageThrottler&) = delete; + virtual ~P2PMessageThrottler(); bool DropNextPacket(size_t packet_len); @@ -32,8 +36,6 @@ private: std::unique_ptr<rtc::DataRateLimiter> rate_limiter_; - - DISALLOW_COPY_AND_ASSIGN(P2PMessageThrottler); }; } // namespace network
diff --git a/services/network/p2p/socket_udp.h b/services/network/p2p/socket_udp.h index e2e4f540..9233898a 100644 --- a/services/network/p2p/socket_udp.h +++ b/services/network/p2p/socket_udp.h
@@ -52,6 +52,10 @@ mojo::PendingReceiver<mojom::P2PSocket> socket, P2PMessageThrottler* throttler, net::NetLog* net_log); + + P2PSocketUdp(const P2PSocketUdp&) = delete; + P2PSocketUdp& operator=(const P2PSocketUdp&) = delete; + ~P2PSocketUdp() override; // P2PSocket overrides. @@ -125,8 +129,6 @@ // Callback object that returns a new socket when invoked. DatagramServerSocketFactory socket_factory_; - - DISALLOW_COPY_AND_ASSIGN(P2PSocketUdp); }; } // namespace network
diff --git a/services/network/proxy_auto_config_library_unittest.cc b/services/network/proxy_auto_config_library_unittest.cc index 0b8974f..dbc8d18 100644 --- a/services/network/proxy_auto_config_library_unittest.cc +++ b/services/network/proxy_auto_config_library_unittest.cc
@@ -77,6 +77,9 @@ net::Error connect_error) : peer_ip_(peer_ip), local_ip_(local_ip), connect_error_(connect_error) {} + MockUDPSocket(const MockUDPSocket&) = delete; + MockUDPSocket& operator=(const MockUDPSocket&) = delete; + ~MockUDPSocket() override = default; // Socket implementation. @@ -202,8 +205,6 @@ net::IPAddress peer_ip_; net::IPAddress local_ip_; net::Error connect_error_; - - DISALLOW_COPY_AND_ASSIGN(MockUDPSocket); }; class MockSocketFactory : public net::ClientSocketFactory { @@ -228,6 +229,9 @@ net::ERR_ADDRESS_UNREACHABLE)); } + MockSocketFactory(const MockSocketFactory&) = delete; + MockSocketFactory& operator=(const MockSocketFactory&) = delete; + ~MockSocketFactory() override { EXPECT_EQ(0u, udp_sockets_.size()) << "Not all of the mock sockets were consumed."; @@ -281,8 +285,6 @@ private: std::vector<std::unique_ptr<MockUDPSocket>> udp_sockets_; - - DISALLOW_COPY_AND_ASSIGN(MockSocketFactory); }; // Tests myIpAddress() when there is a route to 8.8.8.8.
diff --git a/services/network/proxy_config_service_mojo.h b/services/network/proxy_config_service_mojo.h index e4467ed..de0c365 100644 --- a/services/network/proxy_config_service_mojo.h +++ b/services/network/proxy_config_service_mojo.h
@@ -42,6 +42,10 @@ proxy_config_client_receiver, absl::optional<net::ProxyConfigWithAnnotation> initial_proxy_config, mojo::PendingRemote<mojom::ProxyConfigPollerClient> proxy_poller_client); + + ProxyConfigServiceMojo(const ProxyConfigServiceMojo&) = delete; + ProxyConfigServiceMojo& operator=(const ProxyConfigServiceMojo&) = delete; + ~ProxyConfigServiceMojo() override; // net::ProxyConfigService implementation: @@ -65,8 +69,6 @@ mojo::Receiver<mojom::ProxyConfigClient> receiver_{this}; base::ObserverList<Observer>::Unchecked observers_; - - DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceMojo); }; } // namespace network
diff --git a/services/network/proxy_config_service_mojo_unittest.cc b/services/network/proxy_config_service_mojo_unittest.cc index ef2e4646..089df904 100644 --- a/services/network/proxy_config_service_mojo_unittest.cc +++ b/services/network/proxy_config_service_mojo_unittest.cc
@@ -22,6 +22,12 @@ public: explicit TestProxyConfigServiceObserver(net::ProxyConfigService* service) : service_(service) {} + + TestProxyConfigServiceObserver(const TestProxyConfigServiceObserver&) = + delete; + TestProxyConfigServiceObserver& operator=( + const TestProxyConfigServiceObserver&) = delete; + ~TestProxyConfigServiceObserver() override {} void OnProxyConfigChanged( @@ -58,8 +64,6 @@ net::ProxyConfigService* const service_; int config_changes_ = 0; - - DISALLOW_COPY_AND_ASSIGN(TestProxyConfigServiceObserver); }; // Test fixture for notifying ProxyConfigServiceMojo of changes through the @@ -76,6 +80,10 @@ proxy_config_service_.AddObserver(&observer_); } + ProxyConfigServiceMojoTest(const ProxyConfigServiceMojoTest&) = delete; + ProxyConfigServiceMojoTest& operator=(const ProxyConfigServiceMojoTest&) = + delete; + ~ProxyConfigServiceMojoTest() override { proxy_config_service_.RemoveObserver(&observer_); } @@ -89,8 +97,6 @@ mojo::Remote<mojom::ProxyConfigClient> config_client_; ProxyConfigServiceMojo proxy_config_service_; TestProxyConfigServiceObserver observer_; - - DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceMojoTest); }; // Most tests of this class are in network_context_unittests.
diff --git a/services/network/proxy_lookup_request.h b/services/network/proxy_lookup_request.h index 29a7da00..4abf9a5 100644 --- a/services/network/proxy_lookup_request.h +++ b/services/network/proxy_lookup_request.h
@@ -35,6 +35,10 @@ mojo::PendingRemote<mojom::ProxyLookupClient> proxy_lookup_client, NetworkContext* network_context, const net::NetworkIsolationKey& network_isolation_key); + + ProxyLookupRequest(const ProxyLookupRequest&) = delete; + ProxyLookupRequest& operator=(const ProxyLookupRequest&) = delete; + ~ProxyLookupRequest(); // Starts looking up what proxy to use for |url|. On completion, will inform @@ -56,8 +60,6 @@ net::ProxyInfo proxy_info_; std::unique_ptr<net::ProxyResolutionRequest> request_; - - DISALLOW_COPY_AND_ASSIGN(ProxyLookupRequest); }; } // namespace network
diff --git a/services/network/proxy_resolver_factory_mojo.cc b/services/network/proxy_resolver_factory_mojo.cc index e45c0f5..2672a3f 100644 --- a/services/network/proxy_resolver_factory_mojo.cc +++ b/services/network/proxy_resolver_factory_mojo.cc
@@ -185,6 +185,10 @@ net::HostResolver* host_resolver, std::unique_ptr<net::ProxyResolverErrorObserver> error_observer, net::NetLog* net_log); + + ProxyResolverMojo(const ProxyResolverMojo&) = delete; + ProxyResolverMojo& operator=(const ProxyResolverMojo&) = delete; + ~ProxyResolverMojo() override; // ProxyResolver implementation: @@ -212,8 +216,6 @@ std::unique_ptr<net::ProxyResolverErrorObserver> error_observer_; net::NetLog* net_log_; - - DISALLOW_COPY_AND_ASSIGN(ProxyResolverMojo); }; class ProxyResolverMojo::Job @@ -226,6 +228,10 @@ net::ProxyInfo* results, net::CompletionOnceCallback callback, const net::NetLogWithSource& net_log); + + Job(const Job&) = delete; + Job& operator=(const Job&) = delete; + ~Job() override; // Returns the LoadState of this job. @@ -248,8 +254,6 @@ SEQUENCE_CHECKER(sequence_checker_); mojo::Receiver<proxy_resolver::mojom::ProxyResolverRequestClient> receiver_{ this}; - - DISALLOW_COPY_AND_ASSIGN(Job); }; ProxyResolverMojo::Job::Job(
diff --git a/services/network/proxy_resolver_factory_mojo.h b/services/network/proxy_resolver_factory_mojo.h index 1ca4e00..08680c0 100644 --- a/services/network/proxy_resolver_factory_mojo.h +++ b/services/network/proxy_resolver_factory_mojo.h
@@ -39,6 +39,10 @@ std::unique_ptr<net::ProxyResolverErrorObserver>()>& error_observer_factory, net::NetLog* net_log); + + ProxyResolverFactoryMojo(const ProxyResolverFactoryMojo&) = delete; + ProxyResolverFactoryMojo& operator=(const ProxyResolverFactoryMojo&) = delete; + ~ProxyResolverFactoryMojo() override; // ProxyResolverFactory override. @@ -58,8 +62,6 @@ net::NetLog* const net_log_; base::WeakPtrFactory<ProxyResolverFactoryMojo> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ProxyResolverFactoryMojo); }; } // namespace network
diff --git a/services/network/proxy_resolving_client_socket.h b/services/network/proxy_resolving_client_socket.h index 73ccb82..dca35f3 100644 --- a/services/network/proxy_resolving_client_socket.h +++ b/services/network/proxy_resolving_client_socket.h
@@ -61,6 +61,11 @@ const net::NetworkIsolationKey& network_isolation_key, bool use_tls, const net::ConnectJobFactory* connect_job_factory); + + ProxyResolvingClientSocket(const ProxyResolvingClientSocket&) = delete; + ProxyResolvingClientSocket& operator=(const ProxyResolvingClientSocket&) = + delete; + ~ProxyResolvingClientSocket() override; // net::StreamSocket implementation. @@ -149,8 +154,6 @@ State next_state_; base::WeakPtrFactory<ProxyResolvingClientSocket> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ProxyResolvingClientSocket); }; } // namespace network
diff --git a/services/network/proxy_resolving_client_socket_factory.h b/services/network/proxy_resolving_client_socket_factory.h index cc7ec80..9f9ee6a 100644 --- a/services/network/proxy_resolving_client_socket_factory.h +++ b/services/network/proxy_resolving_client_socket_factory.h
@@ -32,6 +32,12 @@ // pools by instantiating and owning a separate |network_session_|. explicit ProxyResolvingClientSocketFactory( net::URLRequestContext* request_context); + + ProxyResolvingClientSocketFactory(const ProxyResolvingClientSocketFactory&) = + delete; + ProxyResolvingClientSocketFactory& operator=( + const ProxyResolvingClientSocketFactory&) = delete; + ~ProxyResolvingClientSocketFactory(); // Creates a socket. |url|'s host and port specify where a connection will be @@ -60,8 +66,6 @@ net::URLRequestContext* request_context_; std::unique_ptr<net::ConnectJobFactory> connect_job_factory_ = std::make_unique<net::ConnectJobFactory>(); - - DISALLOW_COPY_AND_ASSIGN(ProxyResolvingClientSocketFactory); }; } // namespace network
diff --git a/services/network/proxy_resolving_socket_factory_mojo.h b/services/network/proxy_resolving_socket_factory_mojo.h index 7e7e09c56..63e3953 100644 --- a/services/network/proxy_resolving_socket_factory_mojo.h +++ b/services/network/proxy_resolving_socket_factory_mojo.h
@@ -27,6 +27,12 @@ : public mojom::ProxyResolvingSocketFactory { public: ProxyResolvingSocketFactoryMojo(net::URLRequestContext* request_context); + + ProxyResolvingSocketFactoryMojo(const ProxyResolvingSocketFactoryMojo&) = + delete; + ProxyResolvingSocketFactoryMojo& operator=( + const ProxyResolvingSocketFactoryMojo&) = delete; + ~ProxyResolvingSocketFactoryMojo() override; // mojom::ProxyResolvingSocketFactory implementation. @@ -44,8 +50,6 @@ TLSSocketFactory tls_socket_factory_; mojo::UniqueReceiverSet<mojom::ProxyResolvingSocket> proxy_resolving_socket_receivers_; - - DISALLOW_COPY_AND_ASSIGN(ProxyResolvingSocketFactoryMojo); }; } // namespace network
diff --git a/services/network/proxy_resolving_socket_mojo.h b/services/network/proxy_resolving_socket_mojo.h index 058df7c9..aa543c7 100644 --- a/services/network/proxy_resolving_socket_mojo.h +++ b/services/network/proxy_resolving_socket_mojo.h
@@ -33,6 +33,10 @@ const net::NetworkTrafficAnnotationTag& traffic_annotation, mojo::PendingRemote<mojom::SocketObserver> observer, TLSSocketFactory* tls_socket_factory); + + ProxyResolvingSocketMojo(const ProxyResolvingSocketMojo&) = delete; + ProxyResolvingSocketMojo& operator=(const ProxyResolvingSocketMojo&) = delete; + ~ProxyResolvingSocketMojo() override; void Connect( mojom::ProxyResolvingSocketFactory::CreateProxyResolvingSocketCallback @@ -66,8 +70,6 @@ connect_callback_; base::OnceClosure pending_upgrade_to_tls_callback_; std::unique_ptr<SocketDataPump> socket_data_pump_; - - DISALLOW_COPY_AND_ASSIGN(ProxyResolvingSocketMojo); }; } // namespace network
diff --git a/services/network/proxy_resolving_socket_mojo_unittest.cc b/services/network/proxy_resolving_socket_mojo_unittest.cc index c93ac28..f314357e 100644 --- a/services/network/proxy_resolving_socket_mojo_unittest.cc +++ b/services/network/proxy_resolving_socket_mojo_unittest.cc
@@ -62,6 +62,10 @@ fake_tls_handshake_(false), task_environment_(base::test::TaskEnvironment::MainThreadType::IO) {} + ProxyResolvingSocketTestBase(const ProxyResolvingSocketTestBase&) = delete; + ProxyResolvingSocketTestBase& operator=(const ProxyResolvingSocketTestBase&) = + delete; + ~ProxyResolvingSocketTestBase() {} void Init(const std::string& pac_result) { @@ -166,8 +170,6 @@ std::unique_ptr<mojo::Receiver<mojom::ProxyResolvingSocketFactory>> factory_receiver_; std::unique_ptr<ProxyResolvingSocketFactoryMojo> factory_impl_; - - DISALLOW_COPY_AND_ASSIGN(ProxyResolvingSocketTestBase); }; class ProxyResolvingSocketTest : public ProxyResolvingSocketTestBase, @@ -175,10 +177,10 @@ public: ProxyResolvingSocketTest() : ProxyResolvingSocketTestBase(GetParam()) {} - ~ProxyResolvingSocketTest() override {} + ProxyResolvingSocketTest(const ProxyResolvingSocketTest&) = delete; + ProxyResolvingSocketTest& operator=(const ProxyResolvingSocketTest&) = delete; - private: - DISALLOW_COPY_AND_ASSIGN(ProxyResolvingSocketTest); + ~ProxyResolvingSocketTest() override {} }; INSTANTIATE_TEST_SUITE_P(All, @@ -342,10 +344,11 @@ public: ProxyResolvingSocketMojoTest() : ProxyResolvingSocketTestBase(false) {} - ~ProxyResolvingSocketMojoTest() override {} + ProxyResolvingSocketMojoTest(const ProxyResolvingSocketMojoTest&) = delete; + ProxyResolvingSocketMojoTest& operator=(const ProxyResolvingSocketMojoTest&) = + delete; - private: - DISALLOW_COPY_AND_ASSIGN(ProxyResolvingSocketMojoTest); + ~ProxyResolvingSocketMojoTest() override {} }; TEST_F(ProxyResolvingSocketMojoTest, ConnectWithFakeTLSHandshake) {
diff --git a/services/network/public/cpp/cors/origin_access_list.h b/services/network/public/cpp/cors/origin_access_list.h index e867106d..8591e97 100644 --- a/services/network/public/cpp/cors/origin_access_list.h +++ b/services/network/public/cpp/cors/origin_access_list.h
@@ -43,6 +43,10 @@ }; OriginAccessList(); + + OriginAccessList(const OriginAccessList&) = delete; + OriginAccessList& operator=(const OriginAccessList&) = delete; + ~OriginAccessList(); // Clears the old allow list for |source_origin|, and set |patterns| to the @@ -128,8 +132,6 @@ MapType type); OriginPatternsMap map_; - - DISALLOW_COPY_AND_ASSIGN(OriginAccessList); }; } // namespace cors
diff --git a/services/network/public/cpp/cors/origin_access_list_unittest.cc b/services/network/public/cpp/cors/origin_access_list_unittest.cc index 05dbd646..fb16f1d 100644 --- a/services/network/public/cpp/cors/origin_access_list_unittest.cc +++ b/services/network/public/cpp/cors/origin_access_list_unittest.cc
@@ -42,6 +42,9 @@ https_google_origin_(url::Origin::Create(GURL("https://google.com"))), source_origin_(url::Origin::Create(GURL("https://chromium.org"))) {} + OriginAccessListTest(const OriginAccessListTest&) = delete; + OriginAccessListTest& operator=(const OriginAccessListTest&) = delete; + ~OriginAccessListTest() override = default; protected: @@ -130,8 +133,6 @@ url::Origin source_origin_; OriginAccessList list_; - - DISALLOW_COPY_AND_ASSIGN(OriginAccessListTest); }; TEST_F(OriginAccessListTest, IsAccessAllowedWithPort) {
diff --git a/services/network/public/cpp/data_pipe_to_source_stream.h b/services/network/public/cpp/data_pipe_to_source_stream.h index 5fbd808..20ab3655 100644 --- a/services/network/public/cpp/data_pipe_to_source_stream.h +++ b/services/network/public/cpp/data_pipe_to_source_stream.h
@@ -17,6 +17,10 @@ : public net::SourceStream { public: explicit DataPipeToSourceStream(mojo::ScopedDataPipeConsumerHandle body); + + DataPipeToSourceStream(const DataPipeToSourceStream&) = delete; + DataPipeToSourceStream& operator=(const DataPipeToSourceStream&) = delete; + ~DataPipeToSourceStream() override; // net::SourceStream implementation. @@ -39,8 +43,6 @@ scoped_refptr<net::IOBuffer> output_buf_; int output_buf_size_ = 0; net::CompletionOnceCallback pending_callback_; - - DISALLOW_COPY_AND_ASSIGN(DataPipeToSourceStream); }; } // namespace network
diff --git a/services/network/public/cpp/empty_url_loader_client.h b/services/network/public/cpp/empty_url_loader_client.h index 688fb5d..31267c67 100644 --- a/services/network/public/cpp/empty_url_loader_client.h +++ b/services/network/public/cpp/empty_url_loader_client.h
@@ -25,6 +25,10 @@ public mojo::DataPipeDrainer::Client { public: EmptyURLLoaderClient(); + + EmptyURLLoaderClient(const EmptyURLLoaderClient&) = delete; + EmptyURLLoaderClient& operator=(const EmptyURLLoaderClient&) = delete; + ~EmptyURLLoaderClient() override; // Calls |callback| when the request is done. @@ -55,8 +59,6 @@ absl::optional<URLLoaderCompletionStatus> done_status_; base::OnceCallback<void(const URLLoaderCompletionStatus&)> callback_; - - DISALLOW_COPY_AND_ASSIGN(EmptyURLLoaderClient); }; // Self-owned helper class for using EmptyURLLoaderClient.
diff --git a/services/network/public/cpp/features.cc b/services/network/public/cpp/features.cc index 5f70875..5d18a6e 100644 --- a/services/network/public/cpp/features.cc +++ b/services/network/public/cpp/features.cc
@@ -83,7 +83,7 @@ COMPONENT_EXPORT(NETWORK_CPP) extern const base::Feature kCrossOriginEmbedderPolicyCredentialless{ "CrossOriginEmbedderPolicyCredentialless", - base::FEATURE_DISABLED_BY_DEFAULT}; + base::FEATURE_ENABLED_BY_DEFAULT}; // Enables Cross-Origin-Embedder-Policy credentialless origin trial. It will be // used as a kill switch during the experiment.
diff --git a/services/network/public/cpp/network_connection_tracker_unittest.cc b/services/network/public/cpp/network_connection_tracker_unittest.cc index 0d45bc44..1bed9bc 100644 --- a/services/network/public/cpp/network_connection_tracker_unittest.cc +++ b/services/network/public/cpp/network_connection_tracker_unittest.cc
@@ -37,6 +37,10 @@ tracker_->AddNetworkConnectionObserver(this); } + TestNetworkConnectionObserver(const TestNetworkConnectionObserver&) = delete; + TestNetworkConnectionObserver& operator=( + const TestNetworkConnectionObserver&) = delete; + ~TestNetworkConnectionObserver() override { tracker_->RemoveNetworkConnectionObserver(this); } @@ -96,8 +100,6 @@ std::unique_ptr<base::RunLoop> run_loop_; network::mojom::ConnectionType expected_connection_type_; network::mojom::ConnectionType connection_type_; - - DISALLOW_COPY_AND_ASSIGN(TestNetworkConnectionObserver); }; class TestLeakyNetworkConnectionObserver @@ -137,6 +139,10 @@ explicit ConnectionTypeGetter(NetworkConnectionTracker* tracker) : tracker_(tracker), connection_type_(network::mojom::ConnectionType::CONNECTION_UNKNOWN) {} + + ConnectionTypeGetter(const ConnectionTypeGetter&) = delete; + ConnectionTypeGetter& operator=(const ConnectionTypeGetter&) = delete; + ~ConnectionTypeGetter() {} bool GetConnectionType() { @@ -169,8 +175,6 @@ NetworkConnectionTracker* tracker_; network::mojom::ConnectionType connection_type_; THREAD_CHECKER(thread_checker_); - - DISALLOW_COPY_AND_ASSIGN(ConnectionTypeGetter); }; } // namespace @@ -181,6 +185,10 @@ : mock_network_change_notifier_( net::test::MockNetworkChangeNotifier::Create()) {} + NetworkConnectionTrackerTest(const NetworkConnectionTrackerTest&) = delete; + NetworkConnectionTrackerTest& operator=(const NetworkConnectionTrackerTest&) = + delete; + ~NetworkConnectionTrackerTest() override {} void Initialize() { @@ -223,8 +231,6 @@ std::unique_ptr<NetworkService> network_service_; std::unique_ptr<NetworkConnectionTracker> tracker_; std::unique_ptr<TestNetworkConnectionObserver> observer_; - - DISALLOW_COPY_AND_ASSIGN(NetworkConnectionTrackerTest); }; TEST_F(NetworkConnectionTrackerTest, ObserverNotified) { @@ -353,6 +359,9 @@ Initialize(); } + NetworkGetConnectionTest(const NetworkGetConnectionTest&) = delete; + NetworkGetConnectionTest& operator=(const NetworkGetConnectionTest&) = delete; + ~NetworkGetConnectionTest() override {} void GetConnectionType() { @@ -375,8 +384,6 @@ // Accessed on |getter_thread_|. std::unique_ptr<ConnectionTypeGetter> getter_; - - DISALLOW_COPY_AND_ASSIGN(NetworkGetConnectionTest); }; TEST_F(NetworkGetConnectionTest, GetConnectionTypeOnDifferentThread) {
diff --git a/services/network/public/cpp/network_quality_tracker.h b/services/network/public/cpp/network_quality_tracker.h index 1680107..74128dd 100644 --- a/services/network/public/cpp/network_quality_tracker.h +++ b/services/network/public/cpp/network_quality_tracker.h
@@ -55,13 +55,15 @@ base::TimeDelta transport_rtt, int32_t downstream_throughput_kbps) = 0; + RTTAndThroughputEstimatesObserver( + const RTTAndThroughputEstimatesObserver&) = delete; + RTTAndThroughputEstimatesObserver& operator=( + const RTTAndThroughputEstimatesObserver&) = delete; + virtual ~RTTAndThroughputEstimatesObserver() {} protected: RTTAndThroughputEstimatesObserver() {} - - private: - DISALLOW_COPY_AND_ASSIGN(RTTAndThroughputEstimatesObserver); }; // Running the |callback| returns the network service in use.
diff --git a/services/network/public/cpp/network_quality_tracker_unittest.cc b/services/network/public/cpp/network_quality_tracker_unittest.cc index b233f17..c0cd60df 100644 --- a/services/network/public/cpp/network_quality_tracker_unittest.cc +++ b/services/network/public/cpp/network_quality_tracker_unittest.cc
@@ -35,6 +35,11 @@ tracker_->AddEffectiveConnectionTypeObserver(this); } + TestEffectiveConnectionTypeObserver( + const TestEffectiveConnectionTypeObserver&) = delete; + TestEffectiveConnectionTypeObserver& operator=( + const TestEffectiveConnectionTypeObserver&) = delete; + ~TestEffectiveConnectionTypeObserver() override { tracker_->RemoveEffectiveConnectionTypeObserver(this); } @@ -81,8 +86,6 @@ std::unique_ptr<base::RunLoop> run_loop_; net::EffectiveConnectionType expected_effective_connection_type_; net::EffectiveConnectionType effective_connection_type_; - - DISALLOW_COPY_AND_ASSIGN(TestEffectiveConnectionTypeObserver); }; class TestRTTAndThroughputEstimatesObserver @@ -95,6 +98,11 @@ tracker_->AddRTTAndThroughputEstimatesObserver(this); } + TestRTTAndThroughputEstimatesObserver( + const TestRTTAndThroughputEstimatesObserver&) = delete; + TestRTTAndThroughputEstimatesObserver& operator=( + const TestRTTAndThroughputEstimatesObserver&) = delete; + ~TestRTTAndThroughputEstimatesObserver() override { tracker_->RemoveRTTAndThroughputEstimatesObserver(this); } @@ -159,8 +167,6 @@ base::TimeDelta transport_rtt_; int32_t downstream_throughput_kbps_; base::TimeDelta http_rtt_notification_wait_; - - DISALLOW_COPY_AND_ASSIGN(TestRTTAndThroughputEstimatesObserver); }; } // namespace @@ -181,6 +187,10 @@ std::make_unique<TestRTTAndThroughputEstimatesObserver>(tracker_.get()); } + NetworkQualityTrackerTest(const NetworkQualityTrackerTest&) = delete; + NetworkQualityTrackerTest& operator=(const NetworkQualityTrackerTest&) = + delete; + ~NetworkQualityTrackerTest() override {} network::NetworkService* network_service() { return network_service_.get(); } @@ -214,8 +224,6 @@ std::unique_ptr<TestEffectiveConnectionTypeObserver> ect_observer_; std::unique_ptr<TestRTTAndThroughputEstimatesObserver> rtt_throughput_observer_; - - DISALLOW_COPY_AND_ASSIGN(NetworkQualityTrackerTest); }; TEST_F(NetworkQualityTrackerTest, ECTObserverNotified) {
diff --git a/services/network/public/cpp/not_implemented_url_loader_factory.h b/services/network/public/cpp/not_implemented_url_loader_factory.h index 045d9450..4c5d25e 100644 --- a/services/network/public/cpp/not_implemented_url_loader_factory.h +++ b/services/network/public/cpp/not_implemented_url_loader_factory.h
@@ -26,6 +26,11 @@ // method). static mojo::PendingRemote<network::mojom::URLLoaderFactory> Create(); + NotImplementedURLLoaderFactory(const NotImplementedURLLoaderFactory&) = + delete; + NotImplementedURLLoaderFactory& operator=( + const NotImplementedURLLoaderFactory&) = delete; + ~NotImplementedURLLoaderFactory() override; private: @@ -44,8 +49,6 @@ // as receivers that connect via the Clone method). explicit NotImplementedURLLoaderFactory( mojo::PendingReceiver<network::mojom::URLLoaderFactory> factory_receiver); - - DISALLOW_COPY_AND_ASSIGN(NotImplementedURLLoaderFactory); }; } // namespace network
diff --git a/services/network/public/cpp/server/http_connection.h b/services/network/public/cpp/server/http_connection.h index 8891ac2..0ce8aac 100644 --- a/services/network/public/cpp/server/http_connection.h +++ b/services/network/public/cpp/server/http_connection.h
@@ -30,6 +30,10 @@ mojo::ScopedDataPipeConsumerHandle socket_receive_handle, mojo::ScopedDataPipeProducerHandle socket_send_handle, const net::IPEndPoint& peer_addr); + + HttpConnection(const HttpConnection&) = delete; + HttpConnection& operator=(const HttpConnection&) = delete; + ~HttpConnection(); int id() const { return id_; } @@ -77,8 +81,6 @@ const net::IPEndPoint peer_addr_; std::unique_ptr<WebSocket> web_socket_; - - DISALLOW_COPY_AND_ASSIGN(HttpConnection); }; } // namespace server
diff --git a/services/network/public/cpp/server/http_server.h b/services/network/public/cpp/server/http_server.h index cfe3227a..967cf8d 100644 --- a/services/network/public/cpp/server/http_server.h +++ b/services/network/public/cpp/server/http_server.h
@@ -60,6 +60,10 @@ // callbacks yet. HttpServer(mojo::PendingRemote<mojom::TCPServerSocket> server_socket, HttpServer::Delegate* delegate); + + HttpServer(const HttpServer&) = delete; + HttpServer& operator=(const HttpServer&) = delete; + ~HttpServer(); void AcceptWebSocket(int connection_id, @@ -145,8 +149,6 @@ std::map<int, std::unique_ptr<HttpConnection>> id_to_connection_; base::WeakPtrFactory<HttpServer> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(HttpServer); }; } // namespace server
diff --git a/services/network/public/cpp/server/web_socket.h b/services/network/public/cpp/server/web_socket.h index 2ad6000..e5c1912 100644 --- a/services/network/public/cpp/server/web_socket.h +++ b/services/network/public/cpp/server/web_socket.h
@@ -44,6 +44,10 @@ void Send(base::StringPiece message, net::WebSocketFrameHeader::OpCodeEnum op_code, const net::NetworkTrafficAnnotationTag traffic_annotation); + + WebSocket(const WebSocket&) = delete; + WebSocket& operator=(const WebSocket&) = delete; + ~WebSocket(); private: @@ -58,8 +62,6 @@ bool closed_; std::unique_ptr<net::NetworkTrafficAnnotationTag> traffic_annotation_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(WebSocket); }; } // namespace server
diff --git a/services/network/public/cpp/server/web_socket_encoder.h b/services/network/public/cpp/server/web_socket_encoder.h index 496a6b34..f07def4 100644 --- a/services/network/public/cpp/server/web_socket_encoder.h +++ b/services/network/public/cpp/server/web_socket_encoder.h
@@ -29,6 +29,9 @@ public: static const char kClientExtensions[]; + WebSocketEncoder(const WebSocketEncoder&) = delete; + WebSocketEncoder& operator=(const WebSocketEncoder&) = delete; + ~WebSocketEncoder(); // Creates and returns an encoder for a server without extensions. @@ -73,8 +76,6 @@ Type type_; std::unique_ptr<net::WebSocketDeflater> deflater_; std::unique_ptr<net::WebSocketInflater> inflater_; - - DISALLOW_COPY_AND_ASSIGN(WebSocketEncoder); }; } // namespace server
diff --git a/services/network/public/cpp/shared_url_loader_factory.h b/services/network/public/cpp/shared_url_loader_factory.h index b60c678..033fb15 100644 --- a/services/network/public/cpp/shared_url_loader_factory.h +++ b/services/network/public/cpp/shared_url_loader_factory.h
@@ -58,6 +58,11 @@ class COMPONENT_EXPORT(NETWORK_CPP) PendingSharedURLLoaderFactory { public: PendingSharedURLLoaderFactory(); + + PendingSharedURLLoaderFactory(const PendingSharedURLLoaderFactory&) = delete; + PendingSharedURLLoaderFactory& operator=( + const PendingSharedURLLoaderFactory&) = delete; + virtual ~PendingSharedURLLoaderFactory(); protected: @@ -68,9 +73,6 @@ // never called multiple times for each PendingSharedURLLoaderFactory // instance. virtual scoped_refptr<SharedURLLoaderFactory> CreateFactory() = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(PendingSharedURLLoaderFactory); }; } // namespace network
diff --git a/services/network/public/cpp/simple_url_loader_unittest.cc b/services/network/public/cpp/simple_url_loader_unittest.cc index 516d95e..ad1923ed 100644 --- a/services/network/public/cpp/simple_url_loader_unittest.cc +++ b/services/network/public/cpp/simple_url_loader_unittest.cc
@@ -133,6 +133,9 @@ } } + SimpleLoaderTestHelper(const SimpleLoaderTestHelper&) = delete; + SimpleLoaderTestHelper& operator=(const SimpleLoaderTestHelper&) = delete; + ~SimpleLoaderTestHelper() override { base::ScopedAllowBlockingForTesting allow_blocking; if (temp_dir_.IsValid()) @@ -528,8 +531,6 @@ base::FilePath dest_path_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(SimpleLoaderTestHelper); }; // Request handler for the embedded test server that returns a response body @@ -2190,6 +2191,10 @@ task_environment_->RunUntilIdle(); } } + + MockURLLoader(const MockURLLoader&) = delete; + MockURLLoader& operator=(const MockURLLoader&) = delete; + ~MockURLLoader() override {} // network::mojom::URLLoader implementation: @@ -2243,14 +2248,16 @@ base::WeakPtrFactory<MockURLLoader> weak_factory_for_data_pipe_callbacks_{ this}; - - DISALLOW_COPY_AND_ASSIGN(MockURLLoader); }; class MockURLLoaderFactory : public network::mojom::URLLoaderFactory { public: explicit MockURLLoaderFactory(base::test::TaskEnvironment* task_environment) : task_environment_(task_environment) {} + + MockURLLoaderFactory(const MockURLLoaderFactory&) = delete; + MockURLLoaderFactory& operator=(const MockURLLoaderFactory&) = delete; + ~MockURLLoaderFactory() override {} // network::mojom::URLLoaderFactory implementation: @@ -2335,8 +2342,6 @@ std::list<GURL> requested_urls_; mojo::ReceiverSet<network::mojom::URLLoaderFactory> receiver_set_; - - DISALLOW_COPY_AND_ASSIGN(MockURLLoaderFactory); }; // Check that the request fails if OnComplete() is called before anything else.
diff --git a/services/network/resolve_host_request.h b/services/network/resolve_host_request.h index edbc7f9a..03695a4 100644 --- a/services/network/resolve_host_request.h +++ b/services/network/resolve_host_request.h
@@ -38,6 +38,10 @@ const absl::optional<net::HostResolver::ResolveHostParameters>& optional_parameters, net::NetLog* net_log); + + ResolveHostRequest(const ResolveHostRequest&) = delete; + ResolveHostRequest& operator=(const ResolveHostRequest&) = delete; + ~ResolveHostRequest() override; int Start( @@ -62,8 +66,6 @@ bool cancelled_ = false; // Error info for a cancelled request. net::ResolveErrorInfo resolve_error_info_; - - DISALLOW_COPY_AND_ASSIGN(ResolveHostRequest); }; } // namespace network
diff --git a/services/network/resource_scheduler/resource_scheduler.cc b/services/network/resource_scheduler/resource_scheduler.cc index e57c06ec..5fc2eac 100644 --- a/services/network/resource_scheduler/resource_scheduler.cc +++ b/services/network/resource_scheduler/resource_scheduler.cc
@@ -260,6 +260,10 @@ request_->SetUserData(kUserDataKey, std::make_unique<UnownedPointer>(this)); } + ScheduledResourceRequestImpl(const ScheduledResourceRequestImpl&) = delete; + ScheduledResourceRequestImpl& operator=(const ScheduledResourceRequestImpl&) = + delete; + ~ScheduledResourceRequestImpl() override { if ((attributes_ & kAttributeLayoutBlocking) == kAttributeLayoutBlocking) { UMA_HISTOGRAM_COUNTS_100( @@ -371,8 +375,6 @@ base::WeakPtrFactory<ResourceScheduler::ScheduledResourceRequestImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ScheduledResourceRequestImpl); }; const void* const
diff --git a/services/network/resource_scheduler/resource_scheduler_params_manager_unittest.cc b/services/network/resource_scheduler/resource_scheduler_params_manager_unittest.cc index 179d3da..3ebc193 100644 --- a/services/network/resource_scheduler/resource_scheduler_params_manager_unittest.cc +++ b/services/network/resource_scheduler/resource_scheduler_params_manager_unittest.cc
@@ -29,6 +29,11 @@ public: ResourceSchedulerParamsManagerTest() {} + ResourceSchedulerParamsManagerTest( + const ResourceSchedulerParamsManagerTest&) = delete; + ResourceSchedulerParamsManagerTest& operator=( + const ResourceSchedulerParamsManagerTest&) = delete; + ~ResourceSchedulerParamsManagerTest() override {} void ReadConfigTestHelper(size_t num_ranges) { @@ -157,9 +162,6 @@ return; } } - - private: - DISALLOW_COPY_AND_ASSIGN(ResourceSchedulerParamsManagerTest); }; TEST_F(ResourceSchedulerParamsManagerTest, VerifyAllDefaultParams) {
diff --git a/services/network/restricted_cookie_manager.cc b/services/network/restricted_cookie_manager.cc index c6f1531..6b4e47c1 100644 --- a/services/network/restricted_cookie_manager.cc +++ b/services/network/restricted_cookie_manager.cc
@@ -171,6 +171,9 @@ base::Unretained(this))); } + Listener(const Listener&) = delete; + Listener& operator=(const Listener&) = delete; + ~Listener() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); } mojo::Remote<mojom::CookieChangeListener>& mojo_listener() { @@ -241,8 +244,6 @@ mojo::Remote<mojom::CookieChangeListener> mojo_listener_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(Listener); }; RestrictedCookieManager::RestrictedCookieManager(
diff --git a/services/network/restricted_cookie_manager.h b/services/network/restricted_cookie_manager.h index 2804fa89..66708028 100644 --- a/services/network/restricted_cookie_manager.h +++ b/services/network/restricted_cookie_manager.h
@@ -60,6 +60,9 @@ const net::IsolationInfo& isolation_info, mojo::PendingRemote<mojom::CookieAccessObserver> cookie_observer); + RestrictedCookieManager(const RestrictedCookieManager&) = delete; + RestrictedCookieManager& operator=(const RestrictedCookieManager&) = delete; + ~RestrictedCookieManager() override; void OverrideOriginForTesting(const url::Origin& new_origin) { @@ -175,8 +178,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<RestrictedCookieManager> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(RestrictedCookieManager); }; } // namespace network
diff --git a/services/network/restricted_cookie_manager_unittest.cc b/services/network/restricted_cookie_manager_unittest.cc index 82dd35b..962f1e1 100644 --- a/services/network/restricted_cookie_manager_unittest.cc +++ b/services/network/restricted_cookie_manager_unittest.cc
@@ -118,6 +118,11 @@ explicit RestrictedCookieManagerSync( mojom::RestrictedCookieManager* cookie_service) : cookie_service_(cookie_service) {} + + RestrictedCookieManagerSync(const RestrictedCookieManagerSync&) = delete; + RestrictedCookieManagerSync& operator=(const RestrictedCookieManagerSync&) = + delete; + ~RestrictedCookieManagerSync() = default; // Wraps GetAllForUrl() but discards CookieAccessResult from returned cookies. @@ -181,8 +186,6 @@ private: mojom::RestrictedCookieManager* cookie_service_; - - DISALLOW_COPY_AND_ASSIGN(RestrictedCookieManagerSync); }; class RestrictedCookieManagerTest
diff --git a/services/network/socket_data_pump.h b/services/network/socket_data_pump.h index 91da105d..61b8c1a 100644 --- a/services/network/socket_data_pump.h +++ b/services/network/socket_data_pump.h
@@ -59,6 +59,10 @@ mojo::ScopedDataPipeProducerHandle receive_pipe_handle, mojo::ScopedDataPipeConsumerHandle send_pipe_handle, const net::NetworkTrafficAnnotationTag& traffic_annotation); + + SocketDataPump(const SocketDataPump&) = delete; + SocketDataPump& operator=(const SocketDataPump&) = delete; + ~SocketDataPump(); private: @@ -109,8 +113,6 @@ const net::NetworkTrafficAnnotationTag traffic_annotation_; base::WeakPtrFactory<SocketDataPump> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SocketDataPump); }; } // namespace network
diff --git a/services/network/socket_data_pump_unittest.cc b/services/network/socket_data_pump_unittest.cc index 6b59af6..3f5b0dd 100644 --- a/services/network/socket_data_pump_unittest.cc +++ b/services/network/socket_data_pump_unittest.cc
@@ -32,6 +32,11 @@ class TestSocketDataPumpDelegate : public SocketDataPump::Delegate { public: TestSocketDataPumpDelegate() {} + + TestSocketDataPumpDelegate(const TestSocketDataPumpDelegate&) = delete; + TestSocketDataPumpDelegate& operator=(const TestSocketDataPumpDelegate&) = + delete; + ~TestSocketDataPumpDelegate() {} // Waits for read error. Returns the error observed. @@ -69,8 +74,6 @@ base::RunLoop read_loop_; base::RunLoop write_loop_; base::RunLoop shutdown_loop_; - - DISALLOW_COPY_AND_ASSIGN(TestSocketDataPumpDelegate); }; class SocketDataPumpTest : public testing::Test, @@ -78,6 +81,10 @@ public: SocketDataPumpTest() : task_environment_(base::test::TaskEnvironment::MainThreadType::IO) {} + + SocketDataPumpTest(const SocketDataPumpTest&) = delete; + SocketDataPumpTest& operator=(const SocketDataPumpTest&) = delete; + ~SocketDataPumpTest() override {} // Initializes the test case with a socket data provider, which will be used @@ -140,8 +147,6 @@ TestSocketDataPumpDelegate test_delegate_; std::unique_ptr<net::StreamSocket> socket_; std::unique_ptr<SocketDataPump> data_pump_; - - DISALLOW_COPY_AND_ASSIGN(SocketDataPumpTest); }; INSTANTIATE_TEST_SUITE_P(All,
diff --git a/services/network/socket_factory.h b/services/network/socket_factory.h index ba6debb..6edd0682 100644 --- a/services/network/socket_factory.h +++ b/services/network/socket_factory.h
@@ -42,6 +42,10 @@ // |this|. SocketFactory(net::NetLog* net_log, net::URLRequestContext* url_request_context); + + SocketFactory(const SocketFactory&) = delete; + SocketFactory& operator=(const SocketFactory&) = delete; + virtual ~SocketFactory(); // These all correspond to the NetworkContext methods of the same name. @@ -104,8 +108,6 @@ mojo::UniqueReceiverSet<mojom::TCPConnectedSocket> tcp_connected_socket_receiver_; mojo::UniqueReceiverSet<mojom::TCPBoundSocket> tcp_bound_socket_receivers_; - - DISALLOW_COPY_AND_ASSIGN(SocketFactory); }; } // namespace network
diff --git a/services/network/ssl_config_service_mojo.h b/services/network/ssl_config_service_mojo.h index e961314..32b86ae 100644 --- a/services/network/ssl_config_service_mojo.h +++ b/services/network/ssl_config_service_mojo.h
@@ -29,6 +29,10 @@ mojom::SSLConfigPtr initial_config, mojo::PendingReceiver<mojom::SSLConfigClient> ssl_config_client_receiver, CRLSetDistributor* crl_set_distributor); + + SSLConfigServiceMojo(const SSLConfigServiceMojo&) = delete; + SSLConfigServiceMojo& operator=(const SSLConfigServiceMojo&) = delete; + ~SSLConfigServiceMojo() override; // Sets |cert_verifier| to be configured by certificate-related settings @@ -61,8 +65,6 @@ // coalescing is allowed when client certs are in use if the hosts being // coalesced match this list. std::vector<std::string> client_cert_pooling_policy_; - - DISALLOW_COPY_AND_ASSIGN(SSLConfigServiceMojo); }; } // namespace network
diff --git a/services/network/tcp_bound_socket.h b/services/network/tcp_bound_socket.h index a28d875..a9f73cd 100644 --- a/services/network/tcp_bound_socket.h +++ b/services/network/tcp_bound_socket.h
@@ -39,6 +39,10 @@ TCPBoundSocket(SocketFactory* socket_factory, net::NetLog* net_log, const net::NetworkTrafficAnnotationTag& traffic_annotation); + + TCPBoundSocket(const TCPBoundSocket&) = delete; + TCPBoundSocket& operator=(const TCPBoundSocket&) = delete; + ~TCPBoundSocket() override; // Attempts to bind a socket to the specified address. Returns net::OK on @@ -83,8 +87,6 @@ std::unique_ptr<TCPConnectedSocket> connecting_socket_; base::WeakPtrFactory<TCPBoundSocket> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(TCPBoundSocket); }; } // namespace network
diff --git a/services/network/tcp_bound_socket_unittest.cc b/services/network/tcp_bound_socket_unittest.cc index 3431a68a..418d7b9 100644 --- a/services/network/tcp_bound_socket_unittest.cc +++ b/services/network/tcp_bound_socket_unittest.cc
@@ -42,6 +42,10 @@ TCPBoundSocketTest() : task_environment_(base::test::TaskEnvironment::MainThreadType::IO), factory_(nullptr /* net_log */, &url_request_context_) {} + + TCPBoundSocketTest(const TCPBoundSocketTest&) = delete; + TCPBoundSocketTest& operator=(const TCPBoundSocketTest&) = delete; + ~TCPBoundSocketTest() override {} SocketFactory* factory() { return &factory_; } @@ -196,8 +200,6 @@ base::test::TaskEnvironment task_environment_; net::TestURLRequestContext url_request_context_; SocketFactory factory_; - - DISALLOW_COPY_AND_ASSIGN(TCPBoundSocketTest); }; // Try to bind a socket to an address already being listened on, which should
diff --git a/services/network/tcp_connected_socket.h b/services/network/tcp_connected_socket.h index d3cf8d0..c05b6bb 100644 --- a/services/network/tcp_connected_socket.h +++ b/services/network/tcp_connected_socket.h
@@ -56,6 +56,10 @@ mojo::ScopedDataPipeProducerHandle receive_pipe_handle, mojo::ScopedDataPipeConsumerHandle send_pipe_handle, const net::NetworkTrafficAnnotationTag& traffic_annotation); + + TCPConnectedSocket(const TCPConnectedSocket&) = delete; + TCPConnectedSocket& operator=(const TCPConnectedSocket&) = delete; + ~TCPConnectedSocket() override; void Connect( @@ -117,8 +121,6 @@ std::unique_ptr<SocketDataPump> socket_data_pump_; const net::NetworkTrafficAnnotationTag traffic_annotation_; - - DISALLOW_COPY_AND_ASSIGN(TCPConnectedSocket); }; } // namespace network
diff --git a/services/network/tcp_server_socket.h b/services/network/tcp_server_socket.h index 9b0ec4f..5d5976ac 100644 --- a/services/network/tcp_server_socket.h +++ b/services/network/tcp_server_socket.h
@@ -56,6 +56,9 @@ Delegate* delegate, const net::NetworkTrafficAnnotationTag& traffic_annotation); + TCPServerSocket(const TCPServerSocket&) = delete; + TCPServerSocket& operator=(const TCPServerSocket&) = delete; + ~TCPServerSocket() override; int Listen(const net::IPEndPoint& local_addr, @@ -92,8 +95,6 @@ net::NetworkTrafficAnnotationTag traffic_annotation_; base::WeakPtrFactory<TCPServerSocket> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(TCPServerSocket); }; } // namespace network
diff --git a/services/network/tcp_socket_unittest.cc b/services/network/tcp_socket_unittest.cc index 177681b..47e9194 100644 --- a/services/network/tcp_socket_unittest.cc +++ b/services/network/tcp_socket_unittest.cc
@@ -271,6 +271,10 @@ TCPSocketTest() : task_environment_(base::test::TaskEnvironment::MainThreadType::IO), url_request_context_(true) {} + + TCPSocketTest(const TCPSocketTest&) = delete; + TCPSocketTest& operator=(const TCPSocketTest&) = delete; + ~TCPSocketTest() override {} void Init(net::ClientSocketFactory* mock_client_socket_factory) { @@ -360,8 +364,6 @@ std::unique_ptr<SocketFactory> factory_; TestSocketObserver test_observer_; mojo::UniqueReceiverSet<mojom::TCPServerSocket> tcp_server_socket_receiver_; - - DISALLOW_COPY_AND_ASSIGN(TCPSocketTest); }; TEST_F(TCPSocketTest, ReadAndWrite) {
diff --git a/services/network/test/test_data_pipe_getter.h b/services/network/test/test_data_pipe_getter.h index cd235f1..0c06a83 100644 --- a/services/network/test/test_data_pipe_getter.h +++ b/services/network/test/test_data_pipe_getter.h
@@ -22,6 +22,10 @@ public: TestDataPipeGetter(const std::string& string_to_write, mojo::PendingReceiver<mojom::DataPipeGetter> receiver); + + TestDataPipeGetter(const TestDataPipeGetter&) = delete; + TestDataPipeGetter& operator=(const TestDataPipeGetter&) = delete; + ~TestDataPipeGetter() override; // If set to anything other than net::OK, won't bother to write the data. @@ -52,8 +56,6 @@ // Must be below |pipe_|, so it's deleted first. std::unique_ptr<mojo::SimpleWatcher> handle_watcher_; size_t write_position_ = 0; - - DISALLOW_COPY_AND_ASSIGN(TestDataPipeGetter); }; } // namespace network
diff --git a/services/network/test/test_url_loader_client.h b/services/network/test/test_url_loader_client.h index 06a68151..23330b4 100644 --- a/services/network/test/test_url_loader_client.h +++ b/services/network/test/test_url_loader_client.h
@@ -32,6 +32,10 @@ class TestURLLoaderClient final : public mojom::URLLoaderClient { public: TestURLLoaderClient(); + + TestURLLoaderClient(const TestURLLoaderClient&) = delete; + TestURLLoaderClient& operator=(const TestURLLoaderClient&) = delete; + ~TestURLLoaderClient() override; void OnReceiveEarlyHints(network::mojom::EarlyHintsPtr early_hints) override; @@ -129,8 +133,6 @@ int64_t total_upload_size_ = 0; std::vector<network::mojom::EarlyHintsPtr> early_hints_; - - DISALLOW_COPY_AND_ASSIGN(TestURLLoaderClient); }; } // namespace network
diff --git a/services/network/test/test_url_loader_factory.h b/services/network/test/test_url_loader_factory.h index 011306fe..2c98a20 100644 --- a/services/network/test/test_url_loader_factory.h +++ b/services/network/test/test_url_loader_factory.h
@@ -60,6 +60,10 @@ }; TestURLLoaderFactory(); + + TestURLLoaderFactory(const TestURLLoaderFactory&) = delete; + TestURLLoaderFactory& operator=(const TestURLLoaderFactory&) = delete; + ~TestURLLoaderFactory() override; using Redirects = @@ -199,8 +203,6 @@ Interceptor interceptor_; mojo::ReceiverSet<network::mojom::URLLoaderFactory> receivers_; - - DISALLOW_COPY_AND_ASSIGN(TestURLLoaderFactory); }; } // namespace network
diff --git a/services/network/test/udp_socket_test_util.h b/services/network/test/udp_socket_test_util.h index b161559..fb54da0f 100644 --- a/services/network/test/udp_socket_test_util.h +++ b/services/network/test/udp_socket_test_util.h
@@ -64,6 +64,10 @@ }; UDPSocketListenerImpl(); + + UDPSocketListenerImpl(const UDPSocketListenerImpl&) = delete; + UDPSocketListenerImpl& operator=(const UDPSocketListenerImpl&) = delete; + ~UDPSocketListenerImpl() override; const std::vector<ReceivedResult>& results() const { return results_; } @@ -77,8 +81,6 @@ std::unique_ptr<base::RunLoop> run_loop_; std::vector<ReceivedResult> results_; size_t expected_receive_count_; - - DISALLOW_COPY_AND_ASSIGN(UDPSocketListenerImpl); }; } // namespace test
diff --git a/services/network/test_chunked_data_pipe_getter.h b/services/network/test_chunked_data_pipe_getter.h index 635513c..4832189 100644 --- a/services/network/test_chunked_data_pipe_getter.h +++ b/services/network/test_chunked_data_pipe_getter.h
@@ -22,6 +22,11 @@ class TestChunkedDataPipeGetter : public mojom::ChunkedDataPipeGetter { public: TestChunkedDataPipeGetter(); + + TestChunkedDataPipeGetter(const TestChunkedDataPipeGetter&) = delete; + TestChunkedDataPipeGetter& operator=(const TestChunkedDataPipeGetter&) = + delete; + ~TestChunkedDataPipeGetter() override; // Returns the mojo::PendingRemote<mojom::ChunkedDataPipeGetter> corresponding @@ -46,8 +51,6 @@ mojo::ScopedDataPipeProducerHandle write_pipe_; GetSizeCallback get_size_callback_; bool received_size_callback_ = false; - - DISALLOW_COPY_AND_ASSIGN(TestChunkedDataPipeGetter); }; } // namespace network
diff --git a/services/network/test_mojo_proxy_resolver_factory.h b/services/network/test_mojo_proxy_resolver_factory.h index 301f636..e7057e16 100644 --- a/services/network/test_mojo_proxy_resolver_factory.h +++ b/services/network/test_mojo_proxy_resolver_factory.h
@@ -21,6 +21,11 @@ : public proxy_resolver::mojom::ProxyResolverFactory { public: TestMojoProxyResolverFactory(); + + TestMojoProxyResolverFactory(const TestMojoProxyResolverFactory&) = delete; + TestMojoProxyResolverFactory& operator=(const TestMojoProxyResolverFactory&) = + delete; + ~TestMojoProxyResolverFactory() override; // Returns true if CreateResolver was called. @@ -44,8 +49,6 @@ mojo::Receiver<ProxyResolverFactory> receiver_{this}; bool resolver_created_ = false; - - DISALLOW_COPY_AND_ASSIGN(TestMojoProxyResolverFactory); }; } // namespace network
diff --git a/services/network/throttling/network_conditions.h b/services/network/throttling/network_conditions.h index 3f27624..db9eed0 100644 --- a/services/network/throttling/network_conditions.h +++ b/services/network/throttling/network_conditions.h
@@ -14,6 +14,10 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkConditions { public: NetworkConditions(); + + NetworkConditions(const NetworkConditions&) = delete; + NetworkConditions& operator=(const NetworkConditions&) = delete; + ~NetworkConditions(); explicit NetworkConditions(bool offline); @@ -34,8 +38,6 @@ const double latency_; const double download_throughput_; const double upload_throughput_; - - DISALLOW_COPY_AND_ASSIGN(NetworkConditions); }; } // namespace network
diff --git a/services/network/throttling/scoped_throttling_token.h b/services/network/throttling/scoped_throttling_token.h index 3fd541f..af4ea1d 100644 --- a/services/network/throttling/scoped_throttling_token.h +++ b/services/network/throttling/scoped_throttling_token.h
@@ -32,6 +32,9 @@ uint32_t net_log_source_id, const absl::optional<base::UnguessableToken>& throttling_profile_id); + ScopedThrottlingToken(const ScopedThrottlingToken&) = delete; + ScopedThrottlingToken& operator=(const ScopedThrottlingToken&) = delete; + ~ScopedThrottlingToken(); private: @@ -39,8 +42,6 @@ const base::UnguessableToken& throttling_profile_id); const uint32_t net_log_source_id_; - - DISALLOW_COPY_AND_ASSIGN(ScopedThrottlingToken); }; } // namespace network
diff --git a/services/network/throttling/throttling_network_interceptor.h b/services/network/throttling/throttling_network_interceptor.h index 045ad85..b30403b 100644 --- a/services/network/throttling/throttling_network_interceptor.h +++ b/services/network/throttling/throttling_network_interceptor.h
@@ -31,6 +31,11 @@ using ThrottleCallback = base::RepeatingCallback<void(int, int64_t)>; ThrottlingNetworkInterceptor(); + + ThrottlingNetworkInterceptor(const ThrottlingNetworkInterceptor&) = delete; + ThrottlingNetworkInterceptor& operator=(const ThrottlingNetworkInterceptor&) = + delete; + virtual ~ThrottlingNetworkInterceptor(); base::WeakPtr<ThrottlingNetworkInterceptor> GetWeakPtr(); @@ -136,8 +141,6 @@ bool suspend_when_offline_ = false; base::WeakPtrFactory<ThrottlingNetworkInterceptor> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ThrottlingNetworkInterceptor); }; } // namespace network
diff --git a/services/network/throttling/throttling_network_transaction.h b/services/network/throttling/throttling_network_transaction.h index b609952..8065b4f 100644 --- a/services/network/throttling/throttling_network_transaction.h +++ b/services/network/throttling/throttling_network_transaction.h
@@ -46,6 +46,10 @@ explicit ThrottlingNetworkTransaction( std::unique_ptr<net::HttpTransaction> network_transaction); + ThrottlingNetworkTransaction(const ThrottlingNetworkTransaction&) = delete; + ThrottlingNetworkTransaction& operator=(const ThrottlingNetworkTransaction&) = + delete; + ~ThrottlingNetworkTransaction() override; // HttpTransaction methods: @@ -122,8 +126,6 @@ // True if Fail was already invoked. bool failed_; - - DISALLOW_COPY_AND_ASSIGN(ThrottlingNetworkTransaction); }; } // namespace network
diff --git a/services/network/throttling/throttling_network_transaction_factory.h b/services/network/throttling/throttling_network_transaction_factory.h index 012d4db..390698c2 100644 --- a/services/network/throttling/throttling_network_transaction_factory.h +++ b/services/network/throttling/throttling_network_transaction_factory.h
@@ -26,6 +26,12 @@ public: explicit ThrottlingNetworkTransactionFactory( net::HttpNetworkSession* session); + + ThrottlingNetworkTransactionFactory( + const ThrottlingNetworkTransactionFactory&) = delete; + ThrottlingNetworkTransactionFactory& operator=( + const ThrottlingNetworkTransactionFactory&) = delete; + ~ThrottlingNetworkTransactionFactory() override; // net::HttpTransactionFactory methods: @@ -36,8 +42,6 @@ private: std::unique_ptr<net::HttpTransactionFactory> network_layer_; - - DISALLOW_COPY_AND_ASSIGN(ThrottlingNetworkTransactionFactory); }; } // namespace network
diff --git a/services/network/throttling/throttling_upload_data_stream.h b/services/network/throttling/throttling_upload_data_stream.h index fe1b318..a1f10d0f 100644 --- a/services/network/throttling/throttling_upload_data_stream.h +++ b/services/network/throttling/throttling_upload_data_stream.h
@@ -23,6 +23,11 @@ // Supplied |upload_data_stream| must outlive this object. explicit ThrottlingUploadDataStream( net::UploadDataStream* upload_data_stream); + + ThrottlingUploadDataStream(const ThrottlingUploadDataStream&) = delete; + ThrottlingUploadDataStream& operator=(const ThrottlingUploadDataStream&) = + delete; + ~ThrottlingUploadDataStream() override; void SetInterceptor(ThrottlingNetworkInterceptor* interceptor); @@ -45,8 +50,6 @@ net::UploadDataStream* upload_data_stream_; base::WeakPtr<ThrottlingNetworkInterceptor> interceptor_; - - DISALLOW_COPY_AND_ASSIGN(ThrottlingUploadDataStream); }; } // namespace network
diff --git a/services/network/tls_client_socket.h b/services/network/tls_client_socket.h index 2e990f1..f898cc1 100644 --- a/services/network/tls_client_socket.h +++ b/services/network/tls_client_socket.h
@@ -36,6 +36,10 @@ public: TLSClientSocket(mojo::PendingRemote<mojom::SocketObserver> observer, const net::NetworkTrafficAnnotationTag& traffic_annotation); + + TLSClientSocket(const TLSClientSocket&) = delete; + TLSClientSocket& operator=(const TLSClientSocket&) = delete; + ~TLSClientSocket() override; void Connect(const net::HostPortPair& host_port_pair, @@ -60,8 +64,6 @@ mojom::TCPConnectedSocket::UpgradeToTLSCallback connect_callback_; bool send_ssl_info_ = false; const net::NetworkTrafficAnnotationTag traffic_annotation_; - - DISALLOW_COPY_AND_ASSIGN(TLSClientSocket); }; } // namespace network
diff --git a/services/network/tls_client_socket_unittest.cc b/services/network/tls_client_socket_unittest.cc index 35143fa..5ff6f6d 100644 --- a/services/network/tls_client_socket_unittest.cc +++ b/services/network/tls_client_socket_unittest.cc
@@ -56,6 +56,10 @@ : mode_(mode), task_environment_(base::test::TaskEnvironment::MainThreadType::IO), url_request_context_(true) {} + + TLSClientSocketTestBase(const TLSClientSocketTestBase&) = delete; + TLSClientSocketTestBase& operator=(const TLSClientSocketTestBase&) = delete; + virtual ~TLSClientSocketTestBase() {} Mode mode() { return mode_; } @@ -309,8 +313,6 @@ std::unique_ptr<ProxyResolvingSocketFactoryMojo> proxy_resolving_factory_; TestSocketObserver pre_tls_observer_; TestSocketObserver post_tls_observer_; - - DISALLOW_COPY_AND_ASSIGN(TLSClientSocketTestBase); }; class TLSClientSocketTest @@ -321,10 +323,10 @@ Init(true /* use_mock_sockets */, false /* configure_proxy */); } - ~TLSClientSocketTest() override {} + TLSClientSocketTest(const TLSClientSocketTest&) = delete; + TLSClientSocketTest& operator=(const TLSClientSocketTest&) = delete; - private: - DISALLOW_COPY_AND_ASSIGN(TLSClientSocketTest); + ~TLSClientSocketTest() override {} }; // Basic test to call UpgradeToTLS, and then read/write after UpgradeToTLS is @@ -893,10 +895,10 @@ Init(true /* use_mock_sockets*/, true /* configure_proxy */); } - ~TLSCLientSocketProxyTest() override {} + TLSCLientSocketProxyTest(const TLSCLientSocketProxyTest&) = delete; + TLSCLientSocketProxyTest& operator=(const TLSCLientSocketProxyTest&) = delete; - private: - DISALLOW_COPY_AND_ASSIGN(TLSCLientSocketProxyTest); + ~TLSCLientSocketProxyTest() override {} }; TEST_F(TLSCLientSocketProxyTest, UpgradeToTLS) { @@ -952,10 +954,11 @@ Init(true /* use_mock_sockets*/, false /* configure_proxy */); } - ~TLSClientSocketIoModeTest() override {} + TLSClientSocketIoModeTest(const TLSClientSocketIoModeTest&) = delete; + TLSClientSocketIoModeTest& operator=(const TLSClientSocketIoModeTest&) = + delete; - private: - DISALLOW_COPY_AND_ASSIGN(TLSClientSocketIoModeTest); + ~TLSClientSocketIoModeTest() override {} }; INSTANTIATE_TEST_SUITE_P(All, @@ -1070,6 +1073,11 @@ Init(false /* use_mock_sockets */, false /* configure_proxy */); } + TLSClientSocketTestWithEmbeddedTestServerBase( + const TLSClientSocketTestWithEmbeddedTestServerBase&) = delete; + TLSClientSocketTestWithEmbeddedTestServerBase& operator=( + const TLSClientSocketTestWithEmbeddedTestServerBase&) = delete; + ~TLSClientSocketTestWithEmbeddedTestServerBase() override {} // Starts the test server using the specified certificate. @@ -1149,8 +1157,6 @@ net::EmbeddedTestServer server_; mojo::Remote<mojom::TLSClientSocket> tls_socket_; - - DISALLOW_COPY_AND_ASSIGN(TLSClientSocketTestWithEmbeddedTestServerBase); }; class TLSClientSocketTestWithEmbeddedTestServer @@ -1159,10 +1165,13 @@ public: TLSClientSocketTestWithEmbeddedTestServer() : TLSClientSocketTestWithEmbeddedTestServerBase(GetParam()) {} - ~TLSClientSocketTestWithEmbeddedTestServer() override {} - private: - DISALLOW_COPY_AND_ASSIGN(TLSClientSocketTestWithEmbeddedTestServer); + TLSClientSocketTestWithEmbeddedTestServer( + const TLSClientSocketTestWithEmbeddedTestServer&) = delete; + TLSClientSocketTestWithEmbeddedTestServer& operator=( + const TLSClientSocketTestWithEmbeddedTestServer&) = delete; + + ~TLSClientSocketTestWithEmbeddedTestServer() override {} }; TEST_P(TLSClientSocketTestWithEmbeddedTestServer, Basic) { @@ -1200,10 +1209,13 @@ public: TLSClientSocketDirectTestWithEmbeddedTestServer() : TLSClientSocketTestWithEmbeddedTestServerBase(kDirect) {} - ~TLSClientSocketDirectTestWithEmbeddedTestServer() override {} - private: - DISALLOW_COPY_AND_ASSIGN(TLSClientSocketDirectTestWithEmbeddedTestServer); + TLSClientSocketDirectTestWithEmbeddedTestServer( + const TLSClientSocketDirectTestWithEmbeddedTestServer&) = delete; + TLSClientSocketDirectTestWithEmbeddedTestServer& operator=( + const TLSClientSocketDirectTestWithEmbeddedTestServer&) = delete; + + ~TLSClientSocketDirectTestWithEmbeddedTestServer() override {} }; TEST_F(TLSClientSocketDirectTestWithEmbeddedTestServer, SSLInfo) {
diff --git a/services/network/tls_socket_factory.h b/services/network/tls_socket_factory.h index ca441ac..772305d0 100644 --- a/services/network/tls_socket_factory.h +++ b/services/network/tls_socket_factory.h
@@ -52,6 +52,10 @@ // HttpNetworkSession::Context // 2) The default ClientSocketFactory. explicit TLSSocketFactory(net::URLRequestContext* url_request_context); + + TLSSocketFactory(const TLSSocketFactory&) = delete; + TLSSocketFactory& operator=(const TLSSocketFactory&) = delete; + virtual ~TLSSocketFactory(); // Upgrades an existing socket to TLS. The previous pipes and data pump @@ -87,8 +91,6 @@ net::ClientSocketFactory* client_socket_factory_; net::SSLConfigService* const ssl_config_service_; mojo::UniqueReceiverSet<mojom::TLSClientSocket> tls_socket_receivers_; - - DISALLOW_COPY_AND_ASSIGN(TLSSocketFactory); }; } // namespace network
diff --git a/services/network/transitional_url_loader_factory_owner.h b/services/network/transitional_url_loader_factory_owner.h index dfc35b22..3337e683 100644 --- a/services/network/transitional_url_loader_factory_owner.h +++ b/services/network/transitional_url_loader_factory_owner.h
@@ -39,6 +39,12 @@ // |url_request_context_getter|. explicit TransitionalURLLoaderFactoryOwner( scoped_refptr<net::URLRequestContextGetter> url_request_context_getter); + + TransitionalURLLoaderFactoryOwner(const TransitionalURLLoaderFactoryOwner&) = + delete; + TransitionalURLLoaderFactoryOwner& operator=( + const TransitionalURLLoaderFactoryOwner&) = delete; + ~TransitionalURLLoaderFactoryOwner(); scoped_refptr<network::SharedURLLoaderFactory> GetURLLoaderFactory(); @@ -60,8 +66,6 @@ scoped_refptr<network::WeakWrapperSharedURLLoaderFactory> shared_url_loader_factory_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(TransitionalURLLoaderFactoryOwner); }; } // namespace network
diff --git a/services/network/udp_socket.cc b/services/network/udp_socket.cc index c3abf9e..94961585 100644 --- a/services/network/udp_socket.cc +++ b/services/network/udp_socket.cc
@@ -39,6 +39,10 @@ net::NetLog* net_log, const net::NetLogSource& source) : socket_(bind_type, net_log, source) {} + + SocketWrapperImpl(const SocketWrapperImpl&) = delete; + SocketWrapperImpl& operator=(const SocketWrapperImpl&) = delete; + ~SocketWrapperImpl() override {} int Connect(const net::IPEndPoint& remote_addr, @@ -142,8 +146,6 @@ } net::UDPSocket socket_; - - DISALLOW_COPY_AND_ASSIGN(SocketWrapperImpl); }; } // namespace
diff --git a/services/network/udp_socket.h b/services/network/udp_socket.h index f5edb2c..32dfd9c 100644 --- a/services/network/udp_socket.h +++ b/services/network/udp_socket.h
@@ -75,6 +75,10 @@ UDPSocket(mojo::PendingRemote<mojom::UDPSocketListener> listener, net::NetLog* net_log); + + UDPSocket(const UDPSocket&) = delete; + UDPSocket& operator=(const UDPSocket&) = delete; + ~UDPSocket() override; // UDPSocket implementation. @@ -171,8 +175,6 @@ // The queue owns the PendingSendRequest instances. base::circular_deque<std::unique_ptr<PendingSendRequest>> pending_send_requests_; - - DISALLOW_COPY_AND_ASSIGN(UDPSocket); }; } // namespace network
diff --git a/services/network/udp_socket_unittest.cc b/services/network/udp_socket_unittest.cc index cfa802a..2c3d151c 100644 --- a/services/network/udp_socket_unittest.cc +++ b/services/network/udp_socket_unittest.cc
@@ -38,6 +38,10 @@ class SocketWrapperTestImpl : public UDPSocket::SocketWrapper { public: SocketWrapperTestImpl() {} + + SocketWrapperTestImpl(const SocketWrapperTestImpl&) = delete; + SocketWrapperTestImpl& operator=(const SocketWrapperTestImpl&) = delete; + ~SocketWrapperTestImpl() override {} int Connect(const net::IPEndPoint& remote_addr, @@ -96,9 +100,6 @@ NOTREACHED(); return net::ERR_NOT_IMPLEMENTED; } - - private: - DISALLOW_COPY_AND_ASSIGN(SocketWrapperTestImpl); }; net::IPEndPoint GetLocalHostWithAnyPort() { @@ -193,6 +194,10 @@ UDPSocketTest() : task_environment_(base::test::TaskEnvironment::MainThreadType::IO), factory_(nullptr /*netlog*/, &url_request_context_) {} + + UDPSocketTest(const UDPSocketTest&) = delete; + UDPSocketTest& operator=(const UDPSocketTest&) = delete; + ~UDPSocketTest() override {} void SetWrappedSocket( @@ -211,8 +216,6 @@ base::test::TaskEnvironment task_environment_; net::TestURLRequestContext url_request_context_; SocketFactory factory_; - - DISALLOW_COPY_AND_ASSIGN(UDPSocketTest); }; TEST_F(UDPSocketTest, Settings) {
diff --git a/services/network/upload_progress_tracker.h b/services/network/upload_progress_tracker.h index 994535c3..60067638 100644 --- a/services/network/upload_progress_tracker.h +++ b/services/network/upload_progress_tracker.h
@@ -39,6 +39,10 @@ net::URLRequest* request, scoped_refptr<base::SequencedTaskRunner> task_runner = base::SequencedTaskRunnerHandle::Get()); + + UploadProgressTracker(const UploadProgressTracker&) = delete; + UploadProgressTracker& operator=(const UploadProgressTracker&) = delete; + virtual ~UploadProgressTracker(); void OnAckReceived(); @@ -61,8 +65,6 @@ base::RepeatingTimer progress_timer_; UploadProgressReportCallback report_progress_; - - DISALLOW_COPY_AND_ASSIGN(UploadProgressTracker); }; } // namespace network
diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc index 3a0b520..c73973f7 100644 --- a/services/network/url_loader.cc +++ b/services/network/url_loader.cc
@@ -183,12 +183,13 @@ element.AsStringPiece().size()), resource_request_body_(resource_request_body) {} + BytesElementReader(const BytesElementReader&) = delete; + BytesElementReader& operator=(const BytesElementReader&) = delete; + ~BytesElementReader() override {} private: scoped_refptr<ResourceRequestBody> resource_request_body_; - - DISALLOW_COPY_AND_ASSIGN(BytesElementReader); }; // A subclass of net::UploadFileElementReader which owns @@ -209,12 +210,13 @@ element.expected_modification_time()), resource_request_body_(resource_request_body) {} + FileElementReader(const FileElementReader&) = delete; + FileElementReader& operator=(const FileElementReader&) = delete; + ~FileElementReader() override {} private: scoped_refptr<ResourceRequestBody> resource_request_body_; - - DISALLOW_COPY_AND_ASSIGN(FileElementReader); }; std::unique_ptr<net::UploadDataStream> CreateUploadDataStream( @@ -681,6 +683,9 @@ StartOpeningNextBatch(); } + FileOpenerForUpload(const FileOpenerForUpload&) = delete; + FileOpenerForUpload& operator=(const FileOpenerForUpload&) = delete; + ~FileOpenerForUpload() { if (!opened_files_.empty()) PostCloseFiles(std::move(opened_files_)); @@ -759,8 +764,6 @@ std::vector<base::File> opened_files_; base::WeakPtrFactory<FileOpenerForUpload> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FileOpenerForUpload); }; void URLLoader::OpenFilesForUpload(const ResourceRequest& request) { @@ -2359,15 +2362,12 @@ ShouldSendClientCertificates(request_credentials_mode_) && coep_allow_credentials; - // TODO(https://crbug.com/799935) net::LOAD_DO_NOT_* are in the process of - // being converted to credentials_mode. Using set_allow_credentials will - // implicitly override the deprecated LOAD_DO_NOT_SAVE_COOKIE flag. As a - // result, set_allow_credentials should not be called when not needed, or it - // would have side effects. - if (url_request_->allow_credentials() != allow_credentials) - url_request_->set_allow_credentials(allow_credentials); - - url_request_->set_send_client_certs(allow_client_certificates); + // The decision not to include credentials is sticky. This is equivalent to + // checking the tainted origin flag in the fetch specification. + if (!allow_credentials) + url_request_->set_allow_credentials(false); + if (!allow_client_certificates) + url_request_->set_send_client_certs(false); // Contrary to Firefox or blink's cache, the HTTP cache doesn't distinguish // requests including user's credentials from the anonymous ones yet. See
diff --git a/services/network/url_loader.h b/services/network/url_loader.h index d015405..93dfe6f 100644 --- a/services/network/url_loader.h +++ b/services/network/url_loader.h
@@ -142,6 +142,10 @@ mojo::PendingRemote<mojom::DevToolsObserver> devtools_observer, mojo::PendingRemote<mojom::AcceptCHFrameObserver> accept_ch_frame_observer); + + URLLoader(const URLLoader&) = delete; + URLLoader& operator=(const URLLoader&) = delete; + ~URLLoader() override; // mojom::URLLoader implementation: @@ -585,8 +589,6 @@ mojo::Remote<mojom::AcceptCHFrameObserver> accept_ch_frame_observer_; base::WeakPtrFactory<URLLoader> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(URLLoader); }; } // namespace network
diff --git a/services/network/url_loader_factory.h b/services/network/url_loader_factory.h index 87a19cd3..02909432 100644 --- a/services/network/url_loader_factory.h +++ b/services/network/url_loader_factory.h
@@ -49,6 +49,9 @@ scoped_refptr<ResourceSchedulerClient> resource_scheduler_client, cors::CorsURLLoaderFactory* cors_url_loader_factory); + URLLoaderFactory(const URLLoaderFactory&) = delete; + URLLoaderFactory& operator=(const URLLoaderFactory&) = delete; + ~URLLoaderFactory() override; // mojom::URLLoaderFactory implementation. @@ -106,8 +109,6 @@ base::OneShotTimer update_load_info_timer_; bool waiting_on_load_state_ack_ = false; - - DISALLOW_COPY_AND_ASSIGN(URLLoaderFactory); }; } // namespace network
diff --git a/services/network/url_loader_unittest.cc b/services/network/url_loader_unittest.cc index 2a74499..4cfdec8 100644 --- a/services/network/url_loader_unittest.cc +++ b/services/network/url_loader_unittest.cc
@@ -187,6 +187,10 @@ net_error_(net_error), async_reads_(async_reads) {} + URLRequestMultipleWritesJob(const URLRequestMultipleWritesJob&) = delete; + URLRequestMultipleWritesJob& operator=(const URLRequestMultipleWritesJob&) = + delete; + ~URLRequestMultipleWritesJob() override = default; // net::URLRequestJob implementation: @@ -226,8 +230,6 @@ bool async_reads_; base::WeakPtrFactory<URLRequestMultipleWritesJob> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(URLRequestMultipleWritesJob); }; class MultipleWritesInterceptor : public net::URLRequestInterceptor { @@ -238,6 +240,11 @@ : packets_(std::move(packets)), net_error_(net_error), async_reads_(async_reads) {} + + MultipleWritesInterceptor(const MultipleWritesInterceptor&) = delete; + MultipleWritesInterceptor& operator=(const MultipleWritesInterceptor&) = + delete; + ~MultipleWritesInterceptor() override {} static GURL GetURL() { return GURL("http://foo"); } @@ -253,8 +260,6 @@ std::list<std::string> packets_; net::Error net_error_; bool async_reads_; - - DISALLOW_COPY_AND_ASSIGN(MultipleWritesInterceptor); }; // Every read completes synchronously. @@ -266,6 +271,10 @@ bool fill_entire_buffer) : URLRequestJob(request), fill_entire_buffer_(fill_entire_buffer) {} + URLRequestEternalSyncReadsJob(const URLRequestEternalSyncReadsJob&) = delete; + URLRequestEternalSyncReadsJob& operator=( + const URLRequestEternalSyncReadsJob&) = delete; + ~URLRequestEternalSyncReadsJob() override = default; // net::URLRequestJob implementation: @@ -292,13 +301,16 @@ const bool fill_entire_buffer_; base::WeakPtrFactory<URLRequestEternalSyncReadsJob> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(URLRequestEternalSyncReadsJob); }; class EternalSyncReadsInterceptor : public net::URLRequestInterceptor { public: EternalSyncReadsInterceptor() {} + + EternalSyncReadsInterceptor(const EternalSyncReadsInterceptor&) = delete; + EternalSyncReadsInterceptor& operator=(const EternalSyncReadsInterceptor&) = + delete; + ~EternalSyncReadsInterceptor() override {} static std::string GetHostName() { return "eternal"; } @@ -319,9 +331,6 @@ } return nullptr; } - - private: - DISALLOW_COPY_AND_ASSIGN(EternalSyncReadsInterceptor); }; // Simulates handing over things to the disk to write before returning to the @@ -338,6 +347,10 @@ simulated_cache_dest_(simulated_cache_dest), use_text_plain_(use_text_plain) {} + URLRequestSimulatedCacheJob(const URLRequestSimulatedCacheJob&) = delete; + URLRequestSimulatedCacheJob& operator=(const URLRequestSimulatedCacheJob&) = + delete; + ~URLRequestSimulatedCacheJob() override = default; // net::URLRequestJob implementation: @@ -375,8 +388,6 @@ scoped_refptr<net::IOBuffer>* simulated_cache_dest_; bool use_text_plain_; base::WeakPtrFactory<URLRequestSimulatedCacheJob> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(URLRequestSimulatedCacheJob); }; class SimulatedCacheInterceptor : public net::URLRequestInterceptor { @@ -3224,6 +3235,9 @@ response_data, auto_advance) {} + MockHTTPSURLRequestJob(const MockHTTPSURLRequestJob&) = delete; + MockHTTPSURLRequestJob& operator=(const MockHTTPSURLRequestJob&) = delete; + ~MockHTTPSURLRequestJob() override = default; // net::URLRequestTestJob: @@ -3234,9 +3248,6 @@ net::ImportCertFromFile(net::GetTestCertsDirectory(), "ok_cert.pem"); info->ssl_info.cert_status = net::CERT_STATUS_DATE_INVALID; } - - private: - DISALLOW_COPY_AND_ASSIGN(MockHTTPSURLRequestJob); }; class MockHTTPSJobURLRequestInterceptor : public net::URLRequestInterceptor { @@ -3391,6 +3402,10 @@ explicit FakeSSLPrivateKeyImpl( scoped_refptr<net::SSLPrivateKey> ssl_private_key) : ssl_private_key_(std::move(ssl_private_key)) {} + + FakeSSLPrivateKeyImpl(const FakeSSLPrivateKeyImpl&) = delete; + FakeSSLPrivateKeyImpl& operator=(const FakeSSLPrivateKeyImpl&) = delete; + ~FakeSSLPrivateKeyImpl() override {} // network::mojom::SSLPrivateKey: @@ -3412,8 +3427,6 @@ } scoped_refptr<net::SSLPrivateKey> ssl_private_key_; - - DISALLOW_COPY_AND_ASSIGN(FakeSSLPrivateKeyImpl); }; using CookieAccessType = mojom::CookieAccessDetails::Type;
diff --git a/services/network/url_request_context_builder_mojo.h b/services/network/url_request_context_builder_mojo.h index 1847f7f5..3f3a1abc 100644 --- a/services/network/url_request_context_builder_mojo.h +++ b/services/network/url_request_context_builder_mojo.h
@@ -40,6 +40,11 @@ : public net::URLRequestContextBuilder { public: URLRequestContextBuilderMojo(); + + URLRequestContextBuilderMojo(const URLRequestContextBuilderMojo&) = delete; + URLRequestContextBuilderMojo& operator=(const URLRequestContextBuilderMojo&) = + delete; + ~URLRequestContextBuilderMojo() override; // Sets Mojo factory used to create ProxyResolvers. If not set, falls back to @@ -74,7 +79,6 @@ mojo::PendingRemote<proxy_resolver::mojom::ProxyResolverFactory> mojo_proxy_resolver_factory_; - DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilderMojo); }; } // namespace network
diff --git a/services/network/websocket.cc b/services/network/websocket.cc index 398a30c..74f58b7 100644 --- a/services/network/websocket.cc +++ b/services/network/websocket.cc
@@ -130,6 +130,10 @@ : public net::WebSocketEventInterface { public: explicit WebSocketEventHandler(WebSocket* impl); + + WebSocketEventHandler(const WebSocketEventHandler&) = delete; + WebSocketEventHandler& operator=(const WebSocketEventHandler&) = delete; + ~WebSocketEventHandler() override; // net::WebSocketEventInterface implementation @@ -169,8 +173,6 @@ private: WebSocket* const impl_; - - DISALLOW_COPY_AND_ASSIGN(WebSocketEventHandler); }; WebSocket::WebSocketEventHandler::WebSocketEventHandler(WebSocket* impl)
diff --git a/services/network/websocket.h b/services/network/websocket.h index 9e40f4f..51c69738 100644 --- a/services/network/websocket.h +++ b/services/network/websocket.h
@@ -77,6 +77,9 @@ base::TimeDelta delay, const absl::optional<base::UnguessableToken>& throttling_profile_id); + WebSocket(const WebSocket&) = delete; + WebSocket& operator=(const WebSocket&) = delete; + ~WebSocket() override; // mojom::WebSocket methods: @@ -254,8 +257,6 @@ std::unique_ptr<WebSocketInterceptor> outgoing_frame_interceptor_; base::WeakPtrFactory<WebSocket> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(WebSocket); }; } // namespace network
diff --git a/services/network/websocket_factory.h b/services/network/websocket_factory.h index f4ecbfd..0167b8f 100644 --- a/services/network/websocket_factory.h +++ b/services/network/websocket_factory.h
@@ -37,6 +37,10 @@ class WebSocketFactory final { public: explicit WebSocketFactory(NetworkContext* context); + + WebSocketFactory(const WebSocketFactory&) = delete; + WebSocketFactory& operator=(const WebSocketFactory&) = delete; + ~WebSocketFactory(); void CreateWebSocket( @@ -79,8 +83,6 @@ // |context_| outlives this object. NetworkContext* const context_; - - DISALLOW_COPY_AND_ASSIGN(WebSocketFactory); }; } // namespace network
diff --git a/services/network/websocket_throttler.h b/services/network/websocket_throttler.h index 0db73a7..679d8db 100644 --- a/services/network/websocket_throttler.h +++ b/services/network/websocket_throttler.h
@@ -33,6 +33,10 @@ explicit PendingConnection( base::WeakPtr<WebSocketPerProcessThrottler> throttler); PendingConnection(PendingConnection&& other); + + PendingConnection(const PendingConnection&) = delete; + PendingConnection& operator=(const PendingConnection&) = delete; + ~PendingConnection(); // Called when the hansdhake finishes sucessfully. @@ -40,8 +44,6 @@ private: base::WeakPtr<WebSocketPerProcessThrottler> throttler_; - - DISALLOW_COPY_AND_ASSIGN(PendingConnection); }; WebSocketPerProcessThrottler(); @@ -109,6 +111,10 @@ using PendingConnection = WebSocketPerProcessThrottler::PendingConnection; WebSocketThrottler(); + + WebSocketThrottler(const WebSocketThrottler&) = delete; + WebSocketThrottler& operator=(const WebSocketThrottler&) = delete; + ~WebSocketThrottler(); // Returns true if there are too many pending connections for |process_id|. @@ -131,8 +137,6 @@ std::map<int, std::unique_ptr<WebSocketPerProcessThrottler>> per_process_throttlers_; base::RepeatingTimer throttling_period_timer_; - - DISALLOW_COPY_AND_ASSIGN(WebSocketThrottler); }; } // namespace network
diff --git a/services/preferences/public/cpp/dictionary_value_update.h b/services/preferences/public/cpp/dictionary_value_update.h index 2c20aa4..39278fa 100644 --- a/services/preferences/public/cpp/dictionary_value_update.h +++ b/services/preferences/public/cpp/dictionary_value_update.h
@@ -32,6 +32,9 @@ base::DictionaryValue* value, std::vector<std::string> path); + DictionaryValueUpdate(const DictionaryValueUpdate&) = delete; + DictionaryValueUpdate& operator=(const DictionaryValueUpdate&) = delete; + ~DictionaryValueUpdate(); bool HasKey(base::StringPiece key) const; @@ -155,8 +158,6 @@ UpdateCallback report_update_; base::DictionaryValue* const value_; const std::vector<std::string> path_; - - DISALLOW_COPY_AND_ASSIGN(DictionaryValueUpdate); }; } // namespace prefs
diff --git a/services/preferences/public/cpp/scoped_pref_update.h b/services/preferences/public/cpp/scoped_pref_update.h index 9162b04d..b44c710 100644 --- a/services/preferences/public/cpp/scoped_pref_update.h +++ b/services/preferences/public/cpp/scoped_pref_update.h
@@ -41,6 +41,10 @@ public: ScopedDictionaryPrefUpdate(PrefService* service, base::StringPiece path); + ScopedDictionaryPrefUpdate(const ScopedDictionaryPrefUpdate&) = delete; + ScopedDictionaryPrefUpdate& operator=(const ScopedDictionaryPrefUpdate&) = + delete; + // Notifies if necessary. virtual ~ScopedDictionaryPrefUpdate(); @@ -64,8 +68,6 @@ // The paths that have been modified. std::set<std::vector<std::string>> updated_paths_; - - DISALLOW_COPY_AND_ASSIGN(ScopedDictionaryPrefUpdate); }; } // namespace prefs
diff --git a/services/preferences/public/cpp/tracked/mock_validation_delegate.h b/services/preferences/public/cpp/tracked/mock_validation_delegate.h index 2db80188..c3f294c 100644 --- a/services/preferences/public/cpp/tracked/mock_validation_delegate.h +++ b/services/preferences/public/cpp/tracked/mock_validation_delegate.h
@@ -89,6 +89,10 @@ public: explicit MockValidationDelegate( scoped_refptr<MockValidationDelegateRecord> record); + + MockValidationDelegate(const MockValidationDelegate&) = delete; + MockValidationDelegate& operator=(const MockValidationDelegate&) = delete; + ~MockValidationDelegate() override; // TrackedPreferenceValidationDelegate implementation. @@ -119,8 +123,6 @@ prefs::mojom::TrackedPreferenceMetadata::PrefTrackingStrategy strategy); scoped_refptr<MockValidationDelegateRecord> record_; - - DISALLOW_COPY_AND_ASSIGN(MockValidationDelegate); }; #endif // SERVICES_PREFERENCES_PUBLIC_CPP_TRACKED_MOCK_VALIDATION_DELEGATE_H_
diff --git a/services/preferences/tracked/pref_hash_calculator.h b/services/preferences/tracked/pref_hash_calculator.h index 1fc14a1..bebfc55 100644 --- a/services/preferences/tracked/pref_hash_calculator.h +++ b/services/preferences/tracked/pref_hash_calculator.h
@@ -31,6 +31,9 @@ const std::string& device_id, const std::string& legacy_device_id); + PrefHashCalculator(const PrefHashCalculator&) = delete; + PrefHashCalculator& operator=(const PrefHashCalculator&) = delete; + ~PrefHashCalculator(); // Calculates a hash value for the supplied preference |path| and |value|. @@ -48,8 +51,6 @@ const std::string seed_; const std::string device_id_; const std::string legacy_device_id_; - - DISALLOW_COPY_AND_ASSIGN(PrefHashCalculator); }; #endif // SERVICES_PREFERENCES_TRACKED_PREF_HASH_CALCULATOR_H_
diff --git a/services/preferences/tracked/pref_hash_filter.h b/services/preferences/tracked/pref_hash_filter.h index c5d2d7a..fa4d4e5 100644 --- a/services/preferences/tracked/pref_hash_filter.h +++ b/services/preferences/tracked/pref_hash_filter.h
@@ -72,6 +72,9 @@ delegate, size_t reporting_ids_count); + PrefHashFilter(const PrefHashFilter&) = delete; + PrefHashFilter& operator=(const PrefHashFilter&) = delete; + ~PrefHashFilter() override; // Registers required user preferences. @@ -155,8 +158,6 @@ // The set of all paths whose value has changed since the last call to // FilterSerializeData. ChangedPathsMap changed_paths_; - - DISALLOW_COPY_AND_ASSIGN(PrefHashFilter); }; #endif // SERVICES_PREFERENCES_TRACKED_PREF_HASH_FILTER_H_
diff --git a/services/preferences/tracked/pref_hash_filter_unittest.cc b/services/preferences/tracked/pref_hash_filter_unittest.cc index 2ceb929..c6d3b3b 100644 --- a/services/preferences/tracked/pref_hash_filter_unittest.cc +++ b/services/preferences/tracked/pref_hash_filter_unittest.cc
@@ -82,6 +82,9 @@ transactions_performed_(0), transaction_active_(false) {} + MockPrefHashStore(const MockPrefHashStore&) = delete; + MockPrefHashStore& operator=(const MockPrefHashStore&) = delete; + ~MockPrefHashStore() override { EXPECT_FALSE(transaction_active_); } // Set the result that will be returned when |path| is passed to @@ -159,6 +162,10 @@ explicit MockPrefHashStoreTransaction(MockPrefHashStore* outer) : outer_(outer) {} + MockPrefHashStoreTransaction(const MockPrefHashStoreTransaction&) = delete; + MockPrefHashStoreTransaction& operator=( + const MockPrefHashStoreTransaction&) = delete; + ~MockPrefHashStoreTransaction() override { outer_->transaction_active_ = false; ++outer_->transactions_performed_; @@ -184,8 +191,6 @@ private: MockPrefHashStore* outer_; - - DISALLOW_COPY_AND_ASSIGN(MockPrefHashStoreTransaction); }; // Records a call to this mock's CheckValue/CheckSplitValue methods. @@ -213,8 +218,6 @@ // Whether a transaction is currently active (only one transaction should be // active at a time). bool transaction_active_; - - DISALLOW_COPY_AND_ASSIGN(MockPrefHashStore); }; void MockPrefHashStore::SetCheckResult(const std::string& path,
diff --git a/services/preferences/tracked/pref_hash_store_impl.cc b/services/preferences/tracked/pref_hash_store_impl.cc index e508880..63a15eb8e 100644 --- a/services/preferences/tracked/pref_hash_store_impl.cc +++ b/services/preferences/tracked/pref_hash_store_impl.cc
@@ -48,6 +48,11 @@ // members of its |outer| PrefHashStoreImpl. PrefHashStoreTransactionImpl(PrefHashStoreImpl* outer, HashStoreContents* storage); + + PrefHashStoreTransactionImpl(const PrefHashStoreTransactionImpl&) = delete; + PrefHashStoreTransactionImpl& operator=(const PrefHashStoreTransactionImpl&) = + delete; + ~PrefHashStoreTransactionImpl() override; // PrefHashStoreTransaction implementation. @@ -73,8 +78,6 @@ bool super_mac_valid_; bool super_mac_dirty_; - - DISALLOW_COPY_AND_ASSIGN(PrefHashStoreTransactionImpl); }; PrefHashStoreImpl::PrefHashStoreImpl(const std::string& seed,
diff --git a/services/preferences/tracked/pref_hash_store_impl.h b/services/preferences/tracked/pref_hash_store_impl.h index 8e7ae8a..73dfdd1 100644 --- a/services/preferences/tracked/pref_hash_store_impl.h +++ b/services/preferences/tracked/pref_hash_store_impl.h
@@ -33,6 +33,9 @@ const std::string& legacy_device_id, bool use_super_mac); + PrefHashStoreImpl(const PrefHashStoreImpl&) = delete; + PrefHashStoreImpl& operator=(const PrefHashStoreImpl&) = delete; + ~PrefHashStoreImpl() override; // Clears the contents of this PrefHashStore. |IsInitialized()| will return @@ -54,8 +57,6 @@ const PrefHashCalculator pref_hash_calculator_; bool use_super_mac_; - - DISALLOW_COPY_AND_ASSIGN(PrefHashStoreImpl); }; #endif // SERVICES_PREFERENCES_TRACKED_PREF_HASH_STORE_IMPL_H_
diff --git a/services/proxy_resolver/host_resolver_mojo.h b/services/proxy_resolver/host_resolver_mojo.h index 5f60647..a5052e3 100644 --- a/services/proxy_resolver/host_resolver_mojo.h +++ b/services/proxy_resolver/host_resolver_mojo.h
@@ -38,6 +38,10 @@ // |impl| must outlive |this|. explicit HostResolverMojo(Impl* impl); + + HostResolverMojo(const HostResolverMojo&) = delete; + HostResolverMojo& operator=(const HostResolverMojo&) = delete; + ~HostResolverMojo() override; // ProxyHostResolver overrides. @@ -57,8 +61,6 @@ &host_cache_}; base::ThreadChecker thread_checker_; - - DISALLOW_COPY_AND_ASSIGN(HostResolverMojo); }; } // namespace proxy_resolver
diff --git a/services/proxy_resolver/proxy_resolver_factory_impl.cc b/services/proxy_resolver/proxy_resolver_factory_impl.cc index dc59c6f..bc3411a 100644 --- a/services/proxy_resolver/proxy_resolver_factory_impl.cc +++ b/services/proxy_resolver/proxy_resolver_factory_impl.cc
@@ -26,6 +26,10 @@ ProxyResolverV8TracingFactory* proxy_resolver_factory, mojo::PendingReceiver<mojom::ProxyResolver> receiver, mojo::PendingRemote<mojom::ProxyResolverFactoryRequestClient> client); + + Job(const Job&) = delete; + Job& operator=(const Job&) = delete; + ~Job(); private: @@ -38,8 +42,6 @@ ProxyResolverV8TracingFactory* factory_; std::unique_ptr<net::ProxyResolverFactory::Request> request_; mojo::Remote<mojom::ProxyResolverFactoryRequestClient> remote_client_; - - DISALLOW_COPY_AND_ASSIGN(Job); }; ProxyResolverFactoryImpl::Job::Job(
diff --git a/services/proxy_resolver/proxy_resolver_factory_impl.h b/services/proxy_resolver/proxy_resolver_factory_impl.h index af82c80..420711a 100644 --- a/services/proxy_resolver/proxy_resolver_factory_impl.h +++ b/services/proxy_resolver/proxy_resolver_factory_impl.h
@@ -25,6 +25,10 @@ public: explicit ProxyResolverFactoryImpl( mojo::PendingReceiver<mojom::ProxyResolverFactory> receiver); + + ProxyResolverFactoryImpl(const ProxyResolverFactoryImpl&) = delete; + ProxyResolverFactoryImpl& operator=(const ProxyResolverFactoryImpl&) = delete; + ~ProxyResolverFactoryImpl() override; // Used by jobs to pass ownership of a newly bound ProxyResolver to this @@ -57,8 +61,6 @@ mojo::Receiver<mojom::ProxyResolverFactory> receiver_; mojo::UniqueReceiverSet<mojom::ProxyResolver> resolvers_; - - DISALLOW_COPY_AND_ASSIGN(ProxyResolverFactoryImpl); }; } // namespace proxy_resolver
diff --git a/services/proxy_resolver/proxy_resolver_impl.cc b/services/proxy_resolver/proxy_resolver_impl.cc index c11b6ad..8c16c3f 100644 --- a/services/proxy_resolver/proxy_resolver_impl.cc +++ b/services/proxy_resolver/proxy_resolver_impl.cc
@@ -23,6 +23,10 @@ Job(mojo::PendingRemote<mojom::ProxyResolverRequestClient> client, ProxyResolverImpl* resolver, const GURL& url); + + Job(const Job&) = delete; + Job& operator=(const Job&) = delete; + ~Job(); void Start(const net::NetworkIsolationKey& network_isolation_key); @@ -41,8 +45,6 @@ GURL url_; std::unique_ptr<net::ProxyResolver::Request> request_; bool done_; - - DISALLOW_COPY_AND_ASSIGN(Job); }; ProxyResolverImpl::ProxyResolverImpl(
diff --git a/services/proxy_resolver/proxy_resolver_impl.h b/services/proxy_resolver/proxy_resolver_impl.h index 5566ffd..5d4ea76 100644 --- a/services/proxy_resolver/proxy_resolver_impl.h +++ b/services/proxy_resolver/proxy_resolver_impl.h
@@ -21,6 +21,9 @@ public: explicit ProxyResolverImpl(std::unique_ptr<ProxyResolverV8Tracing> resolver); + ProxyResolverImpl(const ProxyResolverImpl&) = delete; + ProxyResolverImpl& operator=(const ProxyResolverImpl&) = delete; + ~ProxyResolverImpl() override; private: @@ -36,8 +39,6 @@ std::unique_ptr<ProxyResolverV8Tracing> resolver_; std::map<Job*, std::unique_ptr<Job>> resolve_jobs_; - - DISALLOW_COPY_AND_ASSIGN(ProxyResolverImpl); }; } // namespace proxy_resolver
diff --git a/services/proxy_resolver/proxy_resolver_v8_tracing.cc b/services/proxy_resolver/proxy_resolver_v8_tracing.cc index 1080863..940b3b7 100644 --- a/services/proxy_resolver/proxy_resolver_v8_tracing.cc +++ b/services/proxy_resolver/proxy_resolver_v8_tracing.cc
@@ -313,6 +313,10 @@ std::unique_ptr<ProxyResolverV8> resolver, std::unique_ptr<Job::Params> job_params); + ProxyResolverV8TracingImpl(const ProxyResolverV8TracingImpl&) = delete; + ProxyResolverV8TracingImpl& operator=(const ProxyResolverV8TracingImpl&) = + delete; + ~ProxyResolverV8TracingImpl() override; // ProxyResolverV8Tracing overrides. @@ -344,8 +348,6 @@ int num_outstanding_callbacks_; THREAD_CHECKER(thread_checker_); - - DISALLOW_COPY_AND_ASSIGN(ProxyResolverV8TracingImpl); }; Job::Job(const Job::Params* params, @@ -988,6 +990,12 @@ class ProxyResolverV8TracingFactoryImpl : public ProxyResolverV8TracingFactory { public: ProxyResolverV8TracingFactoryImpl(); + + ProxyResolverV8TracingFactoryImpl(const ProxyResolverV8TracingFactoryImpl&) = + delete; + ProxyResolverV8TracingFactoryImpl& operator=( + const ProxyResolverV8TracingFactoryImpl&) = delete; + ~ProxyResolverV8TracingFactoryImpl() override; void CreateProxyResolverV8Tracing( @@ -1003,8 +1011,6 @@ void RemoveJob(CreateJob* job); std::set<CreateJob*> jobs_; - - DISALLOW_COPY_AND_ASSIGN(ProxyResolverV8TracingFactoryImpl); }; class ProxyResolverV8TracingFactoryImpl::CreateJob @@ -1034,6 +1040,9 @@ base::Unretained(this))); } + CreateJob(const CreateJob&) = delete; + CreateJob& operator=(const CreateJob&) = delete; + ~CreateJob() override { if (factory_) { factory_->RemoveJob(this); @@ -1082,8 +1091,6 @@ std::unique_ptr<ProxyResolverV8Tracing>* resolver_out_; net::CompletionOnceCallback callback_; int num_outstanding_callbacks_; - - DISALLOW_COPY_AND_ASSIGN(CreateJob); }; ProxyResolverV8TracingFactoryImpl::ProxyResolverV8TracingFactoryImpl() =
diff --git a/services/proxy_resolver/proxy_resolver_v8_tracing.h b/services/proxy_resolver/proxy_resolver_v8_tracing.h index 9a5800a..71f4e7a 100644 --- a/services/proxy_resolver/proxy_resolver_v8_tracing.h +++ b/services/proxy_resolver/proxy_resolver_v8_tracing.h
@@ -32,6 +32,10 @@ class Bindings { public: Bindings() {} + + Bindings(const Bindings&) = delete; + Bindings& operator=(const Bindings&) = delete; + virtual ~Bindings() {} // Invoked in response to an alert() call by the PAC script. @@ -46,9 +50,6 @@ // Returns a NetLogWithSource to be passed to the HostResolver returned by // GetHostResolver(). virtual net::NetLogWithSource GetNetLogWithSource() = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(Bindings); }; virtual ~ProxyResolverV8Tracing() {} @@ -75,6 +76,11 @@ class ProxyResolverV8TracingFactory { public: ProxyResolverV8TracingFactory() {} + + ProxyResolverV8TracingFactory(const ProxyResolverV8TracingFactory&) = delete; + ProxyResolverV8TracingFactory& operator=( + const ProxyResolverV8TracingFactory&) = delete; + virtual ~ProxyResolverV8TracingFactory() = default; virtual void CreateProxyResolverV8Tracing( @@ -85,9 +91,6 @@ std::unique_ptr<net::ProxyResolverFactory::Request>* request) = 0; static std::unique_ptr<ProxyResolverV8TracingFactory> Create(); - - private: - DISALLOW_COPY_AND_ASSIGN(ProxyResolverV8TracingFactory); }; } // namespace proxy_resolver
diff --git a/services/resource_coordinator/memory_instrumentation/coordinator_impl.h b/services/resource_coordinator/memory_instrumentation/coordinator_impl.h index 6169a00..a20c18c1 100644 --- a/services/resource_coordinator/memory_instrumentation/coordinator_impl.h +++ b/services/resource_coordinator/memory_instrumentation/coordinator_impl.h
@@ -37,6 +37,10 @@ public mojom::HeapProfilerHelper { public: CoordinatorImpl(); + + CoordinatorImpl(const CoordinatorImpl&) = delete; + CoordinatorImpl& operator=(const CoordinatorImpl&) = delete; + ~CoordinatorImpl() override; // The getter of the unique instance. @@ -194,8 +198,6 @@ THREAD_CHECKER(thread_checker_); base::WeakPtrFactory<CoordinatorImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(CoordinatorImpl); }; } // namespace memory_instrumentation
diff --git a/services/resource_coordinator/memory_instrumentation/graph.h b/services/resource_coordinator/memory_instrumentation/graph.h index 805a0eccd..24575e61 100644 --- a/services/resource_coordinator/memory_instrumentation/graph.h +++ b/services/resource_coordinator/memory_instrumentation/graph.h
@@ -34,6 +34,10 @@ class Process { public: Process(base::ProcessId pid, GlobalDumpGraph* global_graph); + + Process(const Process&) = delete; + Process& operator=(const Process&) = delete; + ~Process(); // Creates a node in the dump graph which is associated with the @@ -55,8 +59,6 @@ base::ProcessId pid_; GlobalDumpGraph* global_graph_; GlobalDumpGraph::Node* root_; - - DISALLOW_COPY_AND_ASSIGN(Process); }; // A single node in the graph of allocator dumps associated with a @@ -93,6 +95,10 @@ }; explicit Node(GlobalDumpGraph::Process* dump_graph, Node* parent); + + Node(const Node&) = delete; + Node& operator=(const Node&) = delete; + ~Node(); // Gets the direct child of a node for the given |subpath|. @@ -190,8 +196,6 @@ GlobalDumpGraph::Edge* owns_edge_; std::vector<GlobalDumpGraph::Edge*> owned_by_edges_; - - DISALLOW_COPY_AND_ASSIGN(Node); }; // An edge in the dump graph which indicates ownership between the
diff --git a/services/resource_coordinator/public/cpp/memory_instrumentation/global_memory_dump.h b/services/resource_coordinator/public/cpp/memory_instrumentation/global_memory_dump.h index 3223cc7..216e1bc 100644 --- a/services/resource_coordinator/public/cpp/memory_instrumentation/global_memory_dump.h +++ b/services/resource_coordinator/public/cpp/memory_instrumentation/global_memory_dump.h
@@ -26,6 +26,10 @@ ProcessDump { public: ProcessDump(mojom::ProcessMemoryDumpPtr process_memory_dump); + + ProcessDump(const ProcessDump&) = delete; + ProcessDump& operator=(const ProcessDump&) = delete; + ~ProcessDump(); // Returns the metric for the given dump name and metric name. For example, @@ -44,8 +48,6 @@ private: mojom::ProcessMemoryDumpPtr raw_dump_; - - DISALLOW_COPY_AND_ASSIGN(ProcessDump); }; public: @@ -53,6 +55,10 @@ AggregatedMetrics { public: explicit AggregatedMetrics(mojom::AggregatedMetricsPtr aggregated_metrics); + + AggregatedMetrics(const AggregatedMetrics&) = delete; + AggregatedMetrics& operator=(const AggregatedMetrics&) = delete; + ~AggregatedMetrics(); int32_t native_library_resident_kb() const { @@ -71,8 +77,6 @@ private: const mojom::AggregatedMetricsPtr aggregated_metrics_; - - DISALLOW_COPY_AND_ASSIGN(AggregatedMetrics); }; ~GlobalMemoryDump();
diff --git a/services/resource_coordinator/public/cpp/memory_instrumentation/tracing_observer.h b/services/resource_coordinator/public/cpp/memory_instrumentation/tracing_observer.h index 5c42ff39..0cd0b40e 100644 --- a/services/resource_coordinator/public/cpp/memory_instrumentation/tracing_observer.h +++ b/services/resource_coordinator/public/cpp/memory_instrumentation/tracing_observer.h
@@ -22,6 +22,10 @@ public: TracingObserver(base::trace_event::TraceLog*, base::trace_event::MemoryDumpManager*); + + TracingObserver(const TracingObserver&) = delete; + TracingObserver& operator=(const TracingObserver&) = delete; + ~TracingObserver() override; // TraceLog::EnabledStateObserver implementation. @@ -57,8 +61,6 @@ base::trace_event::TraceLog* const trace_log_; std::unique_ptr<base::trace_event::TraceConfig::MemoryDumpConfig> memory_dump_config_; - - DISALLOW_COPY_AND_ASSIGN(TracingObserver); }; } // namespace memory_instrumentation
diff --git a/services/resource_coordinator/public/cpp/memory_instrumentation/tracing_observer_proto.h b/services/resource_coordinator/public/cpp/memory_instrumentation/tracing_observer_proto.h index 6f9f1e1f..6dc9a0d 100644 --- a/services/resource_coordinator/public/cpp/memory_instrumentation/tracing_observer_proto.h +++ b/services/resource_coordinator/public/cpp/memory_instrumentation/tracing_observer_proto.h
@@ -33,6 +33,10 @@ public: TracingObserverProto(base::trace_event::TraceLog*, base::trace_event::MemoryDumpManager*); + + TracingObserverProto(const TracingObserverProto&) = delete; + TracingObserverProto& operator=(const TracingObserverProto&) = delete; + ~TracingObserverProto() override; static void RegisterForTesting(); @@ -79,8 +83,6 @@ #endif // !BUILDFLAG(USE_PERFETTO_CLIENT_LIBRARY) static tracing::PerfettoTracedProcess::DataSourceBase* instance_for_testing_; - - DISALLOW_COPY_AND_ASSIGN(TracingObserverProto); }; } // namespace memory_instrumentation
diff --git a/services/resource_coordinator/public/cpp/memory_instrumentation/tracing_observer_traced_value.h b/services/resource_coordinator/public/cpp/memory_instrumentation/tracing_observer_traced_value.h index 155c8ae..60cc56e6 100644 --- a/services/resource_coordinator/public/cpp/memory_instrumentation/tracing_observer_traced_value.h +++ b/services/resource_coordinator/public/cpp/memory_instrumentation/tracing_observer_traced_value.h
@@ -20,6 +20,11 @@ public: TracingObserverTracedValue(base::trace_event::TraceLog*, base::trace_event::MemoryDumpManager*); + + TracingObserverTracedValue(const TracingObserverTracedValue&) = delete; + TracingObserverTracedValue& operator=(const TracingObserverTracedValue&) = + delete; + ~TracingObserverTracedValue() override; bool AddChromeDumpToTraceIfEnabled( @@ -42,8 +47,6 @@ static void AddToTrace(const base::trace_event::MemoryDumpRequestArgs&, const base::ProcessId, std::unique_ptr<base::trace_event::TracedValue>); - - DISALLOW_COPY_AND_ASSIGN(TracingObserverTracedValue); }; } // namespace memory_instrumentation
diff --git a/services/service_manager/background_service_manager.h b/services/service_manager/background_service_manager.h index 73827f9..d7b1a1b8 100644 --- a/services/service_manager/background_service_manager.h +++ b/services/service_manager/background_service_manager.h
@@ -34,6 +34,10 @@ class BackgroundServiceManager { public: explicit BackgroundServiceManager(const std::vector<Manifest>& manifests); + + BackgroundServiceManager(const BackgroundServiceManager&) = delete; + BackgroundServiceManager& operator=(const BackgroundServiceManager&) = delete; + ~BackgroundServiceManager(); // Creates a service instance for |identity|. This is intended for use by the @@ -59,8 +63,6 @@ // Must only be used on the background thread. std::unique_ptr<ServiceManager> service_manager_; - - DISALLOW_COPY_AND_ASSIGN(BackgroundServiceManager); }; } // namespace service_manager
diff --git a/services/service_manager/catalog.h b/services/service_manager/catalog.h index 64bacd8e..a01722a 100644 --- a/services/service_manager/catalog.h +++ b/services/service_manager/catalog.h
@@ -19,6 +19,10 @@ public: // Constructs a catalog over a set of Manifests to use for lookup. explicit Catalog(const std::vector<Manifest>& manifests); + + Catalog(const Catalog&) = delete; + Catalog& operator=(const Catalog&) = delete; + ~Catalog(); // Returns manifest data for the service named by |service_name|. If no @@ -43,8 +47,6 @@ // reverse-lookup of packaged service relationships. The values in this map // refer to objects owned by |manifests_| above. const std::map<Manifest::ServiceName, const Manifest*> parent_manifest_map_; - - DISALLOW_COPY_AND_ASSIGN(Catalog); }; } // namespace service_manager
diff --git a/services/service_manager/public/cpp/binder_registry.h b/services/service_manager/public/cpp/binder_registry.h index 2144d87d..f38565c1 100644 --- a/services/service_manager/public/cpp/binder_registry.h +++ b/services/service_manager/public/cpp/binder_registry.h
@@ -26,6 +26,10 @@ void(const std::string&, mojo::ScopedMessagePipeHandle, BinderArgs...)>; BinderRegistryWithArgs() {} + + BinderRegistryWithArgs(const BinderRegistryWithArgs&) = delete; + BinderRegistryWithArgs& operator=(const BinderRegistryWithArgs&) = delete; + ~BinderRegistryWithArgs() = default; template <typename Interface> @@ -133,8 +137,6 @@ InterfaceNameToBinderMap binders_; base::WeakPtrFactory<BinderRegistryWithArgs> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(BinderRegistryWithArgs); }; using BinderRegistry = BinderRegistryWithArgs<>;
diff --git a/services/service_manager/public/cpp/interface_binder.h b/services/service_manager/public/cpp/interface_binder.h index ac357f66..c9fa6639 100644 --- a/services/service_manager/public/cpp/interface_binder.h +++ b/services/service_manager/public/cpp/interface_binder.h
@@ -47,6 +47,10 @@ CallbackBinder(const BindCallback& callback, const scoped_refptr<base::SequencedTaskRunner>& task_runner) : callback_(callback), task_runner_(task_runner) {} + + CallbackBinder(const CallbackBinder&) = delete; + CallbackBinder& operator=(const CallbackBinder&) = delete; + ~CallbackBinder() override = default; private: @@ -80,7 +84,6 @@ const BindCallback callback_; scoped_refptr<base::SequencedTaskRunner> task_runner_; - DISALLOW_COPY_AND_ASSIGN(CallbackBinder); }; template <typename... BinderArgs> @@ -100,6 +103,10 @@ : callback_( base::BindRepeating(&BindCallbackAdapter<BinderArgs...>, callback)), task_runner_(task_runner) {} + + GenericCallbackBinder(const GenericCallbackBinder&) = delete; + GenericCallbackBinder& operator=(const GenericCallbackBinder&) = delete; + ~GenericCallbackBinder() override {} private: @@ -126,7 +133,6 @@ const BindCallback callback_; scoped_refptr<base::SequencedTaskRunner> task_runner_; - DISALLOW_COPY_AND_ASSIGN(GenericCallbackBinder); }; } // namespace service_manager
diff --git a/services/service_manager/public/cpp/interface_provider.h b/services/service_manager/public/cpp/interface_provider.h index 496f37c..e6467d7 100644 --- a/services/service_manager/public/cpp/interface_provider.h +++ b/services/service_manager/public/cpp/interface_provider.h
@@ -29,6 +29,10 @@ class TestApi { public: explicit TestApi(InterfaceProvider* provider) : provider_(provider) {} + + TestApi(const TestApi&) = delete; + TestApi& operator=(const TestApi&) = delete; + ~TestApi() {} void SetBinderForName( @@ -51,7 +55,6 @@ private: InterfaceProvider* provider_; - DISALLOW_COPY_AND_ASSIGN(TestApi); }; // Constructs an InterfaceProvider which is usable immediately despite not
diff --git a/services/service_manager/public/cpp/service_executable/service_executable_environment.h b/services/service_manager/public/cpp/service_executable/service_executable_environment.h index 2b957fe..9f3f1a3 100644 --- a/services/service_manager/public/cpp/service_executable/service_executable_environment.h +++ b/services/service_manager/public/cpp/service_executable/service_executable_environment.h
@@ -29,6 +29,11 @@ class ServiceExecutableEnvironment { public: ServiceExecutableEnvironment(); + + ServiceExecutableEnvironment(const ServiceExecutableEnvironment&) = delete; + ServiceExecutableEnvironment& operator=(const ServiceExecutableEnvironment&) = + delete; + ~ServiceExecutableEnvironment(); // Returns a ServiceRequest which should be passed to the Service @@ -38,8 +43,6 @@ private: base::Thread ipc_thread_; absl::optional<mojo::core::ScopedIPCSupport> ipc_support_; - - DISALLOW_COPY_AND_ASSIGN(ServiceExecutableEnvironment); }; } // namespace service_manager
diff --git a/services/service_manager/public/cpp/service_keepalive.cc b/services/service_manager/public/cpp/service_keepalive.cc index a94fbd4f..0a3d9cb 100644 --- a/services/service_manager/public/cpp/service_keepalive.cc +++ b/services/service_manager/public/cpp/service_keepalive.cc
@@ -22,6 +22,9 @@ DETACH_FROM_SEQUENCE(sequence_checker_); } + ServiceKeepaliveRefImpl(const ServiceKeepaliveRefImpl&) = delete; + ServiceKeepaliveRefImpl& operator=(const ServiceKeepaliveRefImpl&) = delete; + ~ServiceKeepaliveRefImpl() override { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); @@ -52,8 +55,6 @@ base::WeakPtr<ServiceKeepalive> keepalive_; scoped_refptr<base::SequencedTaskRunner> keepalive_task_runner_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(ServiceKeepaliveRefImpl); }; ServiceKeepalive::ServiceKeepalive(ServiceReceiver* receiver,
diff --git a/services/service_manager/public/cpp/service_keepalive.h b/services/service_manager/public/cpp/service_keepalive.h index a32289a1..5ae458c 100644 --- a/services/service_manager/public/cpp/service_keepalive.h +++ b/services/service_manager/public/cpp/service_keepalive.h
@@ -60,6 +60,10 @@ // maintain an internal ref-count which the consumer can query. ServiceKeepalive(ServiceReceiver* receiver, absl::optional<base::TimeDelta> idle_timeout); + + ServiceKeepalive(const ServiceKeepalive&) = delete; + ServiceKeepalive& operator=(const ServiceKeepalive&) = delete; + ~ServiceKeepalive(); // Constructs a new ServiceKeepaliveRef associated with this ServiceKeepalive. @@ -88,8 +92,6 @@ base::ObserverList<Observer> observers_; int ref_count_ = 0; base::WeakPtrFactory<ServiceKeepalive> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ServiceKeepalive); }; // Objects which can be created by a |ServiceKeepalive| and cloned from each
diff --git a/services/service_manager/public/cpp/service_receiver.h b/services/service_manager/public/cpp/service_receiver.h index c803008..4ed67e1 100644 --- a/services/service_manager/public/cpp/service_receiver.h +++ b/services/service_manager/public/cpp/service_receiver.h
@@ -60,6 +60,9 @@ ServiceReceiver(service_manager::Service* service, mojo::PendingReceiver<mojom::Service> receiver); + ServiceReceiver(const ServiceReceiver&) = delete; + ServiceReceiver& operator=(const ServiceReceiver&) = delete; + ~ServiceReceiver() override; bool is_bound() const { return receiver_.is_bound(); } @@ -140,8 +143,6 @@ // receiving |OnStart()| on a bound ServiceReceiver. This ensures that the // closure request is actually issued once |OnStart()| is invoked. bool request_closure_on_start_ = false; - - DISALLOW_COPY_AND_ASSIGN(ServiceReceiver); }; } // namespace service_manager
diff --git a/services/service_manager/public/cpp/standalone_connector_impl.h b/services/service_manager/public/cpp/standalone_connector_impl.h index cf2c211..7f578ea 100644 --- a/services/service_manager/public/cpp/standalone_connector_impl.h +++ b/services/service_manager/public/cpp/standalone_connector_impl.h
@@ -38,6 +38,10 @@ }; explicit StandaloneConnectorImpl(Delegate* delegate); + + StandaloneConnectorImpl(const StandaloneConnectorImpl&) = delete; + StandaloneConnectorImpl& operator=(const StandaloneConnectorImpl&) = delete; + ~StandaloneConnectorImpl() override; // Produces a new remote Connector endpoint whose connection requests are @@ -70,8 +74,6 @@ Delegate* const delegate_; mojo::ReceiverSet<mojom::Connector> receivers_; - - DISALLOW_COPY_AND_ASSIGN(StandaloneConnectorImpl); }; } // namespace service_manager
diff --git a/services/service_manager/public/cpp/standalone_connector_impl_unittest.cc b/services/service_manager/public/cpp/standalone_connector_impl_unittest.cc index d938515..77530d6 100644 --- a/services/service_manager/public/cpp/standalone_connector_impl_unittest.cc +++ b/services/service_manager/public/cpp/standalone_connector_impl_unittest.cc
@@ -24,6 +24,9 @@ TestConnectorDelegate(Handler handler) : TestConnectorDelegate(base::BindLambdaForTesting(handler)) {} + TestConnectorDelegate(const TestConnectorDelegate&) = delete; + TestConnectorDelegate& operator=(const TestConnectorDelegate&) = delete; + ~TestConnectorDelegate() override = default; private: @@ -40,8 +43,6 @@ } const Callback callback_; - - DISALLOW_COPY_AND_ASSIGN(TestConnectorDelegate); }; class StandaloneConnectorImplTest : public testing::Test {
diff --git a/services/service_manager/public/cpp/test/test_connector_factory.cc b/services/service_manager/public/cpp/test/test_connector_factory.cc index b01be7f4..e238b87 100644 --- a/services/service_manager/public/cpp/test/test_connector_factory.cc +++ b/services/service_manager/public/cpp/test/test_connector_factory.cc
@@ -33,6 +33,9 @@ proxies_(proxies), test_instance_group_(test_instance_group) {} + ProxiedServiceConnector(const ProxiedServiceConnector&) = delete; + ProxiedServiceConnector& operator=(const ProxiedServiceConnector&) = delete; + ~ProxiedServiceConnector() override = default; private: @@ -95,8 +98,6 @@ TestConnectorFactory::NameToServiceProxyMap* const proxies_; const base::Token test_instance_group_; mojo::ReceiverSet<mojom::Connector> receivers_; - - DISALLOW_COPY_AND_ASSIGN(ProxiedServiceConnector); }; } // namespace
diff --git a/services/service_manager/public/cpp/test/test_connector_factory.h b/services/service_manager/public/cpp/test/test_connector_factory.h index bfad674..dbc819ff 100644 --- a/services/service_manager/public/cpp/test/test_connector_factory.h +++ b/services/service_manager/public/cpp/test/test_connector_factory.h
@@ -45,6 +45,10 @@ // Creates a simple TestConnectorFactory which can be used register Service // instances and vend Connectors which can connect to them. TestConnectorFactory(); + + TestConnectorFactory(const TestConnectorFactory&) = delete; + TestConnectorFactory& operator=(const TestConnectorFactory&) = delete; + ~TestConnectorFactory() override; // A mapping from service names to Service proxies for registered instances. @@ -116,8 +120,6 @@ bool ignore_unknown_service_requests_ = false; bool ignore_quit_requests_ = false; - - DISALLOW_COPY_AND_ASSIGN(TestConnectorFactory); }; } // namespace service_manager
diff --git a/services/service_manager/public/cpp/test/test_service.h b/services/service_manager/public/cpp/test/test_service.h index b40d039..f98f9ab 100644 --- a/services/service_manager/public/cpp/test/test_service.h +++ b/services/service_manager/public/cpp/test/test_service.h
@@ -45,14 +45,16 @@ class TestService : public Service { public: explicit TestService(mojo::PendingReceiver<mojom::Service> receiver); + + TestService(const TestService&) = delete; + TestService& operator=(const TestService&) = delete; + ~TestService() override; Connector* connector() { return receiver_.GetConnector(); } private: ServiceReceiver receiver_; - - DISALLOW_COPY_AND_ASSIGN(TestService); }; } // namespace service_manager
diff --git a/services/service_manager/public/cpp/test/test_service_manager.h b/services/service_manager/public/cpp/test/test_service_manager.h index 4735a97..a5f2da8 100644 --- a/services/service_manager/public/cpp/test/test_service_manager.h +++ b/services/service_manager/public/cpp/test/test_service_manager.h
@@ -33,6 +33,9 @@ // manifests. explicit TestServiceManager(const std::vector<Manifest>& manifests); + TestServiceManager(const TestServiceManager&) = delete; + TestServiceManager& operator=(const TestServiceManager&) = delete; + ~TestServiceManager(); // Registers a new service instance with a random Identity including @@ -54,8 +57,6 @@ private: const std::unique_ptr<BackgroundServiceManager> background_service_manager_; - - DISALLOW_COPY_AND_ASSIGN(TestServiceManager); }; } // namespace service_manager
diff --git a/services/service_manager/service_instance.h b/services/service_manager/service_instance.h index 05aea26..df3d738 100644 --- a/services/service_manager/service_instance.h +++ b/services/service_manager/service_instance.h
@@ -51,6 +51,10 @@ ServiceInstance(service_manager::ServiceManager* service_manager, const Identity& identity, const Manifest& manifest); + + ServiceInstance(const ServiceInstance&) = delete; + ServiceInstance& operator=(const ServiceInstance&) = delete; + ~ServiceInstance() override; const Identity& identity() const { return identity_; } @@ -200,8 +204,6 @@ int pending_service_connections_ = 0; base::WeakPtrFactory<ServiceInstance> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ServiceInstance); }; } // namespace service_manager
diff --git a/services/service_manager/service_instance_registry.h b/services/service_manager/service_instance_registry.h index 4d4b829..e82a3680 100644 --- a/services/service_manager/service_instance_registry.h +++ b/services/service_manager/service_instance_registry.h
@@ -36,6 +36,10 @@ class ServiceInstanceRegistry { public: ServiceInstanceRegistry(); + + ServiceInstanceRegistry(const ServiceInstanceRegistry&) = delete; + ServiceInstanceRegistry& operator=(const ServiceInstanceRegistry&) = delete; + ~ServiceInstanceRegistry(); // Registers |instance| with the registry. |instance| is not owned by the @@ -108,8 +112,6 @@ RegularInstanceMap regular_instances_; SharedInstanceMap shared_instances_; SingletonInstanceMap singleton_instances_; - - DISALLOW_COPY_AND_ASSIGN(ServiceInstanceRegistry); }; } // namespace service_manager
diff --git a/services/service_manager/service_manager.cc b/services/service_manager/service_manager.cc index a3c3dc7..3b43d60 100644 --- a/services/service_manager/service_manager.cc +++ b/services/service_manager/service_manager.cc
@@ -75,6 +75,10 @@ { } + DefaultServiceProcessHost(const DefaultServiceProcessHost&) = delete; + DefaultServiceProcessHost& operator=(const DefaultServiceProcessHost&) = + delete; + ~DefaultServiceProcessHost() override = default; mojo::PendingRemote<mojom::Service> Launch( @@ -96,8 +100,6 @@ #if !defined(OS_IOS) ServiceProcessLauncher launcher_; #endif - - DISALLOW_COPY_AND_ASSIGN(DefaultServiceProcessHost); }; // Default ServiceManager::Delegate implementation. This supports launching only @@ -110,6 +112,11 @@ explicit DefaultServiceManagerDelegate( ServiceManager::ServiceExecutablePolicy service_executable_policy) : service_executable_policy_(service_executable_policy) {} + + DefaultServiceManagerDelegate(const DefaultServiceManagerDelegate&) = delete; + DefaultServiceManagerDelegate& operator=( + const DefaultServiceManagerDelegate&) = delete; + ~DefaultServiceManagerDelegate() override = default; bool RunBuiltinServiceInstanceInCurrentProcess( @@ -138,8 +145,6 @@ private: const ServiceManager::ServiceExecutablePolicy service_executable_policy_; - - DISALLOW_COPY_AND_ASSIGN(DefaultServiceManagerDelegate); }; } // namespace
diff --git a/services/service_manager/service_manager.h b/services/service_manager/service_manager.h index 90cec0c..b1e9d35 100644 --- a/services/service_manager/service_manager.h +++ b/services/service_manager/service_manager.h
@@ -108,6 +108,9 @@ ServiceManager(const std::vector<Manifest>& manifests, ServiceExecutablePolicy service_executable_policy); + ServiceManager(const ServiceManager&) = delete; + ServiceManager& operator=(const ServiceManager&) = delete; + ~ServiceManager() override; // Directly requests that the Service Manager start a new instance for @@ -204,8 +207,6 @@ ServiceInstance* service_manager_instance_; mojo::RemoteSet<mojom::ServiceManagerListener> listeners_; - - DISALLOW_COPY_AND_ASSIGN(ServiceManager); }; } // namespace service_manager
diff --git a/services/service_manager/service_process_launcher.h b/services/service_manager/service_process_launcher.h index f9d69a4..43b29a4 100644 --- a/services/service_manager/service_process_launcher.h +++ b/services/service_manager/service_process_launcher.h
@@ -41,6 +41,10 @@ // the service executable we wish to start. ServiceProcessLauncher(ServiceProcessLauncherDelegate* delegate, const base::FilePath& service_path); + + ServiceProcessLauncher(const ServiceProcessLauncher&) = delete; + ServiceProcessLauncher& operator=(const ServiceProcessLauncher&) = delete; + ~ServiceProcessLauncher(); // |Start()|s the child process; calls |DidStart()| (on the thread on which @@ -67,8 +71,6 @@ const base::FilePath service_path_; const scoped_refptr<base::SequencedTaskRunner> background_task_runner_; scoped_refptr<ProcessState> state_; - - DISALLOW_COPY_AND_ASSIGN(ServiceProcessLauncher); }; } // namespace service_manager
diff --git a/services/service_manager/tests/background_service_manager_test_service_main.cc b/services/service_manager/tests/background_service_manager_test_service_main.cc index a19523b..a616f9c 100644 --- a/services/service_manager/tests/background_service_manager_test_service_main.cc +++ b/services/service_manager/tests/background_service_manager_test_service_main.cc
@@ -25,6 +25,9 @@ &TestClient::BindTestServiceReceiver, base::Unretained(this))); } + TestClient(const TestClient&) = delete; + TestClient& operator=(const TestClient&) = delete; + ~TestClient() override = default; private: @@ -48,8 +51,6 @@ ServiceReceiver service_receiver_; BinderRegistry registry_; mojo::ReceiverSet<mojom::TestService> receivers_; - - DISALLOW_COPY_AND_ASSIGN(TestClient); }; } // namespace service_manager
diff --git a/services/service_manager/tests/background_service_manager_unittest.cc b/services/service_manager/tests/background_service_manager_unittest.cc index 7c5a161..c0fd87b 100644 --- a/services/service_manager/tests/background_service_manager_unittest.cc +++ b/services/service_manager/tests/background_service_manager_unittest.cc
@@ -57,14 +57,16 @@ public: explicit ServiceImpl(mojo::PendingReceiver<mojom::Service> receiver) : receiver_(this, std::move(receiver)) {} + + ServiceImpl(const ServiceImpl&) = delete; + ServiceImpl& operator=(const ServiceImpl&) = delete; + ~ServiceImpl() override = default; Connector* connector() { return receiver_.GetConnector(); } private: ServiceReceiver receiver_; - - DISALLOW_COPY_AND_ASSIGN(ServiceImpl); }; void SetFlagAndRunClosure(bool* flag, base::OnceClosure closure) {
diff --git a/services/service_manager/tests/connect/connect_test_app.cc b/services/service_manager/tests/connect/connect_test_app.cc index 05ad83d..31ad5980 100644 --- a/services/service_manager/tests/connect/connect_test_app.cc +++ b/services/service_manager/tests/connect/connect_test_app.cc
@@ -53,6 +53,9 @@ explicit ConnectTestApp(mojo::PendingReceiver<mojom::Service> receiver) : service_receiver_(this, std::move(receiver)) {} + ConnectTestApp(const ConnectTestApp&) = delete; + ConnectTestApp& operator=(const ConnectTestApp&) = delete; + ~ConnectTestApp() override = default; private: @@ -207,8 +210,6 @@ mojo::ReceiverSet<test::mojom::BlockedInterface> blocked_receivers_; mojo::ReceiverSet<test::mojom::IdentityTest> identity_test_receivers_; mojo::Remote<test::mojom::ExposedInterface> caller_; - - DISALLOW_COPY_AND_ASSIGN(ConnectTestApp); }; } // namespace service_manager
diff --git a/services/service_manager/tests/connect/connect_test_class_app.cc b/services/service_manager/tests/connect/connect_test_class_app.cc index 9630a4a..09d0bc9 100644 --- a/services/service_manager/tests/connect/connect_test_class_app.cc +++ b/services/service_manager/tests/connect/connect_test_class_app.cc
@@ -38,6 +38,9 @@ base::Unretained(this))); } + ConnectTestClassApp(const ConnectTestClassApp&) = delete; + ConnectTestClassApp& operator=(const ConnectTestClassApp&) = delete; + ~ConnectTestClassApp() override = default; private: @@ -81,8 +84,6 @@ BinderRegistry registry_; mojo::ReceiverSet<test::mojom::ConnectTestService> receivers_; mojo::ReceiverSet<test::mojom::ClassInterface> class_interface_receivers_; - - DISALLOW_COPY_AND_ASSIGN(ConnectTestClassApp); }; } // namespace service_manager
diff --git a/services/service_manager/tests/connect/connect_test_exe.cc b/services/service_manager/tests/connect/connect_test_exe.cc index 4af392c..2158fcb 100644 --- a/services/service_manager/tests/connect/connect_test_exe.cc +++ b/services/service_manager/tests/connect/connect_test_exe.cc
@@ -31,6 +31,9 @@ base::BindRepeating(&Target::Create, base::Unretained(this))); } + Target(const Target&) = delete; + Target& operator=(const Target&) = delete; + ~Target() override = default; private: @@ -57,8 +60,6 @@ service_manager::ServiceReceiver service_receiver_; service_manager::BinderRegistry registry_; mojo::ReceiverSet<ConnectTestService> receivers_; - - DISALLOW_COPY_AND_ASSIGN(Target); }; } // namespace
diff --git a/services/service_manager/tests/connect/connect_test_package.cc b/services/service_manager/tests/connect/connect_test_package.cc index ccd03a6..8aebb91b 100644 --- a/services/service_manager/tests/connect/connect_test_package.cc +++ b/services/service_manager/tests/connect/connect_test_package.cc
@@ -60,6 +60,9 @@ Start(); } + ProvidedService(const ProvidedService&) = delete; + ProvidedService& operator=(const ProvidedService&) = delete; + ~ProvidedService() override { Join(); } @@ -197,8 +200,6 @@ mojo::ReceiverSet<test::mojom::AlwaysAllowedInterface> always_allowed_receivers_; mojo::ReceiverSet<test::mojom::IdentityTest> identity_test_receivers_; - - DISALLOW_COPY_AND_ASSIGN(ProvidedService); }; class ConnectTestService : public Service, @@ -207,6 +208,10 @@ explicit ConnectTestService( mojo::PendingReceiver<service_manager::mojom::Service> receiver) : service_receiver_(this, std::move(receiver)) {} + + ConnectTestService(const ConnectTestService&) = delete; + ConnectTestService& operator=(const ConnectTestService&) = delete; + ~ConnectTestService() override = default; private: @@ -269,8 +274,6 @@ BinderRegistry registry_; mojo::ReceiverSet<test::mojom::ConnectTestService> receivers_; std::list<std::unique_ptr<ProvidedService>> provided_services_; - - DISALLOW_COPY_AND_ASSIGN(ConnectTestService); }; } // namespace service_manager
diff --git a/services/service_manager/tests/connect/connect_unittest.cc b/services/service_manager/tests/connect/connect_unittest.cc index 6207717..e02f1e67 100644 --- a/services/service_manager/tests/connect/connect_unittest.cc +++ b/services/service_manager/tests/connect/connect_unittest.cc
@@ -236,6 +236,10 @@ public: explicit TestTargetService(mojo::PendingReceiver<mojom::Service> receiver) : receiver_(this, std::move(receiver)) {} + + TestTargetService(const TestTargetService&) = delete; + TestTargetService& operator=(const TestTargetService&) = delete; + ~TestTargetService() override = default; const Identity& identity() const { return receiver_.identity(); } @@ -275,8 +279,6 @@ base::RunLoop wait_for_disconnect_loop_; absl::optional<base::RunLoop> wait_for_bind_interface_loop_; base::OnceClosure next_bind_interface_callback_; - - DISALLOW_COPY_AND_ASSIGN(TestTargetService); }; class ConnectTest : public testing::Test, @@ -284,6 +286,10 @@ public test::mojom::ExposedInterface { public: ConnectTest() : test_service_manager_(GetTestManifests()) {} + + ConnectTest(const ConnectTest&) = delete; + ConnectTest& operator=(const ConnectTest&) = delete; + ~ConnectTest() override = default; Connector* connector() { return service_receiver_.GetConnector(); } @@ -347,8 +353,6 @@ ServiceReceiver service_receiver_{this}; mojo::ReceiverSet<test::mojom::ExposedInterface> receivers_; test::mojom::ConnectionStatePtr connection_state_; - - DISALLOW_COPY_AND_ASSIGN(ConnectTest); }; // Ensure the connection was properly established and that a round trip
diff --git a/services/service_manager/tests/lifecycle/app_client.h b/services/service_manager/tests/lifecycle/app_client.h index 5928e4f..86488b4 100644 --- a/services/service_manager/tests/lifecycle/app_client.h +++ b/services/service_manager/tests/lifecycle/app_client.h
@@ -26,6 +26,10 @@ public: explicit AppClient( mojo::PendingReceiver<service_manager::mojom::Service> receiver); + + AppClient(const AppClient&) = delete; + AppClient& operator=(const AppClient&) = delete; + ~AppClient() override; // Service: @@ -48,8 +52,6 @@ ServiceReceiver service_receiver_; BinderRegistry registry_; mojo::ReceiverSet<mojom::LifecycleControl> receivers_; - - DISALLOW_COPY_AND_ASSIGN(AppClient); }; } // namespace test
diff --git a/services/service_manager/tests/lifecycle/lifecycle_unittest.cc b/services/service_manager/tests/lifecycle/lifecycle_unittest.cc index 0fb2416..4ed3a8a 100644 --- a/services/service_manager/tests/lifecycle/lifecycle_unittest.cc +++ b/services/service_manager/tests/lifecycle/lifecycle_unittest.cc
@@ -123,6 +123,10 @@ : receiver_(this, std::move(receiver)), on_init_complete_(std::move(on_init_complete)), on_destruction_(destruction_loop_.QuitClosure()) {} + + InstanceState(const InstanceState&) = delete; + InstanceState& operator=(const InstanceState&) = delete; + ~InstanceState() override {} bool HasInstanceForName(const std::string& name) const { @@ -195,8 +199,6 @@ // of an instance before proceeding. base::RunLoop destruction_loop_; base::OnceClosure on_destruction_; - - DISALLOW_COPY_AND_ASSIGN(InstanceState); }; } // namespace @@ -211,6 +213,9 @@ Identity{kTestName, kSystemInstanceGroup, base::Token{}, base::Token::CreateRandom()})) {} + LifecycleTest(const LifecycleTest&) = delete; + LifecycleTest& operator=(const LifecycleTest&) = delete; + ~LifecycleTest() override {} Connector* connector() { return test_service_receiver_.GetConnector(); } @@ -263,8 +268,6 @@ Service test_service_; ServiceReceiver test_service_receiver_; std::unique_ptr<InstanceState> instances_; - - DISALLOW_COPY_AND_ASSIGN(LifecycleTest); }; TEST_F(LifecycleTest, Standalone_GracefulQuit) {
diff --git a/services/service_manager/tests/lifecycle/package.cc b/services/service_manager/tests/lifecycle/package.cc index 5bf62281..22ba027 100644 --- a/services/service_manager/tests/lifecycle/package.cc +++ b/services/service_manager/tests/lifecycle/package.cc
@@ -34,6 +34,9 @@ base::BindRepeating(&PackagedApp::Create, base::Unretained(this))); } + PackagedApp(const PackagedApp&) = delete; + PackagedApp& operator=(const PackagedApp&) = delete; + ~PackagedApp() override = default; private: @@ -94,8 +97,6 @@ base::OnceClosure service_manager_connection_closed_callback_; // Run when this object is destructed. base::OnceClosure destruct_callback_; - - DISALLOW_COPY_AND_ASSIGN(PackagedApp); }; class Package : public service_manager::Service { @@ -108,6 +109,9 @@ base::BindOnce(&Package::Terminate, base::Unretained(this))); } + Package(const Package&) = delete; + Package& operator=(const Package&) = delete; + ~Package() override = default; private: @@ -152,8 +156,6 @@ int next_id_ = 0; std::map<int, std::unique_ptr<PackagedApp>> app_instances_; - - DISALLOW_COPY_AND_ASSIGN(Package); }; } // namespace
diff --git a/services/service_manager/tests/lifecycle/parent.cc b/services/service_manager/tests/lifecycle/parent.cc index b880d1c..ce08b16 100644 --- a/services/service_manager/tests/lifecycle/parent.cc +++ b/services/service_manager/tests/lifecycle/parent.cc
@@ -30,6 +30,9 @@ base::BindRepeating(&Parent::Create, base::Unretained(this))); } + Parent(const Parent&) = delete; + Parent& operator=(const Parent&) = delete; + ~Parent() override = default; private: @@ -63,8 +66,6 @@ service_manager::ServiceReceiver service_receiver_; service_manager::BinderRegistry registry_; mojo::ReceiverSet<service_manager::test::mojom::Parent> parent_receivers_; - - DISALLOW_COPY_AND_ASSIGN(Parent); }; } // namespace
diff --git a/services/service_manager/tests/service_manager/embedder.cc b/services/service_manager/tests/service_manager/embedder.cc index e875fc0f..0542f19 100644 --- a/services/service_manager/tests/service_manager/embedder.cc +++ b/services/service_manager/tests/service_manager/embedder.cc
@@ -20,12 +20,14 @@ explicit PackagedService( mojo::PendingReceiver<service_manager::mojom::Service> receiver) : service_receiver_(this, std::move(receiver)) {} + + PackagedService(const PackagedService&) = delete; + PackagedService& operator=(const PackagedService&) = delete; + ~PackagedService() override = default; private: service_manager::ServiceReceiver service_receiver_; - - DISALLOW_COPY_AND_ASSIGN(PackagedService); }; class Embedder : public service_manager::Service { @@ -33,6 +35,10 @@ explicit Embedder( mojo::PendingReceiver<service_manager::mojom::Service> receiver) : service_receiver_(this, std::move(receiver)) {} + + Embedder(const Embedder&) = delete; + Embedder& operator=(const Embedder&) = delete; + ~Embedder() override = default; private: @@ -55,8 +61,6 @@ service_manager::ServiceReceiver service_receiver_; std::unique_ptr<service_manager::Service> packaged_service_; - - DISALLOW_COPY_AND_ASSIGN(Embedder); }; } // namespace
diff --git a/services/service_manager/tests/service_manager/service_manager_listener_unittest.cc b/services/service_manager/tests/service_manager/service_manager_listener_unittest.cc index feb834f..3885df80 100644 --- a/services/service_manager/tests/service_manager/service_manager_listener_unittest.cc +++ b/services/service_manager/tests/service_manager/service_manager_listener_unittest.cc
@@ -34,6 +34,10 @@ explicit TestListener( mojo::PendingReceiver<mojom::ServiceManagerListener> receiver) : receiver_(this, std::move(receiver)) {} + + TestListener(const TestListener&) = delete; + TestListener& operator=(const TestListener&) = delete; + ~TestListener() override = default; void WaitForInit() { wait_for_init_loop_.Run(); } @@ -71,14 +75,16 @@ absl::optional<base::RunLoop> wait_for_start_loop_; Identity* wait_for_start_identity_ = nullptr; uint32_t* wait_for_start_pid_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(TestListener); }; class TestTargetService : public Service { public: explicit TestTargetService(mojo::PendingReceiver<mojom::Service> receiver) : receiver_(this, std::move(receiver)) {} + + TestTargetService(const TestTargetService&) = delete; + TestTargetService& operator=(const TestTargetService&) = delete; + ~TestTargetService() override = default; Connector* connector() { return receiver_.GetConnector(); } @@ -98,8 +104,6 @@ ServiceReceiver receiver_; base::RunLoop wait_for_disconnect_loop_; - - DISALLOW_COPY_AND_ASSIGN(TestTargetService); }; class ServiceManagerListenerTest : public testing::Test, public Service { @@ -107,6 +111,11 @@ ServiceManagerListenerTest() : service_manager_(GetTestManifests(), ServiceManager::ServiceExecutablePolicy::kSupported) {} + + ServiceManagerListenerTest(const ServiceManagerListenerTest&) = delete; + ServiceManagerListenerTest& operator=(const ServiceManagerListenerTest&) = + delete; + ~ServiceManagerListenerTest() override = default; Connector* connector() { return service_receiver_.GetConnector(); } @@ -149,8 +158,6 @@ ServiceManager service_manager_; ServiceReceiver service_receiver_{this}; std::unique_ptr<TestListener> listener_; - - DISALLOW_COPY_AND_ASSIGN(ServiceManagerListenerTest); }; TEST_F(ServiceManagerListenerTest, InstancesHaveUniqueIdentity) {
diff --git a/services/service_manager/tests/service_manager/service_manager_unittest.cc b/services/service_manager/tests/service_manager/service_manager_unittest.cc index 57cffb1d..fe6c35cc 100644 --- a/services/service_manager/tests/service_manager/service_manager_unittest.cc +++ b/services/service_manager/tests/service_manager/service_manager_unittest.cc
@@ -78,6 +78,10 @@ registry_.AddInterface<test::mojom::CreateInstanceTest>( base::BindRepeating(&TestService::Create, base::Unretained(this))); } + + TestService(const TestService&) = delete; + TestService& operator=(const TestService&) = delete; + ~TestService() override = default; const Identity& target_identity() const { return target_identity_; } @@ -116,14 +120,16 @@ BinderRegistry registry_; mojo::Receiver<test::mojom::CreateInstanceTest> receiver_{this}; - - DISALLOW_COPY_AND_ASSIGN(TestService); }; class SimpleService : public Service { public: explicit SimpleService(mojo::PendingReceiver<mojom::Service> receiver) : receiver_(this, std::move(receiver)) {} + + SimpleService(const SimpleService&) = delete; + SimpleService& operator=(const SimpleService&) = delete; + ~SimpleService() override = default; Connector* connector() { return receiver_.GetConnector(); } @@ -144,8 +150,6 @@ ServiceReceiver receiver_; base::OnceClosure connection_lost_closure_; - - DISALLOW_COPY_AND_ASSIGN(SimpleService); }; } // namespace @@ -157,6 +161,10 @@ : test_service_manager_(GetTestManifests()), test_service_( test_service_manager_.RegisterTestInstance(kTestServiceName)) {} + + ServiceManagerTest(const ServiceManagerTest&) = delete; + ServiceManagerTest& operator=(const ServiceManagerTest&) = delete; + ~ServiceManagerTest() override = default; protected: @@ -394,8 +402,6 @@ ServiceFailedToStartCallback service_failed_to_start_callback_; ServicePIDReceivedCallback service_pid_received_callback_; base::Process target_; - - DISALLOW_COPY_AND_ASSIGN(ServiceManagerTest); }; TEST_F(ServiceManagerTest, CreateInstance) {
diff --git a/services/service_manager/tests/service_manager/target.cc b/services/service_manager/tests/service_manager/target.cc index f094ad4..cbe8797 100644 --- a/services/service_manager/tests/service_manager/target.cc +++ b/services/service_manager/tests/service_manager/target.cc
@@ -20,6 +20,10 @@ explicit Target( mojo::PendingReceiver<service_manager::mojom::Service> receiver) : service_receiver_(this, std::move(receiver)) {} + + Target(const Target&) = delete; + Target& operator=(const Target&) = delete; + ~Target() override = default; private: @@ -33,8 +37,6 @@ } service_manager::ServiceReceiver service_receiver_; - - DISALLOW_COPY_AND_ASSIGN(Target); }; } // namespace
diff --git a/services/service_manager/tests/service_process_launcher_unittest.cc b/services/service_manager/tests/service_process_launcher_unittest.cc index 2f59517..cfbc634a 100644 --- a/services/service_manager/tests/service_process_launcher_unittest.cc +++ b/services/service_manager/tests/service_process_launcher_unittest.cc
@@ -43,6 +43,12 @@ : public ServiceProcessLauncherDelegate { public: ServiceProcessLauncherDelegateImpl() {} + + ServiceProcessLauncherDelegateImpl( + const ServiceProcessLauncherDelegateImpl&) = delete; + ServiceProcessLauncherDelegateImpl& operator=( + const ServiceProcessLauncherDelegateImpl&) = delete; + ~ServiceProcessLauncherDelegateImpl() override {} size_t get_and_clear_adjust_count() { @@ -60,8 +66,6 @@ } size_t adjust_count_ = 0; - - DISALLOW_COPY_AND_ASSIGN(ServiceProcessLauncherDelegateImpl); }; #if defined(OS_ANDROID)
diff --git a/services/service_manager/tests/shutdown/shutdown_client_app.cc b/services/service_manager/tests/shutdown/shutdown_client_app.cc index c5cdfe78..1049117 100644 --- a/services/service_manager/tests/shutdown/shutdown_client_app.cc +++ b/services/service_manager/tests/shutdown/shutdown_client_app.cc
@@ -29,6 +29,10 @@ base::BindRepeating(&ShutdownClientApp::Create, base::Unretained(this))); } + + ShutdownClientApp(const ShutdownClientApp&) = delete; + ShutdownClientApp& operator=(const ShutdownClientApp&) = delete; + ~ShutdownClientApp() override = default; private: @@ -64,8 +68,6 @@ ServiceReceiver service_receiver_; BinderRegistry registry_; mojo::ReceiverSet<mojom::ShutdownTestClientController> receivers_; - - DISALLOW_COPY_AND_ASSIGN(ShutdownClientApp); }; } // namespace service_manager
diff --git a/services/service_manager/tests/shutdown/shutdown_service_app.cc b/services/service_manager/tests/shutdown/shutdown_service_app.cc index 19c28a2..2697ec8 100644 --- a/services/service_manager/tests/shutdown/shutdown_service_app.cc +++ b/services/service_manager/tests/shutdown/shutdown_service_app.cc
@@ -26,6 +26,9 @@ &ShutdownServiceApp::Create, base::Unretained(this))); } + ShutdownServiceApp(const ShutdownServiceApp&) = delete; + ShutdownServiceApp& operator=(const ShutdownServiceApp&) = delete; + ~ShutdownServiceApp() override = default; private: @@ -48,8 +51,6 @@ ServiceReceiver service_receiver_; BinderRegistry registry_; mojo::ReceiverSet<mojom::ShutdownTestService> receivers_; - - DISALLOW_COPY_AND_ASSIGN(ShutdownServiceApp); }; } // namespace
diff --git a/services/service_manager/tests/shutdown/shutdown_unittest.cc b/services/service_manager/tests/shutdown/shutdown_unittest.cc index 3d0dbda..c83a4eda 100644 --- a/services/service_manager/tests/shutdown/shutdown_unittest.cc +++ b/services/service_manager/tests/shutdown/shutdown_unittest.cc
@@ -74,6 +74,10 @@ test_service_receiver_( &test_service_, test_service_manager_.RegisterTestInstance(kTestServiceName)) {} + + ShutdownTest(const ShutdownTest&) = delete; + ShutdownTest& operator=(const ShutdownTest&) = delete; + ~ShutdownTest() override = default; Connector* connector() { return test_service_receiver_.GetConnector(); } @@ -83,8 +87,6 @@ TestServiceManager test_service_manager_; Service test_service_; ServiceReceiver test_service_receiver_; - - DISALLOW_COPY_AND_ASSIGN(ShutdownTest); }; TEST_F(ShutdownTest, ConnectRace) {
diff --git a/services/service_manager/tests/test_support_unittest.cc b/services/service_manager/tests/test_support_unittest.cc index 95ec7d7..7a8918c 100644 --- a/services/service_manager/tests/test_support_unittest.cc +++ b/services/service_manager/tests/test_support_unittest.cc
@@ -28,26 +28,30 @@ class TestBImpl : public mojom::TestB { public: TestBImpl() = default; + + TestBImpl(const TestBImpl&) = delete; + TestBImpl& operator=(const TestBImpl&) = delete; + ~TestBImpl() override = default; private: // TestB: void B(BCallback callback) override { std::move(callback).Run(); } void CallC(CallCCallback callback) override { std::move(callback).Run(); } - - DISALLOW_COPY_AND_ASSIGN(TestBImpl); }; class TestCImpl : public mojom::TestC { public: TestCImpl() = default; + + TestCImpl(const TestCImpl&) = delete; + TestCImpl& operator=(const TestCImpl&) = delete; + ~TestCImpl() override = default; private: // TestC: void C(CCallback callback) override { std::move(callback).Run(); } - - DISALLOW_COPY_AND_ASSIGN(TestCImpl); }; void OnTestBReceiver(mojo::PendingReceiver<mojom::TestB> receiver) { @@ -67,6 +71,9 @@ registry_.AddInterface(base::BindRepeating(&OnTestBReceiver)); } + TestBServiceImpl(const TestBServiceImpl&) = delete; + TestBServiceImpl& operator=(const TestBServiceImpl&) = delete; + ~TestBServiceImpl() override = default; private: @@ -79,8 +86,6 @@ service_manager::ServiceReceiver service_receiver_; service_manager::BinderRegistry registry_; - - DISALLOW_COPY_AND_ASSIGN(TestBServiceImpl); }; class TestCServiceImpl : public Service { @@ -90,6 +95,9 @@ registry_.AddInterface(base::BindRepeating(&OnTestCReceiver)); } + TestCServiceImpl(const TestCServiceImpl&) = delete; + TestCServiceImpl& operator=(const TestCServiceImpl&) = delete; + ~TestCServiceImpl() override = default; private: @@ -102,8 +110,6 @@ service_manager::ServiceReceiver service_receiver_; service_manager::BinderRegistry registry_; - - DISALLOW_COPY_AND_ASSIGN(TestCServiceImpl); }; constexpr char kServiceBName[] = "ServiceB";
diff --git a/services/shape_detection/barcode_detection_impl_mac.h b/services/shape_detection/barcode_detection_impl_mac.h index 3799769..31ffa97 100644 --- a/services/shape_detection/barcode_detection_impl_mac.h +++ b/services/shape_detection/barcode_detection_impl_mac.h
@@ -22,6 +22,10 @@ : public shape_detection::mojom::BarcodeDetection { public: BarcodeDetectionImplMac(); + + BarcodeDetectionImplMac(const BarcodeDetectionImplMac&) = delete; + BarcodeDetectionImplMac& operator=(const BarcodeDetectionImplMac&) = delete; + ~BarcodeDetectionImplMac() override; void Detect(const SkBitmap& bitmap, @@ -33,8 +37,6 @@ private: base::scoped_nsobject<CIDetector> detector_; - - DISALLOW_COPY_AND_ASSIGN(BarcodeDetectionImplMac); }; } // namespace shape_detection
diff --git a/services/shape_detection/barcode_detection_impl_mac_vision.h b/services/shape_detection/barcode_detection_impl_mac_vision.h index bc56852..d10211e00 100644 --- a/services/shape_detection/barcode_detection_impl_mac_vision.h +++ b/services/shape_detection/barcode_detection_impl_mac_vision.h
@@ -34,6 +34,11 @@ explicit BarcodeDetectionImplMacVision( mojom::BarcodeDetectorOptionsPtr options); + + BarcodeDetectionImplMacVision(const BarcodeDetectionImplMacVision&) = delete; + BarcodeDetectionImplMacVision& operator=( + const BarcodeDetectionImplMacVision&) = delete; + ~BarcodeDetectionImplMacVision() override; void Detect(const SkBitmap& bitmap, @@ -58,8 +63,6 @@ DetectCallback detected_callback_; mojo::SelfOwnedReceiverRef<mojom::BarcodeDetection> receiver_; base::WeakPtrFactory<BarcodeDetectionImplMacVision> weak_factory_; - - DISALLOW_COPY_AND_ASSIGN(BarcodeDetectionImplMacVision); }; } // namespace shape_detection
diff --git a/services/shape_detection/barcode_detection_provider_mac.h b/services/shape_detection/barcode_detection_provider_mac.h index 155bc5c..21e520cd 100644 --- a/services/shape_detection/barcode_detection_provider_mac.h +++ b/services/shape_detection/barcode_detection_provider_mac.h
@@ -26,6 +26,11 @@ public: BarcodeDetectionProviderMac(); explicit BarcodeDetectionProviderMac(std::unique_ptr<VisionAPIInterface>); + + BarcodeDetectionProviderMac(const BarcodeDetectionProviderMac&) = delete; + BarcodeDetectionProviderMac& operator=(const BarcodeDetectionProviderMac&) = + delete; + ~BarcodeDetectionProviderMac() override; // Binds BarcodeDetection provider receiver to the implementation of @@ -39,9 +44,6 @@ void EnumerateSupportedFormats( EnumerateSupportedFormatsCallback callback) override; - private: - DISALLOW_COPY_AND_ASSIGN(BarcodeDetectionProviderMac); - absl::optional<std::vector<mojom::BarcodeFormat>> supported_formats_; std::unique_ptr<VisionAPIInterface> vision_api_; };
diff --git a/services/shape_detection/detection_utils_mac.h b/services/shape_detection/detection_utils_mac.h index fab7d7b1..52be0cc8 100644 --- a/services/shape_detection/detection_utils_mac.h +++ b/services/shape_detection/detection_utils_mac.h
@@ -36,6 +36,9 @@ using Callback = base::RepeatingCallback<void(VNRequest* request, NSError* error)>; + VisionAPIAsyncRequestMac(const VisionAPIAsyncRequestMac&) = delete; + VisionAPIAsyncRequestMac& operator=(const VisionAPIAsyncRequestMac&) = delete; + ~VisionAPIAsyncRequestMac(); // Creates an VisionAPIAsyncRequestMac instance which sets |callback| to be @@ -57,8 +60,6 @@ base::scoped_nsobject<VNRequest> request_; const Callback callback_; - - DISALLOW_COPY_AND_ASSIGN(VisionAPIAsyncRequestMac); }; } // namespace shape_detection
diff --git a/services/shape_detection/face_detection_impl_mac.h b/services/shape_detection/face_detection_impl_mac.h index 484a21e..6c51257 100644 --- a/services/shape_detection/face_detection_impl_mac.h +++ b/services/shape_detection/face_detection_impl_mac.h
@@ -17,6 +17,10 @@ public: explicit FaceDetectionImplMac( shape_detection::mojom::FaceDetectorOptionsPtr options); + + FaceDetectionImplMac(const FaceDetectionImplMac&) = delete; + FaceDetectionImplMac& operator=(const FaceDetectionImplMac&) = delete; + ~FaceDetectionImplMac() override; void Detect( @@ -25,8 +29,6 @@ private: base::scoped_nsobject<CIDetector> detector_; - - DISALLOW_COPY_AND_ASSIGN(FaceDetectionImplMac); }; } // namespace shape_detection
diff --git a/services/shape_detection/face_detection_impl_mac_vision.h b/services/shape_detection/face_detection_impl_mac_vision.h index a5a1338d..203058b 100644 --- a/services/shape_detection/face_detection_impl_mac_vision.h +++ b/services/shape_detection/face_detection_impl_mac_vision.h
@@ -26,6 +26,11 @@ : public mojom::FaceDetection { public: FaceDetectionImplMacVision(); + + FaceDetectionImplMacVision(const FaceDetectionImplMacVision&) = delete; + FaceDetectionImplMacVision& operator=(const FaceDetectionImplMacVision&) = + delete; + ~FaceDetectionImplMacVision() override; void Detect(const SkBitmap& bitmap, @@ -43,8 +48,6 @@ DetectCallback detected_callback_; mojo::SelfOwnedReceiverRef<mojom::FaceDetection> receiver_; base::WeakPtrFactory<FaceDetectionImplMacVision> weak_factory_; - - DISALLOW_COPY_AND_ASSIGN(FaceDetectionImplMacVision); }; } // namespace shape_detection
diff --git a/services/shape_detection/face_detection_impl_win.h b/services/shape_detection/face_detection_impl_win.h index 9af4ffa78..92f9b18 100644 --- a/services/shape_detection/face_detection_impl_win.h +++ b/services/shape_detection/face_detection_impl_win.h
@@ -32,6 +32,10 @@ ABI::Windows::Graphics::Imaging::ISoftwareBitmapStatics> bitmap_factory, ABI::Windows::Graphics::Imaging::BitmapPixelFormat pixel_format); + + FaceDetectionImplWin(const FaceDetectionImplWin&) = delete; + FaceDetectionImplWin& operator=(const FaceDetectionImplWin&) = delete; + ~FaceDetectionImplWin() override; void SetReceiver(mojo::SelfOwnedReceiverRef<mojom::FaceDetection> receiver) { @@ -65,8 +69,6 @@ mojo::SelfOwnedReceiverRef<mojom::FaceDetection> receiver_; base::WeakPtrFactory<FaceDetectionImplWin> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FaceDetectionImplWin); }; } // namespace shape_detection
diff --git a/services/shape_detection/face_detection_provider_mac.h b/services/shape_detection/face_detection_provider_mac.h index a8f878bb..013f09c 100644 --- a/services/shape_detection/face_detection_provider_mac.h +++ b/services/shape_detection/face_detection_provider_mac.h
@@ -17,6 +17,10 @@ : public shape_detection::mojom::FaceDetectionProvider { public: FaceDetectionProviderMac(); + + FaceDetectionProviderMac(const FaceDetectionProviderMac&) = delete; + FaceDetectionProviderMac& operator=(const FaceDetectionProviderMac&) = delete; + ~FaceDetectionProviderMac() override; // Binds FaceDetection provider receiver to the implementation of @@ -26,9 +30,6 @@ void CreateFaceDetection(mojo::PendingReceiver<mojom::FaceDetection> receiver, mojom::FaceDetectorOptionsPtr options) override; - - private: - DISALLOW_COPY_AND_ASSIGN(FaceDetectionProviderMac); }; } // namespace shape_detection
diff --git a/services/shape_detection/face_detection_provider_win.h b/services/shape_detection/face_detection_provider_win.h index 1cb4ff0b..d4a9623 100644 --- a/services/shape_detection/face_detection_provider_win.h +++ b/services/shape_detection/face_detection_provider_win.h
@@ -24,6 +24,10 @@ : public shape_detection::mojom::FaceDetectionProvider { public: FaceDetectionProviderWin(); + + FaceDetectionProviderWin(const FaceDetectionProviderWin&) = delete; + FaceDetectionProviderWin& operator=(const FaceDetectionProviderWin&) = delete; + ~FaceDetectionProviderWin() override; static void Create( @@ -48,8 +52,6 @@ mojo::SelfOwnedReceiverRef<mojom::FaceDetectionProvider> receiver_; base::WeakPtrFactory<FaceDetectionProviderWin> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FaceDetectionProviderWin); }; } // namespace shape_detection
diff --git a/services/shape_detection/shape_detection_service.h b/services/shape_detection/shape_detection_service.h index 023b14f7..8ca0e0c 100644 --- a/services/shape_detection/shape_detection_service.h +++ b/services/shape_detection/shape_detection_service.h
@@ -18,6 +18,10 @@ public: explicit ShapeDetectionService( mojo::PendingReceiver<mojom::ShapeDetectionService> receiver); + + ShapeDetectionService(const ShapeDetectionService&) = delete; + ShapeDetectionService& operator=(const ShapeDetectionService&) = delete; + ~ShapeDetectionService() override; // mojom::ShapeDetectionService implementation: @@ -30,8 +34,6 @@ private: mojo::Receiver<mojom::ShapeDetectionService> receiver_; - - DISALLOW_COPY_AND_ASSIGN(ShapeDetectionService); }; } // namespace shape_detection
diff --git a/services/shape_detection/text_detection_impl_mac.h b/services/shape_detection/text_detection_impl_mac.h index 6b3e2a1..204fa31 100644 --- a/services/shape_detection/text_detection_impl_mac.h +++ b/services/shape_detection/text_detection_impl_mac.h
@@ -18,6 +18,10 @@ : public mojom::TextDetection { public: TextDetectionImplMac(); + + TextDetectionImplMac(const TextDetectionImplMac&) = delete; + TextDetectionImplMac& operator=(const TextDetectionImplMac&) = delete; + ~TextDetectionImplMac() override; void Detect(const SkBitmap& bitmap, @@ -25,8 +29,6 @@ private: base::scoped_nsobject<CIDetector> detector_; - - DISALLOW_COPY_AND_ASSIGN(TextDetectionImplMac); }; } // namespace shape_detection
diff --git a/services/shape_detection/text_detection_impl_win.h b/services/shape_detection/text_detection_impl_win.h index f7bc396..391d32c 100644 --- a/services/shape_detection/text_detection_impl_win.h +++ b/services/shape_detection/text_detection_impl_win.h
@@ -28,6 +28,10 @@ Microsoft::WRL::ComPtr< ABI::Windows::Graphics::Imaging::ISoftwareBitmapStatics> bitmap_factory); + + TextDetectionImplWin(const TextDetectionImplWin&) = delete; + TextDetectionImplWin& operator=(const TextDetectionImplWin&) = delete; + ~TextDetectionImplWin() override; // mojom::TextDetection implementation. @@ -55,8 +59,6 @@ Microsoft::WRL::ComPtr<ABI::Windows::Media::Ocr::IOcrResult> ocr_result); base::WeakPtrFactory<TextDetectionImplWin> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(TextDetectionImplWin); }; } // namespace shape_detection
diff --git a/services/test/echo/echo_service.h b/services/test/echo/echo_service.h index 0e60d37..8966a6fe 100644 --- a/services/test/echo/echo_service.h +++ b/services/test/echo/echo_service.h
@@ -15,6 +15,10 @@ class EchoService : public mojom::EchoService { public: explicit EchoService(mojo::PendingReceiver<mojom::EchoService> receiver); + + EchoService(const EchoService&) = delete; + EchoService& operator=(const EchoService&) = delete; + ~EchoService() override; private: @@ -27,8 +31,6 @@ void Crash() override; mojo::Receiver<mojom::EchoService> receiver_; - - DISALLOW_COPY_AND_ASSIGN(EchoService); }; } // namespace echo
diff --git a/services/test/run_all_unittests.cc b/services/test/run_all_unittests.cc index eb3270f..d66e7490 100644 --- a/services/test/run_all_unittests.cc +++ b/services/test/run_all_unittests.cc
@@ -28,6 +28,10 @@ class ServiceTestSuite : public base::TestSuite { public: ServiceTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {} + + ServiceTestSuite(const ServiceTestSuite&) = delete; + ServiceTestSuite& operator=(const ServiceTestSuite&) = delete; + ~ServiceTestSuite() override = default; protected: @@ -64,9 +68,6 @@ base::TestSuite::Shutdown(); } - - private: - DISALLOW_COPY_AND_ASSIGN(ServiceTestSuite); }; } // namespace
diff --git a/services/tracing/perfetto/consumer_host.h b/services/tracing/perfetto/consumer_host.h index 655aebb8..3bfc532b 100644 --- a/services/tracing/perfetto/consumer_host.h +++ b/services/tracing/perfetto/consumer_host.h
@@ -50,6 +50,10 @@ const perfetto::TraceConfig& trace_config, perfetto::base::ScopedFile output_file, mojom::TracingClientPriority priority); + + TracingSession(const TracingSession&) = delete; + TracingSession& operator=(const TracingSession&) = delete; + ~TracingSession() override; void OnPerfettoEvents(const perfetto::ObservableEvents&); @@ -121,8 +125,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<TracingSession> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(TracingSession); }; // The owner of ConsumerHost should make sure to destroy
diff --git a/services/tracing/perfetto/perfetto_service.h b/services/tracing/perfetto/perfetto_service.h index 82e9cf4c5..635776b9 100644 --- a/services/tracing/perfetto/perfetto_service.h +++ b/services/tracing/perfetto/perfetto_service.h
@@ -30,6 +30,10 @@ public: explicit PerfettoService(scoped_refptr<base::SequencedTaskRunner> task_runner_for_testing = nullptr); + + PerfettoService(const PerfettoService&) = delete; + PerfettoService& operator=(const PerfettoService&) = delete; + ~PerfettoService() override; static PerfettoService* GetInstance(); @@ -94,8 +98,6 @@ std::set<base::ProcessId> active_service_pids_; std::map<base::ProcessId, int> num_active_connections_; bool active_service_pids_initialized_ = false; - - DISALLOW_COPY_AND_ASSIGN(PerfettoService); }; } // namespace tracing
diff --git a/services/tracing/perfetto/privacy_filtering_check.h b/services/tracing/perfetto/privacy_filtering_check.h index e9e7528a..1409ff3 100644 --- a/services/tracing/perfetto/privacy_filtering_check.h +++ b/services/tracing/perfetto/privacy_filtering_check.h
@@ -25,6 +25,10 @@ }; PrivacyFilteringCheck(); + + PrivacyFilteringCheck(const PrivacyFilteringCheck&) = delete; + PrivacyFilteringCheck& operator=(const PrivacyFilteringCheck&) = delete; + ~PrivacyFilteringCheck(); // Removes disallowed fields from the trace. @@ -36,8 +40,6 @@ private: TraceStats stats_; - - DISALLOW_COPY_AND_ASSIGN(PrivacyFilteringCheck); }; } // namespace tracing
diff --git a/services/tracing/perfetto/producer_host.h b/services/tracing/perfetto/producer_host.h index 23536ce..3a31e16e 100644 --- a/services/tracing/perfetto/producer_host.h +++ b/services/tracing/perfetto/producer_host.h
@@ -38,6 +38,10 @@ public perfetto::Producer { public: explicit ProducerHost(base::tracing::PerfettoTaskRunner*); + + ProducerHost(const ProducerHost&) = delete; + ProducerHost& operator=(const ProducerHost&) = delete; + ~ProducerHost() override; // Keep in sync with tools/metrics/histograms/enums.xml. These values are @@ -113,8 +117,6 @@ // immediately after |producer_endpoint_| is destroyed. std::unique_ptr<perfetto::TracingService::ProducerEndpoint> producer_endpoint_; - - DISALLOW_COPY_AND_ASSIGN(ProducerHost); }; } // namespace tracing
diff --git a/services/tracing/public/cpp/background_tracing/background_tracing_agent_impl.h b/services/tracing/public/cpp/background_tracing/background_tracing_agent_impl.h index 9adfdc3..a23c0eb 100644 --- a/services/tracing/public/cpp/background_tracing/background_tracing_agent_impl.h +++ b/services/tracing/public/cpp/background_tracing/background_tracing_agent_impl.h
@@ -24,6 +24,11 @@ public: explicit BackgroundTracingAgentImpl( mojo::PendingRemote<mojom::BackgroundTracingAgentClient> client); + + BackgroundTracingAgentImpl(const BackgroundTracingAgentImpl&) = delete; + BackgroundTracingAgentImpl& operator=(const BackgroundTracingAgentImpl&) = + delete; + ~BackgroundTracingAgentImpl() override; // mojom::BackgroundTracingAgent methods: @@ -54,8 +59,6 @@ histogram_callback_map_; base::WeakPtrFactory<BackgroundTracingAgentImpl> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(BackgroundTracingAgentImpl); }; } // namespace tracing
diff --git a/services/tracing/public/cpp/background_tracing/background_tracing_agent_provider_impl.h b/services/tracing/public/cpp/background_tracing/background_tracing_agent_provider_impl.h index b88f201..c646b49 100644 --- a/services/tracing/public/cpp/background_tracing/background_tracing_agent_provider_impl.h +++ b/services/tracing/public/cpp/background_tracing/background_tracing_agent_provider_impl.h
@@ -18,6 +18,12 @@ : public mojom::BackgroundTracingAgentProvider { public: BackgroundTracingAgentProviderImpl(); + + BackgroundTracingAgentProviderImpl( + const BackgroundTracingAgentProviderImpl&) = delete; + BackgroundTracingAgentProviderImpl& operator=( + const BackgroundTracingAgentProviderImpl&) = delete; + ~BackgroundTracingAgentProviderImpl() override; void AddBinding( @@ -32,8 +38,6 @@ private: mojo::ReceiverSet<mojom::BackgroundTracingAgentProvider> self_receiver_set_; mojo::UniqueReceiverSet<mojom::BackgroundTracingAgent> agent_receiver_set_; - - DISALLOW_COPY_AND_ASSIGN(BackgroundTracingAgentProviderImpl); }; } // namespace tracing
diff --git a/services/tracing/public/cpp/base_agent.h b/services/tracing/public/cpp/base_agent.h index 53894b7..1e31926 100644 --- a/services/tracing/public/cpp/base_agent.h +++ b/services/tracing/public/cpp/base_agent.h
@@ -17,6 +17,9 @@ // categories via Perfetto. class COMPONENT_EXPORT(TRACING_CPP) BaseAgent { public: + BaseAgent(const BaseAgent&) = delete; + BaseAgent& operator=(const BaseAgent&) = delete; + virtual ~BaseAgent(); // May be called on any thread. @@ -24,8 +27,6 @@ protected: BaseAgent(); - - DISALLOW_COPY_AND_ASSIGN(BaseAgent); }; } // namespace tracing
diff --git a/services/tracing/public/cpp/perfetto/posix_system_producer.h b/services/tracing/public/cpp/perfetto/posix_system_producer.h index ff78f8b5..abb2ea5 100644 --- a/services/tracing/public/cpp/perfetto/posix_system_producer.h +++ b/services/tracing/public/cpp/perfetto/posix_system_producer.h
@@ -40,6 +40,10 @@ }; PosixSystemProducer(const char* socket, base::tracing::PerfettoTaskRunner* task_runner); + + PosixSystemProducer(const PosixSystemProducer&) = delete; + PosixSystemProducer& operator=(const PosixSystemProducer&) = delete; + ~PosixSystemProducer() override; // Functions needed for PosixSystemProducer only. @@ -153,7 +157,6 @@ // NOTE: Weak pointers must be invalidated before all other member variables. // and thus must be the last member variable. base::WeakPtrFactory<PosixSystemProducer> weak_ptr_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(PosixSystemProducer); }; } // namespace tracing
diff --git a/services/tracing/public/cpp/perfetto/producer_client.h b/services/tracing/public/cpp/perfetto/producer_client.h index d3af18a6..32e8b51 100644 --- a/services/tracing/public/cpp/perfetto/producer_client.h +++ b/services/tracing/public/cpp/perfetto/producer_client.h
@@ -43,6 +43,10 @@ public mojom::ProducerClient { public: explicit ProducerClient(base::tracing::PerfettoTaskRunner*); + + ProducerClient(const ProducerClient&) = delete; + ProducerClient& operator=(const ProducerClient&) = delete; + ~ProducerClient() override; void Connect(mojo::PendingRemote<mojom::PerfettoService> perfetto_service); @@ -145,7 +149,6 @@ // NOTE: Weak pointers must be invalidated before all other member variables. base::WeakPtrFactory<ProducerClient> weak_ptr_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(ProducerClient); }; } // namespace tracing
diff --git a/services/tracing/public/cpp/perfetto/shared_memory.h b/services/tracing/public/cpp/perfetto/shared_memory.h index 548e64d..6c2e4496 100644 --- a/services/tracing/public/cpp/perfetto/shared_memory.h +++ b/services/tracing/public/cpp/perfetto/shared_memory.h
@@ -28,6 +28,10 @@ explicit MojoSharedMemory(size_t size); explicit MojoSharedMemory(mojo::ScopedSharedBufferHandle shared_memory); + + MojoSharedMemory(const MojoSharedMemory&) = delete; + MojoSharedMemory& operator=(const MojoSharedMemory&) = delete; + ~MojoSharedMemory() override; // Create another wrapping instance of the same SharedMemory buffer, @@ -46,8 +50,6 @@ private: mojo::ScopedSharedBufferHandle shared_buffer_; mojo::ScopedSharedBufferMapping mapping_; - - DISALLOW_COPY_AND_ASSIGN(MojoSharedMemory); }; } // namespace tracing
diff --git a/services/tracing/public/cpp/perfetto/track_event_thread_local_event_sink.h b/services/tracing/public/cpp/perfetto/track_event_thread_local_event_sink.h index 7ab6753..e5003d1 100644 --- a/services/tracing/public/cpp/perfetto/track_event_thread_local_event_sink.h +++ b/services/tracing/public/cpp/perfetto/track_event_thread_local_event_sink.h
@@ -40,6 +40,12 @@ uint32_t session_id, bool disable_interning, bool proto_writer_filtering_enabled); + + TrackEventThreadLocalEventSink(const TrackEventThreadLocalEventSink&) = + delete; + TrackEventThreadLocalEventSink& operator=( + const TrackEventThreadLocalEventSink&) = delete; + ~TrackEventThreadLocalEventSink() override; // Resets emitted incremental state on all threads and causes incremental data @@ -150,8 +156,6 @@ // Stores the trace packet handle for a typed TrackEvent until the TrackEvent // was finalized after the code in //base filled its typed argument fields. perfetto::TraceWriter::TracePacketHandle pending_trace_packet_; - - DISALLOW_COPY_AND_ASSIGN(TrackEventThreadLocalEventSink); }; } // namespace tracing
diff --git a/services/tracing/public/cpp/stack_sampling/stack_unwinder_android_unittest.cc b/services/tracing/public/cpp/stack_sampling/stack_unwinder_android_unittest.cc index 1a6c507..30294ed2 100644 --- a/services/tracing/public/cpp/stack_sampling/stack_unwinder_android_unittest.cc +++ b/services/tracing/public/cpp/stack_sampling/stack_unwinder_android_unittest.cc
@@ -23,6 +23,10 @@ class StackUnwinderTest : public testing::Test { public: StackUnwinderTest() : testing::Test() {} + + StackUnwinderTest(const StackUnwinderTest&) = delete; + StackUnwinderTest& operator=(const StackUnwinderTest&) = delete; + ~StackUnwinderTest() override {} void SetUp() override { @@ -36,8 +40,6 @@ private: StackUnwinderAndroid unwinder_; base::test::TaskEnvironment task_environment_; - - DISALLOW_COPY_AND_ASSIGN(StackUnwinderTest); }; uintptr_t GetCurrentPC() {
diff --git a/services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler_unittest.cc b/services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler_unittest.cc index ba8e74f..7910f05 100644 --- a/services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler_unittest.cc +++ b/services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler_unittest.cc
@@ -71,6 +71,11 @@ class TracingSampleProfilerTest : public TracingUnitTest { public: TracingSampleProfilerTest() = default; + + TracingSampleProfilerTest(const TracingSampleProfilerTest&) = delete; + TracingSampleProfilerTest& operator=(const TracingSampleProfilerTest&) = + delete; + ~TracingSampleProfilerTest() override = default; void SetUp() override { @@ -161,9 +166,6 @@ #if BUILDFLAG(ENABLE_LOADER_LOCK_SAMPLING) MockLoaderLockSampler mock_loader_lock_sampler_; #endif - - private: - DISALLOW_COPY_AND_ASSIGN(TracingSampleProfilerTest); }; // Stub module for testing.
diff --git a/services/tracing/public/cpp/system_tracing_service.h b/services/tracing/public/cpp/system_tracing_service.h index bb3f334..e8f89959 100644 --- a/services/tracing/public/cpp/system_tracing_service.h +++ b/services/tracing/public/cpp/system_tracing_service.h
@@ -36,6 +36,10 @@ : public mojom::SystemTracingService { public: SystemTracingService(); + + SystemTracingService(const SystemTracingService&) = delete; + SystemTracingService& operator=(const SystemTracingService&) = delete; + ~SystemTracingService() override; void OpenProducerSocket(OpenProducerSocketCallback callback) override; @@ -51,8 +55,6 @@ private: void OnConnectionError(); - DISALLOW_COPY_AND_ASSIGN(SystemTracingService); - mojo::Receiver<mojom::SystemTracingService> receiver_{this}; };
diff --git a/services/video_capture/device_factory_media_to_mojo_adapter.h b/services/video_capture/device_factory_media_to_mojo_adapter.h index 4a5d9be..b6d70aa 100644 --- a/services/video_capture/device_factory_media_to_mojo_adapter.h +++ b/services/video_capture/device_factory_media_to_mojo_adapter.h
@@ -39,6 +39,12 @@ DeviceFactoryMediaToMojoAdapter( std::unique_ptr<media::VideoCaptureSystem> capture_system); #endif // BUILDFLAG(IS_CHROMEOS_ASH) + + DeviceFactoryMediaToMojoAdapter(const DeviceFactoryMediaToMojoAdapter&) = + delete; + DeviceFactoryMediaToMojoAdapter& operator=( + const DeviceFactoryMediaToMojoAdapter&) = delete; + ~DeviceFactoryMediaToMojoAdapter() override; // DeviceFactory implementation. @@ -95,8 +101,6 @@ bool has_called_get_device_infos_; base::WeakPtrFactory<DeviceFactoryMediaToMojoAdapter> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DeviceFactoryMediaToMojoAdapter); }; } // namespace video_capture
diff --git a/services/video_capture/gpu_memory_buffer_virtual_device_mojo_adapter.h b/services/video_capture/gpu_memory_buffer_virtual_device_mojo_adapter.h index 9a72a4a..b5df2c7 100644 --- a/services/video_capture/gpu_memory_buffer_virtual_device_mojo_adapter.h +++ b/services/video_capture/gpu_memory_buffer_virtual_device_mojo_adapter.h
@@ -30,6 +30,12 @@ GpuMemoryBufferVirtualDeviceMojoAdapter&) = delete; GpuMemoryBufferVirtualDeviceMojoAdapter& operator=( GpuMemoryBufferVirtualDeviceMojoAdapter&) = delete; + + GpuMemoryBufferVirtualDeviceMojoAdapter( + const GpuMemoryBufferVirtualDeviceMojoAdapter&) = delete; + GpuMemoryBufferVirtualDeviceMojoAdapter& operator=( + const GpuMemoryBufferVirtualDeviceMojoAdapter&) = delete; + ~GpuMemoryBufferVirtualDeviceMojoAdapter() override; void SetReceiverDisconnectedCallback(base::OnceClosure callback); @@ -73,8 +79,6 @@ scoped_refptr<VideoFrameAccessHandlerRemote> frame_access_handler_remote_; bool video_frame_handler_has_forwarder_ = false; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferVirtualDeviceMojoAdapter); }; } // namespace video_capture
diff --git a/services/video_capture/push_video_stream_subscription_impl.h b/services/video_capture/push_video_stream_subscription_impl.h index 646df18..3a65e54 100644 --- a/services/video_capture/push_video_stream_subscription_impl.h +++ b/services/video_capture/push_video_stream_subscription_impl.h
@@ -27,6 +27,12 @@ mojom::VideoSource::CreatePushSubscriptionCallback creation_callback, BroadcastingReceiver* broadcaster, mojo::Remote<mojom::Device>* device); + + PushVideoStreamSubscriptionImpl(const PushVideoStreamSubscriptionImpl&) = + delete; + PushVideoStreamSubscriptionImpl& operator=( + const PushVideoStreamSubscriptionImpl&) = delete; + ~PushVideoStreamSubscriptionImpl() override; void SetOnClosedHandler( @@ -75,8 +81,6 @@ base::OnceCallback<void(base::OnceClosure done_cb)> on_closed_handler_; base::WeakPtrFactory<PushVideoStreamSubscriptionImpl> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PushVideoStreamSubscriptionImpl); }; } // namespace video_capture
diff --git a/services/video_capture/shared_memory_virtual_device_mojo_adapter.h b/services/video_capture/shared_memory_virtual_device_mojo_adapter.h index 13a2c24..c126014 100644 --- a/services/video_capture/shared_memory_virtual_device_mojo_adapter.h +++ b/services/video_capture/shared_memory_virtual_device_mojo_adapter.h
@@ -25,6 +25,12 @@ SharedMemoryVirtualDeviceMojoAdapter( mojo::Remote<mojom::Producer> producer, bool send_buffer_handles_to_producer_as_raw_file_descriptors = false); + + SharedMemoryVirtualDeviceMojoAdapter( + const SharedMemoryVirtualDeviceMojoAdapter&) = delete; + SharedMemoryVirtualDeviceMojoAdapter& operator=( + const SharedMemoryVirtualDeviceMojoAdapter&) = delete; + ~SharedMemoryVirtualDeviceMojoAdapter() override; // mojom::SharedMemoryVirtualDevice implementation. @@ -63,8 +69,6 @@ std::vector<int> known_buffer_ids_; scoped_refptr<ScopedAccessPermissionMap> scoped_access_permission_map_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(SharedMemoryVirtualDeviceMojoAdapter); }; } // namespace video_capture
diff --git a/services/video_capture/test/service_lifecycle_unittest.cc b/services/video_capture/test/service_lifecycle_unittest.cc index 89a7a78b..4dcae91 100644 --- a/services/video_capture/test/service_lifecycle_unittest.cc +++ b/services/video_capture/test/service_lifecycle_unittest.cc
@@ -33,6 +33,12 @@ class VideoCaptureServiceLifecycleTest : public ::testing::Test { public: VideoCaptureServiceLifecycleTest() = default; + + VideoCaptureServiceLifecycleTest(const VideoCaptureServiceLifecycleTest&) = + delete; + VideoCaptureServiceLifecycleTest& operator=( + const VideoCaptureServiceLifecycleTest&) = delete; + ~VideoCaptureServiceLifecycleTest() override = default; void SetUp() override { @@ -57,8 +63,6 @@ private: void OnServiceIdle() { service_idle_wait_loop_.Quit(); } - - DISALLOW_COPY_AND_ASSIGN(VideoCaptureServiceLifecycleTest); }; // Tests that the service quits when the only client disconnects after not
diff --git a/services/video_capture/test/video_capture_service_test.h b/services/video_capture/test/video_capture_service_test.h index e9ed865..fa3d579 100644 --- a/services/video_capture/test/video_capture_service_test.h +++ b/services/video_capture/test/video_capture_service_test.h
@@ -25,6 +25,10 @@ class VideoCaptureServiceTest : public testing::Test { public: VideoCaptureServiceTest(); + + VideoCaptureServiceTest(const VideoCaptureServiceTest&) = delete; + VideoCaptureServiceTest& operator=(const VideoCaptureServiceTest&) = delete; + ~VideoCaptureServiceTest() override; void SetUp() override; @@ -52,8 +56,6 @@ mojo::Remote<mojom::DeviceFactory> factory_; base::MockCallback<mojom::DeviceFactory::GetDeviceInfosCallback> device_info_receiver_; - - DISALLOW_COPY_AND_ASSIGN(VideoCaptureServiceTest); }; } // namespace video_capture
diff --git a/services/video_capture/testing_controls_impl.h b/services/video_capture/testing_controls_impl.h index eb051d1..17248ee 100644 --- a/services/video_capture/testing_controls_impl.h +++ b/services/video_capture/testing_controls_impl.h
@@ -12,13 +12,14 @@ class TestingControlsImpl : public mojom::TestingControls { public: TestingControlsImpl(); + + TestingControlsImpl(const TestingControlsImpl&) = delete; + TestingControlsImpl& operator=(const TestingControlsImpl&) = delete; + ~TestingControlsImpl() override; // mojom::TestingControls implementation. void Crash() override; - - private: - DISALLOW_COPY_AND_ASSIGN(TestingControlsImpl); }; } // namespace video_capture
diff --git a/services/video_capture/texture_virtual_device_mojo_adapter.h b/services/video_capture/texture_virtual_device_mojo_adapter.h index 2141159..94173cc 100644 --- a/services/video_capture/texture_virtual_device_mojo_adapter.h +++ b/services/video_capture/texture_virtual_device_mojo_adapter.h
@@ -22,6 +22,12 @@ public mojom::Device { public: TextureVirtualDeviceMojoAdapter(); + + TextureVirtualDeviceMojoAdapter(const TextureVirtualDeviceMojoAdapter&) = + delete; + TextureVirtualDeviceMojoAdapter& operator=( + const TextureVirtualDeviceMojoAdapter&) = delete; + ~TextureVirtualDeviceMojoAdapter() override; void SetReceiverDisconnectedCallback(base::OnceClosure callback); @@ -66,8 +72,6 @@ scoped_refptr<VideoFrameAccessHandlerRemote> frame_access_handler_remote_; bool video_frame_handler_has_forwarder_ = false; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(TextureVirtualDeviceMojoAdapter); }; } // namespace video_capture
diff --git a/services/video_capture/video_capture_service_impl.h b/services/video_capture/video_capture_service_impl.h index 264a724..8b49446 100644 --- a/services/video_capture/video_capture_service_impl.h +++ b/services/video_capture/video_capture_service_impl.h
@@ -31,6 +31,10 @@ VideoCaptureServiceImpl( mojo::PendingReceiver<mojom::VideoCaptureService> receiver, scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); + + VideoCaptureServiceImpl(const VideoCaptureServiceImpl&) = delete; + VideoCaptureServiceImpl& operator=(const VideoCaptureServiceImpl&) = delete; + ~VideoCaptureServiceImpl() override; // mojom::VideoCaptureService implementation. @@ -64,8 +68,6 @@ std::unique_ptr<GpuDependenciesContext> gpu_dependencies_context_; scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; - - DISALLOW_COPY_AND_ASSIGN(VideoCaptureServiceImpl); }; } // namespace video_capture
diff --git a/services/video_capture/video_source_impl.h b/services/video_capture/video_source_impl.h index ec808a16..ff80d71 100644 --- a/services/video_capture/video_source_impl.h +++ b/services/video_capture/video_source_impl.h
@@ -30,6 +30,10 @@ VideoSourceImpl(mojom::DeviceFactory* device_factory, const std::string& device_id, base::RepeatingClosure on_last_binding_closed_cb); + + VideoSourceImpl(const VideoSourceImpl&) = delete; + VideoSourceImpl& operator=(const VideoSourceImpl&) = delete; + ~VideoSourceImpl() override; void AddToReceiverSet(mojo::PendingReceiver<VideoSource> receiver); @@ -80,8 +84,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<VideoSourceImpl> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(VideoSourceImpl); }; } // namespace video_capture
diff --git a/services/video_capture/video_source_provider_impl.h b/services/video_capture/video_source_provider_impl.h index 41db327..39bb247 100644 --- a/services/video_capture/video_source_provider_impl.h +++ b/services/video_capture/video_source_provider_impl.h
@@ -22,6 +22,10 @@ VideoSourceProviderImpl( DeviceFactory* device_factory, base::RepeatingClosure on_last_client_disconnected_cb); + + VideoSourceProviderImpl(const VideoSourceProviderImpl&) = delete; + VideoSourceProviderImpl& operator=(const VideoSourceProviderImpl&) = delete; + ~VideoSourceProviderImpl() override; void AddClient(mojo::PendingReceiver<mojom::VideoSourceProvider> receiver); @@ -57,7 +61,6 @@ int closed_but_not_yet_disconnected_client_count_ = 0; mojo::ReceiverSet<mojom::VideoSourceProvider> receivers_; std::map<std::string, std::unique_ptr<VideoSourceImpl>> sources_; - DISALLOW_COPY_AND_ASSIGN(VideoSourceProviderImpl); }; } // namespace video_capture
diff --git a/services/video_capture/virtual_device_enabled_device_factory.h b/services/video_capture/virtual_device_enabled_device_factory.h index 09bb142..f6256f08 100644 --- a/services/video_capture/virtual_device_enabled_device_factory.h +++ b/services/video_capture/virtual_device_enabled_device_factory.h
@@ -23,6 +23,12 @@ public: explicit VirtualDeviceEnabledDeviceFactory( std::unique_ptr<DeviceFactory> factory); + + VirtualDeviceEnabledDeviceFactory(const VirtualDeviceEnabledDeviceFactory&) = + delete; + VirtualDeviceEnabledDeviceFactory& operator=( + const VirtualDeviceEnabledDeviceFactory&) = delete; + ~VirtualDeviceEnabledDeviceFactory() override; // DeviceFactory implementation. @@ -69,7 +75,6 @@ devices_changed_observers_; base::WeakPtrFactory<VirtualDeviceEnabledDeviceFactory> weak_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(VirtualDeviceEnabledDeviceFactory); }; } // namespace video_capture
diff --git a/services/viz/public/cpp/gpu/client_gpu_memory_buffer_manager.h b/services/viz/public/cpp/gpu/client_gpu_memory_buffer_manager.h index 04c1ddc7..cd999ab 100644 --- a/services/viz/public/cpp/gpu/client_gpu_memory_buffer_manager.h +++ b/services/viz/public/cpp/gpu/client_gpu_memory_buffer_manager.h
@@ -36,6 +36,11 @@ public: explicit ClientGpuMemoryBufferManager( mojo::PendingRemote<mojom::GpuMemoryBufferFactory> gpu); + + ClientGpuMemoryBufferManager(const ClientGpuMemoryBufferManager&) = delete; + ClientGpuMemoryBufferManager& operator=(const ClientGpuMemoryBufferManager&) = + delete; + ~ClientGpuMemoryBufferManager() override; private: @@ -83,8 +88,6 @@ scoped_refptr<base::UnsafeSharedMemoryPool> pool_; base::WeakPtrFactory<ClientGpuMemoryBufferManager> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ClientGpuMemoryBufferManager); }; } // namespace viz
diff --git a/services/viz/public/cpp/gpu/gpu.cc b/services/viz/public/cpp/gpu/gpu.cc index cd1e4fa..5647cf39 100644 --- a/services/viz/public/cpp/gpu/gpu.cc +++ b/services/viz/public/cpp/gpu/gpu.cc
@@ -30,6 +30,10 @@ class Gpu::GpuPtrIO { public: GpuPtrIO() { DETACH_FROM_THREAD(thread_checker_); } + + GpuPtrIO(const GpuPtrIO&) = delete; + GpuPtrIO& operator=(const GpuPtrIO&) = delete; + ~GpuPtrIO() { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); } void Initialize(mojo::PendingRemote<mojom::Gpu> gpu_remote, @@ -87,8 +91,6 @@ // callback fires or if an interface connection error occurs. scoped_refptr<EstablishRequest> establish_request_; THREAD_CHECKER(thread_checker_); - - DISALLOW_COPY_AND_ASSIGN(GpuPtrIO); }; // Encapsulates a single request to establish a GPU channel.
diff --git a/services/viz/public/cpp/gpu/gpu.h b/services/viz/public/cpp/gpu/gpu.h index 32fa7d1e..53823536 100644 --- a/services/viz/public/cpp/gpu/gpu.h +++ b/services/viz/public/cpp/gpu/gpu.h
@@ -37,6 +37,9 @@ mojo::PendingRemote<mojom::Gpu> remote, scoped_refptr<base::SingleThreadTaskRunner> io_task_runner); + Gpu(const Gpu&) = delete; + Gpu& operator=(const Gpu&) = delete; + ~Gpu() override; gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager() const { @@ -86,8 +89,6 @@ scoped_refptr<EstablishRequest> pending_request_; scoped_refptr<gpu::GpuChannelHost> gpu_channel_; std::vector<gpu::GpuChannelEstablishedCallback> establish_callbacks_; - - DISALLOW_COPY_AND_ASSIGN(Gpu); }; } // namespace viz
diff --git a/services/viz/public/cpp/gpu/gpu_unittest.cc b/services/viz/public/cpp/gpu/gpu_unittest.cc index f68bb7d..2973522 100644 --- a/services/viz/public/cpp/gpu/gpu_unittest.cc +++ b/services/viz/public/cpp/gpu/gpu_unittest.cc
@@ -30,6 +30,10 @@ class TestGpuImpl : public mojom::Gpu { public: TestGpuImpl() = default; + + TestGpuImpl(const TestGpuImpl&) = delete; + TestGpuImpl& operator=(const TestGpuImpl&) = delete; + ~TestGpuImpl() override = default; void SetRequestWillSucceed(bool request_will_succeed) { @@ -82,8 +86,6 @@ // Closing this handle will result in GpuChannelHost being lost. mojo::ScopedMessagePipeHandle gpu_channel_handle_; - - DISALLOW_COPY_AND_ASSIGN(TestGpuImpl); }; } // namespace @@ -95,6 +97,10 @@ thread_options.priority = base::ThreadPriority::NORMAL; CHECK(io_thread_.StartWithOptions(std::move(thread_options))); } + + GpuTest(const GpuTest&) = delete; + GpuTest& operator=(const GpuTest&) = delete; + ~GpuTest() override = default; Gpu* gpu() { return gpu_.get(); } @@ -170,8 +176,6 @@ base::Thread io_thread_; std::unique_ptr<Gpu> gpu_; std::unique_ptr<TestGpuImpl> gpu_impl_; - - DISALLOW_COPY_AND_ASSIGN(GpuTest); }; // Tests that multiple calls for establishing a gpu channel are all notified
diff --git a/testing/buildbot/chromium.angle.json b/testing/buildbot/chromium.angle.json index b8001c6..1d4806f8 100644 --- a/testing/buildbot/chromium.angle.json +++ b/testing/buildbot/chromium.angle.json
@@ -301,8 +301,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "named_caches": [ @@ -360,8 +360,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "named_caches": [ @@ -1788,8 +1788,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", @@ -1813,8 +1813,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -1835,7 +1835,7 @@ "--expected-vendor-id", "8086", "--expected-device-id", - "0a2e" + "3e9b" ], "isolate_name": "telemetry_gpu_integration_test", "merge": { @@ -1855,8 +1855,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -1893,8 +1893,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -1931,8 +1931,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -1969,8 +1969,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -2007,8 +2007,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -2044,8 +2044,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false,
diff --git a/testing/buildbot/chromium.dawn.json b/testing/buildbot/chromium.dawn.json index 9fe40d8..2811b46 100644 --- a/testing/buildbot/chromium.dawn.json +++ b/testing/buildbot/chromium.dawn.json
@@ -1245,7 +1245,7 @@ "args": [ "--initialize-webgpu-adapter-at-startup-timeout-ms=60000", "--flag-specific=webgpu", - "--platform=mac-mac10.13" + "--platform=mac-mac11.5" ], "isolate_name": "webgpu_blink_web_tests", "merge": { @@ -1280,7 +1280,7 @@ "--initialize-webgpu-adapter-at-startup-timeout-ms=60000", "--flag-specific=webgpu-with-backend-validation", "--time-out-ms=30000", - "--platform=mac-mac10.13" + "--platform=mac-mac11.5" ], "isolate_name": "webgpu_blink_web_tests", "merge": { @@ -1331,8 +1331,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -1358,8 +1358,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -1386,8 +1386,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -1414,8 +1414,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -1439,8 +1439,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -1462,8 +1462,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -1494,8 +1494,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -1506,7 +1506,7 @@ "args": [ "--initialize-webgpu-adapter-at-startup-timeout-ms=60000", "--flag-specific=webgpu", - "--platform=mac-mac10.13" + "--platform=mac-mac11.5" ], "isolate_name": "webgpu_blink_web_tests", "merge": { @@ -1525,8 +1525,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", @@ -1539,7 +1539,7 @@ "--initialize-webgpu-adapter-at-startup-timeout-ms=60000", "--flag-specific=webgpu-with-backend-validation", "--time-out-ms=30000", - "--platform=mac-mac10.13" + "--platform=mac-mac11.5" ], "isolate_name": "webgpu_blink_web_tests", "merge": { @@ -1558,8 +1558,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", @@ -1784,7 +1784,7 @@ "args": [ "--initialize-webgpu-adapter-at-startup-timeout-ms=60000", "--flag-specific=webgpu", - "--platform=mac-mac10.13" + "--platform=mac-mac11.5" ], "isolate_name": "webgpu_blink_web_tests", "merge": { @@ -1820,7 +1820,7 @@ "--initialize-webgpu-adapter-at-startup-timeout-ms=60000", "--flag-specific=webgpu-with-backend-validation", "--time-out-ms=30000", - "--platform=mac-mac10.13" + "--platform=mac-mac11.5" ], "isolate_name": "webgpu_blink_web_tests", "merge": { @@ -2327,7 +2327,7 @@ "args": [ "--initialize-webgpu-adapter-at-startup-timeout-ms=60000", "--flag-specific=webgpu", - "--platform=mac-mac10.13" + "--platform=mac-mac11.5" ], "isolate_name": "webgpu_blink_web_tests", "merge": { @@ -2362,7 +2362,7 @@ "--initialize-webgpu-adapter-at-startup-timeout-ms=60000", "--flag-specific=webgpu-with-backend-validation", "--time-out-ms=30000", - "--platform=mac-mac10.13" + "--platform=mac-mac11.5" ], "isolate_name": "webgpu_blink_web_tests", "merge": { @@ -2413,8 +2413,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -2440,8 +2440,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -2468,8 +2468,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -2496,8 +2496,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -2521,8 +2521,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -2544,8 +2544,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -2576,8 +2576,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -2588,7 +2588,7 @@ "args": [ "--initialize-webgpu-adapter-at-startup-timeout-ms=60000", "--flag-specific=webgpu", - "--platform=mac-mac10.13" + "--platform=mac-mac11.5" ], "isolate_name": "webgpu_blink_web_tests", "merge": { @@ -2607,8 +2607,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", @@ -2621,7 +2621,7 @@ "--initialize-webgpu-adapter-at-startup-timeout-ms=60000", "--flag-specific=webgpu-with-backend-validation", "--time-out-ms=30000", - "--platform=mac-mac10.13" + "--platform=mac-mac11.5" ], "isolate_name": "webgpu_blink_web_tests", "merge": { @@ -2640,8 +2640,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com",
diff --git a/testing/buildbot/chromium.fyi.json b/testing/buildbot/chromium.fyi.json index 422446ae..139d89d 100644 --- a/testing/buildbot/chromium.fyi.json +++ b/testing/buildbot/chromium.fyi.json
@@ -22340,6 +22340,9 @@ ] }, "fuchsia-code-coverage": { + "additional_compile_targets": [ + "chrome_pkg" + ], "gtest_tests": [ { "args": [ @@ -22408,7 +22411,8 @@ }, "swarming": { "can_use_on_swarming_builders": true, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 5 }, "test": "base_unittests", "test_id_prefix": "ninja://base:base_unittests/" @@ -22462,7 +22466,8 @@ }, "swarming": { "can_use_on_swarming_builders": true, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 5 }, "test": "blink_platform_unittests", "test_id_prefix": "ninja://third_party/blink/renderer/platform:blink_platform_unittests/" @@ -22481,7 +22486,8 @@ }, "swarming": { "can_use_on_swarming_builders": true, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 30 }, "test": "blink_unittests", "test_id_prefix": "ninja://third_party/blink/renderer/controller:blink_unittests/" @@ -22608,7 +22614,7 @@ "swarming": { "can_use_on_swarming_builders": true, "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", - "shards": 2 + "shards": 4 }, "test": "cc_unittests", "test_id_prefix": "ninja://cc:cc_unittests/" @@ -22862,7 +22868,8 @@ }, "swarming": { "can_use_on_swarming_builders": true, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 2 }, "test": "gfx_unittests", "test_id_prefix": "ninja://ui/gfx:gfx_unittests/" @@ -22916,7 +22923,8 @@ }, "swarming": { "can_use_on_swarming_builders": true, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 5 }, "test": "gpu_unittests", "test_id_prefix": "ninja://gpu:gpu_unittests/" @@ -22953,7 +22961,8 @@ }, "swarming": { "can_use_on_swarming_builders": true, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 6 }, "test": "headless_browsertests", "test_id_prefix": "ninja://headless:headless_browsertests/" @@ -23062,7 +23071,8 @@ }, "swarming": { "can_use_on_swarming_builders": true, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 3 }, "test": "media_unittests", "test_id_prefix": "ninja://media:media_unittests/" @@ -23116,7 +23126,8 @@ }, "swarming": { "can_use_on_swarming_builders": true, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 2 }, "test": "mojo_unittests", "test_id_prefix": "ninja://mojo:mojo_unittests/" @@ -23154,7 +23165,7 @@ "swarming": { "can_use_on_swarming_builders": true, "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", - "shards": 4 + "shards": 14 }, "test": "net_unittests", "test_id_prefix": "ninja://net:net_unittests/" @@ -23468,7 +23479,8 @@ }, "swarming": { "can_use_on_swarming_builders": true, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 28 }, "test": "web_engine_browsertests", "test_id_prefix": "ninja://fuchsia/engine:web_engine_browsertests/" @@ -23487,7 +23499,8 @@ }, "swarming": { "can_use_on_swarming_builders": true, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 6 }, "test": "web_engine_integration_tests", "test_id_prefix": "ninja://fuchsia/engine:web_engine_integration_tests/" @@ -23882,6 +23895,9 @@ "test_id_prefix": "ninja://fuchsia/runners:cast_runner_unittests/" }, { + "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/fuchsia.debug.cc_unittests.filter" + ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -23921,6 +23937,9 @@ "test_id_prefix": "ninja://ui/color:color_unittests/" }, { + "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/fuchsia.debug.compositor_unittests.filter" + ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -24367,6 +24386,9 @@ "test_id_prefix": "ninja://ui/latency:latency_unittests/" }, { + "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/fuchsia.debug.media_unittests.filter" + ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -24624,6 +24646,9 @@ "test_id_prefix": "ninja://skia:skia_unittests/" }, { + "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/fuchsia.debug.snapshot_unittests.filter" + ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -26957,25 +26982,6 @@ ], "gtest_tests": [ { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "arm64", - "inside_docker": "1", - "os": "Ubuntu-20.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "components_browsertests", - "test_id_prefix": "ninja://components:components_browsertests/" - }, - { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/fuchsia.components_unittests.filter" ], @@ -26996,25 +27002,6 @@ }, "test": "components_unittests", "test_id_prefix": "ninja://components:components_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "arm64", - "inside_docker": "1", - "os": "Ubuntu-20.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "content_browsertests", - "test_id_prefix": "ninja://content/test:content_browsertests/" } ] }, @@ -28501,27 +28488,6 @@ "gtest_tests": [ { "args": [ - "--device=fvdl" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "kvm": "1", - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "components_browsertests", - "test_id_prefix": "ninja://components:components_browsertests/" - }, - { - "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/fuchsia.components_unittests.filter", "--device=fvdl" ], @@ -28541,27 +28507,6 @@ }, "test": "components_unittests", "test_id_prefix": "ninja://components:components_unittests/" - }, - { - "args": [ - "--device=fvdl" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "kvm": "1", - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "content_browsertests", - "test_id_prefix": "ninja://content/test:content_browsertests/" } ], "isolated_scripts": [
diff --git a/testing/buildbot/chromium.gpu.fyi.json b/testing/buildbot/chromium.gpu.fyi.json index 66f2b50..fe23143 100644 --- a/testing/buildbot/chromium.gpu.fyi.json +++ b/testing/buildbot/chromium.gpu.fyi.json
@@ -14186,8 +14186,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", @@ -14212,8 +14212,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -14240,8 +14240,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", @@ -14267,8 +14267,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -14291,8 +14291,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -14315,8 +14315,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -14336,8 +14336,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -14361,8 +14361,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -14382,8 +14382,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -14420,8 +14420,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -14456,8 +14456,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -14492,8 +14492,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -14528,8 +14528,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -14548,7 +14548,7 @@ "--expected-vendor-id", "8086", "--expected-device-id", - "0a2e" + "3e9b" ], "isolate_name": "telemetry_gpu_integration_test", "merge": { @@ -14568,8 +14568,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -14613,8 +14613,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -14658,8 +14658,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -14695,8 +14695,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -14731,8 +14731,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -14768,8 +14768,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -14805,8 +14805,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "expiration": 21600, @@ -16332,8 +16332,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" }, { "cpu": "x86-64", @@ -16366,8 +16366,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" }, { "cpu": "x86-64", @@ -16403,8 +16403,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" }, { "cpu": "x86-64", @@ -16438,8 +16438,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" }, { "cpu": "x86-64", @@ -16473,8 +16473,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" }, { "cpu": "x86-64", @@ -16505,8 +16505,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" }, { "cpu": "x86-64", @@ -16537,8 +16537,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" }, { "cpu": "x86-64", @@ -16566,8 +16566,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" }, { "cpu": "x86-64", @@ -16599,8 +16599,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" }, { "cpu": "x86-64", @@ -16628,8 +16628,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" }, { "cpu": "x86-64", @@ -16675,8 +16675,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" }, { "cpu": "x86-64", @@ -16720,8 +16720,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" }, { "cpu": "x86-64", @@ -16764,8 +16764,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" }, { "cpu": "x86-64", @@ -16808,8 +16808,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" }, { "cpu": "x86-64", @@ -16852,8 +16852,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" }, { "cpu": "x86-64", @@ -16896,8 +16896,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" }, { "cpu": "x86-64", @@ -16940,8 +16940,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" }, { "cpu": "x86-64", @@ -16993,8 +16993,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" }, { "cpu": "x86-64", @@ -17046,8 +17046,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" }, { "cpu": "x86-64", @@ -17091,8 +17091,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" }, { "cpu": "x86-64", @@ -17135,8 +17135,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" }, { "cpu": "x86-64", @@ -17179,8 +17179,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" }, { "cpu": "x86-64", @@ -17232,8 +17232,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" }, { "cpu": "x86-64", @@ -17285,8 +17285,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" }, { "cpu": "x86-64", @@ -17329,8 +17329,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" }, { "cpu": "x86-64", @@ -17373,8 +17373,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" }, { "cpu": "x86-64", @@ -17426,8 +17426,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" }, { "cpu": "x86-64", @@ -17479,8 +17479,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" }, { "cpu": "x86-64", @@ -17524,8 +17524,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" }, { "cpu": "x86-64", @@ -17569,8 +17569,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" }, { "cpu": "x86-64", @@ -17613,8 +17613,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" }, { "cpu": "x86-64", @@ -17659,8 +17659,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" }, { "cpu": "x86-64", @@ -17707,8 +17707,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" }, { "cpu": "x86-64", @@ -17753,8 +17753,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" }, { "cpu": "x86-64", @@ -17799,8 +17799,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" }, { "cpu": "x86-64", @@ -17845,8 +17845,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" }, { "cpu": "x86-64", @@ -17891,8 +17891,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" }, { "cpu": "x86-64", @@ -19294,8 +19294,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", @@ -19320,8 +19320,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -19349,8 +19349,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -19376,8 +19376,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", @@ -19403,8 +19403,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -19427,8 +19427,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -19451,8 +19451,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -19472,8 +19472,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -19497,8 +19497,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -19518,8 +19518,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -19556,8 +19556,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -19592,8 +19592,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -19628,8 +19628,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -19664,8 +19664,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -19700,8 +19700,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -19736,8 +19736,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -19772,8 +19772,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -19817,8 +19817,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -19862,8 +19862,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -19899,8 +19899,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -19935,8 +19935,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -19971,8 +19971,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -19991,7 +19991,7 @@ "--expected-vendor-id", "8086", "--expected-device-id", - "0a2e" + "3e9b" ], "isolate_name": "telemetry_gpu_integration_test", "merge": { @@ -20011,8 +20011,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -20056,8 +20056,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -20101,8 +20101,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -20137,8 +20137,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -20173,8 +20173,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -20218,8 +20218,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -20263,8 +20263,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -20290,8 +20290,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -20326,8 +20326,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -20363,8 +20363,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -20399,8 +20399,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -20437,8 +20437,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -20476,8 +20476,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -20514,8 +20514,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -20552,8 +20552,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -20590,8 +20590,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -20627,8 +20627,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -28526,8 +28526,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", @@ -28552,8 +28552,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -28573,8 +28573,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -28598,8 +28598,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -28619,8 +28619,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -28657,8 +28657,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -28693,8 +28693,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -28729,8 +28729,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -28765,8 +28765,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -28785,7 +28785,7 @@ "--expected-vendor-id", "8086", "--expected-device-id", - "0a2e" + "3e9b" ], "isolate_name": "telemetry_gpu_integration_test", "merge": { @@ -28805,8 +28805,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -28850,8 +28850,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -28886,8 +28886,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -28922,8 +28922,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -28967,8 +28967,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -29004,8 +29004,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -29040,8 +29040,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -29072,8 +29072,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -29110,8 +29110,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -29148,8 +29148,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -29186,8 +29186,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -29224,8 +29224,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false,
diff --git a/testing/buildbot/chromium.gpu.json b/testing/buildbot/chromium.gpu.json index 6070d74..11d88eba 100644 --- a/testing/buildbot/chromium.gpu.json +++ b/testing/buildbot/chromium.gpu.json
@@ -1502,8 +1502,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -1530,8 +1530,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", @@ -1557,8 +1557,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -1581,8 +1581,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -1619,8 +1619,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -1655,8 +1655,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -1691,8 +1691,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -1727,8 +1727,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -1747,7 +1747,7 @@ "--expected-vendor-id", "8086", "--expected-device-id", - "0a2e" + "3e9b" ], "isolate_name": "telemetry_gpu_integration_test", "merge": { @@ -1767,8 +1767,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -1812,8 +1812,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -1857,8 +1857,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -1894,8 +1894,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -1930,8 +1930,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -1967,8 +1967,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -1996,8 +1996,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -2025,8 +2025,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -2052,8 +2052,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", @@ -2079,8 +2079,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -2103,8 +2103,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -2141,8 +2141,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -2177,8 +2177,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -2213,8 +2213,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -2249,8 +2249,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -2269,7 +2269,7 @@ "--expected-vendor-id", "8086", "--expected-device-id", - "0a2e" + "3e9b" ], "isolate_name": "telemetry_gpu_integration_test", "merge": { @@ -2289,8 +2289,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -2334,8 +2334,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -2379,8 +2379,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -2406,8 +2406,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -2442,8 +2442,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -2478,8 +2478,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -2515,8 +2515,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false,
diff --git a/testing/buildbot/client.v8.fyi.json b/testing/buildbot/client.v8.fyi.json index 3b6c7e2..164572a3 100644 --- a/testing/buildbot/client.v8.fyi.json +++ b/testing/buildbot/client.v8.fyi.json
@@ -1219,8 +1219,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -1254,8 +1254,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -1289,8 +1289,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -1324,8 +1324,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -1368,8 +1368,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -1412,8 +1412,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -1448,8 +1448,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -1483,8 +1483,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -1520,8 +1520,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false, @@ -1557,8 +1557,8 @@ { "cpu": "x86-64", "display_attached": "1", - "gpu": "8086:0a2e", - "os": "Mac-10.15.7" + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" } ], "idempotent": false,
diff --git a/testing/buildbot/gn_isolate_map.pyl b/testing/buildbot/gn_isolate_map.pyl index 7cdb0cfb..44b7a50 100644 --- a/testing/buildbot/gn_isolate_map.pyl +++ b/testing/buildbot/gn_isolate_map.pyl
@@ -473,6 +473,10 @@ "label": "//:chrome_official_builder_no_unittests", "type": "additional_compile_target", }, + "chrome_pkg": { + "label": "//chrome/app:chrome_pkg", + "type": "additional_compile_target", + }, "chrome_public_apk": { "label": "//chrome/android:chrome_public_apk", "type": "additional_compile_target",
diff --git a/testing/buildbot/mixins.pyl b/testing/buildbot/mixins.pyl index 6db85efc..86e606b 100644 --- a/testing/buildbot/mixins.pyl +++ b/testing/buildbot/mixins.pyl
@@ -761,8 +761,8 @@ 'swarming': { 'dimensions': { 'cpu': 'x86-64', - 'gpu': '8086:0a2e', - 'os': 'Mac-10.15.7', + 'gpu': '8086:3e9b', + 'os': 'Mac-11.5.2', 'display_attached': '1', }, }, @@ -771,8 +771,8 @@ 'swarming': { 'dimensions': { 'cpu': 'x86-64', - 'gpu': '8086:0a2e', - 'os': 'Mac-10.15.7', + 'gpu': '8086:3e9b', + 'os': 'Mac-11.5.2', 'display_attached': '1', }, }, @@ -785,23 +785,13 @@ 'dimension_sets': [ { 'cpu': 'x86-64', - 'gpu': '8086:0a2e', - 'os': 'Mac-10.15.7', + 'gpu': '8086:3e9b', + 'os': 'Mac-11.5.2', 'display_attached': '1', }, ], }, }, - 'mac_mini_intel_uhd_630_gpu_stable': { - 'swarming': { - 'dimensions': { - 'cpu': 'x86-64', - 'gpu': '8086:3e9b', - 'os': 'Mac-11.5.2', - 'display_attached': '1', - }, - }, - }, 'mac_pro_amd_gpu': { 'swarming': { 'dimensions': {
diff --git a/testing/buildbot/test_suite_exceptions.pyl b/testing/buildbot/test_suite_exceptions.pyl index 83a6f8d..59593eae 100644 --- a/testing/buildbot/test_suite_exceptions.pyl +++ b/testing/buildbot/test_suite_exceptions.pyl
@@ -174,10 +174,6 @@ '--test-launcher-filter-file=../../testing/buildbot/filters/android.emulator_11.base_unittests.filter', ], }, - }, - }, - 'base_unittests_fuchsia': { - 'modifications': { 'fuchsia-code-coverage': { 'swarming': { 'shards': 5, @@ -204,10 +200,6 @@ ], }, }, - }, - }, - 'blink_platform_unittests_fuchsia': { - 'modifications': { 'fuchsia-code-coverage': { 'swarming': { 'shards': 5, @@ -215,7 +207,7 @@ }, }, }, - 'blink_unittests_fuchsia': { + 'blink_unittests': { 'modifications': { 'fuchsia-code-coverage': { 'swarming': { @@ -784,10 +776,6 @@ '--test-launcher-filter-file=../../testing/buildbot/filters/android.emulator.cc_unittests.filter', ], }, - }, - }, - 'cc_unittests_fuchsia': { - 'modifications': { 'fuchsia-code-coverage': { 'swarming': { 'shards': 4, @@ -1074,6 +1062,10 @@ ], }, 'components_browsertests': { + 'remove_from': [ + 'fuchsia-fyi-arm64-rel', # https://crbug.com/961457 + 'fuchsia-fyi-x64-rel', # https://crbug.com/961457 + ], 'modifications': { 'android-11-x86-rel': { 'swarming': { @@ -1082,12 +1074,6 @@ }, }, }, - 'components_browsertests_fuchsia': { - 'remove_from': [ - 'fuchsia-fyi-arm64-rel', # https://crbug.com/961457 - 'fuchsia-fyi-x64-rel', # https://crbug.com/961457 - ], - }, 'components_unittests': { 'remove_from': [ # https://crbug.com/1147531 - covered on lollipop @@ -1143,7 +1129,7 @@ }, }, }, - 'compositor_unittests_fuchsia': { + 'compositor_unittests': { 'modifications': { 'fuchsia-fyi-arm64-dbg': { 'args': [ @@ -1157,6 +1143,8 @@ 'CrWinAsan(dll)', # https://crbug.com/935598 'android-lollipop-arm-rel', # crbug.com/1133002 'android-marshmallow-arm64-rel', # http://crbug.com/1060245#c30: due to low utility and capacity. + 'fuchsia-fyi-arm64-rel', # https://crbug.com/1164534 + 'fuchsia-fyi-x64-rel', # https://crbug.com/1164534 ], 'modifications': { 'Cast Audio Linux': { @@ -1335,12 +1323,6 @@ }, }, }, - 'content_browsertests_fuchsia': { - 'remove_from': [ - 'fuchsia-fyi-arm64-rel', # https://crbug.com/1164534 - 'fuchsia-fyi-x64-rel', # https://crbug.com/1164534 - ], - }, 'content_browsertests_wayland': { 'modifications': { 'Linux Ozone Tester (Wayland)': { @@ -1410,15 +1392,6 @@ }, }, }, - 'content_unittests_fuchsia': { - 'modifications': { - 'fuchsia-code-coverage': { - 'swarming': { - 'shards': 12, - }, - }, - }, - }, 'context_lost_passthrough_tests': { 'modifications': { 'Mac FYI GPU ASAN Release': { @@ -1539,7 +1512,7 @@ }, }, }, - 'gfx_unittests_fuchsia': { + 'gfx_unittests': { 'modifications': { 'fuchsia-code-coverage': { 'swarming': { @@ -1708,7 +1681,7 @@ 'Android FYI Release (Pixel 2)', ], }, - 'gpu_unittests_fuchsia': { + 'gpu_unittests': { 'modifications': { 'fuchsia-code-coverage': { 'swarming': { @@ -1737,8 +1710,6 @@ 'remove_from': [ 'CrWinAsan(dll)', # https://crbug.com/935598 ], - }, - 'headless_browsertests_fuchsia': { 'modifications': { 'fuchsia-code-coverage': { 'swarming': { @@ -2004,10 +1975,6 @@ '--test-launcher-filter-file=../../testing/buildbot/filters/android.emulator_p.media_unittests.filter', ], }, - }, - }, - 'media_unittests_fuchsia': { - 'modifications': { 'fuchsia-code-coverage': { 'swarming': { 'shards': 3, @@ -2039,10 +2006,6 @@ 'shards': 5, }, }, - }, - }, - 'mojo_unittests_fuchsia': { - 'modifications': { 'fuchsia-code-coverage': { 'swarming': { 'shards': 2, @@ -2252,6 +2215,11 @@ '--test-launcher-filter-file=../../testing/buildbot/filters/android.emulator.net_unittests.filter', ], }, + 'fuchsia-code-coverage': { + 'swarming': { + 'shards': 14, + }, + }, 'linux-blink-heap-concurrent-marking-tsan-rel': { 'swarming': { 'shards': 4, @@ -2270,15 +2238,6 @@ }, }, }, - 'net_unittests_fuchsia': { - 'modifications': { - 'fuchsia-code-coverage': { - 'swarming': { - 'shards': 14, - }, - }, - }, - }, 'not_site_per_process_blink_web_tests': { 'remove_from': [ # TODO(dpranke): Should we be running this step on Linux Tests (dbg)(1)? @@ -2624,15 +2583,6 @@ }, } }, - 'services_unittests_fuchsia': { - 'modifications': { - 'fuchsia-code-coverage': { - 'swarming': { - 'shards': 7, - }, - }, - } - }, # TODO(crbug.com/1202958): Remove these when SkiaRenderer is fully shipped # on Chrome OS. 'skia_renderer_telemetry_perf_unittests': { @@ -2677,7 +2627,7 @@ }, }, }, - 'snapshot_unittests_fuchsia': { + 'snapshot_unittests': { 'modifications': { 'fuchsia-fyi-arm64-dbg': { 'args': [ @@ -3052,15 +3002,6 @@ }, }, }, - 'views_unittests_fuchsia': { - 'modifications': { - 'fuchsia-fyi-arm64-dbg': { - 'args': [ - '--test-launcher-filter-file=../../testing/buildbot/filters/fuchsia.debug.views_unittests.filter', - ], - }, - }, - }, 'views_unittests_wayland': { 'modifications': { # CQ tester. @@ -3101,15 +3042,6 @@ }, }, }, - 'viz_unittests_fuchsia': { - 'modifications': { - 'fuchsia-fyi-arm64-dbg': { - 'args': [ - '--test-launcher-filter-file=../../testing/buildbot/filters/fuchsia.debug.viz_unittests.filter', - ], - }, - }, - }, 'vr_android_unittests': { 'remove_from': [ 'android-lollipop-arm-rel', @@ -3131,7 +3063,7 @@ 'linux-chromeos-dbg', # https://crbug.com/859307 ], }, - 'web_engine_browsertests_fuchsia': { + 'web_engine_browsertests': { 'modifications': { 'fuchsia-code-coverage': { 'swarming': { @@ -3140,7 +3072,7 @@ }, }, }, - 'web_engine_integration_tests_fuchsia': { + 'web_engine_integration_tests': { 'modifications': { 'fuchsia-code-coverage': { 'swarming': {
diff --git a/testing/buildbot/test_suites.pyl b/testing/buildbot/test_suites.pyl index bc5612c..d286a9e 100644 --- a/testing/buildbot/test_suites.pyl +++ b/testing/buildbot/test_suites.pyl
@@ -3947,9 +3947,7 @@ ], 'win64_args': [ '--target=Release_x64' ], 'mac_args': [ - # These tests run on 10.14, but web_tests [ Mac ] expectations don't - # work correctly yet under 10.14. Pretend it's 10.13. - '--platform=mac-mac10.13' + '--platform=mac-mac11.5' ], 'linux_args': [ '--no-xvfb', @@ -3982,9 +3980,7 @@ ], 'win64_args': [ '--target=Release_x64' ], 'mac_args': [ - # These tests run on 10.14, but web_tests [ Mac ] expectations don't - # work correctly yet under 10.14. Pretend it's 10.13. - '--platform=mac-mac10.13' + '--platform=mac-mac11.5' ], 'linux_args': [ '--no-xvfb', @@ -4021,9 +4017,7 @@ ], 'win64_args': [ '--target=Release_x64' ], 'mac_args': [ - # These tests run on 10.14, but web_tests [ Mac ] expectations don't - # work correctly yet under 10.14. Pretend it's 10.13. - '--platform=mac-mac10.13' + '--platform=mac-mac11.5' ], 'linux_args': [ '--no-xvfb',
diff --git a/testing/buildbot/waterfalls.pyl b/testing/buildbot/waterfalls.pyl index aed5095e..2955479 100644 --- a/testing/buildbot/waterfalls.pyl +++ b/testing/buildbot/waterfalls.pyl
@@ -2113,7 +2113,7 @@ 'browser_config': 'release', 'mixins': [ 'limited_capacity_bot', - 'mac_mini_intel_uhd_630_gpu_stable', + 'mac_mini_intel_gpu_stable', ], 'test_suites': { 'gtest_tests': 'gpu_dawn_integration_gtests_validating', @@ -2818,6 +2818,9 @@ }, }, 'fuchsia-code-coverage': { + 'additional_compile_targets': [ + 'chrome_pkg', + ], 'test_suites': { 'gtest_tests': 'fuchsia_gtests', 'isolated_scripts': 'gpu_angle_fuchsia_unittests_isolated_scripts', @@ -4407,7 +4410,7 @@ 'os_type': 'mac', 'browser_config': 'release', 'mixins': [ - 'mac_mini_intel_uhd_630_gpu_stable', + 'mac_mini_intel_gpu_stable', ], 'test_suites': { 'gtest_tests': 'gpu_fyi_mac_release_gtests',
diff --git a/third_party/blink/public/mojom/frame/frame.mojom b/third_party/blink/public/mojom/frame/frame.mojom index 1ba26fe..e78b90a 100644 --- a/third_party/blink/public/mojom/frame/frame.mojom +++ b/third_party/blink/public/mojom/frame/frame.mojom
@@ -710,10 +710,6 @@ // container policy. DidUpdateFramePolicy(blink.mojom.FramePolicy frame_policy); - // Called when the device's screen information changes. - // TODO(crbug.com/1205676): Remove deprecated window.screenschange plumbing. - OnScreensChange(); - // Posts a message from a frame in another process to the current renderer. // |source_frame_token| is the frame token of the RemoteFrame in the current // renderer representing the frame (from a different renderer) where this
diff --git a/third_party/blink/renderer/core/frame/local_frame.h b/third_party/blink/renderer/core/frame/local_frame.h index e2f6c5f..ff9d0d8b 100644 --- a/third_party/blink/renderer/core/frame/local_frame.h +++ b/third_party/blink/renderer/core/frame/local_frame.h
@@ -664,6 +664,11 @@ // Return true if the frame has a transient affordance to enter fullscreen. bool IsTransientAllowFullscreenActive() const; + // Activate the transient affordance to enter fullscreen. + void ActivateTransientAllowFullscreen() { + transient_allow_fullscreen_.Activate(); + } + // Returns the state of the |PaymentRequestToken| in the current |Frame|. bool IsPaymentRequestTokenActive() const;
diff --git a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc b/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc index b960c8b..786baec0 100644 --- a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc +++ b/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc
@@ -784,13 +784,6 @@ To<RemoteFrameOwner>(frame_->Owner())->SetFramePolicy(frame_policy); } -void LocalFrameMojoHandler::OnScreensChange() { - if (RuntimeEnabledFeatures::WindowPlacementEnabled(DomWindow())) { - // Allow fullscreen requests shortly after user-generated screens changes. - frame_->transient_allow_fullscreen_.Activate(); - } -} - void LocalFrameMojoHandler::OnPostureChanged( device::mojom::blink::DevicePostureType posture) { if (!RuntimeEnabledFeatures::DevicePostureEnabled())
diff --git a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.h b/third_party/blink/renderer/core/frame/local_frame_mojo_handler.h index 404c3ae..d89af36b 100644 --- a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.h +++ b/third_party/blink/renderer/core/frame/local_frame_mojo_handler.h
@@ -134,7 +134,6 @@ // frame's sandbox flags or container policy. The new policy won't take effect // until the next navigation. void DidUpdateFramePolicy(const FramePolicy& frame_policy) final; - void OnScreensChange() final; void PostMessageEvent( const absl::optional<RemoteFrameToken>& source_frame_token, const String& source_origin,
diff --git a/third_party/blink/renderer/modules/accessibility/ax_layout_object.cc b/third_party/blink/renderer/modules/accessibility/ax_layout_object.cc index 6e93a4c..49cc989 100644 --- a/third_party/blink/renderer/modules/accessibility/ax_layout_object.cc +++ b/third_party/blink/renderer/modules/accessibility/ax_layout_object.cc
@@ -533,8 +533,9 @@ // be inconsistent with the list marker. const AXObject* list_marker_object = ContainerListMarkerIncludingIgnored(); - if (list_marker_object->GetLayoutObject()->IsListMarkerForSummary() || - !list_marker_object->AccessibilityIsIgnored()) { + if (list_marker_object && + (list_marker_object->GetLayoutObject()->IsListMarkerForSummary() || + !list_marker_object->AccessibilityIsIgnored())) { if (ignored_reasons) ignored_reasons->push_back(IgnoredReason(kAXPresentational)); return true;
diff --git a/third_party/blink/renderer/modules/accessibility/ax_list_box.cc b/third_party/blink/renderer/modules/accessibility/ax_list_box.cc index 663d25f..5dc3141a 100644 --- a/third_party/blink/renderer/modules/accessibility/ax_list_box.cc +++ b/third_party/blink/renderer/modules/accessibility/ax_list_box.cc
@@ -52,13 +52,11 @@ if (!select) return nullptr; - int active_index = select->ActiveSelectionEndListIndex(); - if (active_index >= 0 && active_index < static_cast<int>(select->length())) { - HTMLOptionElement* option = select->item(active_index_); - return AXObjectCache().Get(option); - } - - return nullptr; + // This is more direct than getting the item via select->item(active_index_). + // It's also more accurate, because active_index includes optgroup lines, + // whereas select->item() assumes an index that does not include them. + HTMLOptionElement* option = select->ActiveSelectionEnd(); + return AXObjectCache().GetOrCreate(option); } void AXListBox::ActiveIndexChanged() {
diff --git a/third_party/blink/renderer/modules/accessibility/ax_menu_list_popup.cc b/third_party/blink/renderer/modules/accessibility/ax_menu_list_popup.cc index 3918a43..fcba03051 100644 --- a/third_party/blink/renderer/modules/accessibility/ax_menu_list_popup.cc +++ b/third_party/blink/renderer/modules/accessibility/ax_menu_list_popup.cc
@@ -201,6 +201,7 @@ return nullptr; HTMLOptionElement* option = select->item(active_index_); + DCHECK(option); return AXObjectCache().Get(option); }
diff --git a/third_party/blink/renderer/modules/background_fetch/background_fetch_registration.cc b/third_party/blink/renderer/modules/background_fetch/background_fetch_registration.cc index 7f04b14c..0d7106d 100644 --- a/third_party/blink/renderer/modules/background_fetch/background_fetch_registration.cc +++ b/third_party/blink/renderer/modules/background_fetch/background_fetch_registration.cc
@@ -73,11 +73,6 @@ result_ = result; failure_reason_ = failure_reason; - ExecutionContext* context = GetExecutionContext(); - if (!context || context->IsContextDestroyed()) - return; - - DCHECK(context->IsContextThread()); DispatchEvent(*Event::Create(event_type_names::kProgress)); }
diff --git a/third_party/blink/renderer/modules/screen_enumeration/screens.cc b/third_party/blink/renderer/modules/screen_enumeration/screens.cc index ed545c1..3da9ae2 100644 --- a/third_party/blink/renderer/modules/screen_enumeration/screens.cc +++ b/third_party/blink/renderer/modules/screen_enumeration/screens.cc
@@ -109,6 +109,11 @@ // (4) Send a change event if the set of screens has changed. if (added_or_removed) { + // Allow fullscreen requests shortly after user-generated screens changes. + // TODO(enne): consider doing this only when screens have been added. + LocalFrame* frame = window->GetFrame(); + frame->ActivateTransientAllowFullscreen(); + DispatchEvent(*Event::Create(event_type_names::kScreenschange)); }
diff --git a/third_party/blink/web_tests/TestExpectations b/third_party/blink/web_tests/TestExpectations index 3a35ef16..3709b6e 100644 --- a/third_party/blink/web_tests/TestExpectations +++ b/third_party/blink/web_tests/TestExpectations
@@ -2848,7 +2848,6 @@ crbug.com/626703 [ Mac11.0 ] wpt_internal/webcodecs/basic_video_encoding.https.any.html [ Timeout ] crbug.com/626703 [ Linux ] external/wpt/cookies/attributes/domain.sub.html [ Failure ] crbug.com/626703 [ Win ] external/wpt/cookies/attributes/domain.sub.html [ Failure ] -crbug.com/626703 [ Mac ] external/wpt/css/mediaqueries/test_media_queries.html [ Failure ] crbug.com/626703 external/wpt/workers/interfaces/WorkerUtils/importScripts/blob-url.worker.html [ Failure ] crbug.com/626703 [ Linux ] external/wpt/input-events/input-events-get-target-ranges.html [ Failure Timeout ] crbug.com/626703 [ Linux ] external/wpt/input-events/input-events-get-target-ranges-non-collapsed-selection.tentative.html?TypingA [ Skip Timeout ] @@ -7006,9 +7005,6 @@ crbug.com/1249176 [ Mac11-arm64 ] external/wpt/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/location-setter-user-click.html [ Failure Timeout ] -# Sheriff 2021-09-15 -crbug.com/1250066 [ Win ] external/wpt/css/mediaqueries/test_media_queries.html [ Failure ] - # Sheriff 2021-09-16 crbug.com/1250457 [ Win7 ] http/tests/devtools/sources/debugger-ui/script-formatter-breakpoints-3.js [ Failure ] crbug.com/1250457 [ Mac ] virtual/scroll-unification/plugins/plugin-map-data-to-src.html [ Failure ] @@ -7055,11 +7051,20 @@ crbug.com/1250457 [ Mac ] external/wpt/html/syntax/speculative-parsing/generated/document-write/meta-viewport-link-stylesheet-media.tentative.sub.html [ Failure ] # FileSystemHandle::move() is temporarily disabled outside of the Origin Private File System -crbug.com/1247850 external/wpt/file-system-access/local_FileSystemBaseHandle-move-manual.https.html [ Failure ] -crbug.com/1247850 external/wpt/file-system-access/local_FileSystemBaseHandle-rename-manual.https.html [ Failure ] -crbug.com/1247850 virtual/file-system-access-access-handle-incognito/external/wpt/file-system-access/local_FileSystemBaseHandle-move-manual.https.html [ Failure ] -crbug.com/1247850 virtual/file-system-access-access-handle-incognito/external/wpt/file-system-access/local_FileSystemBaseHandle-rename-manual.https.html [ Failure ] -crbug.com/1247850 [ Mac11-arm64 ] external/wpt/file-system-access/sandboxed_FileSystemBaseHandle-move.https.any.worker.html [ Failure ] -crbug.com/1247850 [ Mac11-arm64 ] external/wpt/file-system-access/sandboxed_FileSystemBaseHandle-rename.https.any.html [ Failure ] -crbug.com/1247850 [ Mac11-arm64 ] external/wpt/file-system-access/sandboxed_FileSystemBaseHandle-rename.https.any.worker.html [ Failure ] -crbug.com/1247850 [ Mac11-arm64 ] external/wpt/file-system-access/sandboxed_FileSystemBaseHandle-move.https.any.html [ Failure ] +crbug.com/1247850 external/wpt/file-system-access/local_FileSystemFileHandle-move-manual.https.html [ Failure ] +crbug.com/1247850 external/wpt/file-system-access/local_FileSystemFileHandle-rename-manual.https.html [ Failure ] +crbug.com/1247850 virtual/file-system-access-access-handle-incognito/external/wpt/file-system-access/local_FileSystemFileHandle-move-manual.https.html [ Failure ] +crbug.com/1247850 virtual/file-system-access-access-handle-incognito/external/wpt/file-system-access/local_FileSystemFileHandle-rename-manual.https.html [ Failure ] +# FileSystemHandle::move() is temporarily disabled for directory handles +crbug.com/1250534 external/wpt/file-system-access/local_FileSystemDirectoryHandle-move-manual.https.html [ Failure ] +crbug.com/1250534 external/wpt/file-system-access/local_FileSystemDirectoryHandle-rename-manual.https.html [ Failure ] +crbug.com/1250534 external/wpt/file-system-access/sandboxed_FileSystemDirectoryHandle-move.https.any.html [ Failure ] +crbug.com/1250534 external/wpt/file-system-access/sandboxed_FileSystemDirectoryHandle-rename.https.any.html [ Failure ] +crbug.com/1250534 external/wpt/file-system-access/sandboxed_FileSystemDirectoryHandle-move.https.any.worker.html [ Failure ] +crbug.com/1250534 external/wpt/file-system-access/sandboxed_FileSystemDirectoryHandle-rename.https.any.worker.html [ Failure ] +crbug.com/1250534 virtual/file-system-access-access-handle-incognito/external/wpt/file-system-access/local_FileSystemDirectoryHandle-move-manual.https.html [ Failure ] +crbug.com/1250534 virtual/file-system-access-access-handle-incognito/external/wpt/file-system-access/local_FileSystemDirectoryHandle-rename-manual.https.html [ Failure ] +crbug.com/1250534 virtual/file-system-access-access-handle-incognito/external/wpt/file-system-access/sandboxed_FileSystemDirectoryHandle-move.https.any.html [ Failure ] +crbug.com/1250534 virtual/file-system-access-access-handle-incognito/external/wpt/file-system-access/sandboxed_FileSystemDirectoryHandle-rename.https.any.html [ Failure ] +crbug.com/1250534 virtual/file-system-access-access-handle-incognito/external/wpt/file-system-access/sandboxed_FileSystemDirectoryHandle-move.https.any.worker.html [ Failure ] +crbug.com/1250534 virtual/file-system-access-access-handle-incognito/external/wpt/file-system-access/sandboxed_FileSystemDirectoryHandle-rename.https.any.worker.html [ Failure ]
diff --git a/third_party/blink/web_tests/VirtualTestSuites b/third_party/blink/web_tests/VirtualTestSuites index ae94daf7..edf2072a 100644 --- a/third_party/blink/web_tests/VirtualTestSuites +++ b/third_party/blink/web_tests/VirtualTestSuites
@@ -1031,7 +1031,8 @@ }, { "prefix": "force-renderer-accessibility", - "bases": ["accessibility/details-summary-crash.html", + "bases": ["accessibility/accessibility-beforematch-marker-crash.html", + "accessibility/details-summary-crash.html", "accessibility/slot-poison.html", "accessibility/virtual-node-child-removal.html", "accessibility/virtual-node-parent-removal.html",
diff --git a/third_party/blink/web_tests/accessibility/accessibility-beforematch-marker-crash.html b/third_party/blink/web_tests/accessibility/accessibility-beforematch-marker-crash.html new file mode 100644 index 0000000..d0234299 --- /dev/null +++ b/third_party/blink/web_tests/accessibility/accessibility-beforematch-marker-crash.html
@@ -0,0 +1,25 @@ +<!DOCTYPE html> +<script src="../resources/testharness.js"></script> +<script src="../resources/testharnessreport.js"></script> +<style> +.hidden-matchable { + content-visibility: hidden-matchable; +} +</style> +<li id=hiddenli class=hidden-matchable> + <a id><a><div id=hiddentext>hiddentext</div> +</li> +<script> +const testCase = async_test('Regression test for crbug.com/1250959 should not crash'); + +hiddentext.addEventListener('beforematch', testCase.step_func(() => { + setTimeout(testCase.step_func_done(() => { + hiddenli.classList.remove('hidden-matchable'); + })); +})); + +testCase.step(() => { + assert_own_property(window, 'testRunner', 'This test requires testRunner'); + testRunner.findString('hiddentext', ['Async']); +}); +</script>
diff --git a/third_party/blink/web_tests/external/wpt/bluetooth/README.md b/third_party/blink/web_tests/external/wpt/bluetooth/README.md index abe2777..8d0f063 100644 --- a/third_party/blink/web_tests/external/wpt/bluetooth/README.md +++ b/third_party/blink/web_tests/external/wpt/bluetooth/README.md
@@ -76,7 +76,7 @@ ## Chromium Implementation The Chromium implementation is provided by -`../resources/chromium/web-bluetooth-test.js`. +`../resources/chromium/web-bluetooth-test.js` using [MojoJS]. The Chromium implementation is not included in stable Chrome builds since it would add too much to the binary size. On Chromium infrastructure, it is run @@ -93,6 +93,7 @@ For more implementation details, see the [Web Bluetooth Service README]. +[MojoJS]: https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/testing/web_platform_tests.md#mojojs [Web Bluetooth Service README]: https://chromium.googlesource.com/chromium/src.git/+/master/content/browser/bluetooth/README.md
diff --git a/third_party/blink/web_tests/external/wpt/compat/css-style-declaration-alias-enumeration.html b/third_party/blink/web_tests/external/wpt/compat/css-style-declaration-alias-enumeration.html index cdd9cc8..75776e19 100644 --- a/third_party/blink/web_tests/external/wpt/compat/css-style-declaration-alias-enumeration.html +++ b/third_party/blink/web_tests/external/wpt/compat/css-style-declaration-alias-enumeration.html
@@ -2,26 +2,73 @@ <title>Aliases enumerated on CSSStyleDeclaration</title> <link rel="help" href="https://compat.spec.whatwg.org/#css-simple-aliases"> <meta name="assert" content="This test verifies that aliases are enumerated on CSSStyleDeclaration" /> - <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <body> </body> <script> +const PREFIXED_PROPS = [ + 'webkitAlignContent', + 'webkitAlignItems', + 'webkitAnimationName', + 'webkitAlignSelf', + 'webkitAnimationDuration', + 'webkitAnimationTimingFunction', + 'webkitAnimationIterationCount', + 'webkitAnimationDirection', + 'webkitAnimationPlayState', + 'webkitAnimationDelay', + 'webkitAnimationFillMode', + 'webkitAnimation', + 'webkitBackfaceVisibility', + 'webkitBackgroundOrigin', + 'webkitBackgroundSize', + 'webkitBorderBottomLeftRadius', + 'webkitBorderBottomRightRadius', + 'webkitBorderTopLeftRadius', + 'webkitBorderTopRightRadius', + 'webkitBorderRadius', + 'webkitBoxShadow', + 'webkitFlex', + 'webkitFlexBasis', + 'webkitFlexDirection', + 'webkitFlexFlow', + 'webkitFlexGrow', + 'webkitFlexShrink', + 'webkitFlexWrap', + 'webkitFilter', + 'webkitJustifyContent', + 'webkitMask', + 'webkitMaskBoxImage', + 'webkitMaskBoxImageOutset', + 'webkitMaskBoxImageRepeat', + 'webkitMaskBoxImageSlice', + 'webkitMaskBoxImageSource', + 'webkitMaskBoxImageWidth', + 'webkitMaskClip', + 'webkitMaskComposite', + 'webkitMaskImage', + 'webkitMaskOrigin', + 'webkitMaskPosition', + 'webkitMaskRepeat', + 'webkitMaskSize', + 'webkitOrder', + 'webkitPerspective', + 'webkitPerspectiveOrigin', + 'webkitTransformOrigin', + 'webkitTransformStyle', + 'webkitTransform', + 'webkitTransitionDelay', + 'webkitTransitionDuration', + 'webkitTransitionProperty', + 'webkitTransitionTimingFunction', + 'webkitTransition', +]; -// Note: This is an arbitrarily chosen simple alias from the spec. -const ALIAS_SAMPLE = 'webkitTransform'; - -function find_alias(alias) { - for (let prop in document.body.style) { - if (prop == alias) { - return true; - } - } - return false; +const docBodyStyle = document.body.style; +for (let prop of PREFIXED_PROPS) { + test(() => { + assert_true(prop in docBodyStyle); + }, `${prop} found on CSSStyleDeclaration`); } - -test(() => { - assert_true(find_alias(ALIAS_SAMPLE), `Alias ${ALIAS_SAMPLE} seen`); -}); </script>
diff --git a/third_party/blink/web_tests/platform/linux/external/wpt/css/mediaqueries/test_media_queries-expected.txt b/third_party/blink/web_tests/external/wpt/css/mediaqueries/test_media_queries-expected.txt similarity index 75% rename from third_party/blink/web_tests/platform/linux/external/wpt/css/mediaqueries/test_media_queries-expected.txt rename to third_party/blink/web_tests/external/wpt/css/mediaqueries/test_media_queries-expected.txt index 46dd7d5..eb669b4 100644 --- a/third_party/blink/web_tests/platform/linux/external/wpt/css/mediaqueries/test_media_queries-expected.txt +++ b/third_party/blink/web_tests/external/wpt/css/mediaqueries/test_media_queries-expected.txt
@@ -1,15 +1,15 @@ This is a testharness.js-based test. Found 803 tests; 586 PASS, 217 FAIL, 0 TIMEOUT, 0 NOTRUN. PASS query_should_be_parseable: (orientation) -FAIL query_should_be_parseable: not (orientation) assert_true: not (orientation) expected true got false +FAIL query_should_be_parseable: not (orientation) assert_true: expected true got false PASS query_should_not_be_parseable: only (orientation) PASS query_should_be_parseable: all and (orientation) PASS query_should_be_parseable: not all and (orientation) PASS query_should_be_parseable: only all and (orientation) PASS query_should_not_be_parseable: not not (orientation) PASS query_should_be_parseable: (orientation) and (orientation) -FAIL query_should_be_parseable: (orientation) or (orientation) assert_true: (orientation) or (orientation) expected true got false -FAIL query_should_be_parseable: (orientation) or ((orientation) and ((orientation) or (orientation) or (not (orientation)))) assert_true: (orientation) or ((orientation) and ((orientation) or (orientation) or (not (orientation)))) expected true got false +FAIL query_should_be_parseable: (orientation) or (orientation) assert_true: expected true got false +FAIL query_should_be_parseable: (orientation) or ((orientation) and ((orientation) or (orientation) or (not (orientation)))) assert_true: expected true got false PASS query_should_not_be_parseable: all and (orientation) or (orientation) PASS query_should_be_parseable: all and (orientation) and (orientation) PASS query_should_not_be_parseable: (orientation) and (orientation) or (orientation) @@ -32,14 +32,14 @@ PASS expression_should_not_be_parseable: max-width : -1px PASS expression_should_not_be_parseable: width : -0.00001mm PASS expression_should_not_be_parseable: width : -100000em -FAIL expression_should_be_parseable: width > 0 assert_true: width > 0 expected true got false -FAIL expression_should_be_parseable: width > 0px assert_true: width > 0px expected true got false -FAIL expression_should_be_parseable: width > 0em assert_true: width > 0em expected true got false -FAIL expression_should_be_parseable: width > -0 assert_true: width > -0 expected true got false -FAIL expression_should_be_parseable: width > -0cm assert_true: width > -0cm expected true got false -FAIL expression_should_be_parseable: width > 1px assert_true: width > 1px expected true got false -FAIL expression_should_be_parseable: width > 0.001mm assert_true: width > 0.001mm expected true got false -FAIL expression_should_be_parseable: width > 100000px assert_true: width > 100000px expected true got false +FAIL expression_should_be_parseable: width > 0 assert_true: expected true got false +FAIL expression_should_be_parseable: width > 0px assert_true: expected true got false +FAIL expression_should_be_parseable: width > 0em assert_true: expected true got false +FAIL expression_should_be_parseable: width > -0 assert_true: expected true got false +FAIL expression_should_be_parseable: width > -0cm assert_true: expected true got false +FAIL expression_should_be_parseable: width > 1px assert_true: expected true got false +FAIL expression_should_be_parseable: width > 0.001mm assert_true: expected true got false +FAIL expression_should_be_parseable: width > 100000px assert_true: expected true got false PASS expression_should_not_be_parseable: min-width > -0 PASS expression_should_not_be_parseable: max-width > -0 PASS expression_should_not_be_parseable: width > -1px @@ -47,14 +47,14 @@ PASS expression_should_not_be_parseable: max-width > -1px PASS expression_should_not_be_parseable: width > -0.00001mm PASS expression_should_not_be_parseable: width > -100000em -FAIL expression_should_be_parseable: width >= 0 assert_true: width >= 0 expected true got false -FAIL expression_should_be_parseable: width >= 0px assert_true: width >= 0px expected true got false -FAIL expression_should_be_parseable: width >= 0em assert_true: width >= 0em expected true got false -FAIL expression_should_be_parseable: width >= -0 assert_true: width >= -0 expected true got false -FAIL expression_should_be_parseable: width >= -0cm assert_true: width >= -0cm expected true got false -FAIL expression_should_be_parseable: width >= 1px assert_true: width >= 1px expected true got false -FAIL expression_should_be_parseable: width >= 0.001mm assert_true: width >= 0.001mm expected true got false -FAIL expression_should_be_parseable: width >= 100000px assert_true: width >= 100000px expected true got false +FAIL expression_should_be_parseable: width >= 0 assert_true: expected true got false +FAIL expression_should_be_parseable: width >= 0px assert_true: expected true got false +FAIL expression_should_be_parseable: width >= 0em assert_true: expected true got false +FAIL expression_should_be_parseable: width >= -0 assert_true: expected true got false +FAIL expression_should_be_parseable: width >= -0cm assert_true: expected true got false +FAIL expression_should_be_parseable: width >= 1px assert_true: expected true got false +FAIL expression_should_be_parseable: width >= 0.001mm assert_true: expected true got false +FAIL expression_should_be_parseable: width >= 100000px assert_true: expected true got false PASS expression_should_not_be_parseable: min-width >= -0 PASS expression_should_not_be_parseable: max-width >= -0 PASS expression_should_not_be_parseable: width > = 0px @@ -63,14 +63,14 @@ PASS expression_should_not_be_parseable: max-width >= -1px PASS expression_should_not_be_parseable: width >= -0.00001mm PASS expression_should_not_be_parseable: width >= -100000em -FAIL expression_should_be_parseable: width = 0 assert_true: width = 0 expected true got false -FAIL expression_should_be_parseable: width = 0px assert_true: width = 0px expected true got false -FAIL expression_should_be_parseable: width = 0em assert_true: width = 0em expected true got false -FAIL expression_should_be_parseable: width = -0 assert_true: width = -0 expected true got false -FAIL expression_should_be_parseable: width = -0cm assert_true: width = -0cm expected true got false -FAIL expression_should_be_parseable: width = 1px assert_true: width = 1px expected true got false -FAIL expression_should_be_parseable: width = 0.001mm assert_true: width = 0.001mm expected true got false -FAIL expression_should_be_parseable: width = 100000px assert_true: width = 100000px expected true got false +FAIL expression_should_be_parseable: width = 0 assert_true: expected true got false +FAIL expression_should_be_parseable: width = 0px assert_true: expected true got false +FAIL expression_should_be_parseable: width = 0em assert_true: expected true got false +FAIL expression_should_be_parseable: width = -0 assert_true: expected true got false +FAIL expression_should_be_parseable: width = -0cm assert_true: expected true got false +FAIL expression_should_be_parseable: width = 1px assert_true: expected true got false +FAIL expression_should_be_parseable: width = 0.001mm assert_true: expected true got false +FAIL expression_should_be_parseable: width = 100000px assert_true: expected true got false PASS expression_should_not_be_parseable: min-width = -0 PASS expression_should_not_be_parseable: max-width = -0 PASS expression_should_not_be_parseable: width = -1px @@ -78,14 +78,14 @@ PASS expression_should_not_be_parseable: max-width = -1px PASS expression_should_not_be_parseable: width = -0.00001mm PASS expression_should_not_be_parseable: width = -100000em -FAIL expression_should_be_parseable: width <= 0 assert_true: width <= 0 expected true got false -FAIL expression_should_be_parseable: width <= 0px assert_true: width <= 0px expected true got false -FAIL expression_should_be_parseable: width <= 0em assert_true: width <= 0em expected true got false -FAIL expression_should_be_parseable: width <= -0 assert_true: width <= -0 expected true got false -FAIL expression_should_be_parseable: width <= -0cm assert_true: width <= -0cm expected true got false -FAIL expression_should_be_parseable: width <= 1px assert_true: width <= 1px expected true got false -FAIL expression_should_be_parseable: width <= 0.001mm assert_true: width <= 0.001mm expected true got false -FAIL expression_should_be_parseable: width <= 100000px assert_true: width <= 100000px expected true got false +FAIL expression_should_be_parseable: width <= 0 assert_true: expected true got false +FAIL expression_should_be_parseable: width <= 0px assert_true: expected true got false +FAIL expression_should_be_parseable: width <= 0em assert_true: expected true got false +FAIL expression_should_be_parseable: width <= -0 assert_true: expected true got false +FAIL expression_should_be_parseable: width <= -0cm assert_true: expected true got false +FAIL expression_should_be_parseable: width <= 1px assert_true: expected true got false +FAIL expression_should_be_parseable: width <= 0.001mm assert_true: expected true got false +FAIL expression_should_be_parseable: width <= 100000px assert_true: expected true got false PASS expression_should_not_be_parseable: min-width <= -0 PASS expression_should_not_be_parseable: max-width <= -0 PASS expression_should_not_be_parseable: width < = 0px @@ -94,14 +94,14 @@ PASS expression_should_not_be_parseable: max-width <= -1px PASS expression_should_not_be_parseable: width <= -0.00001mm PASS expression_should_not_be_parseable: width <= -100000em -FAIL expression_should_be_parseable: width < 0 assert_true: width < 0 expected true got false -FAIL expression_should_be_parseable: width < 0px assert_true: width < 0px expected true got false -FAIL expression_should_be_parseable: width < 0em assert_true: width < 0em expected true got false -FAIL expression_should_be_parseable: width < -0 assert_true: width < -0 expected true got false -FAIL expression_should_be_parseable: width < -0cm assert_true: width < -0cm expected true got false -FAIL expression_should_be_parseable: width < 1px assert_true: width < 1px expected true got false -FAIL expression_should_be_parseable: width < 0.001mm assert_true: width < 0.001mm expected true got false -FAIL expression_should_be_parseable: width < 100000px assert_true: width < 100000px expected true got false +FAIL expression_should_be_parseable: width < 0 assert_true: expected true got false +FAIL expression_should_be_parseable: width < 0px assert_true: expected true got false +FAIL expression_should_be_parseable: width < 0em assert_true: expected true got false +FAIL expression_should_be_parseable: width < -0 assert_true: expected true got false +FAIL expression_should_be_parseable: width < -0cm assert_true: expected true got false +FAIL expression_should_be_parseable: width < 1px assert_true: expected true got false +FAIL expression_should_be_parseable: width < 0.001mm assert_true: expected true got false +FAIL expression_should_be_parseable: width < 100000px assert_true: expected true got false PASS expression_should_not_be_parseable: min-width < -0 PASS expression_should_not_be_parseable: max-width < -0 PASS expression_should_not_be_parseable: width < -1px @@ -127,14 +127,14 @@ PASS expression_should_not_be_parseable: max-height : -1px PASS expression_should_not_be_parseable: height : -0.00001mm PASS expression_should_not_be_parseable: height : -100000em -FAIL expression_should_be_parseable: height > 0 assert_true: height > 0 expected true got false -FAIL expression_should_be_parseable: height > 0px assert_true: height > 0px expected true got false -FAIL expression_should_be_parseable: height > 0em assert_true: height > 0em expected true got false -FAIL expression_should_be_parseable: height > -0 assert_true: height > -0 expected true got false -FAIL expression_should_be_parseable: height > -0cm assert_true: height > -0cm expected true got false -FAIL expression_should_be_parseable: height > 1px assert_true: height > 1px expected true got false -FAIL expression_should_be_parseable: height > 0.001mm assert_true: height > 0.001mm expected true got false -FAIL expression_should_be_parseable: height > 100000px assert_true: height > 100000px expected true got false +FAIL expression_should_be_parseable: height > 0 assert_true: expected true got false +FAIL expression_should_be_parseable: height > 0px assert_true: expected true got false +FAIL expression_should_be_parseable: height > 0em assert_true: expected true got false +FAIL expression_should_be_parseable: height > -0 assert_true: expected true got false +FAIL expression_should_be_parseable: height > -0cm assert_true: expected true got false +FAIL expression_should_be_parseable: height > 1px assert_true: expected true got false +FAIL expression_should_be_parseable: height > 0.001mm assert_true: expected true got false +FAIL expression_should_be_parseable: height > 100000px assert_true: expected true got false PASS expression_should_not_be_parseable: min-height > -0 PASS expression_should_not_be_parseable: max-height > -0 PASS expression_should_not_be_parseable: height > -1px @@ -142,14 +142,14 @@ PASS expression_should_not_be_parseable: max-height > -1px PASS expression_should_not_be_parseable: height > -0.00001mm PASS expression_should_not_be_parseable: height > -100000em -FAIL expression_should_be_parseable: height >= 0 assert_true: height >= 0 expected true got false -FAIL expression_should_be_parseable: height >= 0px assert_true: height >= 0px expected true got false -FAIL expression_should_be_parseable: height >= 0em assert_true: height >= 0em expected true got false -FAIL expression_should_be_parseable: height >= -0 assert_true: height >= -0 expected true got false -FAIL expression_should_be_parseable: height >= -0cm assert_true: height >= -0cm expected true got false -FAIL expression_should_be_parseable: height >= 1px assert_true: height >= 1px expected true got false -FAIL expression_should_be_parseable: height >= 0.001mm assert_true: height >= 0.001mm expected true got false -FAIL expression_should_be_parseable: height >= 100000px assert_true: height >= 100000px expected true got false +FAIL expression_should_be_parseable: height >= 0 assert_true: expected true got false +FAIL expression_should_be_parseable: height >= 0px assert_true: expected true got false +FAIL expression_should_be_parseable: height >= 0em assert_true: expected true got false +FAIL expression_should_be_parseable: height >= -0 assert_true: expected true got false +FAIL expression_should_be_parseable: height >= -0cm assert_true: expected true got false +FAIL expression_should_be_parseable: height >= 1px assert_true: expected true got false +FAIL expression_should_be_parseable: height >= 0.001mm assert_true: expected true got false +FAIL expression_should_be_parseable: height >= 100000px assert_true: expected true got false PASS expression_should_not_be_parseable: min-height >= -0 PASS expression_should_not_be_parseable: max-height >= -0 PASS expression_should_not_be_parseable: height > = 0px @@ -158,14 +158,14 @@ PASS expression_should_not_be_parseable: max-height >= -1px PASS expression_should_not_be_parseable: height >= -0.00001mm PASS expression_should_not_be_parseable: height >= -100000em -FAIL expression_should_be_parseable: height = 0 assert_true: height = 0 expected true got false -FAIL expression_should_be_parseable: height = 0px assert_true: height = 0px expected true got false -FAIL expression_should_be_parseable: height = 0em assert_true: height = 0em expected true got false -FAIL expression_should_be_parseable: height = -0 assert_true: height = -0 expected true got false -FAIL expression_should_be_parseable: height = -0cm assert_true: height = -0cm expected true got false -FAIL expression_should_be_parseable: height = 1px assert_true: height = 1px expected true got false -FAIL expression_should_be_parseable: height = 0.001mm assert_true: height = 0.001mm expected true got false -FAIL expression_should_be_parseable: height = 100000px assert_true: height = 100000px expected true got false +FAIL expression_should_be_parseable: height = 0 assert_true: expected true got false +FAIL expression_should_be_parseable: height = 0px assert_true: expected true got false +FAIL expression_should_be_parseable: height = 0em assert_true: expected true got false +FAIL expression_should_be_parseable: height = -0 assert_true: expected true got false +FAIL expression_should_be_parseable: height = -0cm assert_true: expected true got false +FAIL expression_should_be_parseable: height = 1px assert_true: expected true got false +FAIL expression_should_be_parseable: height = 0.001mm assert_true: expected true got false +FAIL expression_should_be_parseable: height = 100000px assert_true: expected true got false PASS expression_should_not_be_parseable: min-height = -0 PASS expression_should_not_be_parseable: max-height = -0 PASS expression_should_not_be_parseable: height = -1px @@ -173,14 +173,14 @@ PASS expression_should_not_be_parseable: max-height = -1px PASS expression_should_not_be_parseable: height = -0.00001mm PASS expression_should_not_be_parseable: height = -100000em -FAIL expression_should_be_parseable: height <= 0 assert_true: height <= 0 expected true got false -FAIL expression_should_be_parseable: height <= 0px assert_true: height <= 0px expected true got false -FAIL expression_should_be_parseable: height <= 0em assert_true: height <= 0em expected true got false -FAIL expression_should_be_parseable: height <= -0 assert_true: height <= -0 expected true got false -FAIL expression_should_be_parseable: height <= -0cm assert_true: height <= -0cm expected true got false -FAIL expression_should_be_parseable: height <= 1px assert_true: height <= 1px expected true got false -FAIL expression_should_be_parseable: height <= 0.001mm assert_true: height <= 0.001mm expected true got false -FAIL expression_should_be_parseable: height <= 100000px assert_true: height <= 100000px expected true got false +FAIL expression_should_be_parseable: height <= 0 assert_true: expected true got false +FAIL expression_should_be_parseable: height <= 0px assert_true: expected true got false +FAIL expression_should_be_parseable: height <= 0em assert_true: expected true got false +FAIL expression_should_be_parseable: height <= -0 assert_true: expected true got false +FAIL expression_should_be_parseable: height <= -0cm assert_true: expected true got false +FAIL expression_should_be_parseable: height <= 1px assert_true: expected true got false +FAIL expression_should_be_parseable: height <= 0.001mm assert_true: expected true got false +FAIL expression_should_be_parseable: height <= 100000px assert_true: expected true got false PASS expression_should_not_be_parseable: min-height <= -0 PASS expression_should_not_be_parseable: max-height <= -0 PASS expression_should_not_be_parseable: height < = 0px @@ -189,14 +189,14 @@ PASS expression_should_not_be_parseable: max-height <= -1px PASS expression_should_not_be_parseable: height <= -0.00001mm PASS expression_should_not_be_parseable: height <= -100000em -FAIL expression_should_be_parseable: height < 0 assert_true: height < 0 expected true got false -FAIL expression_should_be_parseable: height < 0px assert_true: height < 0px expected true got false -FAIL expression_should_be_parseable: height < 0em assert_true: height < 0em expected true got false -FAIL expression_should_be_parseable: height < -0 assert_true: height < -0 expected true got false -FAIL expression_should_be_parseable: height < -0cm assert_true: height < -0cm expected true got false -FAIL expression_should_be_parseable: height < 1px assert_true: height < 1px expected true got false -FAIL expression_should_be_parseable: height < 0.001mm assert_true: height < 0.001mm expected true got false -FAIL expression_should_be_parseable: height < 100000px assert_true: height < 100000px expected true got false +FAIL expression_should_be_parseable: height < 0 assert_true: expected true got false +FAIL expression_should_be_parseable: height < 0px assert_true: expected true got false +FAIL expression_should_be_parseable: height < 0em assert_true: expected true got false +FAIL expression_should_be_parseable: height < -0 assert_true: expected true got false +FAIL expression_should_be_parseable: height < -0cm assert_true: expected true got false +FAIL expression_should_be_parseable: height < 1px assert_true: expected true got false +FAIL expression_should_be_parseable: height < 0.001mm assert_true: expected true got false +FAIL expression_should_be_parseable: height < 100000px assert_true: expected true got false PASS expression_should_not_be_parseable: min-height < -0 PASS expression_should_not_be_parseable: max-height < -0 PASS expression_should_not_be_parseable: height < -1px @@ -222,14 +222,14 @@ PASS expression_should_not_be_parseable: max-device-width : -1px PASS expression_should_not_be_parseable: device-width : -0.00001mm PASS expression_should_not_be_parseable: device-width : -100000em -FAIL expression_should_be_parseable: device-width > 0 assert_true: device-width > 0 expected true got false -FAIL expression_should_be_parseable: device-width > 0px assert_true: device-width > 0px expected true got false -FAIL expression_should_be_parseable: device-width > 0em assert_true: device-width > 0em expected true got false -FAIL expression_should_be_parseable: device-width > -0 assert_true: device-width > -0 expected true got false -FAIL expression_should_be_parseable: device-width > -0cm assert_true: device-width > -0cm expected true got false -FAIL expression_should_be_parseable: device-width > 1px assert_true: device-width > 1px expected true got false -FAIL expression_should_be_parseable: device-width > 0.001mm assert_true: device-width > 0.001mm expected true got false -FAIL expression_should_be_parseable: device-width > 100000px assert_true: device-width > 100000px expected true got false +FAIL expression_should_be_parseable: device-width > 0 assert_true: expected true got false +FAIL expression_should_be_parseable: device-width > 0px assert_true: expected true got false +FAIL expression_should_be_parseable: device-width > 0em assert_true: expected true got false +FAIL expression_should_be_parseable: device-width > -0 assert_true: expected true got false +FAIL expression_should_be_parseable: device-width > -0cm assert_true: expected true got false +FAIL expression_should_be_parseable: device-width > 1px assert_true: expected true got false +FAIL expression_should_be_parseable: device-width > 0.001mm assert_true: expected true got false +FAIL expression_should_be_parseable: device-width > 100000px assert_true: expected true got false PASS expression_should_not_be_parseable: min-device-width > -0 PASS expression_should_not_be_parseable: max-device-width > -0 PASS expression_should_not_be_parseable: device-width > -1px @@ -237,14 +237,14 @@ PASS expression_should_not_be_parseable: max-device-width > -1px PASS expression_should_not_be_parseable: device-width > -0.00001mm PASS expression_should_not_be_parseable: device-width > -100000em -FAIL expression_should_be_parseable: device-width >= 0 assert_true: device-width >= 0 expected true got false -FAIL expression_should_be_parseable: device-width >= 0px assert_true: device-width >= 0px expected true got false -FAIL expression_should_be_parseable: device-width >= 0em assert_true: device-width >= 0em expected true got false -FAIL expression_should_be_parseable: device-width >= -0 assert_true: device-width >= -0 expected true got false -FAIL expression_should_be_parseable: device-width >= -0cm assert_true: device-width >= -0cm expected true got false -FAIL expression_should_be_parseable: device-width >= 1px assert_true: device-width >= 1px expected true got false -FAIL expression_should_be_parseable: device-width >= 0.001mm assert_true: device-width >= 0.001mm expected true got false -FAIL expression_should_be_parseable: device-width >= 100000px assert_true: device-width >= 100000px expected true got false +FAIL expression_should_be_parseable: device-width >= 0 assert_true: expected true got false +FAIL expression_should_be_parseable: device-width >= 0px assert_true: expected true got false +FAIL expression_should_be_parseable: device-width >= 0em assert_true: expected true got false +FAIL expression_should_be_parseable: device-width >= -0 assert_true: expected true got false +FAIL expression_should_be_parseable: device-width >= -0cm assert_true: expected true got false +FAIL expression_should_be_parseable: device-width >= 1px assert_true: expected true got false +FAIL expression_should_be_parseable: device-width >= 0.001mm assert_true: expected true got false +FAIL expression_should_be_parseable: device-width >= 100000px assert_true: expected true got false PASS expression_should_not_be_parseable: min-device-width >= -0 PASS expression_should_not_be_parseable: max-device-width >= -0 PASS expression_should_not_be_parseable: device-width > = 0px @@ -253,14 +253,14 @@ PASS expression_should_not_be_parseable: max-device-width >= -1px PASS expression_should_not_be_parseable: device-width >= -0.00001mm PASS expression_should_not_be_parseable: device-width >= -100000em -FAIL expression_should_be_parseable: device-width = 0 assert_true: device-width = 0 expected true got false -FAIL expression_should_be_parseable: device-width = 0px assert_true: device-width = 0px expected true got false -FAIL expression_should_be_parseable: device-width = 0em assert_true: device-width = 0em expected true got false -FAIL expression_should_be_parseable: device-width = -0 assert_true: device-width = -0 expected true got false -FAIL expression_should_be_parseable: device-width = -0cm assert_true: device-width = -0cm expected true got false -FAIL expression_should_be_parseable: device-width = 1px assert_true: device-width = 1px expected true got false -FAIL expression_should_be_parseable: device-width = 0.001mm assert_true: device-width = 0.001mm expected true got false -FAIL expression_should_be_parseable: device-width = 100000px assert_true: device-width = 100000px expected true got false +FAIL expression_should_be_parseable: device-width = 0 assert_true: expected true got false +FAIL expression_should_be_parseable: device-width = 0px assert_true: expected true got false +FAIL expression_should_be_parseable: device-width = 0em assert_true: expected true got false +FAIL expression_should_be_parseable: device-width = -0 assert_true: expected true got false +FAIL expression_should_be_parseable: device-width = -0cm assert_true: expected true got false +FAIL expression_should_be_parseable: device-width = 1px assert_true: expected true got false +FAIL expression_should_be_parseable: device-width = 0.001mm assert_true: expected true got false +FAIL expression_should_be_parseable: device-width = 100000px assert_true: expected true got false PASS expression_should_not_be_parseable: min-device-width = -0 PASS expression_should_not_be_parseable: max-device-width = -0 PASS expression_should_not_be_parseable: device-width = -1px @@ -268,14 +268,14 @@ PASS expression_should_not_be_parseable: max-device-width = -1px PASS expression_should_not_be_parseable: device-width = -0.00001mm PASS expression_should_not_be_parseable: device-width = -100000em -FAIL expression_should_be_parseable: device-width <= 0 assert_true: device-width <= 0 expected true got false -FAIL expression_should_be_parseable: device-width <= 0px assert_true: device-width <= 0px expected true got false -FAIL expression_should_be_parseable: device-width <= 0em assert_true: device-width <= 0em expected true got false -FAIL expression_should_be_parseable: device-width <= -0 assert_true: device-width <= -0 expected true got false -FAIL expression_should_be_parseable: device-width <= -0cm assert_true: device-width <= -0cm expected true got false -FAIL expression_should_be_parseable: device-width <= 1px assert_true: device-width <= 1px expected true got false -FAIL expression_should_be_parseable: device-width <= 0.001mm assert_true: device-width <= 0.001mm expected true got false -FAIL expression_should_be_parseable: device-width <= 100000px assert_true: device-width <= 100000px expected true got false +FAIL expression_should_be_parseable: device-width <= 0 assert_true: expected true got false +FAIL expression_should_be_parseable: device-width <= 0px assert_true: expected true got false +FAIL expression_should_be_parseable: device-width <= 0em assert_true: expected true got false +FAIL expression_should_be_parseable: device-width <= -0 assert_true: expected true got false +FAIL expression_should_be_parseable: device-width <= -0cm assert_true: expected true got false +FAIL expression_should_be_parseable: device-width <= 1px assert_true: expected true got false +FAIL expression_should_be_parseable: device-width <= 0.001mm assert_true: expected true got false +FAIL expression_should_be_parseable: device-width <= 100000px assert_true: expected true got false PASS expression_should_not_be_parseable: min-device-width <= -0 PASS expression_should_not_be_parseable: max-device-width <= -0 PASS expression_should_not_be_parseable: device-width < = 0px @@ -284,14 +284,14 @@ PASS expression_should_not_be_parseable: max-device-width <= -1px PASS expression_should_not_be_parseable: device-width <= -0.00001mm PASS expression_should_not_be_parseable: device-width <= -100000em -FAIL expression_should_be_parseable: device-width < 0 assert_true: device-width < 0 expected true got false -FAIL expression_should_be_parseable: device-width < 0px assert_true: device-width < 0px expected true got false -FAIL expression_should_be_parseable: device-width < 0em assert_true: device-width < 0em expected true got false -FAIL expression_should_be_parseable: device-width < -0 assert_true: device-width < -0 expected true got false -FAIL expression_should_be_parseable: device-width < -0cm assert_true: device-width < -0cm expected true got false -FAIL expression_should_be_parseable: device-width < 1px assert_true: device-width < 1px expected true got false -FAIL expression_should_be_parseable: device-width < 0.001mm assert_true: device-width < 0.001mm expected true got false -FAIL expression_should_be_parseable: device-width < 100000px assert_true: device-width < 100000px expected true got false +FAIL expression_should_be_parseable: device-width < 0 assert_true: expected true got false +FAIL expression_should_be_parseable: device-width < 0px assert_true: expected true got false +FAIL expression_should_be_parseable: device-width < 0em assert_true: expected true got false +FAIL expression_should_be_parseable: device-width < -0 assert_true: expected true got false +FAIL expression_should_be_parseable: device-width < -0cm assert_true: expected true got false +FAIL expression_should_be_parseable: device-width < 1px assert_true: expected true got false +FAIL expression_should_be_parseable: device-width < 0.001mm assert_true: expected true got false +FAIL expression_should_be_parseable: device-width < 100000px assert_true: expected true got false PASS expression_should_not_be_parseable: min-device-width < -0 PASS expression_should_not_be_parseable: max-device-width < -0 PASS expression_should_not_be_parseable: device-width < -1px @@ -317,14 +317,14 @@ PASS expression_should_not_be_parseable: max-device-height : -1px PASS expression_should_not_be_parseable: device-height : -0.00001mm PASS expression_should_not_be_parseable: device-height : -100000em -FAIL expression_should_be_parseable: device-height > 0 assert_true: device-height > 0 expected true got false -FAIL expression_should_be_parseable: device-height > 0px assert_true: device-height > 0px expected true got false -FAIL expression_should_be_parseable: device-height > 0em assert_true: device-height > 0em expected true got false -FAIL expression_should_be_parseable: device-height > -0 assert_true: device-height > -0 expected true got false -FAIL expression_should_be_parseable: device-height > -0cm assert_true: device-height > -0cm expected true got false -FAIL expression_should_be_parseable: device-height > 1px assert_true: device-height > 1px expected true got false -FAIL expression_should_be_parseable: device-height > 0.001mm assert_true: device-height > 0.001mm expected true got false -FAIL expression_should_be_parseable: device-height > 100000px assert_true: device-height > 100000px expected true got false +FAIL expression_should_be_parseable: device-height > 0 assert_true: expected true got false +FAIL expression_should_be_parseable: device-height > 0px assert_true: expected true got false +FAIL expression_should_be_parseable: device-height > 0em assert_true: expected true got false +FAIL expression_should_be_parseable: device-height > -0 assert_true: expected true got false +FAIL expression_should_be_parseable: device-height > -0cm assert_true: expected true got false +FAIL expression_should_be_parseable: device-height > 1px assert_true: expected true got false +FAIL expression_should_be_parseable: device-height > 0.001mm assert_true: expected true got false +FAIL expression_should_be_parseable: device-height > 100000px assert_true: expected true got false PASS expression_should_not_be_parseable: min-device-height > -0 PASS expression_should_not_be_parseable: max-device-height > -0 PASS expression_should_not_be_parseable: device-height > -1px @@ -332,14 +332,14 @@ PASS expression_should_not_be_parseable: max-device-height > -1px PASS expression_should_not_be_parseable: device-height > -0.00001mm PASS expression_should_not_be_parseable: device-height > -100000em -FAIL expression_should_be_parseable: device-height >= 0 assert_true: device-height >= 0 expected true got false -FAIL expression_should_be_parseable: device-height >= 0px assert_true: device-height >= 0px expected true got false -FAIL expression_should_be_parseable: device-height >= 0em assert_true: device-height >= 0em expected true got false -FAIL expression_should_be_parseable: device-height >= -0 assert_true: device-height >= -0 expected true got false -FAIL expression_should_be_parseable: device-height >= -0cm assert_true: device-height >= -0cm expected true got false -FAIL expression_should_be_parseable: device-height >= 1px assert_true: device-height >= 1px expected true got false -FAIL expression_should_be_parseable: device-height >= 0.001mm assert_true: device-height >= 0.001mm expected true got false -FAIL expression_should_be_parseable: device-height >= 100000px assert_true: device-height >= 100000px expected true got false +FAIL expression_should_be_parseable: device-height >= 0 assert_true: expected true got false +FAIL expression_should_be_parseable: device-height >= 0px assert_true: expected true got false +FAIL expression_should_be_parseable: device-height >= 0em assert_true: expected true got false +FAIL expression_should_be_parseable: device-height >= -0 assert_true: expected true got false +FAIL expression_should_be_parseable: device-height >= -0cm assert_true: expected true got false +FAIL expression_should_be_parseable: device-height >= 1px assert_true: expected true got false +FAIL expression_should_be_parseable: device-height >= 0.001mm assert_true: expected true got false +FAIL expression_should_be_parseable: device-height >= 100000px assert_true: expected true got false PASS expression_should_not_be_parseable: min-device-height >= -0 PASS expression_should_not_be_parseable: max-device-height >= -0 PASS expression_should_not_be_parseable: device-height > = 0px @@ -348,14 +348,14 @@ PASS expression_should_not_be_parseable: max-device-height >= -1px PASS expression_should_not_be_parseable: device-height >= -0.00001mm PASS expression_should_not_be_parseable: device-height >= -100000em -FAIL expression_should_be_parseable: device-height = 0 assert_true: device-height = 0 expected true got false -FAIL expression_should_be_parseable: device-height = 0px assert_true: device-height = 0px expected true got false -FAIL expression_should_be_parseable: device-height = 0em assert_true: device-height = 0em expected true got false -FAIL expression_should_be_parseable: device-height = -0 assert_true: device-height = -0 expected true got false -FAIL expression_should_be_parseable: device-height = -0cm assert_true: device-height = -0cm expected true got false -FAIL expression_should_be_parseable: device-height = 1px assert_true: device-height = 1px expected true got false -FAIL expression_should_be_parseable: device-height = 0.001mm assert_true: device-height = 0.001mm expected true got false -FAIL expression_should_be_parseable: device-height = 100000px assert_true: device-height = 100000px expected true got false +FAIL expression_should_be_parseable: device-height = 0 assert_true: expected true got false +FAIL expression_should_be_parseable: device-height = 0px assert_true: expected true got false +FAIL expression_should_be_parseable: device-height = 0em assert_true: expected true got false +FAIL expression_should_be_parseable: device-height = -0 assert_true: expected true got false +FAIL expression_should_be_parseable: device-height = -0cm assert_true: expected true got false +FAIL expression_should_be_parseable: device-height = 1px assert_true: expected true got false +FAIL expression_should_be_parseable: device-height = 0.001mm assert_true: expected true got false +FAIL expression_should_be_parseable: device-height = 100000px assert_true: expected true got false PASS expression_should_not_be_parseable: min-device-height = -0 PASS expression_should_not_be_parseable: max-device-height = -0 PASS expression_should_not_be_parseable: device-height = -1px @@ -363,14 +363,14 @@ PASS expression_should_not_be_parseable: max-device-height = -1px PASS expression_should_not_be_parseable: device-height = -0.00001mm PASS expression_should_not_be_parseable: device-height = -100000em -FAIL expression_should_be_parseable: device-height <= 0 assert_true: device-height <= 0 expected true got false -FAIL expression_should_be_parseable: device-height <= 0px assert_true: device-height <= 0px expected true got false -FAIL expression_should_be_parseable: device-height <= 0em assert_true: device-height <= 0em expected true got false -FAIL expression_should_be_parseable: device-height <= -0 assert_true: device-height <= -0 expected true got false -FAIL expression_should_be_parseable: device-height <= -0cm assert_true: device-height <= -0cm expected true got false -FAIL expression_should_be_parseable: device-height <= 1px assert_true: device-height <= 1px expected true got false -FAIL expression_should_be_parseable: device-height <= 0.001mm assert_true: device-height <= 0.001mm expected true got false -FAIL expression_should_be_parseable: device-height <= 100000px assert_true: device-height <= 100000px expected true got false +FAIL expression_should_be_parseable: device-height <= 0 assert_true: expected true got false +FAIL expression_should_be_parseable: device-height <= 0px assert_true: expected true got false +FAIL expression_should_be_parseable: device-height <= 0em assert_true: expected true got false +FAIL expression_should_be_parseable: device-height <= -0 assert_true: expected true got false +FAIL expression_should_be_parseable: device-height <= -0cm assert_true: expected true got false +FAIL expression_should_be_parseable: device-height <= 1px assert_true: expected true got false +FAIL expression_should_be_parseable: device-height <= 0.001mm assert_true: expected true got false +FAIL expression_should_be_parseable: device-height <= 100000px assert_true: expected true got false PASS expression_should_not_be_parseable: min-device-height <= -0 PASS expression_should_not_be_parseable: max-device-height <= -0 PASS expression_should_not_be_parseable: device-height < = 0px @@ -379,14 +379,14 @@ PASS expression_should_not_be_parseable: max-device-height <= -1px PASS expression_should_not_be_parseable: device-height <= -0.00001mm PASS expression_should_not_be_parseable: device-height <= -100000em -FAIL expression_should_be_parseable: device-height < 0 assert_true: device-height < 0 expected true got false -FAIL expression_should_be_parseable: device-height < 0px assert_true: device-height < 0px expected true got false -FAIL expression_should_be_parseable: device-height < 0em assert_true: device-height < 0em expected true got false -FAIL expression_should_be_parseable: device-height < -0 assert_true: device-height < -0 expected true got false -FAIL expression_should_be_parseable: device-height < -0cm assert_true: device-height < -0cm expected true got false -FAIL expression_should_be_parseable: device-height < 1px assert_true: device-height < 1px expected true got false -FAIL expression_should_be_parseable: device-height < 0.001mm assert_true: device-height < 0.001mm expected true got false -FAIL expression_should_be_parseable: device-height < 100000px assert_true: device-height < 100000px expected true got false +FAIL expression_should_be_parseable: device-height < 0 assert_true: expected true got false +FAIL expression_should_be_parseable: device-height < 0px assert_true: expected true got false +FAIL expression_should_be_parseable: device-height < 0em assert_true: expected true got false +FAIL expression_should_be_parseable: device-height < -0 assert_true: expected true got false +FAIL expression_should_be_parseable: device-height < -0cm assert_true: expected true got false +FAIL expression_should_be_parseable: device-height < 1px assert_true: expected true got false +FAIL expression_should_be_parseable: device-height < 0.001mm assert_true: expected true got false +FAIL expression_should_be_parseable: device-height < 100000px assert_true: expected true got false PASS expression_should_not_be_parseable: min-device-height < -0 PASS expression_should_not_be_parseable: max-device-height < -0 PASS expression_should_not_be_parseable: device-height < -1px @@ -395,7 +395,7 @@ PASS expression_should_not_be_parseable: device-height < -0.00001mm PASS expression_should_not_be_parseable: device-height < -100000em PASS should_apply: all and (width: ${value}px) -FAIL should_apply: all and (width = ${value}px) assert_true: all and (width = 117px) expected true got false +FAIL should_apply: all and (width = ${value}px) assert_true: expected true got false PASS should_not_apply: all and (width: ${value + 1}px) PASS should_not_apply: all and (width: ${value - 1}px) PASS should_not_apply: all and (width = ${value + 1}px) @@ -410,20 +410,20 @@ PASS should_apply: all and (min-width: ${Math.floor(value/em_size) - 1}em) PASS should_apply: all and (max-width: ${Math.ceil(value/em_size) + 1}em) PASS should_not_apply: all and (max-width: ${Math.floor(value/em_size) - 1}em) -FAIL should_apply: (width <= ${value}px) assert_true: (width <= 117px) expected true got false -FAIL should_apply: (width >= ${value}px) assert_true: (width >= 117px) expected true got false +FAIL should_apply: (width <= ${value}px) assert_true: expected true got false +FAIL should_apply: (width >= ${value}px) assert_true: expected true got false PASS should_not_apply: (width < ${value}px) PASS should_not_apply: (width > ${value}px) -FAIL should_apply: (width < ${value + 1}px) assert_true: (width < 118px) expected true got false -FAIL should_apply: (width <= ${value + 1}px) assert_true: (width <= 118px) expected true got false +FAIL should_apply: (width < ${value + 1}px) assert_true: expected true got false +FAIL should_apply: (width <= ${value + 1}px) assert_true: expected true got false PASS should_not_apply: (width > ${value + 1}px) PASS should_not_apply: (width >= ${value + 1}px) -FAIL should_apply: (width > ${value - 1}px) assert_true: (width > 116px) expected true got false -FAIL should_apply: (width >= ${value - 1}px) assert_true: (width >= 116px) expected true got false +FAIL should_apply: (width > ${value - 1}px) assert_true: expected true got false +FAIL should_apply: (width >= ${value - 1}px) assert_true: expected true got false PASS should_not_apply: (width < ${value - 1}px) PASS should_not_apply: (width <= ${value - 1}px) PASS should_apply: all and (height: ${value}px) -FAIL should_apply: all and (height = ${value}px) assert_true: all and (height = 76px) expected true got false +FAIL should_apply: all and (height = ${value}px) assert_true: expected true got false PASS should_not_apply: all and (height: ${value + 1}px) PASS should_not_apply: all and (height: ${value - 1}px) PASS should_not_apply: all and (height = ${value + 1}px) @@ -438,20 +438,20 @@ PASS should_apply: all and (min-height: ${Math.floor(value/em_size) - 1}em) PASS should_apply: all and (max-height: ${Math.ceil(value/em_size) + 1}em) PASS should_not_apply: all and (max-height: ${Math.floor(value/em_size) - 1}em) -FAIL should_apply: (height <= ${value}px) assert_true: (height <= 76px) expected true got false -FAIL should_apply: (height >= ${value}px) assert_true: (height >= 76px) expected true got false +FAIL should_apply: (height <= ${value}px) assert_true: expected true got false +FAIL should_apply: (height >= ${value}px) assert_true: expected true got false PASS should_not_apply: (height < ${value}px) PASS should_not_apply: (height > ${value}px) -FAIL should_apply: (height < ${value + 1}px) assert_true: (height < 77px) expected true got false -FAIL should_apply: (height <= ${value + 1}px) assert_true: (height <= 77px) expected true got false +FAIL should_apply: (height < ${value + 1}px) assert_true: expected true got false +FAIL should_apply: (height <= ${value + 1}px) assert_true: expected true got false PASS should_not_apply: (height > ${value + 1}px) PASS should_not_apply: (height >= ${value + 1}px) -FAIL should_apply: (height > ${value - 1}px) assert_true: (height > 75px) expected true got false -FAIL should_apply: (height >= ${value - 1}px) assert_true: (height >= 75px) expected true got false +FAIL should_apply: (height > ${value - 1}px) assert_true: expected true got false +FAIL should_apply: (height >= ${value - 1}px) assert_true: expected true got false PASS should_not_apply: (height < ${value - 1}px) PASS should_not_apply: (height <= ${value - 1}px) PASS should_apply: all and (device-width: ${value}px) -FAIL should_apply: all and (device-width = ${value}px) assert_true: all and (device-width = 1280px) expected true got false +FAIL should_apply: all and (device-width = ${value}px) assert_true: expected true got false PASS should_not_apply: all and (device-width: ${value + 1}px) PASS should_not_apply: all and (device-width: ${value - 1}px) PASS should_not_apply: all and (device-width = ${value + 1}px) @@ -466,20 +466,20 @@ PASS should_apply: all and (min-device-width: ${Math.floor(value/em_size) - 1}em) PASS should_apply: all and (max-device-width: ${Math.ceil(value/em_size) + 1}em) PASS should_not_apply: all and (max-device-width: ${Math.floor(value/em_size) - 1}em) -FAIL should_apply: (device-width <= ${value}px) assert_true: (device-width <= 1280px) expected true got false -FAIL should_apply: (device-width >= ${value}px) assert_true: (device-width >= 1280px) expected true got false +FAIL should_apply: (device-width <= ${value}px) assert_true: expected true got false +FAIL should_apply: (device-width >= ${value}px) assert_true: expected true got false PASS should_not_apply: (device-width < ${value}px) PASS should_not_apply: (device-width > ${value}px) -FAIL should_apply: (device-width < ${value + 1}px) assert_true: (device-width < 1281px) expected true got false -FAIL should_apply: (device-width <= ${value + 1}px) assert_true: (device-width <= 1281px) expected true got false +FAIL should_apply: (device-width < ${value + 1}px) assert_true: expected true got false +FAIL should_apply: (device-width <= ${value + 1}px) assert_true: expected true got false PASS should_not_apply: (device-width > ${value + 1}px) PASS should_not_apply: (device-width >= ${value + 1}px) -FAIL should_apply: (device-width > ${value - 1}px) assert_true: (device-width > 1279px) expected true got false -FAIL should_apply: (device-width >= ${value - 1}px) assert_true: (device-width >= 1279px) expected true got false +FAIL should_apply: (device-width > ${value - 1}px) assert_true: expected true got false +FAIL should_apply: (device-width >= ${value - 1}px) assert_true: expected true got false PASS should_not_apply: (device-width < ${value - 1}px) PASS should_not_apply: (device-width <= ${value - 1}px) PASS should_apply: all and (device-height: ${value}px) -FAIL should_apply: all and (device-height = ${value}px) assert_true: all and (device-height = 800px) expected true got false +FAIL should_apply: all and (device-height = ${value}px) assert_true: expected true got false PASS should_not_apply: all and (device-height: ${value + 1}px) PASS should_not_apply: all and (device-height: ${value - 1}px) PASS should_not_apply: all and (device-height = ${value + 1}px) @@ -494,16 +494,16 @@ PASS should_apply: all and (min-device-height: ${Math.floor(value/em_size) - 1}em) PASS should_apply: all and (max-device-height: ${Math.ceil(value/em_size) + 1}em) PASS should_not_apply: all and (max-device-height: ${Math.floor(value/em_size) - 1}em) -FAIL should_apply: (device-height <= ${value}px) assert_true: (device-height <= 800px) expected true got false -FAIL should_apply: (device-height >= ${value}px) assert_true: (device-height >= 800px) expected true got false +FAIL should_apply: (device-height <= ${value}px) assert_true: expected true got false +FAIL should_apply: (device-height >= ${value}px) assert_true: expected true got false PASS should_not_apply: (device-height < ${value}px) PASS should_not_apply: (device-height > ${value}px) -FAIL should_apply: (device-height < ${value + 1}px) assert_true: (device-height < 801px) expected true got false -FAIL should_apply: (device-height <= ${value + 1}px) assert_true: (device-height <= 801px) expected true got false +FAIL should_apply: (device-height < ${value + 1}px) assert_true: expected true got false +FAIL should_apply: (device-height <= ${value + 1}px) assert_true: expected true got false PASS should_not_apply: (device-height > ${value + 1}px) PASS should_not_apply: (device-height >= ${value + 1}px) -FAIL should_apply: (device-height > ${value - 1}px) assert_true: (device-height > 799px) expected true got false -FAIL should_apply: (device-height >= ${value - 1}px) assert_true: (device-height >= 799px) expected true got false +FAIL should_apply: (device-height > ${value - 1}px) assert_true: expected true got false +FAIL should_apply: (device-height >= ${value - 1}px) assert_true: expected true got false PASS should_not_apply: (device-height < ${value - 1}px) PASS should_not_apply: (device-height <= ${value - 1}px) PASS width = 0, height != 0: should_apply: all and (height) @@ -581,14 +581,14 @@ PASS expression_should_be_parseable: max-aspect-ratio: 1 / 1 PASS expression_should_be_parseable: max-aspect-ratio: 1/\r1 -FAIL expression_should_be_parseable: max-aspect-ratio: 1 assert_true: max-aspect-ratio: 1 expected true got false -FAIL expression_should_be_parseable: max-aspect-ratio: 0.5 assert_true: max-aspect-ratio: 0.5 expected true got false -FAIL expression_should_be_parseable: max-aspect-ratio: 1.0/1 assert_true: max-aspect-ratio: 1.0/1 expected true got false -FAIL expression_should_be_parseable: max-aspect-ratio: 1/1.0 assert_true: max-aspect-ratio: 1/1.0 expected true got false -FAIL expression_should_be_parseable: max-aspect-ratio: 1.0/1.0 assert_true: max-aspect-ratio: 1.0/1.0 expected true got false -FAIL expression_should_be_parseable: max-aspect-ratio: 0/1 assert_true: max-aspect-ratio: 0/1 expected true got false -FAIL expression_should_be_parseable: max-aspect-ratio: 1/0 assert_true: max-aspect-ratio: 1/0 expected true got false -FAIL expression_should_be_parseable: max-aspect-ratio: 0/0 assert_true: max-aspect-ratio: 0/0 expected true got false +FAIL expression_should_be_parseable: max-aspect-ratio: 1 assert_true: expected true got false +FAIL expression_should_be_parseable: max-aspect-ratio: 0.5 assert_true: expected true got false +FAIL expression_should_be_parseable: max-aspect-ratio: 1.0/1 assert_true: expected true got false +FAIL expression_should_be_parseable: max-aspect-ratio: 1/1.0 assert_true: expected true got false +FAIL expression_should_be_parseable: max-aspect-ratio: 1.0/1.0 assert_true: expected true got false +FAIL expression_should_be_parseable: max-aspect-ratio: 0/1 assert_true: expected true got false +FAIL expression_should_be_parseable: max-aspect-ratio: 1/0 assert_true: expected true got false +FAIL expression_should_be_parseable: max-aspect-ratio: 0/0 assert_true: expected true got false PASS expression_should_not_be_parseable: max-aspect-ratio: -1/1 PASS expression_should_not_be_parseable: max-aspect-ratio: 1/-1 PASS expression_should_not_be_parseable: max-aspect-ratio: -1/-1 @@ -600,14 +600,14 @@ PASS expression_should_be_parseable: device-aspect-ratio: 1 / 1 PASS expression_should_be_parseable: device-aspect-ratio: 1/\r1 -FAIL expression_should_be_parseable: device-aspect-ratio: 1 assert_true: device-aspect-ratio: 1 expected true got false -FAIL expression_should_be_parseable: device-aspect-ratio: 0.5 assert_true: device-aspect-ratio: 0.5 expected true got false -FAIL expression_should_be_parseable: device-aspect-ratio: 1.0/1 assert_true: device-aspect-ratio: 1.0/1 expected true got false -FAIL expression_should_be_parseable: device-aspect-ratio: 1/1.0 assert_true: device-aspect-ratio: 1/1.0 expected true got false -FAIL expression_should_be_parseable: device-aspect-ratio: 1.0/1.0 assert_true: device-aspect-ratio: 1.0/1.0 expected true got false -FAIL expression_should_be_parseable: device-aspect-ratio: 0/1 assert_true: device-aspect-ratio: 0/1 expected true got false -FAIL expression_should_be_parseable: device-aspect-ratio: 1/0 assert_true: device-aspect-ratio: 1/0 expected true got false -FAIL expression_should_be_parseable: device-aspect-ratio: 0/0 assert_true: device-aspect-ratio: 0/0 expected true got false +FAIL expression_should_be_parseable: device-aspect-ratio: 1 assert_true: expected true got false +FAIL expression_should_be_parseable: device-aspect-ratio: 0.5 assert_true: expected true got false +FAIL expression_should_be_parseable: device-aspect-ratio: 1.0/1 assert_true: expected true got false +FAIL expression_should_be_parseable: device-aspect-ratio: 1/1.0 assert_true: expected true got false +FAIL expression_should_be_parseable: device-aspect-ratio: 1.0/1.0 assert_true: expected true got false +FAIL expression_should_be_parseable: device-aspect-ratio: 0/1 assert_true: expected true got false +FAIL expression_should_be_parseable: device-aspect-ratio: 1/0 assert_true: expected true got false +FAIL expression_should_be_parseable: device-aspect-ratio: 0/0 assert_true: expected true got false PASS expression_should_not_be_parseable: device-aspect-ratio: -1/1 PASS expression_should_not_be_parseable: device-aspect-ratio: 1/-1 PASS expression_should_not_be_parseable: device-aspect-ratio: -1/-1 @@ -771,16 +771,16 @@ PASS should_not_apply: (bogus) PASS should_not_apply: not all and (bogus) PASS should_not_apply: only all and (bogus) -FAIL expression_should_be_parseable: overflow-block assert_true: overflow-block expected true got false -FAIL expression_should_be_parseable: overflow-block: none assert_true: overflow-block: none expected true got false -FAIL expression_should_be_parseable: overflow-block: paged assert_true: overflow-block: paged expected true got false -FAIL expression_should_be_parseable: overflow-block: scroll assert_true: overflow-block: scroll expected true got false -FAIL expression_should_be_parseable: overflow-block: optional-paged assert_true: overflow-block: optional-paged expected true got false +FAIL expression_should_be_parseable: overflow-block assert_true: expected true got false +FAIL expression_should_be_parseable: overflow-block: none assert_true: expected true got false +FAIL expression_should_be_parseable: overflow-block: paged assert_true: expected true got false +FAIL expression_should_be_parseable: overflow-block: scroll assert_true: expected true got false +FAIL expression_should_be_parseable: overflow-block: optional-paged assert_true: expected true got false PASS expression_should_not_be_parseable: overflow-block: some-random-invalid-thing FAIL Sanity check for overflow-block assert_not_equals: overflow-block should be equivalent to not (overflow-block: none) got disallowed value false -FAIL expression_should_be_parseable: overflow-inline assert_true: overflow-inline expected true got false -FAIL expression_should_be_parseable: overflow-inline: none assert_true: overflow-inline: none expected true got false -FAIL expression_should_be_parseable: overflow-inline: scroll assert_true: overflow-inline: scroll expected true got false +FAIL expression_should_be_parseable: overflow-inline assert_true: expected true got false +FAIL expression_should_be_parseable: overflow-inline: none assert_true: expected true got false +FAIL expression_should_be_parseable: overflow-inline: scroll assert_true: expected true got false PASS expression_should_not_be_parseable: overflow-inline: some-random-invalid-thing FAIL Sanity check for overflow-inline assert_not_equals: overflow-inline should be equivalent to not (overflow-inline: none) got disallowed value false PASS expression_should_be_parseable: hover
diff --git a/third_party/blink/web_tests/external/wpt/css/mediaqueries/test_media_queries.html b/third_party/blink/web_tests/external/wpt/css/mediaqueries/test_media_queries.html index 7628c9d..a57a4c5 100644 --- a/third_party/blink/web_tests/external/wpt/css/mediaqueries/test_media_queries.html +++ b/third_party/blink/web_tests/external/wpt/css/mediaqueries/test_media_queries.html
@@ -32,9 +32,12 @@ function should_apply(q) { test(function() { + // lazily evaluate template string to avoid including device-specific data in test name var escaped = JSON.stringify(q); var evalq = eval("`" + escaped.substring(1, escaped.length - 1) + "`"); - assert_true(query_applies(evalq), evalq); + // Also avoid an assert message for the same reason. (Relevant for + // failing tests). + assert_true(query_applies(evalq)); }, `${testGroup ? testGroup + ": " : ""}should_apply: ${q}`); } @@ -42,9 +45,12 @@ if (extraName) extraName += " "; else extraName = ""; test(function() { + // lazily evaluate template string to avoid including device-specific data in test name var escaped = JSON.stringify(q); var evalq = eval("`" + escaped.substring(1, escaped.length - 1) + "`"); - assert_false(query_applies(evalq), evalq); + // Also avoid an assert message for the same reason. (Relevant for + // failing tests). + assert_false(query_applies(evalq)); }, `${testGroup ? testGroup + ": " : ""}should_not_apply: ${q}`); } @@ -76,7 +82,9 @@ // lazily evaluate template string to avoid including device-specific data in test name var escaped = JSON.stringify(q); var evalq = eval("`" + escaped.substring(1, escaped.length - 1) + "`"); - assert_true(query_is_parseable(evalq), evalq) + // Also avoid an assert message for the same reason. (Relevant for + // failing tests). + assert_true(query_is_parseable(evalq)) }, `${testGroup ? testGroup + ": " : ""}query_should_be_parseable: ${q}`); } @@ -85,7 +93,9 @@ // lazily evaluate template string to avoid including device-specific data in test name var escaped = JSON.stringify(q); var evalq = eval("`" + escaped.substring(1, escaped.length - 1) + "`"); - assert_false(query_is_parseable(evalq), evalq); + // Also avoid an assert message for the same reason. (Relevant for + // failing tests). + assert_false(query_is_parseable(evalq)); }, `${testGroup ? testGroup + ": " : ""}query_should_not_be_parseable: ${q}`); } @@ -102,7 +112,9 @@ // lazily evaluate template string to avoid including device-specific data in test name var escaped = JSON.stringify(e); var evale = eval("`" + escaped.substring(1, escaped.length - 1) + "`"); - assert_true(expression_is_parseable(evale), evale); + // Also avoid an assert message for the same reason. (Relevant for + // failing tests). + assert_true(expression_is_parseable(evale)); }, `${testGroup ? testGroup + ": " : ""}expression_should_be_parseable: ${e}`); } @@ -111,7 +123,9 @@ // lazily evaluate template string to avoid including device-specific data in test name var escaped = JSON.stringify(e); var evale = eval("`" + escaped.substring(1, escaped.length - 1) + "`"); - assert_false(expression_is_parseable(evale), evale); + // Also avoid an assert message for the same reason. (Relevant for + // failing tests). + assert_false(expression_is_parseable(evale)); }, `${testGroup ? testGroup + ": " : ""}expression_should_not_be_parseable: ${e}`); }
diff --git a/third_party/blink/web_tests/external/wpt/file-system-access/local_FileSystemBaseHandle-move-manual.https-expected.txt b/third_party/blink/web_tests/external/wpt/file-system-access/local_FileSystemBaseHandle-move-manual.https-expected.txt deleted file mode 100644 index 6867564..0000000 --- a/third_party/blink/web_tests/external/wpt/file-system-access/local_FileSystemBaseHandle-move-manual.https-expected.txt +++ /dev/null
@@ -1,25 +0,0 @@ -This is a testharness.js-based test. -PASS User succesfully selected an empty directory. -PASS User granted write access. -PASS move(dir, name) to rename a file -PASS move(dir, name) to rename a file the same name -FAIL move(dir, name) to rename an empty directory promise_test: Unhandled rejection with value: object "AbortError: The user aborted a request." -FAIL move(dir, name) to rename a non-empty directory promise_test: Unhandled rejection with value: object "AbortError: The user aborted a request." -PASS move(dir) to move a file to a new directory -PASS move(dir, "") to move a file to a new directory -PASS move(dir, name) to move a file to a new directory -FAIL move(dir) to move an empty directory to a new directory promise_test: Unhandled rejection with value: object "AbortError: The user aborted a request." -FAIL move(dir, "") to move an empty directory to a new directory promise_test: Unhandled rejection with value: object "AbortError: The user aborted a request." -FAIL move(dir, name) to move an empty directory to a new directory promise_test: Unhandled rejection with value: object "AbortError: The user aborted a request." -FAIL move(dir, "") to move a non-empty directory to a new directory promise_test: Unhandled rejection with value: object "AbortError: The user aborted a request." -FAIL move(dir, name) to move a non-empty directory to a new directory promise_test: Unhandled rejection with value: object "AbortError: The user aborted a request." -PASS move(dir) can be called multiple times -PASS move(dir, "") can be called multiple times -PASS move(dir, name) can be called multiple times -PASS move(dir, name) with a name with invalid characters should fail -FAIL move(dir, name) to move a directory within itself fails promise_rejects_dom: function "function() { throw e }" threw object "AbortError: The user aborted a request." that is not a DOMException InvalidModificationError: property "code" is equal to 20, expected 13 -FAIL move(dir, name) to move a directory within itself and rename fails promise_rejects_dom: function "function() { throw e }" threw object "AbortError: The user aborted a request." that is not a DOMException InvalidModificationError: property "code" is equal to 20, expected 13 -FAIL move(dir) to move a directory within a descendent fails promise_rejects_dom: function "function() { throw e }" threw object "AbortError: The user aborted a request." that is not a DOMException InvalidModificationError: property "code" is equal to 20, expected 13 -FAIL move(dir, name) to move a directory within a descendent fails promise_rejects_dom: function "function() { throw e }" threw object "AbortError: The user aborted a request." that is not a DOMException InvalidModificationError: property "code" is equal to 20, expected 13 -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/external/wpt/file-system-access/local_FileSystemBaseHandle-rename-manual.https-expected.txt b/third_party/blink/web_tests/external/wpt/file-system-access/local_FileSystemBaseHandle-rename-manual.https-expected.txt deleted file mode 100644 index 7f803f9..0000000 --- a/third_party/blink/web_tests/external/wpt/file-system-access/local_FileSystemBaseHandle-rename-manual.https-expected.txt +++ /dev/null
@@ -1,15 +0,0 @@ -This is a testharness.js-based test. -PASS User succesfully selected an empty directory. -PASS User granted write access. -PASS rename(name) to rename a file -PASS rename(name) to rename a file the same name -PASS rename("") to rename a file fails -FAIL rename(name) to rename an empty directory promise_test: Unhandled rejection with value: object "AbortError: The user aborted a request." -FAIL rename("") to rename an empty directory fails promise_rejects_js: function "function() { throw e }" threw object "AbortError: The user aborted a request." ("AbortError") expected instance of function "function TypeError() { [native code] }" ("TypeError") -FAIL rename(name) to rename a non-empty directory promise_test: Unhandled rejection with value: object "AbortError: The user aborted a request." -PASS rename(name) can be called multiple times -PASS rename(dir) should rename to stringified dir object -PASS rename(name) with a name with a trailing period should fail -PASS rename(name) with a name with invalid characters should fail -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/external/wpt/file-system-access/local_FileSystemBaseHandle-move-manual.https.html b/third_party/blink/web_tests/external/wpt/file-system-access/local_FileSystemDirectoryHandle-move-manual.https.html similarity index 83% copy from third_party/blink/web_tests/external/wpt/file-system-access/local_FileSystemBaseHandle-move-manual.https.html copy to third_party/blink/web_tests/external/wpt/file-system-access/local_FileSystemDirectoryHandle-move-manual.https.html index 2290a31..20c6ccfd 100644 --- a/third_party/blink/web_tests/external/wpt/file-system-access/local_FileSystemBaseHandle-move-manual.https.html +++ b/third_party/blink/web_tests/external/wpt/file-system-access/local_FileSystemDirectoryHandle-move-manual.https.html
@@ -7,4 +7,4 @@ <script src="/resources/testdriver-vendor.js"></script> <script src="resources/test-helpers.js"></script> <script src="resources/local-fs-test-helpers.js"></script> -<script src="script-tests/FileSystemBaseHandle-move.js"></script> +<script src="script-tests/FileSystemDirectoryHandle-move.js"></script>
diff --git a/third_party/blink/web_tests/external/wpt/file-system-access/local_FileSystemBaseHandle-move-manual.https.html b/third_party/blink/web_tests/external/wpt/file-system-access/local_FileSystemDirectoryHandle-rename-manual.https.html similarity index 82% copy from third_party/blink/web_tests/external/wpt/file-system-access/local_FileSystemBaseHandle-move-manual.https.html copy to third_party/blink/web_tests/external/wpt/file-system-access/local_FileSystemDirectoryHandle-rename-manual.https.html index 2290a31..a4a7fb9b 100644 --- a/third_party/blink/web_tests/external/wpt/file-system-access/local_FileSystemBaseHandle-move-manual.https.html +++ b/third_party/blink/web_tests/external/wpt/file-system-access/local_FileSystemDirectoryHandle-rename-manual.https.html
@@ -7,4 +7,4 @@ <script src="/resources/testdriver-vendor.js"></script> <script src="resources/test-helpers.js"></script> <script src="resources/local-fs-test-helpers.js"></script> -<script src="script-tests/FileSystemBaseHandle-move.js"></script> +<script src="script-tests/FileSystemDirectoryHandle-rename.js"></script>
diff --git a/third_party/blink/web_tests/external/wpt/file-system-access/local_FileSystemBaseHandle-move-manual.https.html b/third_party/blink/web_tests/external/wpt/file-system-access/local_FileSystemFileHandle-move-manual.https.html similarity index 84% rename from third_party/blink/web_tests/external/wpt/file-system-access/local_FileSystemBaseHandle-move-manual.https.html rename to third_party/blink/web_tests/external/wpt/file-system-access/local_FileSystemFileHandle-move-manual.https.html index 2290a31..3d056a5 100644 --- a/third_party/blink/web_tests/external/wpt/file-system-access/local_FileSystemBaseHandle-move-manual.https.html +++ b/third_party/blink/web_tests/external/wpt/file-system-access/local_FileSystemFileHandle-move-manual.https.html
@@ -7,4 +7,4 @@ <script src="/resources/testdriver-vendor.js"></script> <script src="resources/test-helpers.js"></script> <script src="resources/local-fs-test-helpers.js"></script> -<script src="script-tests/FileSystemBaseHandle-move.js"></script> +<script src="script-tests/FileSystemFileHandle-move.js"></script>
diff --git a/third_party/blink/web_tests/external/wpt/file-system-access/local_FileSystemBaseHandle-rename-manual.https.html b/third_party/blink/web_tests/external/wpt/file-system-access/local_FileSystemFileHandle-rename-manual.https.html similarity index 84% rename from third_party/blink/web_tests/external/wpt/file-system-access/local_FileSystemBaseHandle-rename-manual.https.html rename to third_party/blink/web_tests/external/wpt/file-system-access/local_FileSystemFileHandle-rename-manual.https.html index e3e5305..66771018 100644 --- a/third_party/blink/web_tests/external/wpt/file-system-access/local_FileSystemBaseHandle-rename-manual.https.html +++ b/third_party/blink/web_tests/external/wpt/file-system-access/local_FileSystemFileHandle-rename-manual.https.html
@@ -7,4 +7,4 @@ <script src="/resources/testdriver-vendor.js"></script> <script src="resources/test-helpers.js"></script> <script src="resources/local-fs-test-helpers.js"></script> -<script src="script-tests/FileSystemBaseHandle-rename.js"></script> +<script src="script-tests/FileSystemFileHandle-rename.js"></script>
diff --git a/third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemBaseHandle-move.https.any-expected.txt b/third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemBaseHandle-move.https.any-expected.txt deleted file mode 100644 index 484a904e..0000000 --- a/third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemBaseHandle-move.https.any-expected.txt +++ /dev/null
@@ -1,27 +0,0 @@ -This is a testharness.js-based test. -PASS move(dir, name) to rename a file -PASS move(dir, name) to rename a file the same name -FAIL move(dir, name) to rename an empty directory promise_test: Unhandled rejection with value: object "AbortError: The user aborted a request." -FAIL move(dir, name) to rename a non-empty directory promise_test: Unhandled rejection with value: object "AbortError: The user aborted a request." -PASS move(dir) to move a file to a new directory -PASS move(dir, "") to move a file to a new directory -PASS move(dir, name) to move a file to a new directory -FAIL move(dir) to move an empty directory to a new directory promise_test: Unhandled rejection with value: object "AbortError: The user aborted a request." -FAIL move(dir, "") to move an empty directory to a new directory promise_test: Unhandled rejection with value: object "AbortError: The user aborted a request." -FAIL move(dir, name) to move an empty directory to a new directory promise_test: Unhandled rejection with value: object "AbortError: The user aborted a request." -FAIL move(dir, "") to move a non-empty directory to a new directory promise_test: Unhandled rejection with value: object "AbortError: The user aborted a request." -FAIL move(dir, name) to move a non-empty directory to a new directory promise_test: Unhandled rejection with value: object "AbortError: The user aborted a request." -PASS move(dir) can be called multiple times -PASS move(dir, "") can be called multiple times -PASS move(dir, name) can be called multiple times -PASS move(dir, name) with a name with invalid characters should fail -FAIL move(dir, name) to move a directory within itself fails promise_rejects_dom: function "function() { throw e }" threw object "AbortError: The user aborted a request." that is not a DOMException InvalidModificationError: property "code" is equal to 20, expected 13 -FAIL move(dir, name) to move a directory within itself and rename fails promise_rejects_dom: function "function() { throw e }" threw object "AbortError: The user aborted a request." that is not a DOMException InvalidModificationError: property "code" is equal to 20, expected 13 -FAIL move(dir) to move a directory within a descendent fails promise_rejects_dom: function "function() { throw e }" threw object "AbortError: The user aborted a request." that is not a DOMException InvalidModificationError: property "code" is equal to 20, expected 13 -FAIL move(dir, name) to move a directory within a descendent fails promise_rejects_dom: function "function() { throw e }" threw object "AbortError: The user aborted a request." that is not a DOMException InvalidModificationError: property "code" is equal to 20, expected 13 -PASS move(dir) while the file has an open writable fails -PASS move(dir, name) while the file has an open writable fails -PASS move(dir) while the destination file has an open writable fails -PASS move(dir, name) while the destination file has an open writable fails -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemBaseHandle-move.https.any.worker-expected.txt b/third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemBaseHandle-move.https.any.worker-expected.txt deleted file mode 100644 index 484a904e..0000000 --- a/third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemBaseHandle-move.https.any.worker-expected.txt +++ /dev/null
@@ -1,27 +0,0 @@ -This is a testharness.js-based test. -PASS move(dir, name) to rename a file -PASS move(dir, name) to rename a file the same name -FAIL move(dir, name) to rename an empty directory promise_test: Unhandled rejection with value: object "AbortError: The user aborted a request." -FAIL move(dir, name) to rename a non-empty directory promise_test: Unhandled rejection with value: object "AbortError: The user aborted a request." -PASS move(dir) to move a file to a new directory -PASS move(dir, "") to move a file to a new directory -PASS move(dir, name) to move a file to a new directory -FAIL move(dir) to move an empty directory to a new directory promise_test: Unhandled rejection with value: object "AbortError: The user aborted a request." -FAIL move(dir, "") to move an empty directory to a new directory promise_test: Unhandled rejection with value: object "AbortError: The user aborted a request." -FAIL move(dir, name) to move an empty directory to a new directory promise_test: Unhandled rejection with value: object "AbortError: The user aborted a request." -FAIL move(dir, "") to move a non-empty directory to a new directory promise_test: Unhandled rejection with value: object "AbortError: The user aborted a request." -FAIL move(dir, name) to move a non-empty directory to a new directory promise_test: Unhandled rejection with value: object "AbortError: The user aborted a request." -PASS move(dir) can be called multiple times -PASS move(dir, "") can be called multiple times -PASS move(dir, name) can be called multiple times -PASS move(dir, name) with a name with invalid characters should fail -FAIL move(dir, name) to move a directory within itself fails promise_rejects_dom: function "function() { throw e }" threw object "AbortError: The user aborted a request." that is not a DOMException InvalidModificationError: property "code" is equal to 20, expected 13 -FAIL move(dir, name) to move a directory within itself and rename fails promise_rejects_dom: function "function() { throw e }" threw object "AbortError: The user aborted a request." that is not a DOMException InvalidModificationError: property "code" is equal to 20, expected 13 -FAIL move(dir) to move a directory within a descendent fails promise_rejects_dom: function "function() { throw e }" threw object "AbortError: The user aborted a request." that is not a DOMException InvalidModificationError: property "code" is equal to 20, expected 13 -FAIL move(dir, name) to move a directory within a descendent fails promise_rejects_dom: function "function() { throw e }" threw object "AbortError: The user aborted a request." that is not a DOMException InvalidModificationError: property "code" is equal to 20, expected 13 -PASS move(dir) while the file has an open writable fails -PASS move(dir, name) while the file has an open writable fails -PASS move(dir) while the destination file has an open writable fails -PASS move(dir, name) while the destination file has an open writable fails -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemBaseHandle-rename.https.any-expected.txt b/third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemBaseHandle-rename.https.any-expected.txt deleted file mode 100644 index 95afc342..0000000 --- a/third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemBaseHandle-rename.https.any-expected.txt +++ /dev/null
@@ -1,15 +0,0 @@ -This is a testharness.js-based test. -PASS rename(name) to rename a file -PASS rename(name) to rename a file the same name -PASS rename("") to rename a file fails -FAIL rename(name) to rename an empty directory promise_test: Unhandled rejection with value: object "AbortError: The user aborted a request." -FAIL rename("") to rename an empty directory fails promise_rejects_js: function "function() { throw e }" threw object "AbortError: The user aborted a request." ("AbortError") expected instance of function "function TypeError() { [native code] }" ("TypeError") -FAIL rename(name) to rename a non-empty directory promise_test: Unhandled rejection with value: object "AbortError: The user aborted a request." -PASS rename(name) can be called multiple times -PASS rename(dir) should rename to stringified dir object -PASS rename(name) with a name with a trailing period should fail -PASS rename(name) with a name with invalid characters should fail -PASS rename(name) while the file has an open writable fails -PASS rename(name) while the destination file has an open writable fails -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemBaseHandle-rename.https.any.worker-expected.txt b/third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemBaseHandle-rename.https.any.worker-expected.txt deleted file mode 100644 index 95afc342..0000000 --- a/third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemBaseHandle-rename.https.any.worker-expected.txt +++ /dev/null
@@ -1,15 +0,0 @@ -This is a testharness.js-based test. -PASS rename(name) to rename a file -PASS rename(name) to rename a file the same name -PASS rename("") to rename a file fails -FAIL rename(name) to rename an empty directory promise_test: Unhandled rejection with value: object "AbortError: The user aborted a request." -FAIL rename("") to rename an empty directory fails promise_rejects_js: function "function() { throw e }" threw object "AbortError: The user aborted a request." ("AbortError") expected instance of function "function TypeError() { [native code] }" ("TypeError") -FAIL rename(name) to rename a non-empty directory promise_test: Unhandled rejection with value: object "AbortError: The user aborted a request." -PASS rename(name) can be called multiple times -PASS rename(dir) should rename to stringified dir object -PASS rename(name) with a name with a trailing period should fail -PASS rename(name) with a name with invalid characters should fail -PASS rename(name) while the file has an open writable fails -PASS rename(name) while the destination file has an open writable fails -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemBaseHandle-rename.https.any.js b/third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemDirectoryHandle-move.https.any.js similarity index 60% copy from third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemBaseHandle-rename.https.any.js copy to third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemDirectoryHandle-move.https.any.js index 889fedc..70a41a5 100644 --- a/third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemBaseHandle-rename.https.any.js +++ b/third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemDirectoryHandle-move.https.any.js
@@ -1,3 +1,3 @@ // META: script=resources/test-helpers.js // META: script=resources/sandboxed-fs-test-helpers.js -// META: script=script-tests/FileSystemBaseHandle-rename.js +// META: script=script-tests/FileSystemDirectoryHandle-move.js
diff --git a/third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemBaseHandle-rename.https.any.js b/third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemDirectoryHandle-rename.https.any.js similarity index 60% copy from third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemBaseHandle-rename.https.any.js copy to third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemDirectoryHandle-rename.https.any.js index 889fedc..d6aa0d9f 100644 --- a/third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemBaseHandle-rename.https.any.js +++ b/third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemDirectoryHandle-rename.https.any.js
@@ -1,3 +1,3 @@ // META: script=resources/test-helpers.js // META: script=resources/sandboxed-fs-test-helpers.js -// META: script=script-tests/FileSystemBaseHandle-rename.js +// META: script=script-tests/FileSystemDirectoryHandle-rename.js
diff --git a/third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemBaseHandle-move.https.any.js b/third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemFileHandle-move.https.any.js similarity index 62% rename from third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemBaseHandle-move.https.any.js rename to third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemFileHandle-move.https.any.js index 46ed5203..1f9678a 100644 --- a/third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemBaseHandle-move.https.any.js +++ b/third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemFileHandle-move.https.any.js
@@ -1,3 +1,3 @@ // META: script=resources/test-helpers.js // META: script=resources/sandboxed-fs-test-helpers.js -// META: script=script-tests/FileSystemBaseHandle-move.js +// META: script=script-tests/FileSystemFileHandle-move.js
diff --git a/third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemBaseHandle-rename.https.any.js b/third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemFileHandle-rename.https.any.js similarity index 61% rename from third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemBaseHandle-rename.https.any.js rename to third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemFileHandle-rename.https.any.js index 889fedc..37039b83 100644 --- a/third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemBaseHandle-rename.https.any.js +++ b/third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemFileHandle-rename.https.any.js
@@ -1,3 +1,3 @@ // META: script=resources/test-helpers.js // META: script=resources/sandboxed-fs-test-helpers.js -// META: script=script-tests/FileSystemBaseHandle-rename.js +// META: script=script-tests/FileSystemFileHandle-rename.js
diff --git a/third_party/blink/web_tests/external/wpt/file-system-access/script-tests/FileSystemDirectoryHandle-move.js b/third_party/blink/web_tests/external/wpt/file-system-access/script-tests/FileSystemDirectoryHandle-move.js new file mode 100644 index 0000000..368e76ee4 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/file-system-access/script-tests/FileSystemDirectoryHandle-move.js
@@ -0,0 +1,227 @@ +// META: script=resources/test-helpers.js + +'use strict'; + +directory_test(async (t, root) => { + const dir = await root.getDirectoryHandle('dir-before', {create: true}); + await dir.move(root, 'dir-after'); + + assert_array_equals(await getSortedDirectoryEntries(root), ['dir-after/']); + assert_array_equals(await getSortedDirectoryEntries(dir), []); +}, 'move(dir, name) to rename an empty directory'); + +directory_test(async (t, root) => { + const dir = await root.getDirectoryHandle('dir-before', {create: true}); + await createFileWithContents(t, 'file-in-dir', 'abc', dir); + await dir.move(root, 'dir-after'); + + assert_array_equals(await getSortedDirectoryEntries(root), ['dir-after/']); + assert_array_equals(await getSortedDirectoryEntries(dir), ['file-in-dir']); +}, 'move(dir, name) to rename a non-empty directory'); + +directory_test(async (t, root) => { + const dir_src = await root.getDirectoryHandle('dir-src', {create: true}); + const dir_dest = await root.getDirectoryHandle('dir-dest', {create: true}); + const dir_in_dir = + await dir_src.getDirectoryHandle('dir-in-dir', {create: true}); + await dir_in_dir.move(dir_dest, ""); + + assert_array_equals( + await getSortedDirectoryEntries(root), ['dir-dest/', 'dir-src/']); + assert_array_equals(await getSortedDirectoryEntries(dir_src), []); + assert_array_equals( + await getSortedDirectoryEntries(dir_dest), ['dir-in-dir/']); + assert_array_equals(await getSortedDirectoryEntries(dir_in_dir), []); +}, 'move(dir, "") to move an empty directory to a new directory'); + +directory_test(async (t, root) => { + const dir_src = await root.getDirectoryHandle('dir-src', {create: true}); + const dir_dest = await root.getDirectoryHandle('dir-dest', {create: true}); + const dir_in_dir = + await dir_src.getDirectoryHandle('dir-in-dir', {create: true}); + await dir_in_dir.move(dir_dest, 'dir-in-dir'); + + assert_array_equals( + await getSortedDirectoryEntries(root), ['dir-dest/', 'dir-src/']); + assert_array_equals(await getSortedDirectoryEntries(dir_src), []); + assert_array_equals( + await getSortedDirectoryEntries(dir_dest), ['dir-in-dir/']); + assert_array_equals(await getSortedDirectoryEntries(dir_in_dir), []); +}, 'move(dir, name) to move an empty directory to a new directory'); + +directory_test(async (t, root) => { + const dir_src = await root.getDirectoryHandle('dir-src', {create: true}); + const dir_dest = await root.getDirectoryHandle('dir-dest', {create: true}); + const dir_in_dir = + await dir_src.getDirectoryHandle('dir-in-dir', {create: true}); + const file = + await createFileWithContents(t, 'file-in-dir', 'abc', dir_in_dir); + await dir_in_dir.move(dir_dest, ""); + + assert_array_equals( + await getSortedDirectoryEntries(root), ['dir-dest/', 'dir-src/']); + assert_array_equals(await getSortedDirectoryEntries(dir_src), []); + assert_array_equals( + await getSortedDirectoryEntries(dir_dest), ['dir-in-dir/']); + assert_array_equals( + await getSortedDirectoryEntries(dir_in_dir), ['file-in-dir']); + // `file` should be invalidated after moving directories. + await promise_rejects_dom(t, 'NotFoundError', getFileContents(file)); +}, 'move(dir, "") to move a non-empty directory to a new directory'); + +directory_test(async (t, root) => { + const dir_src = await root.getDirectoryHandle('dir-src', {create: true}); + const dir_dest = await root.getDirectoryHandle('dir-dest', {create: true}); + const dir_in_dir = + await dir_src.getDirectoryHandle('dir-in-dir', {create: true}); + const file = + await createFileWithContents(t, 'file-in-dir', 'abc', dir_in_dir); + await dir_in_dir.move(dir_dest, 'dir-in-dir'); + + assert_array_equals( + await getSortedDirectoryEntries(root), ['dir-dest/', 'dir-src/']); + assert_array_equals(await getSortedDirectoryEntries(dir_src), []); + assert_array_equals( + await getSortedDirectoryEntries(dir_dest), ['dir-in-dir/']); + assert_array_equals( + await getSortedDirectoryEntries(dir_in_dir), ['file-in-dir']); + // `file` should be invalidated after moving directories. + await promise_rejects_dom(t, 'NotFoundError', getFileContents(file)); +}, 'move(dir, name) to move a non-empty directory to a new directory'); + +directory_test(async (t, root) => { + const dir1 = await root.getDirectoryHandle('dir1', {create: true}); + const dir2 = await root.getDirectoryHandle('dir2', {create: true}); + const handle = await createFileWithContents(t, 'file', 'foo', root); + + await handle.move(dir1); + assert_array_equals( + await getSortedDirectoryEntries(root), ['dir1/', 'dir2/']); + assert_array_equals(await getSortedDirectoryEntries(dir1), ['file']); + assert_array_equals(await getSortedDirectoryEntries(dir2), []); + assert_equals(await getFileContents(handle), 'foo'); + + await handle.move(dir2); + assert_array_equals( + await getSortedDirectoryEntries(root), ['dir1/', 'dir2/']); + assert_array_equals(await getSortedDirectoryEntries(dir1), []); + assert_array_equals(await getSortedDirectoryEntries(dir2), ['file']); + assert_equals(await getFileContents(handle), 'foo'); + + await handle.move(root); + assert_array_equals( + await getSortedDirectoryEntries(root), ['dir1/', 'dir2/', 'file']); + assert_array_equals(await getSortedDirectoryEntries(dir1), []); + assert_array_equals(await getSortedDirectoryEntries(dir2), []); + assert_equals(await getFileContents(handle), 'foo'); +}, 'move(dir) can be called multiple times'); + +directory_test(async (t, root) => { + const dir1 = await root.getDirectoryHandle('dir1', {create: true}); + const dir2 = await root.getDirectoryHandle('dir2', {create: true}); + const handle = await createFileWithContents(t, 'file', 'foo', root); + + await handle.move(dir1, ""); + assert_array_equals( + await getSortedDirectoryEntries(root), ['dir1/', 'dir2/']); + assert_array_equals(await getSortedDirectoryEntries(dir1), ['file']); + assert_array_equals(await getSortedDirectoryEntries(dir2), []); + assert_equals(await getFileContents(handle), 'foo'); + + await handle.move(dir2, ""); + assert_array_equals( + await getSortedDirectoryEntries(root), ['dir1/', 'dir2/']); + assert_array_equals(await getSortedDirectoryEntries(dir1), []); + assert_array_equals(await getSortedDirectoryEntries(dir2), ['file']); + assert_equals(await getFileContents(handle), 'foo'); + + await handle.move(root, ""); + assert_array_equals( + await getSortedDirectoryEntries(root), ['dir1/', 'dir2/', 'file']); + assert_array_equals(await getSortedDirectoryEntries(dir1), []); + assert_array_equals(await getSortedDirectoryEntries(dir2), []); + assert_equals(await getFileContents(handle), 'foo'); +}, 'move(dir, "") can be called multiple times'); + +directory_test(async (t, root) => { + const dir1 = await root.getDirectoryHandle('dir1', {create: true}); + const dir2 = await root.getDirectoryHandle('dir2', {create: true}); + const handle = await createFileWithContents(t, 'file', 'foo', root); + + await handle.move(dir1, 'file-1'); + assert_array_equals( + await getSortedDirectoryEntries(root), ['dir1/', 'dir2/']); + assert_array_equals(await getSortedDirectoryEntries(dir1), ['file-1']); + assert_array_equals(await getSortedDirectoryEntries(dir2), []); + assert_equals(await getFileContents(handle), 'foo'); + + await handle.move(dir2, 'file-2'); + assert_array_equals( + await getSortedDirectoryEntries(root), ['dir1/', 'dir2/']); + assert_array_equals(await getSortedDirectoryEntries(dir1), []); + assert_array_equals(await getSortedDirectoryEntries(dir2), ['file-2']); + assert_equals(await getFileContents(handle), 'foo'); + + await handle.move(root, 'file-3'); + assert_array_equals( + await getSortedDirectoryEntries(root), ['dir1/', 'dir2/', 'file-3']); + assert_array_equals(await getSortedDirectoryEntries(dir1), []); + assert_array_equals(await getSortedDirectoryEntries(dir2), []); + assert_equals(await getFileContents(handle), 'foo'); +}, 'move(dir, name) can be called multiple times'); + +directory_test(async (t, root) => { + const handle = await createFileWithContents(t, 'file-before', 'foo', root); + await promise_rejects_js( + t, TypeError, handle.move(root, '#$23423@352^*3243')); + + assert_array_equals(await getSortedDirectoryEntries(root), ['file-before']); + assert_equals(await getFileContents(handle), 'foo'); + assert_equals(await getFileSize(handle), 3); +}, 'move(dir, name) with a name with invalid characters should fail'); + +directory_test(async (t, root) => { + const dir = await root.getDirectoryHandle('dir', {create: true}); + await promise_rejects_dom( + t, 'InvalidModificationError', dir.move(dir)); + + assert_array_equals(await getSortedDirectoryEntries(root), ['dir/']); + assert_array_equals(await getSortedDirectoryEntries(dir), []); +}, 'move(dir, name) to move a directory within itself fails'); + +directory_test(async (t, root) => { + const dir = await root.getDirectoryHandle('dir', {create: true}); + await promise_rejects_dom( + t, 'InvalidModificationError', dir.move(dir, 'dir-fail')); + + assert_array_equals(await getSortedDirectoryEntries(root), ['dir/']); + assert_array_equals(await getSortedDirectoryEntries(dir), []); +}, 'move(dir, name) to move a directory within itself and rename fails'); + +directory_test(async (t, root) => { + const parent_dir = + await root.getDirectoryHandle('parent-dir', {create: true}); + const child_dir = + await parent_dir.getDirectoryHandle('child-dir', {create: true}); + await promise_rejects_dom( + t, 'InvalidModificationError', parent_dir.move(child_dir)); + + assert_array_equals(await getSortedDirectoryEntries(root), ['parent-dir/']); + assert_array_equals( + await getSortedDirectoryEntries(parent_dir), ['child-dir/']); + assert_array_equals(await getSortedDirectoryEntries(child_dir), []); +}, 'move(dir) to move a directory within a descendent fails'); + +directory_test(async (t, root) => { + const parent_dir = + await root.getDirectoryHandle('parent-dir', {create: true}); + const child_dir = + await parent_dir.getDirectoryHandle('child-dir', {create: true}); + await promise_rejects_dom( + t, 'InvalidModificationError', parent_dir.move(child_dir, 'dir')); + + assert_array_equals(await getSortedDirectoryEntries(root), ['parent-dir/']); + assert_array_equals( + await getSortedDirectoryEntries(parent_dir), ['child-dir/']); + assert_array_equals(await getSortedDirectoryEntries(child_dir), []); +}, 'move(dir, name) to move a directory within a descendent fails');
diff --git a/third_party/blink/web_tests/external/wpt/file-system-access/script-tests/FileSystemDirectoryHandle-rename.js b/third_party/blink/web_tests/external/wpt/file-system-access/script-tests/FileSystemDirectoryHandle-rename.js new file mode 100644 index 0000000..315303b0 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/file-system-access/script-tests/FileSystemDirectoryHandle-rename.js
@@ -0,0 +1,28 @@ +// META: script=resources/test-helpers.js + +'use strict'; + +directory_test(async (t, root) => { + const dir = await root.getDirectoryHandle('dir-before', {create: true}); + await dir.rename('dir-after'); + + assert_array_equals(await getSortedDirectoryEntries(root), ['dir-after/']); + assert_array_equals(await getSortedDirectoryEntries(dir), []); +}, 'rename(name) to rename an empty directory'); + +directory_test(async (t, root) => { + const dir = await root.getDirectoryHandle('dir-before', {create: true}); + await promise_rejects_js(t, TypeError, dir.rename('')); + + assert_array_equals(await getSortedDirectoryEntries(root), ['dir-before/']); + assert_array_equals(await getSortedDirectoryEntries(dir), []); +}, 'rename("") to rename an empty directory fails'); + +directory_test(async (t, root) => { + const dir = await root.getDirectoryHandle('dir-before', {create: true}); + await createFileWithContents(t, 'file-in-dir', 'abc', dir); + await dir.rename('dir-after'); + + assert_array_equals(await getSortedDirectoryEntries(root), ['dir-after/']); + assert_array_equals(await getSortedDirectoryEntries(dir), ['file-in-dir']); +}, 'rename(name) to rename a non-empty directory');
diff --git a/third_party/blink/web_tests/external/wpt/file-system-access/script-tests/FileSystemBaseHandle-move.js b/third_party/blink/web_tests/external/wpt/file-system-access/script-tests/FileSystemFileHandle-move.js similarity index 63% rename from third_party/blink/web_tests/external/wpt/file-system-access/script-tests/FileSystemBaseHandle-move.js rename to third_party/blink/web_tests/external/wpt/file-system-access/script-tests/FileSystemFileHandle-move.js index 6088502..7e62872a 100644 --- a/third_party/blink/web_tests/external/wpt/file-system-access/script-tests/FileSystemBaseHandle-move.js +++ b/third_party/blink/web_tests/external/wpt/file-system-access/script-tests/FileSystemFileHandle-move.js
@@ -21,23 +21,6 @@ }, 'move(dir, name) to rename a file the same name'); directory_test(async (t, root) => { - const dir = await root.getDirectoryHandle('dir-before', {create: true}); - await dir.move(root, 'dir-after'); - - assert_array_equals(await getSortedDirectoryEntries(root), ['dir-after/']); - assert_array_equals(await getSortedDirectoryEntries(dir), []); -}, 'move(dir, name) to rename an empty directory'); - -directory_test(async (t, root) => { - const dir = await root.getDirectoryHandle('dir-before', {create: true}); - await createFileWithContents(t, 'file-in-dir', 'abc', dir); - await dir.move(root, 'dir-after'); - - assert_array_equals(await getSortedDirectoryEntries(root), ['dir-after/']); - assert_array_equals(await getSortedDirectoryEntries(dir), ['file-in-dir']); -}, 'move(dir, name) to rename a non-empty directory'); - -directory_test(async (t, root) => { const dir_src = await root.getDirectoryHandle('dir-src', {create: true}); const dir_dest = await root.getDirectoryHandle('dir-dest', {create: true}); const file = await createFileWithContents(t, 'file', 'abc', dir_src); @@ -82,91 +65,6 @@ }, 'move(dir, name) to move a file to a new directory'); directory_test(async (t, root) => { - const dir_src = await root.getDirectoryHandle('dir-src', {create: true}); - const dir_dest = await root.getDirectoryHandle('dir-dest', {create: true}); - const dir_in_dir = - await dir_src.getDirectoryHandle('dir-in-dir', {create: true}); - await dir_in_dir.move(dir_dest); - - assert_array_equals( - await getSortedDirectoryEntries(root), ['dir-dest/', 'dir-src/']); - assert_array_equals(await getSortedDirectoryEntries(dir_src), []); - assert_array_equals( - await getSortedDirectoryEntries(dir_dest), ['dir-in-dir/']); - assert_array_equals(await getSortedDirectoryEntries(dir_in_dir), []); -}, 'move(dir) to move an empty directory to a new directory'); - -directory_test(async (t, root) => { - const dir_src = await root.getDirectoryHandle('dir-src', {create: true}); - const dir_dest = await root.getDirectoryHandle('dir-dest', {create: true}); - const dir_in_dir = - await dir_src.getDirectoryHandle('dir-in-dir', {create: true}); - await dir_in_dir.move(dir_dest, ""); - - assert_array_equals( - await getSortedDirectoryEntries(root), ['dir-dest/', 'dir-src/']); - assert_array_equals(await getSortedDirectoryEntries(dir_src), []); - assert_array_equals( - await getSortedDirectoryEntries(dir_dest), ['dir-in-dir/']); - assert_array_equals(await getSortedDirectoryEntries(dir_in_dir), []); -}, 'move(dir, "") to move an empty directory to a new directory'); - -directory_test(async (t, root) => { - const dir_src = await root.getDirectoryHandle('dir-src', {create: true}); - const dir_dest = await root.getDirectoryHandle('dir-dest', {create: true}); - const dir_in_dir = - await dir_src.getDirectoryHandle('dir-in-dir', {create: true}); - await dir_in_dir.move(dir_dest, 'dir-in-dir'); - - assert_array_equals( - await getSortedDirectoryEntries(root), ['dir-dest/', 'dir-src/']); - assert_array_equals(await getSortedDirectoryEntries(dir_src), []); - assert_array_equals( - await getSortedDirectoryEntries(dir_dest), ['dir-in-dir/']); - assert_array_equals(await getSortedDirectoryEntries(dir_in_dir), []); -}, 'move(dir, name) to move an empty directory to a new directory'); - -directory_test(async (t, root) => { - const dir_src = await root.getDirectoryHandle('dir-src', {create: true}); - const dir_dest = await root.getDirectoryHandle('dir-dest', {create: true}); - const dir_in_dir = - await dir_src.getDirectoryHandle('dir-in-dir', {create: true}); - const file = - await createFileWithContents(t, 'file-in-dir', 'abc', dir_in_dir); - await dir_in_dir.move(dir_dest, ""); - - assert_array_equals( - await getSortedDirectoryEntries(root), ['dir-dest/', 'dir-src/']); - assert_array_equals(await getSortedDirectoryEntries(dir_src), []); - assert_array_equals( - await getSortedDirectoryEntries(dir_dest), ['dir-in-dir/']); - assert_array_equals( - await getSortedDirectoryEntries(dir_in_dir), ['file-in-dir']); - // `file` should be invalidated after moving directories. - await promise_rejects_dom(t, 'NotFoundError', getFileContents(file)); -}, 'move(dir, "") to move a non-empty directory to a new directory'); - -directory_test(async (t, root) => { - const dir_src = await root.getDirectoryHandle('dir-src', {create: true}); - const dir_dest = await root.getDirectoryHandle('dir-dest', {create: true}); - const dir_in_dir = - await dir_src.getDirectoryHandle('dir-in-dir', {create: true}); - const file = - await createFileWithContents(t, 'file-in-dir', 'abc', dir_in_dir); - await dir_in_dir.move(dir_dest, 'dir-in-dir'); - - assert_array_equals( - await getSortedDirectoryEntries(root), ['dir-dest/', 'dir-src/']); - assert_array_equals(await getSortedDirectoryEntries(dir_src), []); - assert_array_equals( - await getSortedDirectoryEntries(dir_dest), ['dir-in-dir/']); - assert_array_equals( - await getSortedDirectoryEntries(dir_in_dir), ['file-in-dir']); - // `file` should be invalidated after moving directories. - await promise_rejects_dom(t, 'NotFoundError', getFileContents(file)); -}, 'move(dir, name) to move a non-empty directory to a new directory'); - -directory_test(async (t, root) => { const dir1 = await root.getDirectoryHandle('dir1', {create: true}); const dir2 = await root.getDirectoryHandle('dir2', {create: true}); const handle = await createFileWithContents(t, 'file', 'foo', root); @@ -258,52 +156,6 @@ }, 'move(dir, name) with a name with invalid characters should fail'); directory_test(async (t, root) => { - const dir = await root.getDirectoryHandle('dir', {create: true}); - await promise_rejects_dom( - t, 'InvalidModificationError', dir.move(dir)); - - assert_array_equals(await getSortedDirectoryEntries(root), ['dir/']); - assert_array_equals(await getSortedDirectoryEntries(dir), []); -}, 'move(dir, name) to move a directory within itself fails'); - -directory_test(async (t, root) => { - const dir = await root.getDirectoryHandle('dir', {create: true}); - await promise_rejects_dom( - t, 'InvalidModificationError', dir.move(dir, 'dir-fail')); - - assert_array_equals(await getSortedDirectoryEntries(root), ['dir/']); - assert_array_equals(await getSortedDirectoryEntries(dir), []); -}, 'move(dir, name) to move a directory within itself and rename fails'); - -directory_test(async (t, root) => { - const parent_dir = - await root.getDirectoryHandle('parent-dir', {create: true}); - const child_dir = - await parent_dir.getDirectoryHandle('child-dir', {create: true}); - await promise_rejects_dom( - t, 'InvalidModificationError', parent_dir.move(child_dir)); - - assert_array_equals(await getSortedDirectoryEntries(root), ['parent-dir/']); - assert_array_equals( - await getSortedDirectoryEntries(parent_dir), ['child-dir/']); - assert_array_equals(await getSortedDirectoryEntries(child_dir), []); -}, 'move(dir) to move a directory within a descendent fails'); - -directory_test(async (t, root) => { - const parent_dir = - await root.getDirectoryHandle('parent-dir', {create: true}); - const child_dir = - await parent_dir.getDirectoryHandle('child-dir', {create: true}); - await promise_rejects_dom( - t, 'InvalidModificationError', parent_dir.move(child_dir, 'dir')); - - assert_array_equals(await getSortedDirectoryEntries(root), ['parent-dir/']); - assert_array_equals( - await getSortedDirectoryEntries(parent_dir), ['child-dir/']); - assert_array_equals(await getSortedDirectoryEntries(child_dir), []); -}, 'move(dir, name) to move a directory within a descendent fails'); - -directory_test(async (t, root) => { const dir_src = await root.getDirectoryHandle('dir-src', {create: true}); const dir_dest = await root.getDirectoryHandle('dir-dest', {create: true}); const file = await createFileWithContents(t, 'file', 'abc', dir_src);
diff --git a/third_party/blink/web_tests/external/wpt/file-system-access/script-tests/FileSystemBaseHandle-rename.js b/third_party/blink/web_tests/external/wpt/file-system-access/script-tests/FileSystemFileHandle-rename.js similarity index 79% rename from third_party/blink/web_tests/external/wpt/file-system-access/script-tests/FileSystemBaseHandle-rename.js rename to third_party/blink/web_tests/external/wpt/file-system-access/script-tests/FileSystemFileHandle-rename.js index 646f7c54..425fcae 100644 --- a/third_party/blink/web_tests/external/wpt/file-system-access/script-tests/FileSystemBaseHandle-rename.js +++ b/third_party/blink/web_tests/external/wpt/file-system-access/script-tests/FileSystemFileHandle-rename.js
@@ -30,31 +30,6 @@ }, 'rename("") to rename a file fails'); directory_test(async (t, root) => { - const dir = await root.getDirectoryHandle('dir-before', {create: true}); - await dir.rename('dir-after'); - - assert_array_equals(await getSortedDirectoryEntries(root), ['dir-after/']); - assert_array_equals(await getSortedDirectoryEntries(dir), []); -}, 'rename(name) to rename an empty directory'); - -directory_test(async (t, root) => { - const dir = await root.getDirectoryHandle('dir-before', {create: true}); - await promise_rejects_js(t, TypeError, dir.rename('')); - - assert_array_equals(await getSortedDirectoryEntries(root), ['dir-before/']); - assert_array_equals(await getSortedDirectoryEntries(dir), []); -}, 'rename("") to rename an empty directory fails'); - -directory_test(async (t, root) => { - const dir = await root.getDirectoryHandle('dir-before', {create: true}); - await createFileWithContents(t, 'file-in-dir', 'abc', dir); - await dir.rename('dir-after'); - - assert_array_equals(await getSortedDirectoryEntries(root), ['dir-after/']); - assert_array_equals(await getSortedDirectoryEntries(dir), ['file-in-dir']); -}, 'rename(name) to rename a non-empty directory'); - -directory_test(async (t, root) => { const handle = await createFileWithContents(t, 'file-1', 'foo', root); await handle.rename('file-2');
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-embedder-policy/credentialless/redirect.tentative.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-embedder-policy/credentialless/redirect.tentative.html index 219de4a..f3bf02d 100644 --- a/third_party/blink/web_tests/external/wpt/html/cross-origin-embedder-policy/credentialless/redirect.tentative.html +++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-embedder-policy/credentialless/redirect.tentative.html
@@ -53,7 +53,7 @@ redirectTest("same-origin -> cross-origin", same_origin, cross_origin, undefined) redirectTest("cross-origin -> same-origin", - cross_origin, same_origin, cookie_same_origin); + cross_origin, same_origin, undefined); redirectTest("cross-origin -> cross-origin", cross_origin, cross_origin, undefined); }, "Setup");
diff --git a/third_party/blink/web_tests/external/wpt/serial/README.md b/third_party/blink/web_tests/external/wpt/serial/README.md new file mode 100644 index 0000000..7040cf0 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/serial/README.md
@@ -0,0 +1,20 @@ +# Web Serial Testing + +Automated testing for the [Web Serial API] relies on a test-only interface which +must be provided by browsers under test. This is similar to [WebUSB] however +there is no separate specification of the API other than the tests themselves +and the Chromium implementation. + +Tests in this suite include `resources/automation.js` to detect and load the +test API as needed. + +The Chromium implementation is provided by +`../resources/chromium/fake-serial.js` using [MojoJS]. + +Tests with the "-manual" suffix do not use the test-only interface and expect a +real hardware device to be connected. The specific characteristics of the device +are described in each test. + +[MojoJS]: https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/testing/web_platform_tests.md#mojojs +[WebUSB]: ../webusb +[Web Serial API]: https://wicg.github.io/serial
diff --git a/third_party/blink/web_tests/external/wpt/web-nfc/NDEFMessage_constructor.https.html b/third_party/blink/web_tests/external/wpt/web-nfc/NDEFMessage_constructor.https.html deleted file mode 100644 index 5d6b557..0000000 --- a/third_party/blink/web_tests/external/wpt/web-nfc/NDEFMessage_constructor.https.html +++ /dev/null
@@ -1,44 +0,0 @@ -<!DOCTYPE html> -<title>NDEFMessage constructor</title> -<link rel="help" href="https://w3c.github.io/web-nfc/#dom-ndefmessage"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/nfc-helpers.js"></script> -<script> - - test(() => { - assert_equals(NDEFMessage.length, 1); - assert_throws_js(TypeError, () => new NDEFMessage()); - }, 'NDEFMessage constructor without init dict'); - - test(() => { - assert_throws_js(TypeError, () => new NDEFMessage(null), - 'NDEFMessageInit#records is a required field.'); - }, 'NDEFMessage constructor with null init dict'); - - test(() => { - assert_throws_js(TypeError, () => new NDEFMessage({dummy_key: 'dummy_value'}), - 'NDEFMessageInit#records is a required field.'); - }, 'NDEFMessage constructor without NDEFMessageInit#records field'); - - test(() => { - assert_throws_js(TypeError, () => new NDEFMessage({records: []}), - 'NDEFMessageInit#records should not be empty.'); - }, 'NDEFMessage constructor with NDEFMessageInit#records being empty'); - - test(() => { - const message = new NDEFMessage( - createMessage([createTextRecord(test_text_data)])); - assert_equals(message.records.length, 1, 'one text record'); - assert_equals(message.records[0].recordType, 'text', 'messageType'); - assert_equals(message.records[0].mediaType, null, 'mediaType'); - assert_equals(message.records[0].encoding, 'utf-8', 'encoding'); - assert_equals(message.records[0].lang, 'en', 'lang'); - assert_true(message.records[0].data instanceof DataView, - 'data returns a DataView'); - const decoder = new TextDecoder(); - assert_equals(decoder.decode(message.records[0].data), test_text_data, - 'data contains the same text content'); - }, 'NDEFMessage constructor with a text record'); - -</script>
diff --git a/third_party/blink/web_tests/external/wpt/web-nfc/NDEFMessage_constructor.https.window.js b/third_party/blink/web_tests/external/wpt/web-nfc/NDEFMessage_constructor.https.window.js new file mode 100644 index 0000000..f4d9a44 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/web-nfc/NDEFMessage_constructor.https.window.js
@@ -0,0 +1,42 @@ +// META: script=resources/nfc-helpers.js + +'use strict'; + +test(() => { + assert_equals(NDEFMessage.length, 1); + assert_throws_js(TypeError, () => new NDEFMessage()); +}, 'NDEFMessage constructor without init dict'); + +test(() => { + assert_throws_js( + TypeError, () => new NDEFMessage(null), + 'NDEFMessageInit#records is a required field.'); +}, 'NDEFMessage constructor with null init dict'); + +test(() => { + assert_throws_js( + TypeError, () => new NDEFMessage({dummy_key: 'dummy_value'}), + 'NDEFMessageInit#records is a required field.'); +}, 'NDEFMessage constructor without NDEFMessageInit#records field'); + +test(() => { + assert_throws_js( + TypeError, () => new NDEFMessage({records: []}), + 'NDEFMessageInit#records should not be empty.'); +}, 'NDEFMessage constructor with NDEFMessageInit#records being empty'); + +test(() => { + const message = + new NDEFMessage(createMessage([createTextRecord(test_text_data)])); + assert_equals(message.records.length, 1, 'one text record'); + assert_equals(message.records[0].recordType, 'text', 'messageType'); + assert_equals(message.records[0].mediaType, null, 'mediaType'); + assert_equals(message.records[0].encoding, 'utf-8', 'encoding'); + assert_equals(message.records[0].lang, 'en', 'lang'); + assert_true( + message.records[0].data instanceof DataView, 'data returns a DataView'); + const decoder = new TextDecoder(); + assert_equals( + decoder.decode(message.records[0].data), test_text_data, + 'data contains the same text content'); +}, 'NDEFMessage constructor with a text record');
diff --git a/third_party/blink/web_tests/external/wpt/web-nfc/NDEFReadingEvent_constructor.https.html b/third_party/blink/web_tests/external/wpt/web-nfc/NDEFReadingEvent_constructor.https.html deleted file mode 100644 index 122070f..0000000 --- a/third_party/blink/web_tests/external/wpt/web-nfc/NDEFReadingEvent_constructor.https.html +++ /dev/null
@@ -1,60 +0,0 @@ -<!DOCTYPE html> -<title>NDEFReadingEvent constructor</title> -<link rel="help" href="https://w3c.github.io/web-nfc/#dom-ndefreadingevent"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/nfc-helpers.js"></script> -<script> - - test(() => { - assert_equals(NDEFReadingEvent.length, 2); - assert_throws_js(TypeError, () => new NDEFReadingEvent('message')); - }, 'NDEFReadingEvent constructor without init dict'); - - test(() => { - assert_throws_js(TypeError, () => new NDEFReadingEvent('type', - {serialNumber: '', message: null}), - 'NDEFMessageInit#records is a required field.'); - }, 'NDEFReadingEvent constructor failed to construct its NDEFMessage'); - - test(() => { - const message = createMessage([createMimeRecordFromJson(test_buffer_data)]); - const event = new NDEFReadingEvent('type', {serialNumber: null, message: message}); - assert_equals(event.serialNumber, '', 'serialNumber'); - }, 'NDEFReadingEvent constructor with null serialNumber'); - - test(() => { - const message = createMessage([createMimeRecordFromJson(test_buffer_data)]); - const event = new NDEFReadingEvent('type', {message: message}); - assert_equals(event.serialNumber, '', 'serialNumber'); - }, 'NDEFReadingEvent constructor with serialNumber not present'); - - test(() => { - const message = createMessage([createMimeRecord(test_buffer_data)]); - const event = new NDEFReadingEvent('type', {serialNumber: '', message: message}); - assert_equals(event.type, 'type', 'type'); - assert_equals(event.serialNumber, '', 'serialNumber'); - assertWebNDEFMessagesEqual(event.message, new NDEFMessage(message)); - }, 'NDEFReadingEvent constructor with valid parameters'); - - test(() => { - const record_init = createTextRecord(test_text_data); - const event = new NDEFReadingEvent('type', - {serialNumber: '', message: createMessage([record_init])}); - assert_equals(event.type, 'type', 'type'); - assert_equals(event.serialNumber, '', 'serialNumber'); - assert_equals(1, event.message.records.length, 'only 1 record'); - - const record = new NDEFRecord(record_init); - assert_equals(record.recordType, 'text', 'recordType'); - assert_equals(record.mediaType, null, 'mediaType'); - assert_equals(record.encoding, 'utf-8', 'encoding'); - assert_equals(record.lang, 'en', 'lang'); - - assert_equals(event.message.records[0].recordType, 'text', 'recordType'); - assert_equals(event.message.records[0].mediaType, null, 'mediaType'); - assert_equals(event.message.records[0].encoding, 'utf-8', 'encoding'); - assert_equals(event.message.records[0].lang, null, 'lang is not set'); - }, 'NDEFReadingEvent constructor does not set NDEFRecord#lang for any text records it embeds'); - -</script>
diff --git a/third_party/blink/web_tests/external/wpt/web-nfc/NDEFReadingEvent_constructor.https.window.js b/third_party/blink/web_tests/external/wpt/web-nfc/NDEFReadingEvent_constructor.https.window.js new file mode 100644 index 0000000..418a8a6 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/web-nfc/NDEFReadingEvent_constructor.https.window.js
@@ -0,0 +1,57 @@ +// META: script=resources/nfc-helpers.js + +'use strict'; + +test(() => { + assert_equals(NDEFReadingEvent.length, 2); + assert_throws_js(TypeError, () => new NDEFReadingEvent('message')); +}, 'NDEFReadingEvent constructor without init dict'); + +test(() => { + assert_throws_js( + TypeError, + () => new NDEFReadingEvent('type', {serialNumber: '', message: null}), + 'NDEFMessageInit#records is a required field.'); +}, 'NDEFReadingEvent constructor failed to construct its NDEFMessage'); + +test(() => { + const message = createMessage([createMimeRecordFromJson(test_buffer_data)]); + const event = + new NDEFReadingEvent('type', {serialNumber: null, message: message}); + assert_equals(event.serialNumber, '', 'serialNumber'); +}, 'NDEFReadingEvent constructor with null serialNumber'); + +test(() => { + const message = createMessage([createMimeRecordFromJson(test_buffer_data)]); + const event = new NDEFReadingEvent('type', {message: message}); + assert_equals(event.serialNumber, '', 'serialNumber'); +}, 'NDEFReadingEvent constructor with serialNumber not present'); + +test(() => { + const message = createMessage([createMimeRecord(test_buffer_data)]); + const event = + new NDEFReadingEvent('type', {serialNumber: '', message: message}); + assert_equals(event.type, 'type', 'type'); + assert_equals(event.serialNumber, '', 'serialNumber'); + assertWebNDEFMessagesEqual(event.message, new NDEFMessage(message)); +}, 'NDEFReadingEvent constructor with valid parameters'); + +test(() => { + const record_init = createTextRecord(test_text_data); + const event = new NDEFReadingEvent( + 'type', {serialNumber: '', message: createMessage([record_init])}); + assert_equals(event.type, 'type', 'type'); + assert_equals(event.serialNumber, '', 'serialNumber'); + assert_equals(1, event.message.records.length, 'only 1 record'); + + const record = new NDEFRecord(record_init); + assert_equals(record.recordType, 'text', 'recordType'); + assert_equals(record.mediaType, null, 'mediaType'); + assert_equals(record.encoding, 'utf-8', 'encoding'); + assert_equals(record.lang, 'en', 'lang'); + + assert_equals(event.message.records[0].recordType, 'text', 'recordType'); + assert_equals(event.message.records[0].mediaType, null, 'mediaType'); + assert_equals(event.message.records[0].encoding, 'utf-8', 'encoding'); + assert_equals(event.message.records[0].lang, null, 'lang is not set'); +}, 'NDEFReadingEvent constructor does not set NDEFRecord#lang for any text records it embeds');
diff --git a/third_party/blink/web_tests/external/wpt/web-nfc/nfc_permission.https.html b/third_party/blink/web_tests/external/wpt/web-nfc/nfc_permission.https.html deleted file mode 100644 index af76d1b4..0000000 --- a/third_party/blink/web_tests/external/wpt/web-nfc/nfc_permission.https.html +++ /dev/null
@@ -1,29 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>Web NFC: permission</title> -<link rel="help" href="https://w3c.github.io/web-nfc/"/> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/resources/testdriver.js"></script> -<script src="/resources/testdriver-vendor.js"></script> -<script> - -"use strict"; - -promise_test(async t => { - await test_driver.set_permission({ name: 'nfc' }, 'denied', false); - - const status = await navigator.permissions.query({ name:'nfc' }); - assert_class_string(status, "PermissionStatus"); - assert_equals(status.state, "denied"); -}, "Deny nfc permission should work."); - -promise_test(async t => { - await test_driver.set_permission({ name: 'nfc' }, 'granted', false); - - const status = await navigator.permissions.query({ name: 'nfc' }); - assert_class_string(status, "PermissionStatus"); - assert_equals(status.state, "granted"); -}, "Grant nfc permission should work."); - -</script>
diff --git a/third_party/blink/web_tests/external/wpt/web-nfc/nfc_permission.https.window.js b/third_party/blink/web_tests/external/wpt/web-nfc/nfc_permission.https.window.js new file mode 100644 index 0000000..9150a708 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/web-nfc/nfc_permission.https.window.js
@@ -0,0 +1,20 @@ +// META: script=/resources/testdriver.js +// META: script=/resources/testdriver-vendor.js + +'use strict'; + +promise_test(async t => { + await test_driver.set_permission({name: 'nfc'}, 'denied', false); + + const status = await navigator.permissions.query({name: 'nfc'}); + assert_class_string(status, 'PermissionStatus'); + assert_equals(status.state, 'denied'); +}, 'Deny nfc permission should work.'); + +promise_test(async t => { + await test_driver.set_permission({name: 'nfc'}, 'granted', false); + + const status = await navigator.permissions.query({name: 'nfc'}); + assert_class_string(status, 'PermissionStatus'); + assert_equals(status.state, 'granted'); +}, 'Grant nfc permission should work.');
diff --git a/third_party/blink/web_tests/external/wpt/webusb/README.md b/third_party/blink/web_tests/external/wpt/webusb/README.md index 107a5bb..c19e8fa 100644 --- a/third_party/blink/web_tests/external/wpt/webusb/README.md +++ b/third_party/blink/web_tests/external/wpt/webusb/README.md
@@ -7,6 +7,11 @@ the API to be loaded as needed. The Chromium implementation is provided by -`../resources/chromium/webusb-test.js`. +`../resources/chromium/webusb-test.js` using [MojoJS]. +Tests with the "-manual" suffix do not use the test-only interface and expect a +real hardware device to be connected. The specific characteristics of the device +are described in each test. + +[MojoJS]: https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/testing/web_platform_tests.md#mojojs [WebUSB Testing API]: https://wicg.github.io/webusb/test/
diff --git a/third_party/blink/web_tests/platform/mac-mac-arm11.0/external/wpt/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/location-setter-user-click-expected.txt b/third_party/blink/web_tests/platform/mac-mac-arm11.0/external/wpt/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/location-setter-user-click-expected.txt deleted file mode 100644 index e08d8be7..0000000 --- a/third_party/blink/web_tests/platform/mac-mac-arm11.0/external/wpt/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/location-setter-user-click-expected.txt +++ /dev/null
@@ -1,9 +0,0 @@ -Content-Type: text/plain -This is a testharness.js-based test. -FAIL href assert_equals: expected "http://web-platform.test:8001/common/blank.html?thereplacement" but got "http://web-platform.test:8001/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/resources/slow-code-injector.html?pipe=sub(none)&code=%0A%20%20%20%20const%20button%20%3D%20document.createElement(%22button%22)%3B%0A%20%20%20%20button.id%20%3D%20%22the-button%22%3B%0A%20%20%20%20button.textContent%20%3D%20%22needs%20to%20have%20content%20to%20be%20clickable%22%3B%0A%20%20%20%20button.onclick%20%3D%20()%20%3D%3E%20%7B%20location.href%20%3D%20%22%2Fcommon%2Fblank.html%3Fthereplacement%22%3B%20%7D%3B%0A%20%20%20%20document.currentScript.before(button)%3B%0A%20%20%20%20parent.test_driver.click(button)%3B%0A%20%20" -FAIL search assert_equals: expected "http://web-platform.test:8001/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/resources/slow-code-injector.html?thereplacement" but got "http://web-platform.test:8001/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/resources/slow-code-injector.html?pipe=sub(none)&code=%0A%20%20%20%20const%20button%20%3D%20document.createElement(%22button%22)%3B%0A%20%20%20%20button.id%20%3D%20%22the-button%22%3B%0A%20%20%20%20button.textContent%20%3D%20%22needs%20to%20have%20content%20to%20be%20clickable%22%3B%0A%20%20%20%20button.onclick%20%3D%20()%20%3D%3E%20%7B%20location.search%20%3D%20%22thereplacement%22%3B%20%7D%3B%0A%20%20%20%20document.currentScript.before(button)%3B%0A%20%20%20%20parent.test_driver.click(button)%3B%0A%20%20" -FAIL hash assert_equals: expected "http://web-platform.test:8001/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/resources/slow-code-injector.html?pipe=sub(none)&code=%0A%20%20%20%20const%20button%20%3D%20document.createElement(%22button%22)%3B%0A%20%20%20%20button.id%20%3D%20%22the-button%22%3B%0A%20%20%20%20button.textContent%20%3D%20%22needs%20to%20have%20content%20to%20be%20clickable%22%3B%0A%20%20%20%20button.onclick%20%3D%20()%20%3D%3E%20%7B%20location.hash%20%3D%20%22thereplacement%22%3B%20%7D%3B%0A%20%20%20%20document.currentScript.before(button)%3B%0A%20%20%20%20parent.test_driver.click(button)%3B%0A%20%20#thereplacement" but got "http://web-platform.test:8001/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/resources/slow-code-injector.html?pipe=sub(none)&code=%0A%20%20%20%20const%20button%20%3D%20document.createElement(%22button%22)%3B%0A%20%20%20%20button.id%20%3D%20%22the-button%22%3B%0A%20%20%20%20button.textContent%20%3D%20%22needs%20to%20have%20content%20to%20be%20clickable%22%3B%0A%20%20%20%20button.onclick%20%3D%20()%20%3D%3E%20%7B%20location.hash%20%3D%20%22thereplacement%22%3B%20%7D%3B%0A%20%20%20%20document.currentScript.before(button)%3B%0A%20%20%20%20parent.test_driver.click(button)%3B%0A%20%20" -Harness: the test ran to completion. - -#EOF -#EOF
diff --git a/third_party/blink/web_tests/platform/mac-mac-arm11.0/external/wpt/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/location-setter-user-mouseup-expected.txt b/third_party/blink/web_tests/platform/mac-mac-arm11.0/external/wpt/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/location-setter-user-mouseup-expected.txt deleted file mode 100644 index 60f94000..0000000 --- a/third_party/blink/web_tests/platform/mac-mac-arm11.0/external/wpt/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/location-setter-user-mouseup-expected.txt +++ /dev/null
@@ -1,9 +0,0 @@ -Content-Type: text/plain -This is a testharness.js-based test. -FAIL href assert_equals: expected "http://web-platform.test:8001/common/blank.html?thereplacement" but got "http://web-platform.test:8001/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/resources/slow-code-injector.html?pipe=sub(none)&code=%0A%20%20%20%20const%20button%20%3D%20document.createElement(%22button%22)%3B%0A%20%20%20%20button.id%20%3D%20%22the-button%22%3B%0A%20%20%20%20button.textContent%20%3D%20%22needs%20to%20have%20content%20to%20be%20clickable%22%3B%0A%20%20%20%20button.onmouseup%20%3D%20()%20%3D%3E%20%7B%20location.href%20%3D%20%22%2Fcommon%2Fblank.html%3Fthereplacement%22%3B%20%7D%3B%0A%20%20%20%20document.currentScript.before(button)%3B%0A%20%20%20%20parent.test_driver.click(button)%3B%0A%20%20" -FAIL search assert_equals: expected "http://web-platform.test:8001/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/resources/slow-code-injector.html?thereplacement" but got "http://web-platform.test:8001/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/resources/slow-code-injector.html?pipe=sub(none)&code=%0A%20%20%20%20const%20button%20%3D%20document.createElement(%22button%22)%3B%0A%20%20%20%20button.id%20%3D%20%22the-button%22%3B%0A%20%20%20%20button.textContent%20%3D%20%22needs%20to%20have%20content%20to%20be%20clickable%22%3B%0A%20%20%20%20button.onmouseup%20%3D%20()%20%3D%3E%20%7B%20location.search%20%3D%20%22thereplacement%22%3B%20%7D%3B%0A%20%20%20%20document.currentScript.before(button)%3B%0A%20%20%20%20parent.test_driver.click(button)%3B%0A%20%20" -FAIL hash assert_equals: expected "http://web-platform.test:8001/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/resources/slow-code-injector.html?pipe=sub(none)&code=%0A%20%20%20%20const%20button%20%3D%20document.createElement(%22button%22)%3B%0A%20%20%20%20button.id%20%3D%20%22the-button%22%3B%0A%20%20%20%20button.textContent%20%3D%20%22needs%20to%20have%20content%20to%20be%20clickable%22%3B%0A%20%20%20%20button.onmouseup%20%3D%20()%20%3D%3E%20%7B%20location.hash%20%3D%20%22thereplacement%22%3B%20%7D%3B%0A%20%20%20%20document.currentScript.before(button)%3B%0A%20%20%20%20parent.test_driver.click(button)%3B%0A%20%20#thereplacement" but got "http://web-platform.test:8001/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/resources/slow-code-injector.html?pipe=sub(none)&code=%0A%20%20%20%20const%20button%20%3D%20document.createElement(%22button%22)%3B%0A%20%20%20%20button.id%20%3D%20%22the-button%22%3B%0A%20%20%20%20button.textContent%20%3D%20%22needs%20to%20have%20content%20to%20be%20clickable%22%3B%0A%20%20%20%20button.onmouseup%20%3D%20()%20%3D%3E%20%7B%20location.hash%20%3D%20%22thereplacement%22%3B%20%7D%3B%0A%20%20%20%20document.currentScript.before(button)%3B%0A%20%20%20%20parent.test_driver.click(button)%3B%0A%20%20" -Harness: the test ran to completion. - -#EOF -#EOF
diff --git a/third_party/blink/web_tests/platform/mac-mac-arm11.0/paint/invalidation/compositing/requires-backing-repaint-expected.png b/third_party/blink/web_tests/platform/mac-mac-arm11.0/paint/invalidation/compositing/requires-backing-repaint-expected.png deleted file mode 100644 index 2359ae8..0000000 --- a/third_party/blink/web_tests/platform/mac-mac-arm11.0/paint/invalidation/compositing/requires-backing-repaint-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac-arm11.0/virtual/backface-visibility-interop/paint/invalidation/compositing/requires-backing-repaint-expected.png b/third_party/blink/web_tests/platform/mac-mac-arm11.0/virtual/backface-visibility-interop/paint/invalidation/compositing/requires-backing-repaint-expected.png deleted file mode 100644 index 2359ae8..0000000 --- a/third_party/blink/web_tests/platform/mac-mac-arm11.0/virtual/backface-visibility-interop/paint/invalidation/compositing/requires-backing-repaint-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac-arm11.0/virtual/transform-interop-disabled/paint/invalidation/compositing/requires-backing-repaint-expected.png b/third_party/blink/web_tests/platform/mac-mac-arm11.0/virtual/transform-interop-disabled/paint/invalidation/compositing/requires-backing-repaint-expected.png deleted file mode 100644 index 2359ae8..0000000 --- a/third_party/blink/web_tests/platform/mac-mac-arm11.0/virtual/transform-interop-disabled/paint/invalidation/compositing/requires-backing-repaint-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.14/external/wpt/css/mediaqueries/test_media_queries-expected.txt b/third_party/blink/web_tests/platform/mac-mac10.14/external/wpt/css/mediaqueries/test_media_queries-expected.txt deleted file mode 100644 index 34cc82a..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.14/external/wpt/css/mediaqueries/test_media_queries-expected.txt +++ /dev/null
@@ -1,809 +0,0 @@ -This is a testharness.js-based test. -Found 803 tests; 586 PASS, 217 FAIL, 0 TIMEOUT, 0 NOTRUN. -PASS query_should_be_parseable: (orientation) -FAIL query_should_be_parseable: not (orientation) assert_true: not (orientation) expected true got false -PASS query_should_not_be_parseable: only (orientation) -PASS query_should_be_parseable: all and (orientation) -PASS query_should_be_parseable: not all and (orientation) -PASS query_should_be_parseable: only all and (orientation) -PASS query_should_not_be_parseable: not not (orientation) -PASS query_should_be_parseable: (orientation) and (orientation) -FAIL query_should_be_parseable: (orientation) or (orientation) assert_true: (orientation) or (orientation) expected true got false -FAIL query_should_be_parseable: (orientation) or ((orientation) and ((orientation) or (orientation) or (not (orientation)))) assert_true: (orientation) or ((orientation) and ((orientation) or (orientation) or (not (orientation)))) expected true got false -PASS query_should_not_be_parseable: all and (orientation) or (orientation) -PASS query_should_be_parseable: all and (orientation) and (orientation) -PASS query_should_not_be_parseable: (orientation) and (orientation) or (orientation) -PASS query_should_not_be_parseable: (orientation) and not (orientation) -PASS expression_should_be_parseable: width -PASS expression_should_not_be_parseable: min-width -PASS expression_should_not_be_parseable: max-width -PASS expression_should_be_parseable: width : 0 -PASS expression_should_be_parseable: width : 0px -PASS expression_should_be_parseable: width : 0em -PASS expression_should_be_parseable: width : -0 -PASS expression_should_be_parseable: width : -0cm -PASS expression_should_be_parseable: width : 1px -PASS expression_should_be_parseable: width : 0.001mm -PASS expression_should_be_parseable: width : 100000px -PASS expression_should_be_parseable: min-width : -0 -PASS expression_should_be_parseable: max-width : -0 -PASS expression_should_not_be_parseable: width : -1px -PASS expression_should_not_be_parseable: min-width : -1px -PASS expression_should_not_be_parseable: max-width : -1px -PASS expression_should_not_be_parseable: width : -0.00001mm -PASS expression_should_not_be_parseable: width : -100000em -FAIL expression_should_be_parseable: width > 0 assert_true: width > 0 expected true got false -FAIL expression_should_be_parseable: width > 0px assert_true: width > 0px expected true got false -FAIL expression_should_be_parseable: width > 0em assert_true: width > 0em expected true got false -FAIL expression_should_be_parseable: width > -0 assert_true: width > -0 expected true got false -FAIL expression_should_be_parseable: width > -0cm assert_true: width > -0cm expected true got false -FAIL expression_should_be_parseable: width > 1px assert_true: width > 1px expected true got false -FAIL expression_should_be_parseable: width > 0.001mm assert_true: width > 0.001mm expected true got false -FAIL expression_should_be_parseable: width > 100000px assert_true: width > 100000px expected true got false -PASS expression_should_not_be_parseable: min-width > -0 -PASS expression_should_not_be_parseable: max-width > -0 -PASS expression_should_not_be_parseable: width > -1px -PASS expression_should_not_be_parseable: min-width > -1px -PASS expression_should_not_be_parseable: max-width > -1px -PASS expression_should_not_be_parseable: width > -0.00001mm -PASS expression_should_not_be_parseable: width > -100000em -FAIL expression_should_be_parseable: width >= 0 assert_true: width >= 0 expected true got false -FAIL expression_should_be_parseable: width >= 0px assert_true: width >= 0px expected true got false -FAIL expression_should_be_parseable: width >= 0em assert_true: width >= 0em expected true got false -FAIL expression_should_be_parseable: width >= -0 assert_true: width >= -0 expected true got false -FAIL expression_should_be_parseable: width >= -0cm assert_true: width >= -0cm expected true got false -FAIL expression_should_be_parseable: width >= 1px assert_true: width >= 1px expected true got false -FAIL expression_should_be_parseable: width >= 0.001mm assert_true: width >= 0.001mm expected true got false -FAIL expression_should_be_parseable: width >= 100000px assert_true: width >= 100000px expected true got false -PASS expression_should_not_be_parseable: min-width >= -0 -PASS expression_should_not_be_parseable: max-width >= -0 -PASS expression_should_not_be_parseable: width > = 0px -PASS expression_should_not_be_parseable: width >= -1px -PASS expression_should_not_be_parseable: min-width >= -1px -PASS expression_should_not_be_parseable: max-width >= -1px -PASS expression_should_not_be_parseable: width >= -0.00001mm -PASS expression_should_not_be_parseable: width >= -100000em -FAIL expression_should_be_parseable: width = 0 assert_true: width = 0 expected true got false -FAIL expression_should_be_parseable: width = 0px assert_true: width = 0px expected true got false -FAIL expression_should_be_parseable: width = 0em assert_true: width = 0em expected true got false -FAIL expression_should_be_parseable: width = -0 assert_true: width = -0 expected true got false -FAIL expression_should_be_parseable: width = -0cm assert_true: width = -0cm expected true got false -FAIL expression_should_be_parseable: width = 1px assert_true: width = 1px expected true got false -FAIL expression_should_be_parseable: width = 0.001mm assert_true: width = 0.001mm expected true got false -FAIL expression_should_be_parseable: width = 100000px assert_true: width = 100000px expected true got false -PASS expression_should_not_be_parseable: min-width = -0 -PASS expression_should_not_be_parseable: max-width = -0 -PASS expression_should_not_be_parseable: width = -1px -PASS expression_should_not_be_parseable: min-width = -1px -PASS expression_should_not_be_parseable: max-width = -1px -PASS expression_should_not_be_parseable: width = -0.00001mm -PASS expression_should_not_be_parseable: width = -100000em -FAIL expression_should_be_parseable: width <= 0 assert_true: width <= 0 expected true got false -FAIL expression_should_be_parseable: width <= 0px assert_true: width <= 0px expected true got false -FAIL expression_should_be_parseable: width <= 0em assert_true: width <= 0em expected true got false -FAIL expression_should_be_parseable: width <= -0 assert_true: width <= -0 expected true got false -FAIL expression_should_be_parseable: width <= -0cm assert_true: width <= -0cm expected true got false -FAIL expression_should_be_parseable: width <= 1px assert_true: width <= 1px expected true got false -FAIL expression_should_be_parseable: width <= 0.001mm assert_true: width <= 0.001mm expected true got false -FAIL expression_should_be_parseable: width <= 100000px assert_true: width <= 100000px expected true got false -PASS expression_should_not_be_parseable: min-width <= -0 -PASS expression_should_not_be_parseable: max-width <= -0 -PASS expression_should_not_be_parseable: width < = 0px -PASS expression_should_not_be_parseable: width <= -1px -PASS expression_should_not_be_parseable: min-width <= -1px -PASS expression_should_not_be_parseable: max-width <= -1px -PASS expression_should_not_be_parseable: width <= -0.00001mm -PASS expression_should_not_be_parseable: width <= -100000em -FAIL expression_should_be_parseable: width < 0 assert_true: width < 0 expected true got false -FAIL expression_should_be_parseable: width < 0px assert_true: width < 0px expected true got false -FAIL expression_should_be_parseable: width < 0em assert_true: width < 0em expected true got false -FAIL expression_should_be_parseable: width < -0 assert_true: width < -0 expected true got false -FAIL expression_should_be_parseable: width < -0cm assert_true: width < -0cm expected true got false -FAIL expression_should_be_parseable: width < 1px assert_true: width < 1px expected true got false -FAIL expression_should_be_parseable: width < 0.001mm assert_true: width < 0.001mm expected true got false -FAIL expression_should_be_parseable: width < 100000px assert_true: width < 100000px expected true got false -PASS expression_should_not_be_parseable: min-width < -0 -PASS expression_should_not_be_parseable: max-width < -0 -PASS expression_should_not_be_parseable: width < -1px -PASS expression_should_not_be_parseable: min-width < -1px -PASS expression_should_not_be_parseable: max-width < -1px -PASS expression_should_not_be_parseable: width < -0.00001mm -PASS expression_should_not_be_parseable: width < -100000em -PASS expression_should_be_parseable: height -PASS expression_should_not_be_parseable: min-height -PASS expression_should_not_be_parseable: max-height -PASS expression_should_be_parseable: height : 0 -PASS expression_should_be_parseable: height : 0px -PASS expression_should_be_parseable: height : 0em -PASS expression_should_be_parseable: height : -0 -PASS expression_should_be_parseable: height : -0cm -PASS expression_should_be_parseable: height : 1px -PASS expression_should_be_parseable: height : 0.001mm -PASS expression_should_be_parseable: height : 100000px -PASS expression_should_be_parseable: min-height : -0 -PASS expression_should_be_parseable: max-height : -0 -PASS expression_should_not_be_parseable: height : -1px -PASS expression_should_not_be_parseable: min-height : -1px -PASS expression_should_not_be_parseable: max-height : -1px -PASS expression_should_not_be_parseable: height : -0.00001mm -PASS expression_should_not_be_parseable: height : -100000em -FAIL expression_should_be_parseable: height > 0 assert_true: height > 0 expected true got false -FAIL expression_should_be_parseable: height > 0px assert_true: height > 0px expected true got false -FAIL expression_should_be_parseable: height > 0em assert_true: height > 0em expected true got false -FAIL expression_should_be_parseable: height > -0 assert_true: height > -0 expected true got false -FAIL expression_should_be_parseable: height > -0cm assert_true: height > -0cm expected true got false -FAIL expression_should_be_parseable: height > 1px assert_true: height > 1px expected true got false -FAIL expression_should_be_parseable: height > 0.001mm assert_true: height > 0.001mm expected true got false -FAIL expression_should_be_parseable: height > 100000px assert_true: height > 100000px expected true got false -PASS expression_should_not_be_parseable: min-height > -0 -PASS expression_should_not_be_parseable: max-height > -0 -PASS expression_should_not_be_parseable: height > -1px -PASS expression_should_not_be_parseable: min-height > -1px -PASS expression_should_not_be_parseable: max-height > -1px -PASS expression_should_not_be_parseable: height > -0.00001mm -PASS expression_should_not_be_parseable: height > -100000em -FAIL expression_should_be_parseable: height >= 0 assert_true: height >= 0 expected true got false -FAIL expression_should_be_parseable: height >= 0px assert_true: height >= 0px expected true got false -FAIL expression_should_be_parseable: height >= 0em assert_true: height >= 0em expected true got false -FAIL expression_should_be_parseable: height >= -0 assert_true: height >= -0 expected true got false -FAIL expression_should_be_parseable: height >= -0cm assert_true: height >= -0cm expected true got false -FAIL expression_should_be_parseable: height >= 1px assert_true: height >= 1px expected true got false -FAIL expression_should_be_parseable: height >= 0.001mm assert_true: height >= 0.001mm expected true got false -FAIL expression_should_be_parseable: height >= 100000px assert_true: height >= 100000px expected true got false -PASS expression_should_not_be_parseable: min-height >= -0 -PASS expression_should_not_be_parseable: max-height >= -0 -PASS expression_should_not_be_parseable: height > = 0px -PASS expression_should_not_be_parseable: height >= -1px -PASS expression_should_not_be_parseable: min-height >= -1px -PASS expression_should_not_be_parseable: max-height >= -1px -PASS expression_should_not_be_parseable: height >= -0.00001mm -PASS expression_should_not_be_parseable: height >= -100000em -FAIL expression_should_be_parseable: height = 0 assert_true: height = 0 expected true got false -FAIL expression_should_be_parseable: height = 0px assert_true: height = 0px expected true got false -FAIL expression_should_be_parseable: height = 0em assert_true: height = 0em expected true got false -FAIL expression_should_be_parseable: height = -0 assert_true: height = -0 expected true got false -FAIL expression_should_be_parseable: height = -0cm assert_true: height = -0cm expected true got false -FAIL expression_should_be_parseable: height = 1px assert_true: height = 1px expected true got false -FAIL expression_should_be_parseable: height = 0.001mm assert_true: height = 0.001mm expected true got false -FAIL expression_should_be_parseable: height = 100000px assert_true: height = 100000px expected true got false -PASS expression_should_not_be_parseable: min-height = -0 -PASS expression_should_not_be_parseable: max-height = -0 -PASS expression_should_not_be_parseable: height = -1px -PASS expression_should_not_be_parseable: min-height = -1px -PASS expression_should_not_be_parseable: max-height = -1px -PASS expression_should_not_be_parseable: height = -0.00001mm -PASS expression_should_not_be_parseable: height = -100000em -FAIL expression_should_be_parseable: height <= 0 assert_true: height <= 0 expected true got false -FAIL expression_should_be_parseable: height <= 0px assert_true: height <= 0px expected true got false -FAIL expression_should_be_parseable: height <= 0em assert_true: height <= 0em expected true got false -FAIL expression_should_be_parseable: height <= -0 assert_true: height <= -0 expected true got false -FAIL expression_should_be_parseable: height <= -0cm assert_true: height <= -0cm expected true got false -FAIL expression_should_be_parseable: height <= 1px assert_true: height <= 1px expected true got false -FAIL expression_should_be_parseable: height <= 0.001mm assert_true: height <= 0.001mm expected true got false -FAIL expression_should_be_parseable: height <= 100000px assert_true: height <= 100000px expected true got false -PASS expression_should_not_be_parseable: min-height <= -0 -PASS expression_should_not_be_parseable: max-height <= -0 -PASS expression_should_not_be_parseable: height < = 0px -PASS expression_should_not_be_parseable: height <= -1px -PASS expression_should_not_be_parseable: min-height <= -1px -PASS expression_should_not_be_parseable: max-height <= -1px -PASS expression_should_not_be_parseable: height <= -0.00001mm -PASS expression_should_not_be_parseable: height <= -100000em -FAIL expression_should_be_parseable: height < 0 assert_true: height < 0 expected true got false -FAIL expression_should_be_parseable: height < 0px assert_true: height < 0px expected true got false -FAIL expression_should_be_parseable: height < 0em assert_true: height < 0em expected true got false -FAIL expression_should_be_parseable: height < -0 assert_true: height < -0 expected true got false -FAIL expression_should_be_parseable: height < -0cm assert_true: height < -0cm expected true got false -FAIL expression_should_be_parseable: height < 1px assert_true: height < 1px expected true got false -FAIL expression_should_be_parseable: height < 0.001mm assert_true: height < 0.001mm expected true got false -FAIL expression_should_be_parseable: height < 100000px assert_true: height < 100000px expected true got false -PASS expression_should_not_be_parseable: min-height < -0 -PASS expression_should_not_be_parseable: max-height < -0 -PASS expression_should_not_be_parseable: height < -1px -PASS expression_should_not_be_parseable: min-height < -1px -PASS expression_should_not_be_parseable: max-height < -1px -PASS expression_should_not_be_parseable: height < -0.00001mm -PASS expression_should_not_be_parseable: height < -100000em -PASS expression_should_be_parseable: device-width -PASS expression_should_not_be_parseable: min-device-width -PASS expression_should_not_be_parseable: max-device-width -PASS expression_should_be_parseable: device-width : 0 -PASS expression_should_be_parseable: device-width : 0px -PASS expression_should_be_parseable: device-width : 0em -PASS expression_should_be_parseable: device-width : -0 -PASS expression_should_be_parseable: device-width : -0cm -PASS expression_should_be_parseable: device-width : 1px -PASS expression_should_be_parseable: device-width : 0.001mm -PASS expression_should_be_parseable: device-width : 100000px -PASS expression_should_be_parseable: min-device-width : -0 -PASS expression_should_be_parseable: max-device-width : -0 -PASS expression_should_not_be_parseable: device-width : -1px -PASS expression_should_not_be_parseable: min-device-width : -1px -PASS expression_should_not_be_parseable: max-device-width : -1px -PASS expression_should_not_be_parseable: device-width : -0.00001mm -PASS expression_should_not_be_parseable: device-width : -100000em -FAIL expression_should_be_parseable: device-width > 0 assert_true: device-width > 0 expected true got false -FAIL expression_should_be_parseable: device-width > 0px assert_true: device-width > 0px expected true got false -FAIL expression_should_be_parseable: device-width > 0em assert_true: device-width > 0em expected true got false -FAIL expression_should_be_parseable: device-width > -0 assert_true: device-width > -0 expected true got false -FAIL expression_should_be_parseable: device-width > -0cm assert_true: device-width > -0cm expected true got false -FAIL expression_should_be_parseable: device-width > 1px assert_true: device-width > 1px expected true got false -FAIL expression_should_be_parseable: device-width > 0.001mm assert_true: device-width > 0.001mm expected true got false -FAIL expression_should_be_parseable: device-width > 100000px assert_true: device-width > 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-width > -0 -PASS expression_should_not_be_parseable: max-device-width > -0 -PASS expression_should_not_be_parseable: device-width > -1px -PASS expression_should_not_be_parseable: min-device-width > -1px -PASS expression_should_not_be_parseable: max-device-width > -1px -PASS expression_should_not_be_parseable: device-width > -0.00001mm -PASS expression_should_not_be_parseable: device-width > -100000em -FAIL expression_should_be_parseable: device-width >= 0 assert_true: device-width >= 0 expected true got false -FAIL expression_should_be_parseable: device-width >= 0px assert_true: device-width >= 0px expected true got false -FAIL expression_should_be_parseable: device-width >= 0em assert_true: device-width >= 0em expected true got false -FAIL expression_should_be_parseable: device-width >= -0 assert_true: device-width >= -0 expected true got false -FAIL expression_should_be_parseable: device-width >= -0cm assert_true: device-width >= -0cm expected true got false -FAIL expression_should_be_parseable: device-width >= 1px assert_true: device-width >= 1px expected true got false -FAIL expression_should_be_parseable: device-width >= 0.001mm assert_true: device-width >= 0.001mm expected true got false -FAIL expression_should_be_parseable: device-width >= 100000px assert_true: device-width >= 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-width >= -0 -PASS expression_should_not_be_parseable: max-device-width >= -0 -PASS expression_should_not_be_parseable: device-width > = 0px -PASS expression_should_not_be_parseable: device-width >= -1px -PASS expression_should_not_be_parseable: min-device-width >= -1px -PASS expression_should_not_be_parseable: max-device-width >= -1px -PASS expression_should_not_be_parseable: device-width >= -0.00001mm -PASS expression_should_not_be_parseable: device-width >= -100000em -FAIL expression_should_be_parseable: device-width = 0 assert_true: device-width = 0 expected true got false -FAIL expression_should_be_parseable: device-width = 0px assert_true: device-width = 0px expected true got false -FAIL expression_should_be_parseable: device-width = 0em assert_true: device-width = 0em expected true got false -FAIL expression_should_be_parseable: device-width = -0 assert_true: device-width = -0 expected true got false -FAIL expression_should_be_parseable: device-width = -0cm assert_true: device-width = -0cm expected true got false -FAIL expression_should_be_parseable: device-width = 1px assert_true: device-width = 1px expected true got false -FAIL expression_should_be_parseable: device-width = 0.001mm assert_true: device-width = 0.001mm expected true got false -FAIL expression_should_be_parseable: device-width = 100000px assert_true: device-width = 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-width = -0 -PASS expression_should_not_be_parseable: max-device-width = -0 -PASS expression_should_not_be_parseable: device-width = -1px -PASS expression_should_not_be_parseable: min-device-width = -1px -PASS expression_should_not_be_parseable: max-device-width = -1px -PASS expression_should_not_be_parseable: device-width = -0.00001mm -PASS expression_should_not_be_parseable: device-width = -100000em -FAIL expression_should_be_parseable: device-width <= 0 assert_true: device-width <= 0 expected true got false -FAIL expression_should_be_parseable: device-width <= 0px assert_true: device-width <= 0px expected true got false -FAIL expression_should_be_parseable: device-width <= 0em assert_true: device-width <= 0em expected true got false -FAIL expression_should_be_parseable: device-width <= -0 assert_true: device-width <= -0 expected true got false -FAIL expression_should_be_parseable: device-width <= -0cm assert_true: device-width <= -0cm expected true got false -FAIL expression_should_be_parseable: device-width <= 1px assert_true: device-width <= 1px expected true got false -FAIL expression_should_be_parseable: device-width <= 0.001mm assert_true: device-width <= 0.001mm expected true got false -FAIL expression_should_be_parseable: device-width <= 100000px assert_true: device-width <= 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-width <= -0 -PASS expression_should_not_be_parseable: max-device-width <= -0 -PASS expression_should_not_be_parseable: device-width < = 0px -PASS expression_should_not_be_parseable: device-width <= -1px -PASS expression_should_not_be_parseable: min-device-width <= -1px -PASS expression_should_not_be_parseable: max-device-width <= -1px -PASS expression_should_not_be_parseable: device-width <= -0.00001mm -PASS expression_should_not_be_parseable: device-width <= -100000em -FAIL expression_should_be_parseable: device-width < 0 assert_true: device-width < 0 expected true got false -FAIL expression_should_be_parseable: device-width < 0px assert_true: device-width < 0px expected true got false -FAIL expression_should_be_parseable: device-width < 0em assert_true: device-width < 0em expected true got false -FAIL expression_should_be_parseable: device-width < -0 assert_true: device-width < -0 expected true got false -FAIL expression_should_be_parseable: device-width < -0cm assert_true: device-width < -0cm expected true got false -FAIL expression_should_be_parseable: device-width < 1px assert_true: device-width < 1px expected true got false -FAIL expression_should_be_parseable: device-width < 0.001mm assert_true: device-width < 0.001mm expected true got false -FAIL expression_should_be_parseable: device-width < 100000px assert_true: device-width < 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-width < -0 -PASS expression_should_not_be_parseable: max-device-width < -0 -PASS expression_should_not_be_parseable: device-width < -1px -PASS expression_should_not_be_parseable: min-device-width < -1px -PASS expression_should_not_be_parseable: max-device-width < -1px -PASS expression_should_not_be_parseable: device-width < -0.00001mm -PASS expression_should_not_be_parseable: device-width < -100000em -PASS expression_should_be_parseable: device-height -PASS expression_should_not_be_parseable: min-device-height -PASS expression_should_not_be_parseable: max-device-height -PASS expression_should_be_parseable: device-height : 0 -PASS expression_should_be_parseable: device-height : 0px -PASS expression_should_be_parseable: device-height : 0em -PASS expression_should_be_parseable: device-height : -0 -PASS expression_should_be_parseable: device-height : -0cm -PASS expression_should_be_parseable: device-height : 1px -PASS expression_should_be_parseable: device-height : 0.001mm -PASS expression_should_be_parseable: device-height : 100000px -PASS expression_should_be_parseable: min-device-height : -0 -PASS expression_should_be_parseable: max-device-height : -0 -PASS expression_should_not_be_parseable: device-height : -1px -PASS expression_should_not_be_parseable: min-device-height : -1px -PASS expression_should_not_be_parseable: max-device-height : -1px -PASS expression_should_not_be_parseable: device-height : -0.00001mm -PASS expression_should_not_be_parseable: device-height : -100000em -FAIL expression_should_be_parseable: device-height > 0 assert_true: device-height > 0 expected true got false -FAIL expression_should_be_parseable: device-height > 0px assert_true: device-height > 0px expected true got false -FAIL expression_should_be_parseable: device-height > 0em assert_true: device-height > 0em expected true got false -FAIL expression_should_be_parseable: device-height > -0 assert_true: device-height > -0 expected true got false -FAIL expression_should_be_parseable: device-height > -0cm assert_true: device-height > -0cm expected true got false -FAIL expression_should_be_parseable: device-height > 1px assert_true: device-height > 1px expected true got false -FAIL expression_should_be_parseable: device-height > 0.001mm assert_true: device-height > 0.001mm expected true got false -FAIL expression_should_be_parseable: device-height > 100000px assert_true: device-height > 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-height > -0 -PASS expression_should_not_be_parseable: max-device-height > -0 -PASS expression_should_not_be_parseable: device-height > -1px -PASS expression_should_not_be_parseable: min-device-height > -1px -PASS expression_should_not_be_parseable: max-device-height > -1px -PASS expression_should_not_be_parseable: device-height > -0.00001mm -PASS expression_should_not_be_parseable: device-height > -100000em -FAIL expression_should_be_parseable: device-height >= 0 assert_true: device-height >= 0 expected true got false -FAIL expression_should_be_parseable: device-height >= 0px assert_true: device-height >= 0px expected true got false -FAIL expression_should_be_parseable: device-height >= 0em assert_true: device-height >= 0em expected true got false -FAIL expression_should_be_parseable: device-height >= -0 assert_true: device-height >= -0 expected true got false -FAIL expression_should_be_parseable: device-height >= -0cm assert_true: device-height >= -0cm expected true got false -FAIL expression_should_be_parseable: device-height >= 1px assert_true: device-height >= 1px expected true got false -FAIL expression_should_be_parseable: device-height >= 0.001mm assert_true: device-height >= 0.001mm expected true got false -FAIL expression_should_be_parseable: device-height >= 100000px assert_true: device-height >= 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-height >= -0 -PASS expression_should_not_be_parseable: max-device-height >= -0 -PASS expression_should_not_be_parseable: device-height > = 0px -PASS expression_should_not_be_parseable: device-height >= -1px -PASS expression_should_not_be_parseable: min-device-height >= -1px -PASS expression_should_not_be_parseable: max-device-height >= -1px -PASS expression_should_not_be_parseable: device-height >= -0.00001mm -PASS expression_should_not_be_parseable: device-height >= -100000em -FAIL expression_should_be_parseable: device-height = 0 assert_true: device-height = 0 expected true got false -FAIL expression_should_be_parseable: device-height = 0px assert_true: device-height = 0px expected true got false -FAIL expression_should_be_parseable: device-height = 0em assert_true: device-height = 0em expected true got false -FAIL expression_should_be_parseable: device-height = -0 assert_true: device-height = -0 expected true got false -FAIL expression_should_be_parseable: device-height = -0cm assert_true: device-height = -0cm expected true got false -FAIL expression_should_be_parseable: device-height = 1px assert_true: device-height = 1px expected true got false -FAIL expression_should_be_parseable: device-height = 0.001mm assert_true: device-height = 0.001mm expected true got false -FAIL expression_should_be_parseable: device-height = 100000px assert_true: device-height = 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-height = -0 -PASS expression_should_not_be_parseable: max-device-height = -0 -PASS expression_should_not_be_parseable: device-height = -1px -PASS expression_should_not_be_parseable: min-device-height = -1px -PASS expression_should_not_be_parseable: max-device-height = -1px -PASS expression_should_not_be_parseable: device-height = -0.00001mm -PASS expression_should_not_be_parseable: device-height = -100000em -FAIL expression_should_be_parseable: device-height <= 0 assert_true: device-height <= 0 expected true got false -FAIL expression_should_be_parseable: device-height <= 0px assert_true: device-height <= 0px expected true got false -FAIL expression_should_be_parseable: device-height <= 0em assert_true: device-height <= 0em expected true got false -FAIL expression_should_be_parseable: device-height <= -0 assert_true: device-height <= -0 expected true got false -FAIL expression_should_be_parseable: device-height <= -0cm assert_true: device-height <= -0cm expected true got false -FAIL expression_should_be_parseable: device-height <= 1px assert_true: device-height <= 1px expected true got false -FAIL expression_should_be_parseable: device-height <= 0.001mm assert_true: device-height <= 0.001mm expected true got false -FAIL expression_should_be_parseable: device-height <= 100000px assert_true: device-height <= 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-height <= -0 -PASS expression_should_not_be_parseable: max-device-height <= -0 -PASS expression_should_not_be_parseable: device-height < = 0px -PASS expression_should_not_be_parseable: device-height <= -1px -PASS expression_should_not_be_parseable: min-device-height <= -1px -PASS expression_should_not_be_parseable: max-device-height <= -1px -PASS expression_should_not_be_parseable: device-height <= -0.00001mm -PASS expression_should_not_be_parseable: device-height <= -100000em -FAIL expression_should_be_parseable: device-height < 0 assert_true: device-height < 0 expected true got false -FAIL expression_should_be_parseable: device-height < 0px assert_true: device-height < 0px expected true got false -FAIL expression_should_be_parseable: device-height < 0em assert_true: device-height < 0em expected true got false -FAIL expression_should_be_parseable: device-height < -0 assert_true: device-height < -0 expected true got false -FAIL expression_should_be_parseable: device-height < -0cm assert_true: device-height < -0cm expected true got false -FAIL expression_should_be_parseable: device-height < 1px assert_true: device-height < 1px expected true got false -FAIL expression_should_be_parseable: device-height < 0.001mm assert_true: device-height < 0.001mm expected true got false -FAIL expression_should_be_parseable: device-height < 100000px assert_true: device-height < 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-height < -0 -PASS expression_should_not_be_parseable: max-device-height < -0 -PASS expression_should_not_be_parseable: device-height < -1px -PASS expression_should_not_be_parseable: min-device-height < -1px -PASS expression_should_not_be_parseable: max-device-height < -1px -PASS expression_should_not_be_parseable: device-height < -0.00001mm -PASS expression_should_not_be_parseable: device-height < -100000em -PASS should_apply: all and (width: ${value}px) -FAIL should_apply: all and (width = ${value}px) assert_true: all and (width = 117px) expected true got false -PASS should_not_apply: all and (width: ${value + 1}px) -PASS should_not_apply: all and (width: ${value - 1}px) -PASS should_not_apply: all and (width = ${value + 1}px) -PASS should_not_apply: all and (width = ${value - 1}px) -PASS should_apply: all and (min-width: ${value}px) -PASS should_not_apply: all and (min-width: ${value + 1}px) -PASS should_apply: all and (min-width: ${value - 1}px) -PASS should_apply: all and (max-width: ${value}px) -PASS should_apply: all and (max-width: ${value + 1}px) -PASS should_not_apply: all and (max-width: ${value - 1}px) -PASS should_not_apply: all and (min-width: ${Math.ceil(value/em_size) + 1}em) -PASS should_apply: all and (min-width: ${Math.floor(value/em_size) - 1}em) -PASS should_apply: all and (max-width: ${Math.ceil(value/em_size) + 1}em) -PASS should_not_apply: all and (max-width: ${Math.floor(value/em_size) - 1}em) -FAIL should_apply: (width <= ${value}px) assert_true: (width <= 117px) expected true got false -FAIL should_apply: (width >= ${value}px) assert_true: (width >= 117px) expected true got false -PASS should_not_apply: (width < ${value}px) -PASS should_not_apply: (width > ${value}px) -FAIL should_apply: (width < ${value + 1}px) assert_true: (width < 118px) expected true got false -FAIL should_apply: (width <= ${value + 1}px) assert_true: (width <= 118px) expected true got false -PASS should_not_apply: (width > ${value + 1}px) -PASS should_not_apply: (width >= ${value + 1}px) -FAIL should_apply: (width > ${value - 1}px) assert_true: (width > 116px) expected true got false -FAIL should_apply: (width >= ${value - 1}px) assert_true: (width >= 116px) expected true got false -PASS should_not_apply: (width < ${value - 1}px) -PASS should_not_apply: (width <= ${value - 1}px) -PASS should_apply: all and (height: ${value}px) -FAIL should_apply: all and (height = ${value}px) assert_true: all and (height = 76px) expected true got false -PASS should_not_apply: all and (height: ${value + 1}px) -PASS should_not_apply: all and (height: ${value - 1}px) -PASS should_not_apply: all and (height = ${value + 1}px) -PASS should_not_apply: all and (height = ${value - 1}px) -PASS should_apply: all and (min-height: ${value}px) -PASS should_not_apply: all and (min-height: ${value + 1}px) -PASS should_apply: all and (min-height: ${value - 1}px) -PASS should_apply: all and (max-height: ${value}px) -PASS should_apply: all and (max-height: ${value + 1}px) -PASS should_not_apply: all and (max-height: ${value - 1}px) -PASS should_not_apply: all and (min-height: ${Math.ceil(value/em_size) + 1}em) -PASS should_apply: all and (min-height: ${Math.floor(value/em_size) - 1}em) -PASS should_apply: all and (max-height: ${Math.ceil(value/em_size) + 1}em) -PASS should_not_apply: all and (max-height: ${Math.floor(value/em_size) - 1}em) -FAIL should_apply: (height <= ${value}px) assert_true: (height <= 76px) expected true got false -FAIL should_apply: (height >= ${value}px) assert_true: (height >= 76px) expected true got false -PASS should_not_apply: (height < ${value}px) -PASS should_not_apply: (height > ${value}px) -FAIL should_apply: (height < ${value + 1}px) assert_true: (height < 77px) expected true got false -FAIL should_apply: (height <= ${value + 1}px) assert_true: (height <= 77px) expected true got false -PASS should_not_apply: (height > ${value + 1}px) -PASS should_not_apply: (height >= ${value + 1}px) -FAIL should_apply: (height > ${value - 1}px) assert_true: (height > 75px) expected true got false -FAIL should_apply: (height >= ${value - 1}px) assert_true: (height >= 75px) expected true got false -PASS should_not_apply: (height < ${value - 1}px) -PASS should_not_apply: (height <= ${value - 1}px) -PASS should_apply: all and (device-width: ${value}px) -FAIL should_apply: all and (device-width = ${value}px) assert_true: all and (device-width = 1280px) expected true got false -PASS should_not_apply: all and (device-width: ${value + 1}px) -PASS should_not_apply: all and (device-width: ${value - 1}px) -PASS should_not_apply: all and (device-width = ${value + 1}px) -PASS should_not_apply: all and (device-width = ${value - 1}px) -PASS should_apply: all and (min-device-width: ${value}px) -PASS should_not_apply: all and (min-device-width: ${value + 1}px) -PASS should_apply: all and (min-device-width: ${value - 1}px) -PASS should_apply: all and (max-device-width: ${value}px) -PASS should_apply: all and (max-device-width: ${value + 1}px) -PASS should_not_apply: all and (max-device-width: ${value - 1}px) -PASS should_not_apply: all and (min-device-width: ${Math.ceil(value/em_size) + 1}em) -PASS should_apply: all and (min-device-width: ${Math.floor(value/em_size) - 1}em) -PASS should_apply: all and (max-device-width: ${Math.ceil(value/em_size) + 1}em) -PASS should_not_apply: all and (max-device-width: ${Math.floor(value/em_size) - 1}em) -FAIL should_apply: (device-width <= ${value}px) assert_true: (device-width <= 1280px) expected true got false -FAIL should_apply: (device-width >= ${value}px) assert_true: (device-width >= 1280px) expected true got false -PASS should_not_apply: (device-width < ${value}px) -PASS should_not_apply: (device-width > ${value}px) -FAIL should_apply: (device-width < ${value + 1}px) assert_true: (device-width < 1281px) expected true got false -FAIL should_apply: (device-width <= ${value + 1}px) assert_true: (device-width <= 1281px) expected true got false -PASS should_not_apply: (device-width > ${value + 1}px) -PASS should_not_apply: (device-width >= ${value + 1}px) -FAIL should_apply: (device-width > ${value - 1}px) assert_true: (device-width > 1279px) expected true got false -FAIL should_apply: (device-width >= ${value - 1}px) assert_true: (device-width >= 1279px) expected true got false -PASS should_not_apply: (device-width < ${value - 1}px) -PASS should_not_apply: (device-width <= ${value - 1}px) -PASS should_apply: all and (device-height: ${value}px) -FAIL should_apply: all and (device-height = ${value}px) assert_true: all and (device-height = 1024px) expected true got false -PASS should_not_apply: all and (device-height: ${value + 1}px) -PASS should_not_apply: all and (device-height: ${value - 1}px) -PASS should_not_apply: all and (device-height = ${value + 1}px) -PASS should_not_apply: all and (device-height = ${value - 1}px) -PASS should_apply: all and (min-device-height: ${value}px) -PASS should_not_apply: all and (min-device-height: ${value + 1}px) -PASS should_apply: all and (min-device-height: ${value - 1}px) -PASS should_apply: all and (max-device-height: ${value}px) -PASS should_apply: all and (max-device-height: ${value + 1}px) -PASS should_not_apply: all and (max-device-height: ${value - 1}px) -PASS should_not_apply: all and (min-device-height: ${Math.ceil(value/em_size) + 1}em) -PASS should_apply: all and (min-device-height: ${Math.floor(value/em_size) - 1}em) -PASS should_apply: all and (max-device-height: ${Math.ceil(value/em_size) + 1}em) -PASS should_not_apply: all and (max-device-height: ${Math.floor(value/em_size) - 1}em) -FAIL should_apply: (device-height <= ${value}px) assert_true: (device-height <= 1024px) expected true got false -FAIL should_apply: (device-height >= ${value}px) assert_true: (device-height >= 1024px) expected true got false -PASS should_not_apply: (device-height < ${value}px) -PASS should_not_apply: (device-height > ${value}px) -FAIL should_apply: (device-height < ${value + 1}px) assert_true: (device-height < 1025px) expected true got false -FAIL should_apply: (device-height <= ${value + 1}px) assert_true: (device-height <= 1025px) expected true got false -PASS should_not_apply: (device-height > ${value + 1}px) -PASS should_not_apply: (device-height >= ${value + 1}px) -FAIL should_apply: (device-height > ${value - 1}px) assert_true: (device-height > 1023px) expected true got false -FAIL should_apply: (device-height >= ${value - 1}px) assert_true: (device-height >= 1023px) expected true got false -PASS should_not_apply: (device-height < ${value - 1}px) -PASS should_not_apply: (device-height <= ${value - 1}px) -PASS width = 0, height != 0: should_apply: all and (height) -PASS width = 0, height != 0: should_not_apply: all and (width) -PASS width = 0, height = 0: should_not_apply: all and (height) -PASS width = 0, height = 0: should_not_apply: all and (width) -PASS width = 0, height = 0: should_apply: all and (device-height) -PASS width = 0, height = 0: should_apply: all and (device-width) -PASS width != 0, height = 0: should_not_apply: all and (height) -PASS width != 0, height = 0: should_apply: all and (width) -PASS width != 0, height != 0: should_apply: all and (height) -PASS width != 0, height != 0: should_apply: all and (width) -PASS ratio that reduces to 59/40: expression_should_be_parseable: orientation -PASS ratio that reduces to 59/40: expression_should_be_parseable: orientation: portrait -PASS ratio that reduces to 59/40: expression_should_be_parseable: orientation: landscape -PASS ratio that reduces to 59/40: expression_should_not_be_parseable: min-orientation -PASS ratio that reduces to 59/40: expression_should_not_be_parseable: min-orientation: portrait -PASS ratio that reduces to 59/40: expression_should_not_be_parseable: min-orientation: landscape -PASS ratio that reduces to 59/40: expression_should_not_be_parseable: max-orientation -PASS ratio that reduces to 59/40: expression_should_not_be_parseable: max-orientation: portrait -PASS ratio that reduces to 59/40: expression_should_not_be_parseable: max-orientation: landscape -PASS ratio that reduces to 59/40: should_apply: (orientation) -PASS ratio that reduces to 59/40: should_apply: (orientation: landscape) -PASS ratio that reduces to 59/40: should_not_apply: (orientation: portrait) -PASS ratio that reduces to 59/40: should_apply: not all and (orientation: portrait) -PASS ratio that reduces to 59/80: should_apply: (orientation) -PASS ratio that reduces to 59/80: should_not_apply: (orientation: landscape) -PASS ratio that reduces to 59/80: should_apply: not all and (orientation: landscape) -PASS ratio that reduces to 59/80: should_apply: (orientation: portrait) -PASS should_apply: (aspect-ratio: 59/80) -PASS should_not_apply: (aspect-ratio: 58/80) -PASS should_not_apply: (aspect-ratio: 59/81) -PASS should_not_apply: (aspect-ratio: 60/80) -PASS should_not_apply: (aspect-ratio: 59/79) -PASS should_apply: (aspect-ratio: 177/240) -PASS should_apply: (aspect-ratio: 413/560) -PASS should_apply: (aspect-ratio: 5900/8000) -PASS should_not_apply: (aspect-ratio: 5901/8000) -PASS should_not_apply: (aspect-ratio: 5899/8000) -PASS should_not_apply: (aspect-ratio: 5900/8001) -PASS should_not_apply: (aspect-ratio: 5900/7999) -PASS should_apply: (aspect-ratio) -PASS should_apply: (min-aspect-ratio: 59/80) -PASS should_apply: (min-aspect-ratio: 58/80) -PASS should_apply: (min-aspect-ratio: 59/81) -PASS should_not_apply: (min-aspect-ratio: 60/80) -PASS should_not_apply: (min-aspect-ratio: 59/79) -PASS expression_should_not_be_parseable: min-aspect-ratio -PASS should_apply: (max-aspect-ratio: 59/80) -PASS should_not_apply: (max-aspect-ratio: 58/80) -PASS should_not_apply: (max-aspect-ratio: 59/81) -PASS should_apply: (max-aspect-ratio: 60/80) -PASS should_apply: (max-aspect-ratio: 59/79) -PASS expression_should_not_be_parseable: max-aspect-ratio -PASS should_apply: (device-aspect-ratio: ${real_dar}) -PASS should_apply: not all and (device-aspect-ratio: ${high_dar_1}) -PASS should_not_apply: all and (device-aspect-ratio: ${high_dar_2}) -PASS should_not_apply: all and (device-aspect-ratio: ${low_dar_1}) -PASS should_apply: not all and (device-aspect-ratio: ${low_dar_2}) -PASS should_apply: (device-aspect-ratio) -PASS should_apply: (min-device-aspect-ratio: ${real_dar}) -PASS should_not_apply: all and (min-device-aspect-ratio: ${high_dar_1}) -PASS should_apply: not all and (min-device-aspect-ratio: ${high_dar_2}) -PASS should_not_apply: not all and (min-device-aspect-ratio: ${low_dar_1}) -PASS should_apply: all and (min-device-aspect-ratio: ${low_dar_2}) -PASS expression_should_not_be_parseable: min-device-aspect-ratio -PASS should_apply: all and (max-device-aspect-ratio: ${real_dar}) -PASS should_apply: (max-device-aspect-ratio: ${high_dar_1}) -PASS should_apply: (max-device-aspect-ratio: ${high_dar_2}) -PASS should_not_apply: all and (max-device-aspect-ratio: ${low_dar_1}) -PASS should_apply: not all and (max-device-aspect-ratio: ${low_dar_2}) -PASS expression_should_not_be_parseable: max-device-aspect-ratio -PASS expression_should_be_parseable: max-aspect-ratio: 1/1 -PASS expression_should_be_parseable: max-aspect-ratio: 1 /1 -PASS expression_should_be_parseable: max-aspect-ratio: 1 / -1 -PASS expression_should_be_parseable: max-aspect-ratio: 1/\r1 -FAIL expression_should_be_parseable: max-aspect-ratio: 1 assert_true: max-aspect-ratio: 1 expected true got false -FAIL expression_should_be_parseable: max-aspect-ratio: 0.5 assert_true: max-aspect-ratio: 0.5 expected true got false -FAIL expression_should_be_parseable: max-aspect-ratio: 1.0/1 assert_true: max-aspect-ratio: 1.0/1 expected true got false -FAIL expression_should_be_parseable: max-aspect-ratio: 1/1.0 assert_true: max-aspect-ratio: 1/1.0 expected true got false -FAIL expression_should_be_parseable: max-aspect-ratio: 1.0/1.0 assert_true: max-aspect-ratio: 1.0/1.0 expected true got false -FAIL expression_should_be_parseable: max-aspect-ratio: 0/1 assert_true: max-aspect-ratio: 0/1 expected true got false -FAIL expression_should_be_parseable: max-aspect-ratio: 1/0 assert_true: max-aspect-ratio: 1/0 expected true got false -FAIL expression_should_be_parseable: max-aspect-ratio: 0/0 assert_true: max-aspect-ratio: 0/0 expected true got false -PASS expression_should_not_be_parseable: max-aspect-ratio: -1/1 -PASS expression_should_not_be_parseable: max-aspect-ratio: 1/-1 -PASS expression_should_not_be_parseable: max-aspect-ratio: -1/-1 -PASS expression_should_not_be_parseable: max-aspect-ratio: invalid -PASS expression_should_not_be_parseable: max-aspect-ratio: 1 / invalid -PASS expression_should_not_be_parseable: max-aspect-ratio: 1 invalid -PASS expression_should_be_parseable: device-aspect-ratio: 1/1 -PASS expression_should_be_parseable: device-aspect-ratio: 1 /1 -PASS expression_should_be_parseable: device-aspect-ratio: 1 / -1 -PASS expression_should_be_parseable: device-aspect-ratio: 1/\r1 -FAIL expression_should_be_parseable: device-aspect-ratio: 1 assert_true: device-aspect-ratio: 1 expected true got false -FAIL expression_should_be_parseable: device-aspect-ratio: 0.5 assert_true: device-aspect-ratio: 0.5 expected true got false -FAIL expression_should_be_parseable: device-aspect-ratio: 1.0/1 assert_true: device-aspect-ratio: 1.0/1 expected true got false -FAIL expression_should_be_parseable: device-aspect-ratio: 1/1.0 assert_true: device-aspect-ratio: 1/1.0 expected true got false -FAIL expression_should_be_parseable: device-aspect-ratio: 1.0/1.0 assert_true: device-aspect-ratio: 1.0/1.0 expected true got false -FAIL expression_should_be_parseable: device-aspect-ratio: 0/1 assert_true: device-aspect-ratio: 0/1 expected true got false -FAIL expression_should_be_parseable: device-aspect-ratio: 1/0 assert_true: device-aspect-ratio: 1/0 expected true got false -FAIL expression_should_be_parseable: device-aspect-ratio: 0/0 assert_true: device-aspect-ratio: 0/0 expected true got false -PASS expression_should_not_be_parseable: device-aspect-ratio: -1/1 -PASS expression_should_not_be_parseable: device-aspect-ratio: 1/-1 -PASS expression_should_not_be_parseable: device-aspect-ratio: -1/-1 -PASS expression_should_not_be_parseable: device-aspect-ratio: invalid -PASS expression_should_not_be_parseable: device-aspect-ratio: 1 / invalid -PASS expression_should_not_be_parseable: device-aspect-ratio: 1 invalid -PASS monochrome_and_color -PASS find_depth -PASS should_apply: all and (color:8) -PASS should_not_apply: all and (color:7) -PASS should_not_apply: all and (color:9) -PASS should_apply: all and (max-color:8) -PASS should_not_apply: all and (max-color:7) -PASS should_apply: all and (max-color:9) -PASS should_apply: all and (color) -PASS expression_should_not_be_parseable: max-color -PASS expression_should_not_be_parseable: min-color -PASS should_not_apply: all and (monochrome) -PASS expression_should_not_be_parseable: max-monochrome -PASS expression_should_not_be_parseable: min-monochrome -PASS should_apply: not all and (monochrome) -PASS should_not_apply: not all and (color) -PASS should_apply: only all and (color) -PASS should_not_apply: only all and (monochrome) -PASS expression_should_be_parseable: color: 1 -PASS expression_should_be_parseable: color: 327 -PASS expression_should_be_parseable: color: 0 -PASS expression_should_not_be_parseable: color: 1.0 -PASS expression_should_not_be_parseable: color: -1 -PASS expression_should_not_be_parseable: color: 1/1 -PASS expression_should_be_parseable: min-monochrome: 1 -PASS expression_should_be_parseable: min-monochrome: 327 -PASS expression_should_be_parseable: min-monochrome: 0 -PASS expression_should_not_be_parseable: min-monochrome: 1.0 -PASS expression_should_not_be_parseable: min-monochrome: -1 -PASS expression_should_not_be_parseable: min-monochrome: 1/1 -PASS expression_should_be_parseable: max-color-index: 1 -PASS expression_should_be_parseable: max-color-index: 327 -PASS expression_should_be_parseable: max-color-index: 0 -PASS expression_should_not_be_parseable: max-color-index: 1.0 -PASS expression_should_not_be_parseable: max-color-index: -1 -PASS expression_should_not_be_parseable: max-color-index: 1/1 -PASS should_apply: (color-index: 0) -PASS should_not_apply: (color-index: 1) -PASS should_apply: (min-color-index: 0) -PASS should_not_apply: (min-color-index: 1) -PASS should_apply: (max-color-index: 0) -PASS should_apply: (max-color-index: 1) -PASS should_apply: (max-color-index: 157) -PASS expression_should_be_parseable: resolution: 3dpi -PASS expression_should_be_parseable: resolution:3dpi -PASS expression_should_be_parseable: resolution: 3.0dpi -PASS expression_should_be_parseable: resolution: 3.4dpi -PASS expression_should_be_parseable: resolution : 120dpcm -PASS expression_should_be_parseable: resolution: 1dppx -PASS expression_should_be_parseable: resolution: 1x -PASS expression_should_be_parseable: resolution: 1.5dppx -PASS expression_should_be_parseable: resolution: 1.5x -PASS expression_should_be_parseable: resolution: 2.0dppx -PASS expression_should_not_be_parseable: resolution: 0dpi -PASS expression_should_not_be_parseable: resolution: -3dpi -PASS expression_should_not_be_parseable: resolution: 0dppx -PASS expression_should_not_be_parseable: resolution: 0x -PASS expression_should_be_parseable: min-resolution: 3dpi -PASS expression_should_be_parseable: min-resolution:3dpi -PASS expression_should_be_parseable: min-resolution: 3.0dpi -PASS expression_should_be_parseable: min-resolution: 3.4dpi -PASS expression_should_be_parseable: min-resolution : 120dpcm -PASS expression_should_be_parseable: min-resolution: 1dppx -PASS expression_should_be_parseable: min-resolution: 1x -PASS expression_should_be_parseable: min-resolution: 1.5dppx -PASS expression_should_be_parseable: min-resolution: 1.5x -PASS expression_should_be_parseable: min-resolution: 2.0dppx -PASS expression_should_not_be_parseable: min-resolution: 0dpi -PASS expression_should_not_be_parseable: min-resolution: -3dpi -PASS expression_should_not_be_parseable: min-resolution: 0dppx -PASS expression_should_not_be_parseable: min-resolution: 0x -PASS expression_should_be_parseable: max-resolution: 3dpi -PASS expression_should_be_parseable: max-resolution:3dpi -PASS expression_should_be_parseable: max-resolution: 3.0dpi -PASS expression_should_be_parseable: max-resolution: 3.4dpi -PASS expression_should_be_parseable: max-resolution : 120dpcm -PASS expression_should_be_parseable: max-resolution: 1dppx -PASS expression_should_be_parseable: max-resolution: 1x -PASS expression_should_be_parseable: max-resolution: 1.5dppx -PASS expression_should_be_parseable: max-resolution: 1.5x -PASS expression_should_be_parseable: max-resolution: 2.0dppx -PASS expression_should_not_be_parseable: max-resolution: 0dpi -PASS expression_should_not_be_parseable: max-resolution: -3dpi -PASS expression_should_not_be_parseable: max-resolution: 0dppx -PASS expression_should_not_be_parseable: max-resolution: 0x -PASS find_resolution -PASS resolution is exact: should_apply: (resolution: ${resolution}dpi) -PASS resolution is exact: should_apply: (resolution: ${Math.floor(resolution/96)}dppx) -PASS resolution is exact: should_apply: (resolution: ${Math.floor(resolution/96)}x) -PASS resolution is exact: should_not_apply: (resolution: ${resolution + 1}dpi) -PASS resolution is exact: should_not_apply: (resolution: ${resolution - 1}dpi) -PASS should_apply: (min-resolution: ${dpi_low}dpi) -PASS should_not_apply: not all and (min-resolution: ${dpi_low}dpi) -PASS should_apply: not all and (min-resolution: ${dpi_high}dpi) -PASS should_not_apply: all and (min-resolution: ${dpi_high}dpi) -PASS should_apply: (min-resolution: ${dpcm_low}dpcm) -PASS should_apply: (max-resolution: ${dpcm_high}dpcm) -PASS should_not_apply: (max-resolution: ${dpcm_low}dpcm) -PASS should_apply: not all and (min-resolution: ${dpcm_high}dpcm) -PASS expression_should_be_parseable: scan -PASS expression_should_be_parseable: scan: progressive -PASS expression_should_be_parseable: scan:interlace -PASS expression_should_not_be_parseable: min-scan:interlace -PASS expression_should_not_be_parseable: scan: 1 -PASS expression_should_not_be_parseable: max-scan -PASS expression_should_not_be_parseable: max-scan: progressive -PASS should_not_apply: (scan) -PASS should_not_apply: (scan: progressive) -PASS should_not_apply: (scan: interlace) -PASS should_apply: not all and (scan) -PASS should_apply: not all and (scan: progressive) -PASS should_apply: not all and (scan: interlace) -PASS expression_should_be_parseable: grid -PASS expression_should_be_parseable: grid: 0 -PASS expression_should_be_parseable: grid: 1 -PASS expression_should_not_be_parseable: min-grid -PASS expression_should_not_be_parseable: min-grid:0 -PASS expression_should_not_be_parseable: max-grid: 1 -PASS expression_should_not_be_parseable: grid: 2 -PASS expression_should_not_be_parseable: grid: -1 -PASS should_not_apply: (grid) -PASS should_apply: (grid: 0) -PASS should_not_apply: (grid: 1) -PASS should_not_apply: (grid: 2) -PASS should_not_apply: (grid: -1) -PASS should_apply: (orientation -PASS should_not_apply: not all and (orientation -PASS should_not_apply: (orientation: -PASS should_not_apply: (orientation:) -PASS should_not_apply: (orientation: ) -PASS should_apply: all,(orientation: -PASS should_not_apply: (orientation:,all -PASS should_apply: not all and (grid -PASS should_not_apply: only all and (grid -PASS should_not_apply: (grid -PASS should_apply: all,(grid -PASS should_not_apply: (grid,all -PASS should_apply: ,all -PASS should_apply: all, -PASS should_apply: ,all, -PASS should_apply: all,badmedium -PASS should_apply: badmedium,all -PASS should_not_apply: ,badmedium, -PASS should_apply: all,(badexpression) -PASS should_apply: (badexpression),all -PASS should_not_apply: (badexpression),badmedium -PASS should_not_apply: badmedium,(badexpression) -PASS should_apply: all,[badsyntax] -PASS should_apply: [badsyntax],all -PASS should_not_apply: badmedium,[badsyntax] -PASS should_not_apply: [badsyntax],badmedium -PASS query_should_not_be_parseable: all and color : -PASS query_should_not_be_parseable: all and color : 1 -PASS should_not_apply: all and min-color : 1 -PASS should_not_apply: (bogus) -PASS should_not_apply: not all and (bogus) -PASS should_not_apply: only all and (bogus) -FAIL expression_should_be_parseable: overflow-block assert_true: overflow-block expected true got false -FAIL expression_should_be_parseable: overflow-block: none assert_true: overflow-block: none expected true got false -FAIL expression_should_be_parseable: overflow-block: paged assert_true: overflow-block: paged expected true got false -FAIL expression_should_be_parseable: overflow-block: scroll assert_true: overflow-block: scroll expected true got false -FAIL expression_should_be_parseable: overflow-block: optional-paged assert_true: overflow-block: optional-paged expected true got false -PASS expression_should_not_be_parseable: overflow-block: some-random-invalid-thing -FAIL Sanity check for overflow-block assert_not_equals: overflow-block should be equivalent to not (overflow-block: none) got disallowed value false -FAIL expression_should_be_parseable: overflow-inline assert_true: overflow-inline expected true got false -FAIL expression_should_be_parseable: overflow-inline: none assert_true: overflow-inline: none expected true got false -FAIL expression_should_be_parseable: overflow-inline: scroll assert_true: overflow-inline: scroll expected true got false -PASS expression_should_not_be_parseable: overflow-inline: some-random-invalid-thing -FAIL Sanity check for overflow-inline assert_not_equals: overflow-inline should be equivalent to not (overflow-inline: none) got disallowed value false -PASS expression_should_be_parseable: hover -PASS expression_should_be_parseable: hover: hover -PASS expression_should_be_parseable: hover: none -PASS expression_should_be_parseable: any-hover -PASS expression_should_be_parseable: any-hover: hover -PASS expression_should_be_parseable: any-hover: none -PASS (hover) == (hover: hover) -PASS (hover) == not (hover: none) -PASS (any-hover) == (any-hover: hover) -PASS (any-hover) == not (any-hover: none) -PASS expression_should_be_parseable: pointer -PASS expression_should_be_parseable: pointer: coarse -PASS expression_should_be_parseable: pointer: fine -PASS expression_should_be_parseable: pointer: none -PASS expression_should_be_parseable: any-pointer -PASS expression_should_be_parseable: any-pointer: coarse -PASS expression_should_be_parseable: any-pointer: fine -PASS expression_should_be_parseable: any-pointer: none -PASS (pointer) == (pointer: coarse) or (pointer: fine) -PASS (pointer) == not (pointer: none) -PASS (any-pointer) == (any-pointer: coarse) or (any-pointer: fine) -PASS (any-pointer) == not (any-pointer: none) -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/external/wpt/css/mediaqueries/test_media_queries-expected.txt b/third_party/blink/web_tests/platform/mac-mac10.15/external/wpt/css/mediaqueries/test_media_queries-expected.txt deleted file mode 100644 index fce88d5..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.15/external/wpt/css/mediaqueries/test_media_queries-expected.txt +++ /dev/null
@@ -1,809 +0,0 @@ -This is a testharness.js-based test. -Found 803 tests; 586 PASS, 217 FAIL, 0 TIMEOUT, 0 NOTRUN. -PASS query_should_be_parseable: (orientation) -FAIL query_should_be_parseable: not (orientation) assert_true: not (orientation) expected true got false -PASS query_should_not_be_parseable: only (orientation) -PASS query_should_be_parseable: all and (orientation) -PASS query_should_be_parseable: not all and (orientation) -PASS query_should_be_parseable: only all and (orientation) -PASS query_should_not_be_parseable: not not (orientation) -PASS query_should_be_parseable: (orientation) and (orientation) -FAIL query_should_be_parseable: (orientation) or (orientation) assert_true: (orientation) or (orientation) expected true got false -FAIL query_should_be_parseable: (orientation) or ((orientation) and ((orientation) or (orientation) or (not (orientation)))) assert_true: (orientation) or ((orientation) and ((orientation) or (orientation) or (not (orientation)))) expected true got false -PASS query_should_not_be_parseable: all and (orientation) or (orientation) -PASS query_should_be_parseable: all and (orientation) and (orientation) -PASS query_should_not_be_parseable: (orientation) and (orientation) or (orientation) -PASS query_should_not_be_parseable: (orientation) and not (orientation) -PASS expression_should_be_parseable: width -PASS expression_should_not_be_parseable: min-width -PASS expression_should_not_be_parseable: max-width -PASS expression_should_be_parseable: width : 0 -PASS expression_should_be_parseable: width : 0px -PASS expression_should_be_parseable: width : 0em -PASS expression_should_be_parseable: width : -0 -PASS expression_should_be_parseable: width : -0cm -PASS expression_should_be_parseable: width : 1px -PASS expression_should_be_parseable: width : 0.001mm -PASS expression_should_be_parseable: width : 100000px -PASS expression_should_be_parseable: min-width : -0 -PASS expression_should_be_parseable: max-width : -0 -PASS expression_should_not_be_parseable: width : -1px -PASS expression_should_not_be_parseable: min-width : -1px -PASS expression_should_not_be_parseable: max-width : -1px -PASS expression_should_not_be_parseable: width : -0.00001mm -PASS expression_should_not_be_parseable: width : -100000em -FAIL expression_should_be_parseable: width > 0 assert_true: width > 0 expected true got false -FAIL expression_should_be_parseable: width > 0px assert_true: width > 0px expected true got false -FAIL expression_should_be_parseable: width > 0em assert_true: width > 0em expected true got false -FAIL expression_should_be_parseable: width > -0 assert_true: width > -0 expected true got false -FAIL expression_should_be_parseable: width > -0cm assert_true: width > -0cm expected true got false -FAIL expression_should_be_parseable: width > 1px assert_true: width > 1px expected true got false -FAIL expression_should_be_parseable: width > 0.001mm assert_true: width > 0.001mm expected true got false -FAIL expression_should_be_parseable: width > 100000px assert_true: width > 100000px expected true got false -PASS expression_should_not_be_parseable: min-width > -0 -PASS expression_should_not_be_parseable: max-width > -0 -PASS expression_should_not_be_parseable: width > -1px -PASS expression_should_not_be_parseable: min-width > -1px -PASS expression_should_not_be_parseable: max-width > -1px -PASS expression_should_not_be_parseable: width > -0.00001mm -PASS expression_should_not_be_parseable: width > -100000em -FAIL expression_should_be_parseable: width >= 0 assert_true: width >= 0 expected true got false -FAIL expression_should_be_parseable: width >= 0px assert_true: width >= 0px expected true got false -FAIL expression_should_be_parseable: width >= 0em assert_true: width >= 0em expected true got false -FAIL expression_should_be_parseable: width >= -0 assert_true: width >= -0 expected true got false -FAIL expression_should_be_parseable: width >= -0cm assert_true: width >= -0cm expected true got false -FAIL expression_should_be_parseable: width >= 1px assert_true: width >= 1px expected true got false -FAIL expression_should_be_parseable: width >= 0.001mm assert_true: width >= 0.001mm expected true got false -FAIL expression_should_be_parseable: width >= 100000px assert_true: width >= 100000px expected true got false -PASS expression_should_not_be_parseable: min-width >= -0 -PASS expression_should_not_be_parseable: max-width >= -0 -PASS expression_should_not_be_parseable: width > = 0px -PASS expression_should_not_be_parseable: width >= -1px -PASS expression_should_not_be_parseable: min-width >= -1px -PASS expression_should_not_be_parseable: max-width >= -1px -PASS expression_should_not_be_parseable: width >= -0.00001mm -PASS expression_should_not_be_parseable: width >= -100000em -FAIL expression_should_be_parseable: width = 0 assert_true: width = 0 expected true got false -FAIL expression_should_be_parseable: width = 0px assert_true: width = 0px expected true got false -FAIL expression_should_be_parseable: width = 0em assert_true: width = 0em expected true got false -FAIL expression_should_be_parseable: width = -0 assert_true: width = -0 expected true got false -FAIL expression_should_be_parseable: width = -0cm assert_true: width = -0cm expected true got false -FAIL expression_should_be_parseable: width = 1px assert_true: width = 1px expected true got false -FAIL expression_should_be_parseable: width = 0.001mm assert_true: width = 0.001mm expected true got false -FAIL expression_should_be_parseable: width = 100000px assert_true: width = 100000px expected true got false -PASS expression_should_not_be_parseable: min-width = -0 -PASS expression_should_not_be_parseable: max-width = -0 -PASS expression_should_not_be_parseable: width = -1px -PASS expression_should_not_be_parseable: min-width = -1px -PASS expression_should_not_be_parseable: max-width = -1px -PASS expression_should_not_be_parseable: width = -0.00001mm -PASS expression_should_not_be_parseable: width = -100000em -FAIL expression_should_be_parseable: width <= 0 assert_true: width <= 0 expected true got false -FAIL expression_should_be_parseable: width <= 0px assert_true: width <= 0px expected true got false -FAIL expression_should_be_parseable: width <= 0em assert_true: width <= 0em expected true got false -FAIL expression_should_be_parseable: width <= -0 assert_true: width <= -0 expected true got false -FAIL expression_should_be_parseable: width <= -0cm assert_true: width <= -0cm expected true got false -FAIL expression_should_be_parseable: width <= 1px assert_true: width <= 1px expected true got false -FAIL expression_should_be_parseable: width <= 0.001mm assert_true: width <= 0.001mm expected true got false -FAIL expression_should_be_parseable: width <= 100000px assert_true: width <= 100000px expected true got false -PASS expression_should_not_be_parseable: min-width <= -0 -PASS expression_should_not_be_parseable: max-width <= -0 -PASS expression_should_not_be_parseable: width < = 0px -PASS expression_should_not_be_parseable: width <= -1px -PASS expression_should_not_be_parseable: min-width <= -1px -PASS expression_should_not_be_parseable: max-width <= -1px -PASS expression_should_not_be_parseable: width <= -0.00001mm -PASS expression_should_not_be_parseable: width <= -100000em -FAIL expression_should_be_parseable: width < 0 assert_true: width < 0 expected true got false -FAIL expression_should_be_parseable: width < 0px assert_true: width < 0px expected true got false -FAIL expression_should_be_parseable: width < 0em assert_true: width < 0em expected true got false -FAIL expression_should_be_parseable: width < -0 assert_true: width < -0 expected true got false -FAIL expression_should_be_parseable: width < -0cm assert_true: width < -0cm expected true got false -FAIL expression_should_be_parseable: width < 1px assert_true: width < 1px expected true got false -FAIL expression_should_be_parseable: width < 0.001mm assert_true: width < 0.001mm expected true got false -FAIL expression_should_be_parseable: width < 100000px assert_true: width < 100000px expected true got false -PASS expression_should_not_be_parseable: min-width < -0 -PASS expression_should_not_be_parseable: max-width < -0 -PASS expression_should_not_be_parseable: width < -1px -PASS expression_should_not_be_parseable: min-width < -1px -PASS expression_should_not_be_parseable: max-width < -1px -PASS expression_should_not_be_parseable: width < -0.00001mm -PASS expression_should_not_be_parseable: width < -100000em -PASS expression_should_be_parseable: height -PASS expression_should_not_be_parseable: min-height -PASS expression_should_not_be_parseable: max-height -PASS expression_should_be_parseable: height : 0 -PASS expression_should_be_parseable: height : 0px -PASS expression_should_be_parseable: height : 0em -PASS expression_should_be_parseable: height : -0 -PASS expression_should_be_parseable: height : -0cm -PASS expression_should_be_parseable: height : 1px -PASS expression_should_be_parseable: height : 0.001mm -PASS expression_should_be_parseable: height : 100000px -PASS expression_should_be_parseable: min-height : -0 -PASS expression_should_be_parseable: max-height : -0 -PASS expression_should_not_be_parseable: height : -1px -PASS expression_should_not_be_parseable: min-height : -1px -PASS expression_should_not_be_parseable: max-height : -1px -PASS expression_should_not_be_parseable: height : -0.00001mm -PASS expression_should_not_be_parseable: height : -100000em -FAIL expression_should_be_parseable: height > 0 assert_true: height > 0 expected true got false -FAIL expression_should_be_parseable: height > 0px assert_true: height > 0px expected true got false -FAIL expression_should_be_parseable: height > 0em assert_true: height > 0em expected true got false -FAIL expression_should_be_parseable: height > -0 assert_true: height > -0 expected true got false -FAIL expression_should_be_parseable: height > -0cm assert_true: height > -0cm expected true got false -FAIL expression_should_be_parseable: height > 1px assert_true: height > 1px expected true got false -FAIL expression_should_be_parseable: height > 0.001mm assert_true: height > 0.001mm expected true got false -FAIL expression_should_be_parseable: height > 100000px assert_true: height > 100000px expected true got false -PASS expression_should_not_be_parseable: min-height > -0 -PASS expression_should_not_be_parseable: max-height > -0 -PASS expression_should_not_be_parseable: height > -1px -PASS expression_should_not_be_parseable: min-height > -1px -PASS expression_should_not_be_parseable: max-height > -1px -PASS expression_should_not_be_parseable: height > -0.00001mm -PASS expression_should_not_be_parseable: height > -100000em -FAIL expression_should_be_parseable: height >= 0 assert_true: height >= 0 expected true got false -FAIL expression_should_be_parseable: height >= 0px assert_true: height >= 0px expected true got false -FAIL expression_should_be_parseable: height >= 0em assert_true: height >= 0em expected true got false -FAIL expression_should_be_parseable: height >= -0 assert_true: height >= -0 expected true got false -FAIL expression_should_be_parseable: height >= -0cm assert_true: height >= -0cm expected true got false -FAIL expression_should_be_parseable: height >= 1px assert_true: height >= 1px expected true got false -FAIL expression_should_be_parseable: height >= 0.001mm assert_true: height >= 0.001mm expected true got false -FAIL expression_should_be_parseable: height >= 100000px assert_true: height >= 100000px expected true got false -PASS expression_should_not_be_parseable: min-height >= -0 -PASS expression_should_not_be_parseable: max-height >= -0 -PASS expression_should_not_be_parseable: height > = 0px -PASS expression_should_not_be_parseable: height >= -1px -PASS expression_should_not_be_parseable: min-height >= -1px -PASS expression_should_not_be_parseable: max-height >= -1px -PASS expression_should_not_be_parseable: height >= -0.00001mm -PASS expression_should_not_be_parseable: height >= -100000em -FAIL expression_should_be_parseable: height = 0 assert_true: height = 0 expected true got false -FAIL expression_should_be_parseable: height = 0px assert_true: height = 0px expected true got false -FAIL expression_should_be_parseable: height = 0em assert_true: height = 0em expected true got false -FAIL expression_should_be_parseable: height = -0 assert_true: height = -0 expected true got false -FAIL expression_should_be_parseable: height = -0cm assert_true: height = -0cm expected true got false -FAIL expression_should_be_parseable: height = 1px assert_true: height = 1px expected true got false -FAIL expression_should_be_parseable: height = 0.001mm assert_true: height = 0.001mm expected true got false -FAIL expression_should_be_parseable: height = 100000px assert_true: height = 100000px expected true got false -PASS expression_should_not_be_parseable: min-height = -0 -PASS expression_should_not_be_parseable: max-height = -0 -PASS expression_should_not_be_parseable: height = -1px -PASS expression_should_not_be_parseable: min-height = -1px -PASS expression_should_not_be_parseable: max-height = -1px -PASS expression_should_not_be_parseable: height = -0.00001mm -PASS expression_should_not_be_parseable: height = -100000em -FAIL expression_should_be_parseable: height <= 0 assert_true: height <= 0 expected true got false -FAIL expression_should_be_parseable: height <= 0px assert_true: height <= 0px expected true got false -FAIL expression_should_be_parseable: height <= 0em assert_true: height <= 0em expected true got false -FAIL expression_should_be_parseable: height <= -0 assert_true: height <= -0 expected true got false -FAIL expression_should_be_parseable: height <= -0cm assert_true: height <= -0cm expected true got false -FAIL expression_should_be_parseable: height <= 1px assert_true: height <= 1px expected true got false -FAIL expression_should_be_parseable: height <= 0.001mm assert_true: height <= 0.001mm expected true got false -FAIL expression_should_be_parseable: height <= 100000px assert_true: height <= 100000px expected true got false -PASS expression_should_not_be_parseable: min-height <= -0 -PASS expression_should_not_be_parseable: max-height <= -0 -PASS expression_should_not_be_parseable: height < = 0px -PASS expression_should_not_be_parseable: height <= -1px -PASS expression_should_not_be_parseable: min-height <= -1px -PASS expression_should_not_be_parseable: max-height <= -1px -PASS expression_should_not_be_parseable: height <= -0.00001mm -PASS expression_should_not_be_parseable: height <= -100000em -FAIL expression_should_be_parseable: height < 0 assert_true: height < 0 expected true got false -FAIL expression_should_be_parseable: height < 0px assert_true: height < 0px expected true got false -FAIL expression_should_be_parseable: height < 0em assert_true: height < 0em expected true got false -FAIL expression_should_be_parseable: height < -0 assert_true: height < -0 expected true got false -FAIL expression_should_be_parseable: height < -0cm assert_true: height < -0cm expected true got false -FAIL expression_should_be_parseable: height < 1px assert_true: height < 1px expected true got false -FAIL expression_should_be_parseable: height < 0.001mm assert_true: height < 0.001mm expected true got false -FAIL expression_should_be_parseable: height < 100000px assert_true: height < 100000px expected true got false -PASS expression_should_not_be_parseable: min-height < -0 -PASS expression_should_not_be_parseable: max-height < -0 -PASS expression_should_not_be_parseable: height < -1px -PASS expression_should_not_be_parseable: min-height < -1px -PASS expression_should_not_be_parseable: max-height < -1px -PASS expression_should_not_be_parseable: height < -0.00001mm -PASS expression_should_not_be_parseable: height < -100000em -PASS expression_should_be_parseable: device-width -PASS expression_should_not_be_parseable: min-device-width -PASS expression_should_not_be_parseable: max-device-width -PASS expression_should_be_parseable: device-width : 0 -PASS expression_should_be_parseable: device-width : 0px -PASS expression_should_be_parseable: device-width : 0em -PASS expression_should_be_parseable: device-width : -0 -PASS expression_should_be_parseable: device-width : -0cm -PASS expression_should_be_parseable: device-width : 1px -PASS expression_should_be_parseable: device-width : 0.001mm -PASS expression_should_be_parseable: device-width : 100000px -PASS expression_should_be_parseable: min-device-width : -0 -PASS expression_should_be_parseable: max-device-width : -0 -PASS expression_should_not_be_parseable: device-width : -1px -PASS expression_should_not_be_parseable: min-device-width : -1px -PASS expression_should_not_be_parseable: max-device-width : -1px -PASS expression_should_not_be_parseable: device-width : -0.00001mm -PASS expression_should_not_be_parseable: device-width : -100000em -FAIL expression_should_be_parseable: device-width > 0 assert_true: device-width > 0 expected true got false -FAIL expression_should_be_parseable: device-width > 0px assert_true: device-width > 0px expected true got false -FAIL expression_should_be_parseable: device-width > 0em assert_true: device-width > 0em expected true got false -FAIL expression_should_be_parseable: device-width > -0 assert_true: device-width > -0 expected true got false -FAIL expression_should_be_parseable: device-width > -0cm assert_true: device-width > -0cm expected true got false -FAIL expression_should_be_parseable: device-width > 1px assert_true: device-width > 1px expected true got false -FAIL expression_should_be_parseable: device-width > 0.001mm assert_true: device-width > 0.001mm expected true got false -FAIL expression_should_be_parseable: device-width > 100000px assert_true: device-width > 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-width > -0 -PASS expression_should_not_be_parseable: max-device-width > -0 -PASS expression_should_not_be_parseable: device-width > -1px -PASS expression_should_not_be_parseable: min-device-width > -1px -PASS expression_should_not_be_parseable: max-device-width > -1px -PASS expression_should_not_be_parseable: device-width > -0.00001mm -PASS expression_should_not_be_parseable: device-width > -100000em -FAIL expression_should_be_parseable: device-width >= 0 assert_true: device-width >= 0 expected true got false -FAIL expression_should_be_parseable: device-width >= 0px assert_true: device-width >= 0px expected true got false -FAIL expression_should_be_parseable: device-width >= 0em assert_true: device-width >= 0em expected true got false -FAIL expression_should_be_parseable: device-width >= -0 assert_true: device-width >= -0 expected true got false -FAIL expression_should_be_parseable: device-width >= -0cm assert_true: device-width >= -0cm expected true got false -FAIL expression_should_be_parseable: device-width >= 1px assert_true: device-width >= 1px expected true got false -FAIL expression_should_be_parseable: device-width >= 0.001mm assert_true: device-width >= 0.001mm expected true got false -FAIL expression_should_be_parseable: device-width >= 100000px assert_true: device-width >= 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-width >= -0 -PASS expression_should_not_be_parseable: max-device-width >= -0 -PASS expression_should_not_be_parseable: device-width > = 0px -PASS expression_should_not_be_parseable: device-width >= -1px -PASS expression_should_not_be_parseable: min-device-width >= -1px -PASS expression_should_not_be_parseable: max-device-width >= -1px -PASS expression_should_not_be_parseable: device-width >= -0.00001mm -PASS expression_should_not_be_parseable: device-width >= -100000em -FAIL expression_should_be_parseable: device-width = 0 assert_true: device-width = 0 expected true got false -FAIL expression_should_be_parseable: device-width = 0px assert_true: device-width = 0px expected true got false -FAIL expression_should_be_parseable: device-width = 0em assert_true: device-width = 0em expected true got false -FAIL expression_should_be_parseable: device-width = -0 assert_true: device-width = -0 expected true got false -FAIL expression_should_be_parseable: device-width = -0cm assert_true: device-width = -0cm expected true got false -FAIL expression_should_be_parseable: device-width = 1px assert_true: device-width = 1px expected true got false -FAIL expression_should_be_parseable: device-width = 0.001mm assert_true: device-width = 0.001mm expected true got false -FAIL expression_should_be_parseable: device-width = 100000px assert_true: device-width = 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-width = -0 -PASS expression_should_not_be_parseable: max-device-width = -0 -PASS expression_should_not_be_parseable: device-width = -1px -PASS expression_should_not_be_parseable: min-device-width = -1px -PASS expression_should_not_be_parseable: max-device-width = -1px -PASS expression_should_not_be_parseable: device-width = -0.00001mm -PASS expression_should_not_be_parseable: device-width = -100000em -FAIL expression_should_be_parseable: device-width <= 0 assert_true: device-width <= 0 expected true got false -FAIL expression_should_be_parseable: device-width <= 0px assert_true: device-width <= 0px expected true got false -FAIL expression_should_be_parseable: device-width <= 0em assert_true: device-width <= 0em expected true got false -FAIL expression_should_be_parseable: device-width <= -0 assert_true: device-width <= -0 expected true got false -FAIL expression_should_be_parseable: device-width <= -0cm assert_true: device-width <= -0cm expected true got false -FAIL expression_should_be_parseable: device-width <= 1px assert_true: device-width <= 1px expected true got false -FAIL expression_should_be_parseable: device-width <= 0.001mm assert_true: device-width <= 0.001mm expected true got false -FAIL expression_should_be_parseable: device-width <= 100000px assert_true: device-width <= 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-width <= -0 -PASS expression_should_not_be_parseable: max-device-width <= -0 -PASS expression_should_not_be_parseable: device-width < = 0px -PASS expression_should_not_be_parseable: device-width <= -1px -PASS expression_should_not_be_parseable: min-device-width <= -1px -PASS expression_should_not_be_parseable: max-device-width <= -1px -PASS expression_should_not_be_parseable: device-width <= -0.00001mm -PASS expression_should_not_be_parseable: device-width <= -100000em -FAIL expression_should_be_parseable: device-width < 0 assert_true: device-width < 0 expected true got false -FAIL expression_should_be_parseable: device-width < 0px assert_true: device-width < 0px expected true got false -FAIL expression_should_be_parseable: device-width < 0em assert_true: device-width < 0em expected true got false -FAIL expression_should_be_parseable: device-width < -0 assert_true: device-width < -0 expected true got false -FAIL expression_should_be_parseable: device-width < -0cm assert_true: device-width < -0cm expected true got false -FAIL expression_should_be_parseable: device-width < 1px assert_true: device-width < 1px expected true got false -FAIL expression_should_be_parseable: device-width < 0.001mm assert_true: device-width < 0.001mm expected true got false -FAIL expression_should_be_parseable: device-width < 100000px assert_true: device-width < 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-width < -0 -PASS expression_should_not_be_parseable: max-device-width < -0 -PASS expression_should_not_be_parseable: device-width < -1px -PASS expression_should_not_be_parseable: min-device-width < -1px -PASS expression_should_not_be_parseable: max-device-width < -1px -PASS expression_should_not_be_parseable: device-width < -0.00001mm -PASS expression_should_not_be_parseable: device-width < -100000em -PASS expression_should_be_parseable: device-height -PASS expression_should_not_be_parseable: min-device-height -PASS expression_should_not_be_parseable: max-device-height -PASS expression_should_be_parseable: device-height : 0 -PASS expression_should_be_parseable: device-height : 0px -PASS expression_should_be_parseable: device-height : 0em -PASS expression_should_be_parseable: device-height : -0 -PASS expression_should_be_parseable: device-height : -0cm -PASS expression_should_be_parseable: device-height : 1px -PASS expression_should_be_parseable: device-height : 0.001mm -PASS expression_should_be_parseable: device-height : 100000px -PASS expression_should_be_parseable: min-device-height : -0 -PASS expression_should_be_parseable: max-device-height : -0 -PASS expression_should_not_be_parseable: device-height : -1px -PASS expression_should_not_be_parseable: min-device-height : -1px -PASS expression_should_not_be_parseable: max-device-height : -1px -PASS expression_should_not_be_parseable: device-height : -0.00001mm -PASS expression_should_not_be_parseable: device-height : -100000em -FAIL expression_should_be_parseable: device-height > 0 assert_true: device-height > 0 expected true got false -FAIL expression_should_be_parseable: device-height > 0px assert_true: device-height > 0px expected true got false -FAIL expression_should_be_parseable: device-height > 0em assert_true: device-height > 0em expected true got false -FAIL expression_should_be_parseable: device-height > -0 assert_true: device-height > -0 expected true got false -FAIL expression_should_be_parseable: device-height > -0cm assert_true: device-height > -0cm expected true got false -FAIL expression_should_be_parseable: device-height > 1px assert_true: device-height > 1px expected true got false -FAIL expression_should_be_parseable: device-height > 0.001mm assert_true: device-height > 0.001mm expected true got false -FAIL expression_should_be_parseable: device-height > 100000px assert_true: device-height > 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-height > -0 -PASS expression_should_not_be_parseable: max-device-height > -0 -PASS expression_should_not_be_parseable: device-height > -1px -PASS expression_should_not_be_parseable: min-device-height > -1px -PASS expression_should_not_be_parseable: max-device-height > -1px -PASS expression_should_not_be_parseable: device-height > -0.00001mm -PASS expression_should_not_be_parseable: device-height > -100000em -FAIL expression_should_be_parseable: device-height >= 0 assert_true: device-height >= 0 expected true got false -FAIL expression_should_be_parseable: device-height >= 0px assert_true: device-height >= 0px expected true got false -FAIL expression_should_be_parseable: device-height >= 0em assert_true: device-height >= 0em expected true got false -FAIL expression_should_be_parseable: device-height >= -0 assert_true: device-height >= -0 expected true got false -FAIL expression_should_be_parseable: device-height >= -0cm assert_true: device-height >= -0cm expected true got false -FAIL expression_should_be_parseable: device-height >= 1px assert_true: device-height >= 1px expected true got false -FAIL expression_should_be_parseable: device-height >= 0.001mm assert_true: device-height >= 0.001mm expected true got false -FAIL expression_should_be_parseable: device-height >= 100000px assert_true: device-height >= 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-height >= -0 -PASS expression_should_not_be_parseable: max-device-height >= -0 -PASS expression_should_not_be_parseable: device-height > = 0px -PASS expression_should_not_be_parseable: device-height >= -1px -PASS expression_should_not_be_parseable: min-device-height >= -1px -PASS expression_should_not_be_parseable: max-device-height >= -1px -PASS expression_should_not_be_parseable: device-height >= -0.00001mm -PASS expression_should_not_be_parseable: device-height >= -100000em -FAIL expression_should_be_parseable: device-height = 0 assert_true: device-height = 0 expected true got false -FAIL expression_should_be_parseable: device-height = 0px assert_true: device-height = 0px expected true got false -FAIL expression_should_be_parseable: device-height = 0em assert_true: device-height = 0em expected true got false -FAIL expression_should_be_parseable: device-height = -0 assert_true: device-height = -0 expected true got false -FAIL expression_should_be_parseable: device-height = -0cm assert_true: device-height = -0cm expected true got false -FAIL expression_should_be_parseable: device-height = 1px assert_true: device-height = 1px expected true got false -FAIL expression_should_be_parseable: device-height = 0.001mm assert_true: device-height = 0.001mm expected true got false -FAIL expression_should_be_parseable: device-height = 100000px assert_true: device-height = 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-height = -0 -PASS expression_should_not_be_parseable: max-device-height = -0 -PASS expression_should_not_be_parseable: device-height = -1px -PASS expression_should_not_be_parseable: min-device-height = -1px -PASS expression_should_not_be_parseable: max-device-height = -1px -PASS expression_should_not_be_parseable: device-height = -0.00001mm -PASS expression_should_not_be_parseable: device-height = -100000em -FAIL expression_should_be_parseable: device-height <= 0 assert_true: device-height <= 0 expected true got false -FAIL expression_should_be_parseable: device-height <= 0px assert_true: device-height <= 0px expected true got false -FAIL expression_should_be_parseable: device-height <= 0em assert_true: device-height <= 0em expected true got false -FAIL expression_should_be_parseable: device-height <= -0 assert_true: device-height <= -0 expected true got false -FAIL expression_should_be_parseable: device-height <= -0cm assert_true: device-height <= -0cm expected true got false -FAIL expression_should_be_parseable: device-height <= 1px assert_true: device-height <= 1px expected true got false -FAIL expression_should_be_parseable: device-height <= 0.001mm assert_true: device-height <= 0.001mm expected true got false -FAIL expression_should_be_parseable: device-height <= 100000px assert_true: device-height <= 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-height <= -0 -PASS expression_should_not_be_parseable: max-device-height <= -0 -PASS expression_should_not_be_parseable: device-height < = 0px -PASS expression_should_not_be_parseable: device-height <= -1px -PASS expression_should_not_be_parseable: min-device-height <= -1px -PASS expression_should_not_be_parseable: max-device-height <= -1px -PASS expression_should_not_be_parseable: device-height <= -0.00001mm -PASS expression_should_not_be_parseable: device-height <= -100000em -FAIL expression_should_be_parseable: device-height < 0 assert_true: device-height < 0 expected true got false -FAIL expression_should_be_parseable: device-height < 0px assert_true: device-height < 0px expected true got false -FAIL expression_should_be_parseable: device-height < 0em assert_true: device-height < 0em expected true got false -FAIL expression_should_be_parseable: device-height < -0 assert_true: device-height < -0 expected true got false -FAIL expression_should_be_parseable: device-height < -0cm assert_true: device-height < -0cm expected true got false -FAIL expression_should_be_parseable: device-height < 1px assert_true: device-height < 1px expected true got false -FAIL expression_should_be_parseable: device-height < 0.001mm assert_true: device-height < 0.001mm expected true got false -FAIL expression_should_be_parseable: device-height < 100000px assert_true: device-height < 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-height < -0 -PASS expression_should_not_be_parseable: max-device-height < -0 -PASS expression_should_not_be_parseable: device-height < -1px -PASS expression_should_not_be_parseable: min-device-height < -1px -PASS expression_should_not_be_parseable: max-device-height < -1px -PASS expression_should_not_be_parseable: device-height < -0.00001mm -PASS expression_should_not_be_parseable: device-height < -100000em -PASS should_apply: all and (width: ${value}px) -FAIL should_apply: all and (width = ${value}px) assert_true: all and (width = 117px) expected true got false -PASS should_not_apply: all and (width: ${value + 1}px) -PASS should_not_apply: all and (width: ${value - 1}px) -PASS should_not_apply: all and (width = ${value + 1}px) -PASS should_not_apply: all and (width = ${value - 1}px) -PASS should_apply: all and (min-width: ${value}px) -PASS should_not_apply: all and (min-width: ${value + 1}px) -PASS should_apply: all and (min-width: ${value - 1}px) -PASS should_apply: all and (max-width: ${value}px) -PASS should_apply: all and (max-width: ${value + 1}px) -PASS should_not_apply: all and (max-width: ${value - 1}px) -PASS should_not_apply: all and (min-width: ${Math.ceil(value/em_size) + 1}em) -PASS should_apply: all and (min-width: ${Math.floor(value/em_size) - 1}em) -PASS should_apply: all and (max-width: ${Math.ceil(value/em_size) + 1}em) -PASS should_not_apply: all and (max-width: ${Math.floor(value/em_size) - 1}em) -FAIL should_apply: (width <= ${value}px) assert_true: (width <= 117px) expected true got false -FAIL should_apply: (width >= ${value}px) assert_true: (width >= 117px) expected true got false -PASS should_not_apply: (width < ${value}px) -PASS should_not_apply: (width > ${value}px) -FAIL should_apply: (width < ${value + 1}px) assert_true: (width < 118px) expected true got false -FAIL should_apply: (width <= ${value + 1}px) assert_true: (width <= 118px) expected true got false -PASS should_not_apply: (width > ${value + 1}px) -PASS should_not_apply: (width >= ${value + 1}px) -FAIL should_apply: (width > ${value - 1}px) assert_true: (width > 116px) expected true got false -FAIL should_apply: (width >= ${value - 1}px) assert_true: (width >= 116px) expected true got false -PASS should_not_apply: (width < ${value - 1}px) -PASS should_not_apply: (width <= ${value - 1}px) -PASS should_apply: all and (height: ${value}px) -FAIL should_apply: all and (height = ${value}px) assert_true: all and (height = 76px) expected true got false -PASS should_not_apply: all and (height: ${value + 1}px) -PASS should_not_apply: all and (height: ${value - 1}px) -PASS should_not_apply: all and (height = ${value + 1}px) -PASS should_not_apply: all and (height = ${value - 1}px) -PASS should_apply: all and (min-height: ${value}px) -PASS should_not_apply: all and (min-height: ${value + 1}px) -PASS should_apply: all and (min-height: ${value - 1}px) -PASS should_apply: all and (max-height: ${value}px) -PASS should_apply: all and (max-height: ${value + 1}px) -PASS should_not_apply: all and (max-height: ${value - 1}px) -PASS should_not_apply: all and (min-height: ${Math.ceil(value/em_size) + 1}em) -PASS should_apply: all and (min-height: ${Math.floor(value/em_size) - 1}em) -PASS should_apply: all and (max-height: ${Math.ceil(value/em_size) + 1}em) -PASS should_not_apply: all and (max-height: ${Math.floor(value/em_size) - 1}em) -FAIL should_apply: (height <= ${value}px) assert_true: (height <= 76px) expected true got false -FAIL should_apply: (height >= ${value}px) assert_true: (height >= 76px) expected true got false -PASS should_not_apply: (height < ${value}px) -PASS should_not_apply: (height > ${value}px) -FAIL should_apply: (height < ${value + 1}px) assert_true: (height < 77px) expected true got false -FAIL should_apply: (height <= ${value + 1}px) assert_true: (height <= 77px) expected true got false -PASS should_not_apply: (height > ${value + 1}px) -PASS should_not_apply: (height >= ${value + 1}px) -FAIL should_apply: (height > ${value - 1}px) assert_true: (height > 75px) expected true got false -FAIL should_apply: (height >= ${value - 1}px) assert_true: (height >= 75px) expected true got false -PASS should_not_apply: (height < ${value - 1}px) -PASS should_not_apply: (height <= ${value - 1}px) -PASS should_apply: all and (device-width: ${value}px) -FAIL should_apply: all and (device-width = ${value}px) assert_true: all and (device-width = 1024px) expected true got false -PASS should_not_apply: all and (device-width: ${value + 1}px) -PASS should_not_apply: all and (device-width: ${value - 1}px) -PASS should_not_apply: all and (device-width = ${value + 1}px) -PASS should_not_apply: all and (device-width = ${value - 1}px) -PASS should_apply: all and (min-device-width: ${value}px) -PASS should_not_apply: all and (min-device-width: ${value + 1}px) -PASS should_apply: all and (min-device-width: ${value - 1}px) -PASS should_apply: all and (max-device-width: ${value}px) -PASS should_apply: all and (max-device-width: ${value + 1}px) -PASS should_not_apply: all and (max-device-width: ${value - 1}px) -PASS should_not_apply: all and (min-device-width: ${Math.ceil(value/em_size) + 1}em) -PASS should_apply: all and (min-device-width: ${Math.floor(value/em_size) - 1}em) -PASS should_apply: all and (max-device-width: ${Math.ceil(value/em_size) + 1}em) -PASS should_not_apply: all and (max-device-width: ${Math.floor(value/em_size) - 1}em) -FAIL should_apply: (device-width <= ${value}px) assert_true: (device-width <= 1024px) expected true got false -FAIL should_apply: (device-width >= ${value}px) assert_true: (device-width >= 1024px) expected true got false -PASS should_not_apply: (device-width < ${value}px) -PASS should_not_apply: (device-width > ${value}px) -FAIL should_apply: (device-width < ${value + 1}px) assert_true: (device-width < 1025px) expected true got false -FAIL should_apply: (device-width <= ${value + 1}px) assert_true: (device-width <= 1025px) expected true got false -PASS should_not_apply: (device-width > ${value + 1}px) -PASS should_not_apply: (device-width >= ${value + 1}px) -FAIL should_apply: (device-width > ${value - 1}px) assert_true: (device-width > 1023px) expected true got false -FAIL should_apply: (device-width >= ${value - 1}px) assert_true: (device-width >= 1023px) expected true got false -PASS should_not_apply: (device-width < ${value - 1}px) -PASS should_not_apply: (device-width <= ${value - 1}px) -PASS should_apply: all and (device-height: ${value}px) -FAIL should_apply: all and (device-height = ${value}px) assert_true: all and (device-height = 768px) expected true got false -PASS should_not_apply: all and (device-height: ${value + 1}px) -PASS should_not_apply: all and (device-height: ${value - 1}px) -PASS should_not_apply: all and (device-height = ${value + 1}px) -PASS should_not_apply: all and (device-height = ${value - 1}px) -PASS should_apply: all and (min-device-height: ${value}px) -PASS should_not_apply: all and (min-device-height: ${value + 1}px) -PASS should_apply: all and (min-device-height: ${value - 1}px) -PASS should_apply: all and (max-device-height: ${value}px) -PASS should_apply: all and (max-device-height: ${value + 1}px) -PASS should_not_apply: all and (max-device-height: ${value - 1}px) -PASS should_not_apply: all and (min-device-height: ${Math.ceil(value/em_size) + 1}em) -PASS should_apply: all and (min-device-height: ${Math.floor(value/em_size) - 1}em) -PASS should_apply: all and (max-device-height: ${Math.ceil(value/em_size) + 1}em) -PASS should_not_apply: all and (max-device-height: ${Math.floor(value/em_size) - 1}em) -FAIL should_apply: (device-height <= ${value}px) assert_true: (device-height <= 768px) expected true got false -FAIL should_apply: (device-height >= ${value}px) assert_true: (device-height >= 768px) expected true got false -PASS should_not_apply: (device-height < ${value}px) -PASS should_not_apply: (device-height > ${value}px) -FAIL should_apply: (device-height < ${value + 1}px) assert_true: (device-height < 769px) expected true got false -FAIL should_apply: (device-height <= ${value + 1}px) assert_true: (device-height <= 769px) expected true got false -PASS should_not_apply: (device-height > ${value + 1}px) -PASS should_not_apply: (device-height >= ${value + 1}px) -FAIL should_apply: (device-height > ${value - 1}px) assert_true: (device-height > 767px) expected true got false -FAIL should_apply: (device-height >= ${value - 1}px) assert_true: (device-height >= 767px) expected true got false -PASS should_not_apply: (device-height < ${value - 1}px) -PASS should_not_apply: (device-height <= ${value - 1}px) -PASS width = 0, height != 0: should_apply: all and (height) -PASS width = 0, height != 0: should_not_apply: all and (width) -PASS width = 0, height = 0: should_not_apply: all and (height) -PASS width = 0, height = 0: should_not_apply: all and (width) -PASS width = 0, height = 0: should_apply: all and (device-height) -PASS width = 0, height = 0: should_apply: all and (device-width) -PASS width != 0, height = 0: should_not_apply: all and (height) -PASS width != 0, height = 0: should_apply: all and (width) -PASS width != 0, height != 0: should_apply: all and (height) -PASS width != 0, height != 0: should_apply: all and (width) -PASS ratio that reduces to 59/40: expression_should_be_parseable: orientation -PASS ratio that reduces to 59/40: expression_should_be_parseable: orientation: portrait -PASS ratio that reduces to 59/40: expression_should_be_parseable: orientation: landscape -PASS ratio that reduces to 59/40: expression_should_not_be_parseable: min-orientation -PASS ratio that reduces to 59/40: expression_should_not_be_parseable: min-orientation: portrait -PASS ratio that reduces to 59/40: expression_should_not_be_parseable: min-orientation: landscape -PASS ratio that reduces to 59/40: expression_should_not_be_parseable: max-orientation -PASS ratio that reduces to 59/40: expression_should_not_be_parseable: max-orientation: portrait -PASS ratio that reduces to 59/40: expression_should_not_be_parseable: max-orientation: landscape -PASS ratio that reduces to 59/40: should_apply: (orientation) -PASS ratio that reduces to 59/40: should_apply: (orientation: landscape) -PASS ratio that reduces to 59/40: should_not_apply: (orientation: portrait) -PASS ratio that reduces to 59/40: should_apply: not all and (orientation: portrait) -PASS ratio that reduces to 59/80: should_apply: (orientation) -PASS ratio that reduces to 59/80: should_not_apply: (orientation: landscape) -PASS ratio that reduces to 59/80: should_apply: not all and (orientation: landscape) -PASS ratio that reduces to 59/80: should_apply: (orientation: portrait) -PASS should_apply: (aspect-ratio: 59/80) -PASS should_not_apply: (aspect-ratio: 58/80) -PASS should_not_apply: (aspect-ratio: 59/81) -PASS should_not_apply: (aspect-ratio: 60/80) -PASS should_not_apply: (aspect-ratio: 59/79) -PASS should_apply: (aspect-ratio: 177/240) -PASS should_apply: (aspect-ratio: 413/560) -PASS should_apply: (aspect-ratio: 5900/8000) -PASS should_not_apply: (aspect-ratio: 5901/8000) -PASS should_not_apply: (aspect-ratio: 5899/8000) -PASS should_not_apply: (aspect-ratio: 5900/8001) -PASS should_not_apply: (aspect-ratio: 5900/7999) -PASS should_apply: (aspect-ratio) -PASS should_apply: (min-aspect-ratio: 59/80) -PASS should_apply: (min-aspect-ratio: 58/80) -PASS should_apply: (min-aspect-ratio: 59/81) -PASS should_not_apply: (min-aspect-ratio: 60/80) -PASS should_not_apply: (min-aspect-ratio: 59/79) -PASS expression_should_not_be_parseable: min-aspect-ratio -PASS should_apply: (max-aspect-ratio: 59/80) -PASS should_not_apply: (max-aspect-ratio: 58/80) -PASS should_not_apply: (max-aspect-ratio: 59/81) -PASS should_apply: (max-aspect-ratio: 60/80) -PASS should_apply: (max-aspect-ratio: 59/79) -PASS expression_should_not_be_parseable: max-aspect-ratio -PASS should_apply: (device-aspect-ratio: ${real_dar}) -PASS should_apply: not all and (device-aspect-ratio: ${high_dar_1}) -PASS should_not_apply: all and (device-aspect-ratio: ${high_dar_2}) -PASS should_not_apply: all and (device-aspect-ratio: ${low_dar_1}) -PASS should_apply: not all and (device-aspect-ratio: ${low_dar_2}) -PASS should_apply: (device-aspect-ratio) -PASS should_apply: (min-device-aspect-ratio: ${real_dar}) -PASS should_not_apply: all and (min-device-aspect-ratio: ${high_dar_1}) -PASS should_apply: not all and (min-device-aspect-ratio: ${high_dar_2}) -PASS should_not_apply: not all and (min-device-aspect-ratio: ${low_dar_1}) -PASS should_apply: all and (min-device-aspect-ratio: ${low_dar_2}) -PASS expression_should_not_be_parseable: min-device-aspect-ratio -PASS should_apply: all and (max-device-aspect-ratio: ${real_dar}) -PASS should_apply: (max-device-aspect-ratio: ${high_dar_1}) -PASS should_apply: (max-device-aspect-ratio: ${high_dar_2}) -PASS should_not_apply: all and (max-device-aspect-ratio: ${low_dar_1}) -PASS should_apply: not all and (max-device-aspect-ratio: ${low_dar_2}) -PASS expression_should_not_be_parseable: max-device-aspect-ratio -PASS expression_should_be_parseable: max-aspect-ratio: 1/1 -PASS expression_should_be_parseable: max-aspect-ratio: 1 /1 -PASS expression_should_be_parseable: max-aspect-ratio: 1 / -1 -PASS expression_should_be_parseable: max-aspect-ratio: 1/\r1 -FAIL expression_should_be_parseable: max-aspect-ratio: 1 assert_true: max-aspect-ratio: 1 expected true got false -FAIL expression_should_be_parseable: max-aspect-ratio: 0.5 assert_true: max-aspect-ratio: 0.5 expected true got false -FAIL expression_should_be_parseable: max-aspect-ratio: 1.0/1 assert_true: max-aspect-ratio: 1.0/1 expected true got false -FAIL expression_should_be_parseable: max-aspect-ratio: 1/1.0 assert_true: max-aspect-ratio: 1/1.0 expected true got false -FAIL expression_should_be_parseable: max-aspect-ratio: 1.0/1.0 assert_true: max-aspect-ratio: 1.0/1.0 expected true got false -FAIL expression_should_be_parseable: max-aspect-ratio: 0/1 assert_true: max-aspect-ratio: 0/1 expected true got false -FAIL expression_should_be_parseable: max-aspect-ratio: 1/0 assert_true: max-aspect-ratio: 1/0 expected true got false -FAIL expression_should_be_parseable: max-aspect-ratio: 0/0 assert_true: max-aspect-ratio: 0/0 expected true got false -PASS expression_should_not_be_parseable: max-aspect-ratio: -1/1 -PASS expression_should_not_be_parseable: max-aspect-ratio: 1/-1 -PASS expression_should_not_be_parseable: max-aspect-ratio: -1/-1 -PASS expression_should_not_be_parseable: max-aspect-ratio: invalid -PASS expression_should_not_be_parseable: max-aspect-ratio: 1 / invalid -PASS expression_should_not_be_parseable: max-aspect-ratio: 1 invalid -PASS expression_should_be_parseable: device-aspect-ratio: 1/1 -PASS expression_should_be_parseable: device-aspect-ratio: 1 /1 -PASS expression_should_be_parseable: device-aspect-ratio: 1 / -1 -PASS expression_should_be_parseable: device-aspect-ratio: 1/\r1 -FAIL expression_should_be_parseable: device-aspect-ratio: 1 assert_true: device-aspect-ratio: 1 expected true got false -FAIL expression_should_be_parseable: device-aspect-ratio: 0.5 assert_true: device-aspect-ratio: 0.5 expected true got false -FAIL expression_should_be_parseable: device-aspect-ratio: 1.0/1 assert_true: device-aspect-ratio: 1.0/1 expected true got false -FAIL expression_should_be_parseable: device-aspect-ratio: 1/1.0 assert_true: device-aspect-ratio: 1/1.0 expected true got false -FAIL expression_should_be_parseable: device-aspect-ratio: 1.0/1.0 assert_true: device-aspect-ratio: 1.0/1.0 expected true got false -FAIL expression_should_be_parseable: device-aspect-ratio: 0/1 assert_true: device-aspect-ratio: 0/1 expected true got false -FAIL expression_should_be_parseable: device-aspect-ratio: 1/0 assert_true: device-aspect-ratio: 1/0 expected true got false -FAIL expression_should_be_parseable: device-aspect-ratio: 0/0 assert_true: device-aspect-ratio: 0/0 expected true got false -PASS expression_should_not_be_parseable: device-aspect-ratio: -1/1 -PASS expression_should_not_be_parseable: device-aspect-ratio: 1/-1 -PASS expression_should_not_be_parseable: device-aspect-ratio: -1/-1 -PASS expression_should_not_be_parseable: device-aspect-ratio: invalid -PASS expression_should_not_be_parseable: device-aspect-ratio: 1 / invalid -PASS expression_should_not_be_parseable: device-aspect-ratio: 1 invalid -PASS monochrome_and_color -PASS find_depth -PASS should_apply: all and (color:8) -PASS should_not_apply: all and (color:7) -PASS should_not_apply: all and (color:9) -PASS should_apply: all and (max-color:8) -PASS should_not_apply: all and (max-color:7) -PASS should_apply: all and (max-color:9) -PASS should_apply: all and (color) -PASS expression_should_not_be_parseable: max-color -PASS expression_should_not_be_parseable: min-color -PASS should_not_apply: all and (monochrome) -PASS expression_should_not_be_parseable: max-monochrome -PASS expression_should_not_be_parseable: min-monochrome -PASS should_apply: not all and (monochrome) -PASS should_not_apply: not all and (color) -PASS should_apply: only all and (color) -PASS should_not_apply: only all and (monochrome) -PASS expression_should_be_parseable: color: 1 -PASS expression_should_be_parseable: color: 327 -PASS expression_should_be_parseable: color: 0 -PASS expression_should_not_be_parseable: color: 1.0 -PASS expression_should_not_be_parseable: color: -1 -PASS expression_should_not_be_parseable: color: 1/1 -PASS expression_should_be_parseable: min-monochrome: 1 -PASS expression_should_be_parseable: min-monochrome: 327 -PASS expression_should_be_parseable: min-monochrome: 0 -PASS expression_should_not_be_parseable: min-monochrome: 1.0 -PASS expression_should_not_be_parseable: min-monochrome: -1 -PASS expression_should_not_be_parseable: min-monochrome: 1/1 -PASS expression_should_be_parseable: max-color-index: 1 -PASS expression_should_be_parseable: max-color-index: 327 -PASS expression_should_be_parseable: max-color-index: 0 -PASS expression_should_not_be_parseable: max-color-index: 1.0 -PASS expression_should_not_be_parseable: max-color-index: -1 -PASS expression_should_not_be_parseable: max-color-index: 1/1 -PASS should_apply: (color-index: 0) -PASS should_not_apply: (color-index: 1) -PASS should_apply: (min-color-index: 0) -PASS should_not_apply: (min-color-index: 1) -PASS should_apply: (max-color-index: 0) -PASS should_apply: (max-color-index: 1) -PASS should_apply: (max-color-index: 157) -PASS expression_should_be_parseable: resolution: 3dpi -PASS expression_should_be_parseable: resolution:3dpi -PASS expression_should_be_parseable: resolution: 3.0dpi -PASS expression_should_be_parseable: resolution: 3.4dpi -PASS expression_should_be_parseable: resolution : 120dpcm -PASS expression_should_be_parseable: resolution: 1dppx -PASS expression_should_be_parseable: resolution: 1x -PASS expression_should_be_parseable: resolution: 1.5dppx -PASS expression_should_be_parseable: resolution: 1.5x -PASS expression_should_be_parseable: resolution: 2.0dppx -PASS expression_should_not_be_parseable: resolution: 0dpi -PASS expression_should_not_be_parseable: resolution: -3dpi -PASS expression_should_not_be_parseable: resolution: 0dppx -PASS expression_should_not_be_parseable: resolution: 0x -PASS expression_should_be_parseable: min-resolution: 3dpi -PASS expression_should_be_parseable: min-resolution:3dpi -PASS expression_should_be_parseable: min-resolution: 3.0dpi -PASS expression_should_be_parseable: min-resolution: 3.4dpi -PASS expression_should_be_parseable: min-resolution : 120dpcm -PASS expression_should_be_parseable: min-resolution: 1dppx -PASS expression_should_be_parseable: min-resolution: 1x -PASS expression_should_be_parseable: min-resolution: 1.5dppx -PASS expression_should_be_parseable: min-resolution: 1.5x -PASS expression_should_be_parseable: min-resolution: 2.0dppx -PASS expression_should_not_be_parseable: min-resolution: 0dpi -PASS expression_should_not_be_parseable: min-resolution: -3dpi -PASS expression_should_not_be_parseable: min-resolution: 0dppx -PASS expression_should_not_be_parseable: min-resolution: 0x -PASS expression_should_be_parseable: max-resolution: 3dpi -PASS expression_should_be_parseable: max-resolution:3dpi -PASS expression_should_be_parseable: max-resolution: 3.0dpi -PASS expression_should_be_parseable: max-resolution: 3.4dpi -PASS expression_should_be_parseable: max-resolution : 120dpcm -PASS expression_should_be_parseable: max-resolution: 1dppx -PASS expression_should_be_parseable: max-resolution: 1x -PASS expression_should_be_parseable: max-resolution: 1.5dppx -PASS expression_should_be_parseable: max-resolution: 1.5x -PASS expression_should_be_parseable: max-resolution: 2.0dppx -PASS expression_should_not_be_parseable: max-resolution: 0dpi -PASS expression_should_not_be_parseable: max-resolution: -3dpi -PASS expression_should_not_be_parseable: max-resolution: 0dppx -PASS expression_should_not_be_parseable: max-resolution: 0x -PASS find_resolution -PASS resolution is exact: should_apply: (resolution: ${resolution}dpi) -PASS resolution is exact: should_apply: (resolution: ${Math.floor(resolution/96)}dppx) -PASS resolution is exact: should_apply: (resolution: ${Math.floor(resolution/96)}x) -PASS resolution is exact: should_not_apply: (resolution: ${resolution + 1}dpi) -PASS resolution is exact: should_not_apply: (resolution: ${resolution - 1}dpi) -PASS should_apply: (min-resolution: ${dpi_low}dpi) -PASS should_not_apply: not all and (min-resolution: ${dpi_low}dpi) -PASS should_apply: not all and (min-resolution: ${dpi_high}dpi) -PASS should_not_apply: all and (min-resolution: ${dpi_high}dpi) -PASS should_apply: (min-resolution: ${dpcm_low}dpcm) -PASS should_apply: (max-resolution: ${dpcm_high}dpcm) -PASS should_not_apply: (max-resolution: ${dpcm_low}dpcm) -PASS should_apply: not all and (min-resolution: ${dpcm_high}dpcm) -PASS expression_should_be_parseable: scan -PASS expression_should_be_parseable: scan: progressive -PASS expression_should_be_parseable: scan:interlace -PASS expression_should_not_be_parseable: min-scan:interlace -PASS expression_should_not_be_parseable: scan: 1 -PASS expression_should_not_be_parseable: max-scan -PASS expression_should_not_be_parseable: max-scan: progressive -PASS should_not_apply: (scan) -PASS should_not_apply: (scan: progressive) -PASS should_not_apply: (scan: interlace) -PASS should_apply: not all and (scan) -PASS should_apply: not all and (scan: progressive) -PASS should_apply: not all and (scan: interlace) -PASS expression_should_be_parseable: grid -PASS expression_should_be_parseable: grid: 0 -PASS expression_should_be_parseable: grid: 1 -PASS expression_should_not_be_parseable: min-grid -PASS expression_should_not_be_parseable: min-grid:0 -PASS expression_should_not_be_parseable: max-grid: 1 -PASS expression_should_not_be_parseable: grid: 2 -PASS expression_should_not_be_parseable: grid: -1 -PASS should_not_apply: (grid) -PASS should_apply: (grid: 0) -PASS should_not_apply: (grid: 1) -PASS should_not_apply: (grid: 2) -PASS should_not_apply: (grid: -1) -PASS should_apply: (orientation -PASS should_not_apply: not all and (orientation -PASS should_not_apply: (orientation: -PASS should_not_apply: (orientation:) -PASS should_not_apply: (orientation: ) -PASS should_apply: all,(orientation: -PASS should_not_apply: (orientation:,all -PASS should_apply: not all and (grid -PASS should_not_apply: only all and (grid -PASS should_not_apply: (grid -PASS should_apply: all,(grid -PASS should_not_apply: (grid,all -PASS should_apply: ,all -PASS should_apply: all, -PASS should_apply: ,all, -PASS should_apply: all,badmedium -PASS should_apply: badmedium,all -PASS should_not_apply: ,badmedium, -PASS should_apply: all,(badexpression) -PASS should_apply: (badexpression),all -PASS should_not_apply: (badexpression),badmedium -PASS should_not_apply: badmedium,(badexpression) -PASS should_apply: all,[badsyntax] -PASS should_apply: [badsyntax],all -PASS should_not_apply: badmedium,[badsyntax] -PASS should_not_apply: [badsyntax],badmedium -PASS query_should_not_be_parseable: all and color : -PASS query_should_not_be_parseable: all and color : 1 -PASS should_not_apply: all and min-color : 1 -PASS should_not_apply: (bogus) -PASS should_not_apply: not all and (bogus) -PASS should_not_apply: only all and (bogus) -FAIL expression_should_be_parseable: overflow-block assert_true: overflow-block expected true got false -FAIL expression_should_be_parseable: overflow-block: none assert_true: overflow-block: none expected true got false -FAIL expression_should_be_parseable: overflow-block: paged assert_true: overflow-block: paged expected true got false -FAIL expression_should_be_parseable: overflow-block: scroll assert_true: overflow-block: scroll expected true got false -FAIL expression_should_be_parseable: overflow-block: optional-paged assert_true: overflow-block: optional-paged expected true got false -PASS expression_should_not_be_parseable: overflow-block: some-random-invalid-thing -FAIL Sanity check for overflow-block assert_not_equals: overflow-block should be equivalent to not (overflow-block: none) got disallowed value false -FAIL expression_should_be_parseable: overflow-inline assert_true: overflow-inline expected true got false -FAIL expression_should_be_parseable: overflow-inline: none assert_true: overflow-inline: none expected true got false -FAIL expression_should_be_parseable: overflow-inline: scroll assert_true: overflow-inline: scroll expected true got false -PASS expression_should_not_be_parseable: overflow-inline: some-random-invalid-thing -FAIL Sanity check for overflow-inline assert_not_equals: overflow-inline should be equivalent to not (overflow-inline: none) got disallowed value false -PASS expression_should_be_parseable: hover -PASS expression_should_be_parseable: hover: hover -PASS expression_should_be_parseable: hover: none -PASS expression_should_be_parseable: any-hover -PASS expression_should_be_parseable: any-hover: hover -PASS expression_should_be_parseable: any-hover: none -PASS (hover) == (hover: hover) -PASS (hover) == not (hover: none) -PASS (any-hover) == (any-hover: hover) -PASS (any-hover) == not (any-hover: none) -PASS expression_should_be_parseable: pointer -PASS expression_should_be_parseable: pointer: coarse -PASS expression_should_be_parseable: pointer: fine -PASS expression_should_be_parseable: pointer: none -PASS expression_should_be_parseable: any-pointer -PASS expression_should_be_parseable: any-pointer: coarse -PASS expression_should_be_parseable: any-pointer: fine -PASS expression_should_be_parseable: any-pointer: none -PASS (pointer) == (pointer: coarse) or (pointer: fine) -PASS (pointer) == not (pointer: none) -PASS (any-pointer) == (any-pointer: coarse) or (any-pointer: fine) -PASS (any-pointer) == not (any-pointer: none) -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac/external/wpt/css/mediaqueries/test_media_queries-expected.txt b/third_party/blink/web_tests/platform/mac/external/wpt/css/mediaqueries/test_media_queries-expected.txt deleted file mode 100644 index 34cc82a..0000000 --- a/third_party/blink/web_tests/platform/mac/external/wpt/css/mediaqueries/test_media_queries-expected.txt +++ /dev/null
@@ -1,809 +0,0 @@ -This is a testharness.js-based test. -Found 803 tests; 586 PASS, 217 FAIL, 0 TIMEOUT, 0 NOTRUN. -PASS query_should_be_parseable: (orientation) -FAIL query_should_be_parseable: not (orientation) assert_true: not (orientation) expected true got false -PASS query_should_not_be_parseable: only (orientation) -PASS query_should_be_parseable: all and (orientation) -PASS query_should_be_parseable: not all and (orientation) -PASS query_should_be_parseable: only all and (orientation) -PASS query_should_not_be_parseable: not not (orientation) -PASS query_should_be_parseable: (orientation) and (orientation) -FAIL query_should_be_parseable: (orientation) or (orientation) assert_true: (orientation) or (orientation) expected true got false -FAIL query_should_be_parseable: (orientation) or ((orientation) and ((orientation) or (orientation) or (not (orientation)))) assert_true: (orientation) or ((orientation) and ((orientation) or (orientation) or (not (orientation)))) expected true got false -PASS query_should_not_be_parseable: all and (orientation) or (orientation) -PASS query_should_be_parseable: all and (orientation) and (orientation) -PASS query_should_not_be_parseable: (orientation) and (orientation) or (orientation) -PASS query_should_not_be_parseable: (orientation) and not (orientation) -PASS expression_should_be_parseable: width -PASS expression_should_not_be_parseable: min-width -PASS expression_should_not_be_parseable: max-width -PASS expression_should_be_parseable: width : 0 -PASS expression_should_be_parseable: width : 0px -PASS expression_should_be_parseable: width : 0em -PASS expression_should_be_parseable: width : -0 -PASS expression_should_be_parseable: width : -0cm -PASS expression_should_be_parseable: width : 1px -PASS expression_should_be_parseable: width : 0.001mm -PASS expression_should_be_parseable: width : 100000px -PASS expression_should_be_parseable: min-width : -0 -PASS expression_should_be_parseable: max-width : -0 -PASS expression_should_not_be_parseable: width : -1px -PASS expression_should_not_be_parseable: min-width : -1px -PASS expression_should_not_be_parseable: max-width : -1px -PASS expression_should_not_be_parseable: width : -0.00001mm -PASS expression_should_not_be_parseable: width : -100000em -FAIL expression_should_be_parseable: width > 0 assert_true: width > 0 expected true got false -FAIL expression_should_be_parseable: width > 0px assert_true: width > 0px expected true got false -FAIL expression_should_be_parseable: width > 0em assert_true: width > 0em expected true got false -FAIL expression_should_be_parseable: width > -0 assert_true: width > -0 expected true got false -FAIL expression_should_be_parseable: width > -0cm assert_true: width > -0cm expected true got false -FAIL expression_should_be_parseable: width > 1px assert_true: width > 1px expected true got false -FAIL expression_should_be_parseable: width > 0.001mm assert_true: width > 0.001mm expected true got false -FAIL expression_should_be_parseable: width > 100000px assert_true: width > 100000px expected true got false -PASS expression_should_not_be_parseable: min-width > -0 -PASS expression_should_not_be_parseable: max-width > -0 -PASS expression_should_not_be_parseable: width > -1px -PASS expression_should_not_be_parseable: min-width > -1px -PASS expression_should_not_be_parseable: max-width > -1px -PASS expression_should_not_be_parseable: width > -0.00001mm -PASS expression_should_not_be_parseable: width > -100000em -FAIL expression_should_be_parseable: width >= 0 assert_true: width >= 0 expected true got false -FAIL expression_should_be_parseable: width >= 0px assert_true: width >= 0px expected true got false -FAIL expression_should_be_parseable: width >= 0em assert_true: width >= 0em expected true got false -FAIL expression_should_be_parseable: width >= -0 assert_true: width >= -0 expected true got false -FAIL expression_should_be_parseable: width >= -0cm assert_true: width >= -0cm expected true got false -FAIL expression_should_be_parseable: width >= 1px assert_true: width >= 1px expected true got false -FAIL expression_should_be_parseable: width >= 0.001mm assert_true: width >= 0.001mm expected true got false -FAIL expression_should_be_parseable: width >= 100000px assert_true: width >= 100000px expected true got false -PASS expression_should_not_be_parseable: min-width >= -0 -PASS expression_should_not_be_parseable: max-width >= -0 -PASS expression_should_not_be_parseable: width > = 0px -PASS expression_should_not_be_parseable: width >= -1px -PASS expression_should_not_be_parseable: min-width >= -1px -PASS expression_should_not_be_parseable: max-width >= -1px -PASS expression_should_not_be_parseable: width >= -0.00001mm -PASS expression_should_not_be_parseable: width >= -100000em -FAIL expression_should_be_parseable: width = 0 assert_true: width = 0 expected true got false -FAIL expression_should_be_parseable: width = 0px assert_true: width = 0px expected true got false -FAIL expression_should_be_parseable: width = 0em assert_true: width = 0em expected true got false -FAIL expression_should_be_parseable: width = -0 assert_true: width = -0 expected true got false -FAIL expression_should_be_parseable: width = -0cm assert_true: width = -0cm expected true got false -FAIL expression_should_be_parseable: width = 1px assert_true: width = 1px expected true got false -FAIL expression_should_be_parseable: width = 0.001mm assert_true: width = 0.001mm expected true got false -FAIL expression_should_be_parseable: width = 100000px assert_true: width = 100000px expected true got false -PASS expression_should_not_be_parseable: min-width = -0 -PASS expression_should_not_be_parseable: max-width = -0 -PASS expression_should_not_be_parseable: width = -1px -PASS expression_should_not_be_parseable: min-width = -1px -PASS expression_should_not_be_parseable: max-width = -1px -PASS expression_should_not_be_parseable: width = -0.00001mm -PASS expression_should_not_be_parseable: width = -100000em -FAIL expression_should_be_parseable: width <= 0 assert_true: width <= 0 expected true got false -FAIL expression_should_be_parseable: width <= 0px assert_true: width <= 0px expected true got false -FAIL expression_should_be_parseable: width <= 0em assert_true: width <= 0em expected true got false -FAIL expression_should_be_parseable: width <= -0 assert_true: width <= -0 expected true got false -FAIL expression_should_be_parseable: width <= -0cm assert_true: width <= -0cm expected true got false -FAIL expression_should_be_parseable: width <= 1px assert_true: width <= 1px expected true got false -FAIL expression_should_be_parseable: width <= 0.001mm assert_true: width <= 0.001mm expected true got false -FAIL expression_should_be_parseable: width <= 100000px assert_true: width <= 100000px expected true got false -PASS expression_should_not_be_parseable: min-width <= -0 -PASS expression_should_not_be_parseable: max-width <= -0 -PASS expression_should_not_be_parseable: width < = 0px -PASS expression_should_not_be_parseable: width <= -1px -PASS expression_should_not_be_parseable: min-width <= -1px -PASS expression_should_not_be_parseable: max-width <= -1px -PASS expression_should_not_be_parseable: width <= -0.00001mm -PASS expression_should_not_be_parseable: width <= -100000em -FAIL expression_should_be_parseable: width < 0 assert_true: width < 0 expected true got false -FAIL expression_should_be_parseable: width < 0px assert_true: width < 0px expected true got false -FAIL expression_should_be_parseable: width < 0em assert_true: width < 0em expected true got false -FAIL expression_should_be_parseable: width < -0 assert_true: width < -0 expected true got false -FAIL expression_should_be_parseable: width < -0cm assert_true: width < -0cm expected true got false -FAIL expression_should_be_parseable: width < 1px assert_true: width < 1px expected true got false -FAIL expression_should_be_parseable: width < 0.001mm assert_true: width < 0.001mm expected true got false -FAIL expression_should_be_parseable: width < 100000px assert_true: width < 100000px expected true got false -PASS expression_should_not_be_parseable: min-width < -0 -PASS expression_should_not_be_parseable: max-width < -0 -PASS expression_should_not_be_parseable: width < -1px -PASS expression_should_not_be_parseable: min-width < -1px -PASS expression_should_not_be_parseable: max-width < -1px -PASS expression_should_not_be_parseable: width < -0.00001mm -PASS expression_should_not_be_parseable: width < -100000em -PASS expression_should_be_parseable: height -PASS expression_should_not_be_parseable: min-height -PASS expression_should_not_be_parseable: max-height -PASS expression_should_be_parseable: height : 0 -PASS expression_should_be_parseable: height : 0px -PASS expression_should_be_parseable: height : 0em -PASS expression_should_be_parseable: height : -0 -PASS expression_should_be_parseable: height : -0cm -PASS expression_should_be_parseable: height : 1px -PASS expression_should_be_parseable: height : 0.001mm -PASS expression_should_be_parseable: height : 100000px -PASS expression_should_be_parseable: min-height : -0 -PASS expression_should_be_parseable: max-height : -0 -PASS expression_should_not_be_parseable: height : -1px -PASS expression_should_not_be_parseable: min-height : -1px -PASS expression_should_not_be_parseable: max-height : -1px -PASS expression_should_not_be_parseable: height : -0.00001mm -PASS expression_should_not_be_parseable: height : -100000em -FAIL expression_should_be_parseable: height > 0 assert_true: height > 0 expected true got false -FAIL expression_should_be_parseable: height > 0px assert_true: height > 0px expected true got false -FAIL expression_should_be_parseable: height > 0em assert_true: height > 0em expected true got false -FAIL expression_should_be_parseable: height > -0 assert_true: height > -0 expected true got false -FAIL expression_should_be_parseable: height > -0cm assert_true: height > -0cm expected true got false -FAIL expression_should_be_parseable: height > 1px assert_true: height > 1px expected true got false -FAIL expression_should_be_parseable: height > 0.001mm assert_true: height > 0.001mm expected true got false -FAIL expression_should_be_parseable: height > 100000px assert_true: height > 100000px expected true got false -PASS expression_should_not_be_parseable: min-height > -0 -PASS expression_should_not_be_parseable: max-height > -0 -PASS expression_should_not_be_parseable: height > -1px -PASS expression_should_not_be_parseable: min-height > -1px -PASS expression_should_not_be_parseable: max-height > -1px -PASS expression_should_not_be_parseable: height > -0.00001mm -PASS expression_should_not_be_parseable: height > -100000em -FAIL expression_should_be_parseable: height >= 0 assert_true: height >= 0 expected true got false -FAIL expression_should_be_parseable: height >= 0px assert_true: height >= 0px expected true got false -FAIL expression_should_be_parseable: height >= 0em assert_true: height >= 0em expected true got false -FAIL expression_should_be_parseable: height >= -0 assert_true: height >= -0 expected true got false -FAIL expression_should_be_parseable: height >= -0cm assert_true: height >= -0cm expected true got false -FAIL expression_should_be_parseable: height >= 1px assert_true: height >= 1px expected true got false -FAIL expression_should_be_parseable: height >= 0.001mm assert_true: height >= 0.001mm expected true got false -FAIL expression_should_be_parseable: height >= 100000px assert_true: height >= 100000px expected true got false -PASS expression_should_not_be_parseable: min-height >= -0 -PASS expression_should_not_be_parseable: max-height >= -0 -PASS expression_should_not_be_parseable: height > = 0px -PASS expression_should_not_be_parseable: height >= -1px -PASS expression_should_not_be_parseable: min-height >= -1px -PASS expression_should_not_be_parseable: max-height >= -1px -PASS expression_should_not_be_parseable: height >= -0.00001mm -PASS expression_should_not_be_parseable: height >= -100000em -FAIL expression_should_be_parseable: height = 0 assert_true: height = 0 expected true got false -FAIL expression_should_be_parseable: height = 0px assert_true: height = 0px expected true got false -FAIL expression_should_be_parseable: height = 0em assert_true: height = 0em expected true got false -FAIL expression_should_be_parseable: height = -0 assert_true: height = -0 expected true got false -FAIL expression_should_be_parseable: height = -0cm assert_true: height = -0cm expected true got false -FAIL expression_should_be_parseable: height = 1px assert_true: height = 1px expected true got false -FAIL expression_should_be_parseable: height = 0.001mm assert_true: height = 0.001mm expected true got false -FAIL expression_should_be_parseable: height = 100000px assert_true: height = 100000px expected true got false -PASS expression_should_not_be_parseable: min-height = -0 -PASS expression_should_not_be_parseable: max-height = -0 -PASS expression_should_not_be_parseable: height = -1px -PASS expression_should_not_be_parseable: min-height = -1px -PASS expression_should_not_be_parseable: max-height = -1px -PASS expression_should_not_be_parseable: height = -0.00001mm -PASS expression_should_not_be_parseable: height = -100000em -FAIL expression_should_be_parseable: height <= 0 assert_true: height <= 0 expected true got false -FAIL expression_should_be_parseable: height <= 0px assert_true: height <= 0px expected true got false -FAIL expression_should_be_parseable: height <= 0em assert_true: height <= 0em expected true got false -FAIL expression_should_be_parseable: height <= -0 assert_true: height <= -0 expected true got false -FAIL expression_should_be_parseable: height <= -0cm assert_true: height <= -0cm expected true got false -FAIL expression_should_be_parseable: height <= 1px assert_true: height <= 1px expected true got false -FAIL expression_should_be_parseable: height <= 0.001mm assert_true: height <= 0.001mm expected true got false -FAIL expression_should_be_parseable: height <= 100000px assert_true: height <= 100000px expected true got false -PASS expression_should_not_be_parseable: min-height <= -0 -PASS expression_should_not_be_parseable: max-height <= -0 -PASS expression_should_not_be_parseable: height < = 0px -PASS expression_should_not_be_parseable: height <= -1px -PASS expression_should_not_be_parseable: min-height <= -1px -PASS expression_should_not_be_parseable: max-height <= -1px -PASS expression_should_not_be_parseable: height <= -0.00001mm -PASS expression_should_not_be_parseable: height <= -100000em -FAIL expression_should_be_parseable: height < 0 assert_true: height < 0 expected true got false -FAIL expression_should_be_parseable: height < 0px assert_true: height < 0px expected true got false -FAIL expression_should_be_parseable: height < 0em assert_true: height < 0em expected true got false -FAIL expression_should_be_parseable: height < -0 assert_true: height < -0 expected true got false -FAIL expression_should_be_parseable: height < -0cm assert_true: height < -0cm expected true got false -FAIL expression_should_be_parseable: height < 1px assert_true: height < 1px expected true got false -FAIL expression_should_be_parseable: height < 0.001mm assert_true: height < 0.001mm expected true got false -FAIL expression_should_be_parseable: height < 100000px assert_true: height < 100000px expected true got false -PASS expression_should_not_be_parseable: min-height < -0 -PASS expression_should_not_be_parseable: max-height < -0 -PASS expression_should_not_be_parseable: height < -1px -PASS expression_should_not_be_parseable: min-height < -1px -PASS expression_should_not_be_parseable: max-height < -1px -PASS expression_should_not_be_parseable: height < -0.00001mm -PASS expression_should_not_be_parseable: height < -100000em -PASS expression_should_be_parseable: device-width -PASS expression_should_not_be_parseable: min-device-width -PASS expression_should_not_be_parseable: max-device-width -PASS expression_should_be_parseable: device-width : 0 -PASS expression_should_be_parseable: device-width : 0px -PASS expression_should_be_parseable: device-width : 0em -PASS expression_should_be_parseable: device-width : -0 -PASS expression_should_be_parseable: device-width : -0cm -PASS expression_should_be_parseable: device-width : 1px -PASS expression_should_be_parseable: device-width : 0.001mm -PASS expression_should_be_parseable: device-width : 100000px -PASS expression_should_be_parseable: min-device-width : -0 -PASS expression_should_be_parseable: max-device-width : -0 -PASS expression_should_not_be_parseable: device-width : -1px -PASS expression_should_not_be_parseable: min-device-width : -1px -PASS expression_should_not_be_parseable: max-device-width : -1px -PASS expression_should_not_be_parseable: device-width : -0.00001mm -PASS expression_should_not_be_parseable: device-width : -100000em -FAIL expression_should_be_parseable: device-width > 0 assert_true: device-width > 0 expected true got false -FAIL expression_should_be_parseable: device-width > 0px assert_true: device-width > 0px expected true got false -FAIL expression_should_be_parseable: device-width > 0em assert_true: device-width > 0em expected true got false -FAIL expression_should_be_parseable: device-width > -0 assert_true: device-width > -0 expected true got false -FAIL expression_should_be_parseable: device-width > -0cm assert_true: device-width > -0cm expected true got false -FAIL expression_should_be_parseable: device-width > 1px assert_true: device-width > 1px expected true got false -FAIL expression_should_be_parseable: device-width > 0.001mm assert_true: device-width > 0.001mm expected true got false -FAIL expression_should_be_parseable: device-width > 100000px assert_true: device-width > 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-width > -0 -PASS expression_should_not_be_parseable: max-device-width > -0 -PASS expression_should_not_be_parseable: device-width > -1px -PASS expression_should_not_be_parseable: min-device-width > -1px -PASS expression_should_not_be_parseable: max-device-width > -1px -PASS expression_should_not_be_parseable: device-width > -0.00001mm -PASS expression_should_not_be_parseable: device-width > -100000em -FAIL expression_should_be_parseable: device-width >= 0 assert_true: device-width >= 0 expected true got false -FAIL expression_should_be_parseable: device-width >= 0px assert_true: device-width >= 0px expected true got false -FAIL expression_should_be_parseable: device-width >= 0em assert_true: device-width >= 0em expected true got false -FAIL expression_should_be_parseable: device-width >= -0 assert_true: device-width >= -0 expected true got false -FAIL expression_should_be_parseable: device-width >= -0cm assert_true: device-width >= -0cm expected true got false -FAIL expression_should_be_parseable: device-width >= 1px assert_true: device-width >= 1px expected true got false -FAIL expression_should_be_parseable: device-width >= 0.001mm assert_true: device-width >= 0.001mm expected true got false -FAIL expression_should_be_parseable: device-width >= 100000px assert_true: device-width >= 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-width >= -0 -PASS expression_should_not_be_parseable: max-device-width >= -0 -PASS expression_should_not_be_parseable: device-width > = 0px -PASS expression_should_not_be_parseable: device-width >= -1px -PASS expression_should_not_be_parseable: min-device-width >= -1px -PASS expression_should_not_be_parseable: max-device-width >= -1px -PASS expression_should_not_be_parseable: device-width >= -0.00001mm -PASS expression_should_not_be_parseable: device-width >= -100000em -FAIL expression_should_be_parseable: device-width = 0 assert_true: device-width = 0 expected true got false -FAIL expression_should_be_parseable: device-width = 0px assert_true: device-width = 0px expected true got false -FAIL expression_should_be_parseable: device-width = 0em assert_true: device-width = 0em expected true got false -FAIL expression_should_be_parseable: device-width = -0 assert_true: device-width = -0 expected true got false -FAIL expression_should_be_parseable: device-width = -0cm assert_true: device-width = -0cm expected true got false -FAIL expression_should_be_parseable: device-width = 1px assert_true: device-width = 1px expected true got false -FAIL expression_should_be_parseable: device-width = 0.001mm assert_true: device-width = 0.001mm expected true got false -FAIL expression_should_be_parseable: device-width = 100000px assert_true: device-width = 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-width = -0 -PASS expression_should_not_be_parseable: max-device-width = -0 -PASS expression_should_not_be_parseable: device-width = -1px -PASS expression_should_not_be_parseable: min-device-width = -1px -PASS expression_should_not_be_parseable: max-device-width = -1px -PASS expression_should_not_be_parseable: device-width = -0.00001mm -PASS expression_should_not_be_parseable: device-width = -100000em -FAIL expression_should_be_parseable: device-width <= 0 assert_true: device-width <= 0 expected true got false -FAIL expression_should_be_parseable: device-width <= 0px assert_true: device-width <= 0px expected true got false -FAIL expression_should_be_parseable: device-width <= 0em assert_true: device-width <= 0em expected true got false -FAIL expression_should_be_parseable: device-width <= -0 assert_true: device-width <= -0 expected true got false -FAIL expression_should_be_parseable: device-width <= -0cm assert_true: device-width <= -0cm expected true got false -FAIL expression_should_be_parseable: device-width <= 1px assert_true: device-width <= 1px expected true got false -FAIL expression_should_be_parseable: device-width <= 0.001mm assert_true: device-width <= 0.001mm expected true got false -FAIL expression_should_be_parseable: device-width <= 100000px assert_true: device-width <= 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-width <= -0 -PASS expression_should_not_be_parseable: max-device-width <= -0 -PASS expression_should_not_be_parseable: device-width < = 0px -PASS expression_should_not_be_parseable: device-width <= -1px -PASS expression_should_not_be_parseable: min-device-width <= -1px -PASS expression_should_not_be_parseable: max-device-width <= -1px -PASS expression_should_not_be_parseable: device-width <= -0.00001mm -PASS expression_should_not_be_parseable: device-width <= -100000em -FAIL expression_should_be_parseable: device-width < 0 assert_true: device-width < 0 expected true got false -FAIL expression_should_be_parseable: device-width < 0px assert_true: device-width < 0px expected true got false -FAIL expression_should_be_parseable: device-width < 0em assert_true: device-width < 0em expected true got false -FAIL expression_should_be_parseable: device-width < -0 assert_true: device-width < -0 expected true got false -FAIL expression_should_be_parseable: device-width < -0cm assert_true: device-width < -0cm expected true got false -FAIL expression_should_be_parseable: device-width < 1px assert_true: device-width < 1px expected true got false -FAIL expression_should_be_parseable: device-width < 0.001mm assert_true: device-width < 0.001mm expected true got false -FAIL expression_should_be_parseable: device-width < 100000px assert_true: device-width < 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-width < -0 -PASS expression_should_not_be_parseable: max-device-width < -0 -PASS expression_should_not_be_parseable: device-width < -1px -PASS expression_should_not_be_parseable: min-device-width < -1px -PASS expression_should_not_be_parseable: max-device-width < -1px -PASS expression_should_not_be_parseable: device-width < -0.00001mm -PASS expression_should_not_be_parseable: device-width < -100000em -PASS expression_should_be_parseable: device-height -PASS expression_should_not_be_parseable: min-device-height -PASS expression_should_not_be_parseable: max-device-height -PASS expression_should_be_parseable: device-height : 0 -PASS expression_should_be_parseable: device-height : 0px -PASS expression_should_be_parseable: device-height : 0em -PASS expression_should_be_parseable: device-height : -0 -PASS expression_should_be_parseable: device-height : -0cm -PASS expression_should_be_parseable: device-height : 1px -PASS expression_should_be_parseable: device-height : 0.001mm -PASS expression_should_be_parseable: device-height : 100000px -PASS expression_should_be_parseable: min-device-height : -0 -PASS expression_should_be_parseable: max-device-height : -0 -PASS expression_should_not_be_parseable: device-height : -1px -PASS expression_should_not_be_parseable: min-device-height : -1px -PASS expression_should_not_be_parseable: max-device-height : -1px -PASS expression_should_not_be_parseable: device-height : -0.00001mm -PASS expression_should_not_be_parseable: device-height : -100000em -FAIL expression_should_be_parseable: device-height > 0 assert_true: device-height > 0 expected true got false -FAIL expression_should_be_parseable: device-height > 0px assert_true: device-height > 0px expected true got false -FAIL expression_should_be_parseable: device-height > 0em assert_true: device-height > 0em expected true got false -FAIL expression_should_be_parseable: device-height > -0 assert_true: device-height > -0 expected true got false -FAIL expression_should_be_parseable: device-height > -0cm assert_true: device-height > -0cm expected true got false -FAIL expression_should_be_parseable: device-height > 1px assert_true: device-height > 1px expected true got false -FAIL expression_should_be_parseable: device-height > 0.001mm assert_true: device-height > 0.001mm expected true got false -FAIL expression_should_be_parseable: device-height > 100000px assert_true: device-height > 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-height > -0 -PASS expression_should_not_be_parseable: max-device-height > -0 -PASS expression_should_not_be_parseable: device-height > -1px -PASS expression_should_not_be_parseable: min-device-height > -1px -PASS expression_should_not_be_parseable: max-device-height > -1px -PASS expression_should_not_be_parseable: device-height > -0.00001mm -PASS expression_should_not_be_parseable: device-height > -100000em -FAIL expression_should_be_parseable: device-height >= 0 assert_true: device-height >= 0 expected true got false -FAIL expression_should_be_parseable: device-height >= 0px assert_true: device-height >= 0px expected true got false -FAIL expression_should_be_parseable: device-height >= 0em assert_true: device-height >= 0em expected true got false -FAIL expression_should_be_parseable: device-height >= -0 assert_true: device-height >= -0 expected true got false -FAIL expression_should_be_parseable: device-height >= -0cm assert_true: device-height >= -0cm expected true got false -FAIL expression_should_be_parseable: device-height >= 1px assert_true: device-height >= 1px expected true got false -FAIL expression_should_be_parseable: device-height >= 0.001mm assert_true: device-height >= 0.001mm expected true got false -FAIL expression_should_be_parseable: device-height >= 100000px assert_true: device-height >= 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-height >= -0 -PASS expression_should_not_be_parseable: max-device-height >= -0 -PASS expression_should_not_be_parseable: device-height > = 0px -PASS expression_should_not_be_parseable: device-height >= -1px -PASS expression_should_not_be_parseable: min-device-height >= -1px -PASS expression_should_not_be_parseable: max-device-height >= -1px -PASS expression_should_not_be_parseable: device-height >= -0.00001mm -PASS expression_should_not_be_parseable: device-height >= -100000em -FAIL expression_should_be_parseable: device-height = 0 assert_true: device-height = 0 expected true got false -FAIL expression_should_be_parseable: device-height = 0px assert_true: device-height = 0px expected true got false -FAIL expression_should_be_parseable: device-height = 0em assert_true: device-height = 0em expected true got false -FAIL expression_should_be_parseable: device-height = -0 assert_true: device-height = -0 expected true got false -FAIL expression_should_be_parseable: device-height = -0cm assert_true: device-height = -0cm expected true got false -FAIL expression_should_be_parseable: device-height = 1px assert_true: device-height = 1px expected true got false -FAIL expression_should_be_parseable: device-height = 0.001mm assert_true: device-height = 0.001mm expected true got false -FAIL expression_should_be_parseable: device-height = 100000px assert_true: device-height = 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-height = -0 -PASS expression_should_not_be_parseable: max-device-height = -0 -PASS expression_should_not_be_parseable: device-height = -1px -PASS expression_should_not_be_parseable: min-device-height = -1px -PASS expression_should_not_be_parseable: max-device-height = -1px -PASS expression_should_not_be_parseable: device-height = -0.00001mm -PASS expression_should_not_be_parseable: device-height = -100000em -FAIL expression_should_be_parseable: device-height <= 0 assert_true: device-height <= 0 expected true got false -FAIL expression_should_be_parseable: device-height <= 0px assert_true: device-height <= 0px expected true got false -FAIL expression_should_be_parseable: device-height <= 0em assert_true: device-height <= 0em expected true got false -FAIL expression_should_be_parseable: device-height <= -0 assert_true: device-height <= -0 expected true got false -FAIL expression_should_be_parseable: device-height <= -0cm assert_true: device-height <= -0cm expected true got false -FAIL expression_should_be_parseable: device-height <= 1px assert_true: device-height <= 1px expected true got false -FAIL expression_should_be_parseable: device-height <= 0.001mm assert_true: device-height <= 0.001mm expected true got false -FAIL expression_should_be_parseable: device-height <= 100000px assert_true: device-height <= 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-height <= -0 -PASS expression_should_not_be_parseable: max-device-height <= -0 -PASS expression_should_not_be_parseable: device-height < = 0px -PASS expression_should_not_be_parseable: device-height <= -1px -PASS expression_should_not_be_parseable: min-device-height <= -1px -PASS expression_should_not_be_parseable: max-device-height <= -1px -PASS expression_should_not_be_parseable: device-height <= -0.00001mm -PASS expression_should_not_be_parseable: device-height <= -100000em -FAIL expression_should_be_parseable: device-height < 0 assert_true: device-height < 0 expected true got false -FAIL expression_should_be_parseable: device-height < 0px assert_true: device-height < 0px expected true got false -FAIL expression_should_be_parseable: device-height < 0em assert_true: device-height < 0em expected true got false -FAIL expression_should_be_parseable: device-height < -0 assert_true: device-height < -0 expected true got false -FAIL expression_should_be_parseable: device-height < -0cm assert_true: device-height < -0cm expected true got false -FAIL expression_should_be_parseable: device-height < 1px assert_true: device-height < 1px expected true got false -FAIL expression_should_be_parseable: device-height < 0.001mm assert_true: device-height < 0.001mm expected true got false -FAIL expression_should_be_parseable: device-height < 100000px assert_true: device-height < 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-height < -0 -PASS expression_should_not_be_parseable: max-device-height < -0 -PASS expression_should_not_be_parseable: device-height < -1px -PASS expression_should_not_be_parseable: min-device-height < -1px -PASS expression_should_not_be_parseable: max-device-height < -1px -PASS expression_should_not_be_parseable: device-height < -0.00001mm -PASS expression_should_not_be_parseable: device-height < -100000em -PASS should_apply: all and (width: ${value}px) -FAIL should_apply: all and (width = ${value}px) assert_true: all and (width = 117px) expected true got false -PASS should_not_apply: all and (width: ${value + 1}px) -PASS should_not_apply: all and (width: ${value - 1}px) -PASS should_not_apply: all and (width = ${value + 1}px) -PASS should_not_apply: all and (width = ${value - 1}px) -PASS should_apply: all and (min-width: ${value}px) -PASS should_not_apply: all and (min-width: ${value + 1}px) -PASS should_apply: all and (min-width: ${value - 1}px) -PASS should_apply: all and (max-width: ${value}px) -PASS should_apply: all and (max-width: ${value + 1}px) -PASS should_not_apply: all and (max-width: ${value - 1}px) -PASS should_not_apply: all and (min-width: ${Math.ceil(value/em_size) + 1}em) -PASS should_apply: all and (min-width: ${Math.floor(value/em_size) - 1}em) -PASS should_apply: all and (max-width: ${Math.ceil(value/em_size) + 1}em) -PASS should_not_apply: all and (max-width: ${Math.floor(value/em_size) - 1}em) -FAIL should_apply: (width <= ${value}px) assert_true: (width <= 117px) expected true got false -FAIL should_apply: (width >= ${value}px) assert_true: (width >= 117px) expected true got false -PASS should_not_apply: (width < ${value}px) -PASS should_not_apply: (width > ${value}px) -FAIL should_apply: (width < ${value + 1}px) assert_true: (width < 118px) expected true got false -FAIL should_apply: (width <= ${value + 1}px) assert_true: (width <= 118px) expected true got false -PASS should_not_apply: (width > ${value + 1}px) -PASS should_not_apply: (width >= ${value + 1}px) -FAIL should_apply: (width > ${value - 1}px) assert_true: (width > 116px) expected true got false -FAIL should_apply: (width >= ${value - 1}px) assert_true: (width >= 116px) expected true got false -PASS should_not_apply: (width < ${value - 1}px) -PASS should_not_apply: (width <= ${value - 1}px) -PASS should_apply: all and (height: ${value}px) -FAIL should_apply: all and (height = ${value}px) assert_true: all and (height = 76px) expected true got false -PASS should_not_apply: all and (height: ${value + 1}px) -PASS should_not_apply: all and (height: ${value - 1}px) -PASS should_not_apply: all and (height = ${value + 1}px) -PASS should_not_apply: all and (height = ${value - 1}px) -PASS should_apply: all and (min-height: ${value}px) -PASS should_not_apply: all and (min-height: ${value + 1}px) -PASS should_apply: all and (min-height: ${value - 1}px) -PASS should_apply: all and (max-height: ${value}px) -PASS should_apply: all and (max-height: ${value + 1}px) -PASS should_not_apply: all and (max-height: ${value - 1}px) -PASS should_not_apply: all and (min-height: ${Math.ceil(value/em_size) + 1}em) -PASS should_apply: all and (min-height: ${Math.floor(value/em_size) - 1}em) -PASS should_apply: all and (max-height: ${Math.ceil(value/em_size) + 1}em) -PASS should_not_apply: all and (max-height: ${Math.floor(value/em_size) - 1}em) -FAIL should_apply: (height <= ${value}px) assert_true: (height <= 76px) expected true got false -FAIL should_apply: (height >= ${value}px) assert_true: (height >= 76px) expected true got false -PASS should_not_apply: (height < ${value}px) -PASS should_not_apply: (height > ${value}px) -FAIL should_apply: (height < ${value + 1}px) assert_true: (height < 77px) expected true got false -FAIL should_apply: (height <= ${value + 1}px) assert_true: (height <= 77px) expected true got false -PASS should_not_apply: (height > ${value + 1}px) -PASS should_not_apply: (height >= ${value + 1}px) -FAIL should_apply: (height > ${value - 1}px) assert_true: (height > 75px) expected true got false -FAIL should_apply: (height >= ${value - 1}px) assert_true: (height >= 75px) expected true got false -PASS should_not_apply: (height < ${value - 1}px) -PASS should_not_apply: (height <= ${value - 1}px) -PASS should_apply: all and (device-width: ${value}px) -FAIL should_apply: all and (device-width = ${value}px) assert_true: all and (device-width = 1280px) expected true got false -PASS should_not_apply: all and (device-width: ${value + 1}px) -PASS should_not_apply: all and (device-width: ${value - 1}px) -PASS should_not_apply: all and (device-width = ${value + 1}px) -PASS should_not_apply: all and (device-width = ${value - 1}px) -PASS should_apply: all and (min-device-width: ${value}px) -PASS should_not_apply: all and (min-device-width: ${value + 1}px) -PASS should_apply: all and (min-device-width: ${value - 1}px) -PASS should_apply: all and (max-device-width: ${value}px) -PASS should_apply: all and (max-device-width: ${value + 1}px) -PASS should_not_apply: all and (max-device-width: ${value - 1}px) -PASS should_not_apply: all and (min-device-width: ${Math.ceil(value/em_size) + 1}em) -PASS should_apply: all and (min-device-width: ${Math.floor(value/em_size) - 1}em) -PASS should_apply: all and (max-device-width: ${Math.ceil(value/em_size) + 1}em) -PASS should_not_apply: all and (max-device-width: ${Math.floor(value/em_size) - 1}em) -FAIL should_apply: (device-width <= ${value}px) assert_true: (device-width <= 1280px) expected true got false -FAIL should_apply: (device-width >= ${value}px) assert_true: (device-width >= 1280px) expected true got false -PASS should_not_apply: (device-width < ${value}px) -PASS should_not_apply: (device-width > ${value}px) -FAIL should_apply: (device-width < ${value + 1}px) assert_true: (device-width < 1281px) expected true got false -FAIL should_apply: (device-width <= ${value + 1}px) assert_true: (device-width <= 1281px) expected true got false -PASS should_not_apply: (device-width > ${value + 1}px) -PASS should_not_apply: (device-width >= ${value + 1}px) -FAIL should_apply: (device-width > ${value - 1}px) assert_true: (device-width > 1279px) expected true got false -FAIL should_apply: (device-width >= ${value - 1}px) assert_true: (device-width >= 1279px) expected true got false -PASS should_not_apply: (device-width < ${value - 1}px) -PASS should_not_apply: (device-width <= ${value - 1}px) -PASS should_apply: all and (device-height: ${value}px) -FAIL should_apply: all and (device-height = ${value}px) assert_true: all and (device-height = 1024px) expected true got false -PASS should_not_apply: all and (device-height: ${value + 1}px) -PASS should_not_apply: all and (device-height: ${value - 1}px) -PASS should_not_apply: all and (device-height = ${value + 1}px) -PASS should_not_apply: all and (device-height = ${value - 1}px) -PASS should_apply: all and (min-device-height: ${value}px) -PASS should_not_apply: all and (min-device-height: ${value + 1}px) -PASS should_apply: all and (min-device-height: ${value - 1}px) -PASS should_apply: all and (max-device-height: ${value}px) -PASS should_apply: all and (max-device-height: ${value + 1}px) -PASS should_not_apply: all and (max-device-height: ${value - 1}px) -PASS should_not_apply: all and (min-device-height: ${Math.ceil(value/em_size) + 1}em) -PASS should_apply: all and (min-device-height: ${Math.floor(value/em_size) - 1}em) -PASS should_apply: all and (max-device-height: ${Math.ceil(value/em_size) + 1}em) -PASS should_not_apply: all and (max-device-height: ${Math.floor(value/em_size) - 1}em) -FAIL should_apply: (device-height <= ${value}px) assert_true: (device-height <= 1024px) expected true got false -FAIL should_apply: (device-height >= ${value}px) assert_true: (device-height >= 1024px) expected true got false -PASS should_not_apply: (device-height < ${value}px) -PASS should_not_apply: (device-height > ${value}px) -FAIL should_apply: (device-height < ${value + 1}px) assert_true: (device-height < 1025px) expected true got false -FAIL should_apply: (device-height <= ${value + 1}px) assert_true: (device-height <= 1025px) expected true got false -PASS should_not_apply: (device-height > ${value + 1}px) -PASS should_not_apply: (device-height >= ${value + 1}px) -FAIL should_apply: (device-height > ${value - 1}px) assert_true: (device-height > 1023px) expected true got false -FAIL should_apply: (device-height >= ${value - 1}px) assert_true: (device-height >= 1023px) expected true got false -PASS should_not_apply: (device-height < ${value - 1}px) -PASS should_not_apply: (device-height <= ${value - 1}px) -PASS width = 0, height != 0: should_apply: all and (height) -PASS width = 0, height != 0: should_not_apply: all and (width) -PASS width = 0, height = 0: should_not_apply: all and (height) -PASS width = 0, height = 0: should_not_apply: all and (width) -PASS width = 0, height = 0: should_apply: all and (device-height) -PASS width = 0, height = 0: should_apply: all and (device-width) -PASS width != 0, height = 0: should_not_apply: all and (height) -PASS width != 0, height = 0: should_apply: all and (width) -PASS width != 0, height != 0: should_apply: all and (height) -PASS width != 0, height != 0: should_apply: all and (width) -PASS ratio that reduces to 59/40: expression_should_be_parseable: orientation -PASS ratio that reduces to 59/40: expression_should_be_parseable: orientation: portrait -PASS ratio that reduces to 59/40: expression_should_be_parseable: orientation: landscape -PASS ratio that reduces to 59/40: expression_should_not_be_parseable: min-orientation -PASS ratio that reduces to 59/40: expression_should_not_be_parseable: min-orientation: portrait -PASS ratio that reduces to 59/40: expression_should_not_be_parseable: min-orientation: landscape -PASS ratio that reduces to 59/40: expression_should_not_be_parseable: max-orientation -PASS ratio that reduces to 59/40: expression_should_not_be_parseable: max-orientation: portrait -PASS ratio that reduces to 59/40: expression_should_not_be_parseable: max-orientation: landscape -PASS ratio that reduces to 59/40: should_apply: (orientation) -PASS ratio that reduces to 59/40: should_apply: (orientation: landscape) -PASS ratio that reduces to 59/40: should_not_apply: (orientation: portrait) -PASS ratio that reduces to 59/40: should_apply: not all and (orientation: portrait) -PASS ratio that reduces to 59/80: should_apply: (orientation) -PASS ratio that reduces to 59/80: should_not_apply: (orientation: landscape) -PASS ratio that reduces to 59/80: should_apply: not all and (orientation: landscape) -PASS ratio that reduces to 59/80: should_apply: (orientation: portrait) -PASS should_apply: (aspect-ratio: 59/80) -PASS should_not_apply: (aspect-ratio: 58/80) -PASS should_not_apply: (aspect-ratio: 59/81) -PASS should_not_apply: (aspect-ratio: 60/80) -PASS should_not_apply: (aspect-ratio: 59/79) -PASS should_apply: (aspect-ratio: 177/240) -PASS should_apply: (aspect-ratio: 413/560) -PASS should_apply: (aspect-ratio: 5900/8000) -PASS should_not_apply: (aspect-ratio: 5901/8000) -PASS should_not_apply: (aspect-ratio: 5899/8000) -PASS should_not_apply: (aspect-ratio: 5900/8001) -PASS should_not_apply: (aspect-ratio: 5900/7999) -PASS should_apply: (aspect-ratio) -PASS should_apply: (min-aspect-ratio: 59/80) -PASS should_apply: (min-aspect-ratio: 58/80) -PASS should_apply: (min-aspect-ratio: 59/81) -PASS should_not_apply: (min-aspect-ratio: 60/80) -PASS should_not_apply: (min-aspect-ratio: 59/79) -PASS expression_should_not_be_parseable: min-aspect-ratio -PASS should_apply: (max-aspect-ratio: 59/80) -PASS should_not_apply: (max-aspect-ratio: 58/80) -PASS should_not_apply: (max-aspect-ratio: 59/81) -PASS should_apply: (max-aspect-ratio: 60/80) -PASS should_apply: (max-aspect-ratio: 59/79) -PASS expression_should_not_be_parseable: max-aspect-ratio -PASS should_apply: (device-aspect-ratio: ${real_dar}) -PASS should_apply: not all and (device-aspect-ratio: ${high_dar_1}) -PASS should_not_apply: all and (device-aspect-ratio: ${high_dar_2}) -PASS should_not_apply: all and (device-aspect-ratio: ${low_dar_1}) -PASS should_apply: not all and (device-aspect-ratio: ${low_dar_2}) -PASS should_apply: (device-aspect-ratio) -PASS should_apply: (min-device-aspect-ratio: ${real_dar}) -PASS should_not_apply: all and (min-device-aspect-ratio: ${high_dar_1}) -PASS should_apply: not all and (min-device-aspect-ratio: ${high_dar_2}) -PASS should_not_apply: not all and (min-device-aspect-ratio: ${low_dar_1}) -PASS should_apply: all and (min-device-aspect-ratio: ${low_dar_2}) -PASS expression_should_not_be_parseable: min-device-aspect-ratio -PASS should_apply: all and (max-device-aspect-ratio: ${real_dar}) -PASS should_apply: (max-device-aspect-ratio: ${high_dar_1}) -PASS should_apply: (max-device-aspect-ratio: ${high_dar_2}) -PASS should_not_apply: all and (max-device-aspect-ratio: ${low_dar_1}) -PASS should_apply: not all and (max-device-aspect-ratio: ${low_dar_2}) -PASS expression_should_not_be_parseable: max-device-aspect-ratio -PASS expression_should_be_parseable: max-aspect-ratio: 1/1 -PASS expression_should_be_parseable: max-aspect-ratio: 1 /1 -PASS expression_should_be_parseable: max-aspect-ratio: 1 / -1 -PASS expression_should_be_parseable: max-aspect-ratio: 1/\r1 -FAIL expression_should_be_parseable: max-aspect-ratio: 1 assert_true: max-aspect-ratio: 1 expected true got false -FAIL expression_should_be_parseable: max-aspect-ratio: 0.5 assert_true: max-aspect-ratio: 0.5 expected true got false -FAIL expression_should_be_parseable: max-aspect-ratio: 1.0/1 assert_true: max-aspect-ratio: 1.0/1 expected true got false -FAIL expression_should_be_parseable: max-aspect-ratio: 1/1.0 assert_true: max-aspect-ratio: 1/1.0 expected true got false -FAIL expression_should_be_parseable: max-aspect-ratio: 1.0/1.0 assert_true: max-aspect-ratio: 1.0/1.0 expected true got false -FAIL expression_should_be_parseable: max-aspect-ratio: 0/1 assert_true: max-aspect-ratio: 0/1 expected true got false -FAIL expression_should_be_parseable: max-aspect-ratio: 1/0 assert_true: max-aspect-ratio: 1/0 expected true got false -FAIL expression_should_be_parseable: max-aspect-ratio: 0/0 assert_true: max-aspect-ratio: 0/0 expected true got false -PASS expression_should_not_be_parseable: max-aspect-ratio: -1/1 -PASS expression_should_not_be_parseable: max-aspect-ratio: 1/-1 -PASS expression_should_not_be_parseable: max-aspect-ratio: -1/-1 -PASS expression_should_not_be_parseable: max-aspect-ratio: invalid -PASS expression_should_not_be_parseable: max-aspect-ratio: 1 / invalid -PASS expression_should_not_be_parseable: max-aspect-ratio: 1 invalid -PASS expression_should_be_parseable: device-aspect-ratio: 1/1 -PASS expression_should_be_parseable: device-aspect-ratio: 1 /1 -PASS expression_should_be_parseable: device-aspect-ratio: 1 / -1 -PASS expression_should_be_parseable: device-aspect-ratio: 1/\r1 -FAIL expression_should_be_parseable: device-aspect-ratio: 1 assert_true: device-aspect-ratio: 1 expected true got false -FAIL expression_should_be_parseable: device-aspect-ratio: 0.5 assert_true: device-aspect-ratio: 0.5 expected true got false -FAIL expression_should_be_parseable: device-aspect-ratio: 1.0/1 assert_true: device-aspect-ratio: 1.0/1 expected true got false -FAIL expression_should_be_parseable: device-aspect-ratio: 1/1.0 assert_true: device-aspect-ratio: 1/1.0 expected true got false -FAIL expression_should_be_parseable: device-aspect-ratio: 1.0/1.0 assert_true: device-aspect-ratio: 1.0/1.0 expected true got false -FAIL expression_should_be_parseable: device-aspect-ratio: 0/1 assert_true: device-aspect-ratio: 0/1 expected true got false -FAIL expression_should_be_parseable: device-aspect-ratio: 1/0 assert_true: device-aspect-ratio: 1/0 expected true got false -FAIL expression_should_be_parseable: device-aspect-ratio: 0/0 assert_true: device-aspect-ratio: 0/0 expected true got false -PASS expression_should_not_be_parseable: device-aspect-ratio: -1/1 -PASS expression_should_not_be_parseable: device-aspect-ratio: 1/-1 -PASS expression_should_not_be_parseable: device-aspect-ratio: -1/-1 -PASS expression_should_not_be_parseable: device-aspect-ratio: invalid -PASS expression_should_not_be_parseable: device-aspect-ratio: 1 / invalid -PASS expression_should_not_be_parseable: device-aspect-ratio: 1 invalid -PASS monochrome_and_color -PASS find_depth -PASS should_apply: all and (color:8) -PASS should_not_apply: all and (color:7) -PASS should_not_apply: all and (color:9) -PASS should_apply: all and (max-color:8) -PASS should_not_apply: all and (max-color:7) -PASS should_apply: all and (max-color:9) -PASS should_apply: all and (color) -PASS expression_should_not_be_parseable: max-color -PASS expression_should_not_be_parseable: min-color -PASS should_not_apply: all and (monochrome) -PASS expression_should_not_be_parseable: max-monochrome -PASS expression_should_not_be_parseable: min-monochrome -PASS should_apply: not all and (monochrome) -PASS should_not_apply: not all and (color) -PASS should_apply: only all and (color) -PASS should_not_apply: only all and (monochrome) -PASS expression_should_be_parseable: color: 1 -PASS expression_should_be_parseable: color: 327 -PASS expression_should_be_parseable: color: 0 -PASS expression_should_not_be_parseable: color: 1.0 -PASS expression_should_not_be_parseable: color: -1 -PASS expression_should_not_be_parseable: color: 1/1 -PASS expression_should_be_parseable: min-monochrome: 1 -PASS expression_should_be_parseable: min-monochrome: 327 -PASS expression_should_be_parseable: min-monochrome: 0 -PASS expression_should_not_be_parseable: min-monochrome: 1.0 -PASS expression_should_not_be_parseable: min-monochrome: -1 -PASS expression_should_not_be_parseable: min-monochrome: 1/1 -PASS expression_should_be_parseable: max-color-index: 1 -PASS expression_should_be_parseable: max-color-index: 327 -PASS expression_should_be_parseable: max-color-index: 0 -PASS expression_should_not_be_parseable: max-color-index: 1.0 -PASS expression_should_not_be_parseable: max-color-index: -1 -PASS expression_should_not_be_parseable: max-color-index: 1/1 -PASS should_apply: (color-index: 0) -PASS should_not_apply: (color-index: 1) -PASS should_apply: (min-color-index: 0) -PASS should_not_apply: (min-color-index: 1) -PASS should_apply: (max-color-index: 0) -PASS should_apply: (max-color-index: 1) -PASS should_apply: (max-color-index: 157) -PASS expression_should_be_parseable: resolution: 3dpi -PASS expression_should_be_parseable: resolution:3dpi -PASS expression_should_be_parseable: resolution: 3.0dpi -PASS expression_should_be_parseable: resolution: 3.4dpi -PASS expression_should_be_parseable: resolution : 120dpcm -PASS expression_should_be_parseable: resolution: 1dppx -PASS expression_should_be_parseable: resolution: 1x -PASS expression_should_be_parseable: resolution: 1.5dppx -PASS expression_should_be_parseable: resolution: 1.5x -PASS expression_should_be_parseable: resolution: 2.0dppx -PASS expression_should_not_be_parseable: resolution: 0dpi -PASS expression_should_not_be_parseable: resolution: -3dpi -PASS expression_should_not_be_parseable: resolution: 0dppx -PASS expression_should_not_be_parseable: resolution: 0x -PASS expression_should_be_parseable: min-resolution: 3dpi -PASS expression_should_be_parseable: min-resolution:3dpi -PASS expression_should_be_parseable: min-resolution: 3.0dpi -PASS expression_should_be_parseable: min-resolution: 3.4dpi -PASS expression_should_be_parseable: min-resolution : 120dpcm -PASS expression_should_be_parseable: min-resolution: 1dppx -PASS expression_should_be_parseable: min-resolution: 1x -PASS expression_should_be_parseable: min-resolution: 1.5dppx -PASS expression_should_be_parseable: min-resolution: 1.5x -PASS expression_should_be_parseable: min-resolution: 2.0dppx -PASS expression_should_not_be_parseable: min-resolution: 0dpi -PASS expression_should_not_be_parseable: min-resolution: -3dpi -PASS expression_should_not_be_parseable: min-resolution: 0dppx -PASS expression_should_not_be_parseable: min-resolution: 0x -PASS expression_should_be_parseable: max-resolution: 3dpi -PASS expression_should_be_parseable: max-resolution:3dpi -PASS expression_should_be_parseable: max-resolution: 3.0dpi -PASS expression_should_be_parseable: max-resolution: 3.4dpi -PASS expression_should_be_parseable: max-resolution : 120dpcm -PASS expression_should_be_parseable: max-resolution: 1dppx -PASS expression_should_be_parseable: max-resolution: 1x -PASS expression_should_be_parseable: max-resolution: 1.5dppx -PASS expression_should_be_parseable: max-resolution: 1.5x -PASS expression_should_be_parseable: max-resolution: 2.0dppx -PASS expression_should_not_be_parseable: max-resolution: 0dpi -PASS expression_should_not_be_parseable: max-resolution: -3dpi -PASS expression_should_not_be_parseable: max-resolution: 0dppx -PASS expression_should_not_be_parseable: max-resolution: 0x -PASS find_resolution -PASS resolution is exact: should_apply: (resolution: ${resolution}dpi) -PASS resolution is exact: should_apply: (resolution: ${Math.floor(resolution/96)}dppx) -PASS resolution is exact: should_apply: (resolution: ${Math.floor(resolution/96)}x) -PASS resolution is exact: should_not_apply: (resolution: ${resolution + 1}dpi) -PASS resolution is exact: should_not_apply: (resolution: ${resolution - 1}dpi) -PASS should_apply: (min-resolution: ${dpi_low}dpi) -PASS should_not_apply: not all and (min-resolution: ${dpi_low}dpi) -PASS should_apply: not all and (min-resolution: ${dpi_high}dpi) -PASS should_not_apply: all and (min-resolution: ${dpi_high}dpi) -PASS should_apply: (min-resolution: ${dpcm_low}dpcm) -PASS should_apply: (max-resolution: ${dpcm_high}dpcm) -PASS should_not_apply: (max-resolution: ${dpcm_low}dpcm) -PASS should_apply: not all and (min-resolution: ${dpcm_high}dpcm) -PASS expression_should_be_parseable: scan -PASS expression_should_be_parseable: scan: progressive -PASS expression_should_be_parseable: scan:interlace -PASS expression_should_not_be_parseable: min-scan:interlace -PASS expression_should_not_be_parseable: scan: 1 -PASS expression_should_not_be_parseable: max-scan -PASS expression_should_not_be_parseable: max-scan: progressive -PASS should_not_apply: (scan) -PASS should_not_apply: (scan: progressive) -PASS should_not_apply: (scan: interlace) -PASS should_apply: not all and (scan) -PASS should_apply: not all and (scan: progressive) -PASS should_apply: not all and (scan: interlace) -PASS expression_should_be_parseable: grid -PASS expression_should_be_parseable: grid: 0 -PASS expression_should_be_parseable: grid: 1 -PASS expression_should_not_be_parseable: min-grid -PASS expression_should_not_be_parseable: min-grid:0 -PASS expression_should_not_be_parseable: max-grid: 1 -PASS expression_should_not_be_parseable: grid: 2 -PASS expression_should_not_be_parseable: grid: -1 -PASS should_not_apply: (grid) -PASS should_apply: (grid: 0) -PASS should_not_apply: (grid: 1) -PASS should_not_apply: (grid: 2) -PASS should_not_apply: (grid: -1) -PASS should_apply: (orientation -PASS should_not_apply: not all and (orientation -PASS should_not_apply: (orientation: -PASS should_not_apply: (orientation:) -PASS should_not_apply: (orientation: ) -PASS should_apply: all,(orientation: -PASS should_not_apply: (orientation:,all -PASS should_apply: not all and (grid -PASS should_not_apply: only all and (grid -PASS should_not_apply: (grid -PASS should_apply: all,(grid -PASS should_not_apply: (grid,all -PASS should_apply: ,all -PASS should_apply: all, -PASS should_apply: ,all, -PASS should_apply: all,badmedium -PASS should_apply: badmedium,all -PASS should_not_apply: ,badmedium, -PASS should_apply: all,(badexpression) -PASS should_apply: (badexpression),all -PASS should_not_apply: (badexpression),badmedium -PASS should_not_apply: badmedium,(badexpression) -PASS should_apply: all,[badsyntax] -PASS should_apply: [badsyntax],all -PASS should_not_apply: badmedium,[badsyntax] -PASS should_not_apply: [badsyntax],badmedium -PASS query_should_not_be_parseable: all and color : -PASS query_should_not_be_parseable: all and color : 1 -PASS should_not_apply: all and min-color : 1 -PASS should_not_apply: (bogus) -PASS should_not_apply: not all and (bogus) -PASS should_not_apply: only all and (bogus) -FAIL expression_should_be_parseable: overflow-block assert_true: overflow-block expected true got false -FAIL expression_should_be_parseable: overflow-block: none assert_true: overflow-block: none expected true got false -FAIL expression_should_be_parseable: overflow-block: paged assert_true: overflow-block: paged expected true got false -FAIL expression_should_be_parseable: overflow-block: scroll assert_true: overflow-block: scroll expected true got false -FAIL expression_should_be_parseable: overflow-block: optional-paged assert_true: overflow-block: optional-paged expected true got false -PASS expression_should_not_be_parseable: overflow-block: some-random-invalid-thing -FAIL Sanity check for overflow-block assert_not_equals: overflow-block should be equivalent to not (overflow-block: none) got disallowed value false -FAIL expression_should_be_parseable: overflow-inline assert_true: overflow-inline expected true got false -FAIL expression_should_be_parseable: overflow-inline: none assert_true: overflow-inline: none expected true got false -FAIL expression_should_be_parseable: overflow-inline: scroll assert_true: overflow-inline: scroll expected true got false -PASS expression_should_not_be_parseable: overflow-inline: some-random-invalid-thing -FAIL Sanity check for overflow-inline assert_not_equals: overflow-inline should be equivalent to not (overflow-inline: none) got disallowed value false -PASS expression_should_be_parseable: hover -PASS expression_should_be_parseable: hover: hover -PASS expression_should_be_parseable: hover: none -PASS expression_should_be_parseable: any-hover -PASS expression_should_be_parseable: any-hover: hover -PASS expression_should_be_parseable: any-hover: none -PASS (hover) == (hover: hover) -PASS (hover) == not (hover: none) -PASS (any-hover) == (any-hover: hover) -PASS (any-hover) == not (any-hover: none) -PASS expression_should_be_parseable: pointer -PASS expression_should_be_parseable: pointer: coarse -PASS expression_should_be_parseable: pointer: fine -PASS expression_should_be_parseable: pointer: none -PASS expression_should_be_parseable: any-pointer -PASS expression_should_be_parseable: any-pointer: coarse -PASS expression_should_be_parseable: any-pointer: fine -PASS expression_should_be_parseable: any-pointer: none -PASS (pointer) == (pointer: coarse) or (pointer: fine) -PASS (pointer) == not (pointer: none) -PASS (any-pointer) == (any-pointer: coarse) or (any-pointer: fine) -PASS (any-pointer) == not (any-pointer: none) -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/win/external/wpt/css/mediaqueries/test_media_queries-expected.txt b/third_party/blink/web_tests/platform/win/external/wpt/css/mediaqueries/test_media_queries-expected.txt deleted file mode 100644 index fce88d5..0000000 --- a/third_party/blink/web_tests/platform/win/external/wpt/css/mediaqueries/test_media_queries-expected.txt +++ /dev/null
@@ -1,809 +0,0 @@ -This is a testharness.js-based test. -Found 803 tests; 586 PASS, 217 FAIL, 0 TIMEOUT, 0 NOTRUN. -PASS query_should_be_parseable: (orientation) -FAIL query_should_be_parseable: not (orientation) assert_true: not (orientation) expected true got false -PASS query_should_not_be_parseable: only (orientation) -PASS query_should_be_parseable: all and (orientation) -PASS query_should_be_parseable: not all and (orientation) -PASS query_should_be_parseable: only all and (orientation) -PASS query_should_not_be_parseable: not not (orientation) -PASS query_should_be_parseable: (orientation) and (orientation) -FAIL query_should_be_parseable: (orientation) or (orientation) assert_true: (orientation) or (orientation) expected true got false -FAIL query_should_be_parseable: (orientation) or ((orientation) and ((orientation) or (orientation) or (not (orientation)))) assert_true: (orientation) or ((orientation) and ((orientation) or (orientation) or (not (orientation)))) expected true got false -PASS query_should_not_be_parseable: all and (orientation) or (orientation) -PASS query_should_be_parseable: all and (orientation) and (orientation) -PASS query_should_not_be_parseable: (orientation) and (orientation) or (orientation) -PASS query_should_not_be_parseable: (orientation) and not (orientation) -PASS expression_should_be_parseable: width -PASS expression_should_not_be_parseable: min-width -PASS expression_should_not_be_parseable: max-width -PASS expression_should_be_parseable: width : 0 -PASS expression_should_be_parseable: width : 0px -PASS expression_should_be_parseable: width : 0em -PASS expression_should_be_parseable: width : -0 -PASS expression_should_be_parseable: width : -0cm -PASS expression_should_be_parseable: width : 1px -PASS expression_should_be_parseable: width : 0.001mm -PASS expression_should_be_parseable: width : 100000px -PASS expression_should_be_parseable: min-width : -0 -PASS expression_should_be_parseable: max-width : -0 -PASS expression_should_not_be_parseable: width : -1px -PASS expression_should_not_be_parseable: min-width : -1px -PASS expression_should_not_be_parseable: max-width : -1px -PASS expression_should_not_be_parseable: width : -0.00001mm -PASS expression_should_not_be_parseable: width : -100000em -FAIL expression_should_be_parseable: width > 0 assert_true: width > 0 expected true got false -FAIL expression_should_be_parseable: width > 0px assert_true: width > 0px expected true got false -FAIL expression_should_be_parseable: width > 0em assert_true: width > 0em expected true got false -FAIL expression_should_be_parseable: width > -0 assert_true: width > -0 expected true got false -FAIL expression_should_be_parseable: width > -0cm assert_true: width > -0cm expected true got false -FAIL expression_should_be_parseable: width > 1px assert_true: width > 1px expected true got false -FAIL expression_should_be_parseable: width > 0.001mm assert_true: width > 0.001mm expected true got false -FAIL expression_should_be_parseable: width > 100000px assert_true: width > 100000px expected true got false -PASS expression_should_not_be_parseable: min-width > -0 -PASS expression_should_not_be_parseable: max-width > -0 -PASS expression_should_not_be_parseable: width > -1px -PASS expression_should_not_be_parseable: min-width > -1px -PASS expression_should_not_be_parseable: max-width > -1px -PASS expression_should_not_be_parseable: width > -0.00001mm -PASS expression_should_not_be_parseable: width > -100000em -FAIL expression_should_be_parseable: width >= 0 assert_true: width >= 0 expected true got false -FAIL expression_should_be_parseable: width >= 0px assert_true: width >= 0px expected true got false -FAIL expression_should_be_parseable: width >= 0em assert_true: width >= 0em expected true got false -FAIL expression_should_be_parseable: width >= -0 assert_true: width >= -0 expected true got false -FAIL expression_should_be_parseable: width >= -0cm assert_true: width >= -0cm expected true got false -FAIL expression_should_be_parseable: width >= 1px assert_true: width >= 1px expected true got false -FAIL expression_should_be_parseable: width >= 0.001mm assert_true: width >= 0.001mm expected true got false -FAIL expression_should_be_parseable: width >= 100000px assert_true: width >= 100000px expected true got false -PASS expression_should_not_be_parseable: min-width >= -0 -PASS expression_should_not_be_parseable: max-width >= -0 -PASS expression_should_not_be_parseable: width > = 0px -PASS expression_should_not_be_parseable: width >= -1px -PASS expression_should_not_be_parseable: min-width >= -1px -PASS expression_should_not_be_parseable: max-width >= -1px -PASS expression_should_not_be_parseable: width >= -0.00001mm -PASS expression_should_not_be_parseable: width >= -100000em -FAIL expression_should_be_parseable: width = 0 assert_true: width = 0 expected true got false -FAIL expression_should_be_parseable: width = 0px assert_true: width = 0px expected true got false -FAIL expression_should_be_parseable: width = 0em assert_true: width = 0em expected true got false -FAIL expression_should_be_parseable: width = -0 assert_true: width = -0 expected true got false -FAIL expression_should_be_parseable: width = -0cm assert_true: width = -0cm expected true got false -FAIL expression_should_be_parseable: width = 1px assert_true: width = 1px expected true got false -FAIL expression_should_be_parseable: width = 0.001mm assert_true: width = 0.001mm expected true got false -FAIL expression_should_be_parseable: width = 100000px assert_true: width = 100000px expected true got false -PASS expression_should_not_be_parseable: min-width = -0 -PASS expression_should_not_be_parseable: max-width = -0 -PASS expression_should_not_be_parseable: width = -1px -PASS expression_should_not_be_parseable: min-width = -1px -PASS expression_should_not_be_parseable: max-width = -1px -PASS expression_should_not_be_parseable: width = -0.00001mm -PASS expression_should_not_be_parseable: width = -100000em -FAIL expression_should_be_parseable: width <= 0 assert_true: width <= 0 expected true got false -FAIL expression_should_be_parseable: width <= 0px assert_true: width <= 0px expected true got false -FAIL expression_should_be_parseable: width <= 0em assert_true: width <= 0em expected true got false -FAIL expression_should_be_parseable: width <= -0 assert_true: width <= -0 expected true got false -FAIL expression_should_be_parseable: width <= -0cm assert_true: width <= -0cm expected true got false -FAIL expression_should_be_parseable: width <= 1px assert_true: width <= 1px expected true got false -FAIL expression_should_be_parseable: width <= 0.001mm assert_true: width <= 0.001mm expected true got false -FAIL expression_should_be_parseable: width <= 100000px assert_true: width <= 100000px expected true got false -PASS expression_should_not_be_parseable: min-width <= -0 -PASS expression_should_not_be_parseable: max-width <= -0 -PASS expression_should_not_be_parseable: width < = 0px -PASS expression_should_not_be_parseable: width <= -1px -PASS expression_should_not_be_parseable: min-width <= -1px -PASS expression_should_not_be_parseable: max-width <= -1px -PASS expression_should_not_be_parseable: width <= -0.00001mm -PASS expression_should_not_be_parseable: width <= -100000em -FAIL expression_should_be_parseable: width < 0 assert_true: width < 0 expected true got false -FAIL expression_should_be_parseable: width < 0px assert_true: width < 0px expected true got false -FAIL expression_should_be_parseable: width < 0em assert_true: width < 0em expected true got false -FAIL expression_should_be_parseable: width < -0 assert_true: width < -0 expected true got false -FAIL expression_should_be_parseable: width < -0cm assert_true: width < -0cm expected true got false -FAIL expression_should_be_parseable: width < 1px assert_true: width < 1px expected true got false -FAIL expression_should_be_parseable: width < 0.001mm assert_true: width < 0.001mm expected true got false -FAIL expression_should_be_parseable: width < 100000px assert_true: width < 100000px expected true got false -PASS expression_should_not_be_parseable: min-width < -0 -PASS expression_should_not_be_parseable: max-width < -0 -PASS expression_should_not_be_parseable: width < -1px -PASS expression_should_not_be_parseable: min-width < -1px -PASS expression_should_not_be_parseable: max-width < -1px -PASS expression_should_not_be_parseable: width < -0.00001mm -PASS expression_should_not_be_parseable: width < -100000em -PASS expression_should_be_parseable: height -PASS expression_should_not_be_parseable: min-height -PASS expression_should_not_be_parseable: max-height -PASS expression_should_be_parseable: height : 0 -PASS expression_should_be_parseable: height : 0px -PASS expression_should_be_parseable: height : 0em -PASS expression_should_be_parseable: height : -0 -PASS expression_should_be_parseable: height : -0cm -PASS expression_should_be_parseable: height : 1px -PASS expression_should_be_parseable: height : 0.001mm -PASS expression_should_be_parseable: height : 100000px -PASS expression_should_be_parseable: min-height : -0 -PASS expression_should_be_parseable: max-height : -0 -PASS expression_should_not_be_parseable: height : -1px -PASS expression_should_not_be_parseable: min-height : -1px -PASS expression_should_not_be_parseable: max-height : -1px -PASS expression_should_not_be_parseable: height : -0.00001mm -PASS expression_should_not_be_parseable: height : -100000em -FAIL expression_should_be_parseable: height > 0 assert_true: height > 0 expected true got false -FAIL expression_should_be_parseable: height > 0px assert_true: height > 0px expected true got false -FAIL expression_should_be_parseable: height > 0em assert_true: height > 0em expected true got false -FAIL expression_should_be_parseable: height > -0 assert_true: height > -0 expected true got false -FAIL expression_should_be_parseable: height > -0cm assert_true: height > -0cm expected true got false -FAIL expression_should_be_parseable: height > 1px assert_true: height > 1px expected true got false -FAIL expression_should_be_parseable: height > 0.001mm assert_true: height > 0.001mm expected true got false -FAIL expression_should_be_parseable: height > 100000px assert_true: height > 100000px expected true got false -PASS expression_should_not_be_parseable: min-height > -0 -PASS expression_should_not_be_parseable: max-height > -0 -PASS expression_should_not_be_parseable: height > -1px -PASS expression_should_not_be_parseable: min-height > -1px -PASS expression_should_not_be_parseable: max-height > -1px -PASS expression_should_not_be_parseable: height > -0.00001mm -PASS expression_should_not_be_parseable: height > -100000em -FAIL expression_should_be_parseable: height >= 0 assert_true: height >= 0 expected true got false -FAIL expression_should_be_parseable: height >= 0px assert_true: height >= 0px expected true got false -FAIL expression_should_be_parseable: height >= 0em assert_true: height >= 0em expected true got false -FAIL expression_should_be_parseable: height >= -0 assert_true: height >= -0 expected true got false -FAIL expression_should_be_parseable: height >= -0cm assert_true: height >= -0cm expected true got false -FAIL expression_should_be_parseable: height >= 1px assert_true: height >= 1px expected true got false -FAIL expression_should_be_parseable: height >= 0.001mm assert_true: height >= 0.001mm expected true got false -FAIL expression_should_be_parseable: height >= 100000px assert_true: height >= 100000px expected true got false -PASS expression_should_not_be_parseable: min-height >= -0 -PASS expression_should_not_be_parseable: max-height >= -0 -PASS expression_should_not_be_parseable: height > = 0px -PASS expression_should_not_be_parseable: height >= -1px -PASS expression_should_not_be_parseable: min-height >= -1px -PASS expression_should_not_be_parseable: max-height >= -1px -PASS expression_should_not_be_parseable: height >= -0.00001mm -PASS expression_should_not_be_parseable: height >= -100000em -FAIL expression_should_be_parseable: height = 0 assert_true: height = 0 expected true got false -FAIL expression_should_be_parseable: height = 0px assert_true: height = 0px expected true got false -FAIL expression_should_be_parseable: height = 0em assert_true: height = 0em expected true got false -FAIL expression_should_be_parseable: height = -0 assert_true: height = -0 expected true got false -FAIL expression_should_be_parseable: height = -0cm assert_true: height = -0cm expected true got false -FAIL expression_should_be_parseable: height = 1px assert_true: height = 1px expected true got false -FAIL expression_should_be_parseable: height = 0.001mm assert_true: height = 0.001mm expected true got false -FAIL expression_should_be_parseable: height = 100000px assert_true: height = 100000px expected true got false -PASS expression_should_not_be_parseable: min-height = -0 -PASS expression_should_not_be_parseable: max-height = -0 -PASS expression_should_not_be_parseable: height = -1px -PASS expression_should_not_be_parseable: min-height = -1px -PASS expression_should_not_be_parseable: max-height = -1px -PASS expression_should_not_be_parseable: height = -0.00001mm -PASS expression_should_not_be_parseable: height = -100000em -FAIL expression_should_be_parseable: height <= 0 assert_true: height <= 0 expected true got false -FAIL expression_should_be_parseable: height <= 0px assert_true: height <= 0px expected true got false -FAIL expression_should_be_parseable: height <= 0em assert_true: height <= 0em expected true got false -FAIL expression_should_be_parseable: height <= -0 assert_true: height <= -0 expected true got false -FAIL expression_should_be_parseable: height <= -0cm assert_true: height <= -0cm expected true got false -FAIL expression_should_be_parseable: height <= 1px assert_true: height <= 1px expected true got false -FAIL expression_should_be_parseable: height <= 0.001mm assert_true: height <= 0.001mm expected true got false -FAIL expression_should_be_parseable: height <= 100000px assert_true: height <= 100000px expected true got false -PASS expression_should_not_be_parseable: min-height <= -0 -PASS expression_should_not_be_parseable: max-height <= -0 -PASS expression_should_not_be_parseable: height < = 0px -PASS expression_should_not_be_parseable: height <= -1px -PASS expression_should_not_be_parseable: min-height <= -1px -PASS expression_should_not_be_parseable: max-height <= -1px -PASS expression_should_not_be_parseable: height <= -0.00001mm -PASS expression_should_not_be_parseable: height <= -100000em -FAIL expression_should_be_parseable: height < 0 assert_true: height < 0 expected true got false -FAIL expression_should_be_parseable: height < 0px assert_true: height < 0px expected true got false -FAIL expression_should_be_parseable: height < 0em assert_true: height < 0em expected true got false -FAIL expression_should_be_parseable: height < -0 assert_true: height < -0 expected true got false -FAIL expression_should_be_parseable: height < -0cm assert_true: height < -0cm expected true got false -FAIL expression_should_be_parseable: height < 1px assert_true: height < 1px expected true got false -FAIL expression_should_be_parseable: height < 0.001mm assert_true: height < 0.001mm expected true got false -FAIL expression_should_be_parseable: height < 100000px assert_true: height < 100000px expected true got false -PASS expression_should_not_be_parseable: min-height < -0 -PASS expression_should_not_be_parseable: max-height < -0 -PASS expression_should_not_be_parseable: height < -1px -PASS expression_should_not_be_parseable: min-height < -1px -PASS expression_should_not_be_parseable: max-height < -1px -PASS expression_should_not_be_parseable: height < -0.00001mm -PASS expression_should_not_be_parseable: height < -100000em -PASS expression_should_be_parseable: device-width -PASS expression_should_not_be_parseable: min-device-width -PASS expression_should_not_be_parseable: max-device-width -PASS expression_should_be_parseable: device-width : 0 -PASS expression_should_be_parseable: device-width : 0px -PASS expression_should_be_parseable: device-width : 0em -PASS expression_should_be_parseable: device-width : -0 -PASS expression_should_be_parseable: device-width : -0cm -PASS expression_should_be_parseable: device-width : 1px -PASS expression_should_be_parseable: device-width : 0.001mm -PASS expression_should_be_parseable: device-width : 100000px -PASS expression_should_be_parseable: min-device-width : -0 -PASS expression_should_be_parseable: max-device-width : -0 -PASS expression_should_not_be_parseable: device-width : -1px -PASS expression_should_not_be_parseable: min-device-width : -1px -PASS expression_should_not_be_parseable: max-device-width : -1px -PASS expression_should_not_be_parseable: device-width : -0.00001mm -PASS expression_should_not_be_parseable: device-width : -100000em -FAIL expression_should_be_parseable: device-width > 0 assert_true: device-width > 0 expected true got false -FAIL expression_should_be_parseable: device-width > 0px assert_true: device-width > 0px expected true got false -FAIL expression_should_be_parseable: device-width > 0em assert_true: device-width > 0em expected true got false -FAIL expression_should_be_parseable: device-width > -0 assert_true: device-width > -0 expected true got false -FAIL expression_should_be_parseable: device-width > -0cm assert_true: device-width > -0cm expected true got false -FAIL expression_should_be_parseable: device-width > 1px assert_true: device-width > 1px expected true got false -FAIL expression_should_be_parseable: device-width > 0.001mm assert_true: device-width > 0.001mm expected true got false -FAIL expression_should_be_parseable: device-width > 100000px assert_true: device-width > 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-width > -0 -PASS expression_should_not_be_parseable: max-device-width > -0 -PASS expression_should_not_be_parseable: device-width > -1px -PASS expression_should_not_be_parseable: min-device-width > -1px -PASS expression_should_not_be_parseable: max-device-width > -1px -PASS expression_should_not_be_parseable: device-width > -0.00001mm -PASS expression_should_not_be_parseable: device-width > -100000em -FAIL expression_should_be_parseable: device-width >= 0 assert_true: device-width >= 0 expected true got false -FAIL expression_should_be_parseable: device-width >= 0px assert_true: device-width >= 0px expected true got false -FAIL expression_should_be_parseable: device-width >= 0em assert_true: device-width >= 0em expected true got false -FAIL expression_should_be_parseable: device-width >= -0 assert_true: device-width >= -0 expected true got false -FAIL expression_should_be_parseable: device-width >= -0cm assert_true: device-width >= -0cm expected true got false -FAIL expression_should_be_parseable: device-width >= 1px assert_true: device-width >= 1px expected true got false -FAIL expression_should_be_parseable: device-width >= 0.001mm assert_true: device-width >= 0.001mm expected true got false -FAIL expression_should_be_parseable: device-width >= 100000px assert_true: device-width >= 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-width >= -0 -PASS expression_should_not_be_parseable: max-device-width >= -0 -PASS expression_should_not_be_parseable: device-width > = 0px -PASS expression_should_not_be_parseable: device-width >= -1px -PASS expression_should_not_be_parseable: min-device-width >= -1px -PASS expression_should_not_be_parseable: max-device-width >= -1px -PASS expression_should_not_be_parseable: device-width >= -0.00001mm -PASS expression_should_not_be_parseable: device-width >= -100000em -FAIL expression_should_be_parseable: device-width = 0 assert_true: device-width = 0 expected true got false -FAIL expression_should_be_parseable: device-width = 0px assert_true: device-width = 0px expected true got false -FAIL expression_should_be_parseable: device-width = 0em assert_true: device-width = 0em expected true got false -FAIL expression_should_be_parseable: device-width = -0 assert_true: device-width = -0 expected true got false -FAIL expression_should_be_parseable: device-width = -0cm assert_true: device-width = -0cm expected true got false -FAIL expression_should_be_parseable: device-width = 1px assert_true: device-width = 1px expected true got false -FAIL expression_should_be_parseable: device-width = 0.001mm assert_true: device-width = 0.001mm expected true got false -FAIL expression_should_be_parseable: device-width = 100000px assert_true: device-width = 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-width = -0 -PASS expression_should_not_be_parseable: max-device-width = -0 -PASS expression_should_not_be_parseable: device-width = -1px -PASS expression_should_not_be_parseable: min-device-width = -1px -PASS expression_should_not_be_parseable: max-device-width = -1px -PASS expression_should_not_be_parseable: device-width = -0.00001mm -PASS expression_should_not_be_parseable: device-width = -100000em -FAIL expression_should_be_parseable: device-width <= 0 assert_true: device-width <= 0 expected true got false -FAIL expression_should_be_parseable: device-width <= 0px assert_true: device-width <= 0px expected true got false -FAIL expression_should_be_parseable: device-width <= 0em assert_true: device-width <= 0em expected true got false -FAIL expression_should_be_parseable: device-width <= -0 assert_true: device-width <= -0 expected true got false -FAIL expression_should_be_parseable: device-width <= -0cm assert_true: device-width <= -0cm expected true got false -FAIL expression_should_be_parseable: device-width <= 1px assert_true: device-width <= 1px expected true got false -FAIL expression_should_be_parseable: device-width <= 0.001mm assert_true: device-width <= 0.001mm expected true got false -FAIL expression_should_be_parseable: device-width <= 100000px assert_true: device-width <= 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-width <= -0 -PASS expression_should_not_be_parseable: max-device-width <= -0 -PASS expression_should_not_be_parseable: device-width < = 0px -PASS expression_should_not_be_parseable: device-width <= -1px -PASS expression_should_not_be_parseable: min-device-width <= -1px -PASS expression_should_not_be_parseable: max-device-width <= -1px -PASS expression_should_not_be_parseable: device-width <= -0.00001mm -PASS expression_should_not_be_parseable: device-width <= -100000em -FAIL expression_should_be_parseable: device-width < 0 assert_true: device-width < 0 expected true got false -FAIL expression_should_be_parseable: device-width < 0px assert_true: device-width < 0px expected true got false -FAIL expression_should_be_parseable: device-width < 0em assert_true: device-width < 0em expected true got false -FAIL expression_should_be_parseable: device-width < -0 assert_true: device-width < -0 expected true got false -FAIL expression_should_be_parseable: device-width < -0cm assert_true: device-width < -0cm expected true got false -FAIL expression_should_be_parseable: device-width < 1px assert_true: device-width < 1px expected true got false -FAIL expression_should_be_parseable: device-width < 0.001mm assert_true: device-width < 0.001mm expected true got false -FAIL expression_should_be_parseable: device-width < 100000px assert_true: device-width < 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-width < -0 -PASS expression_should_not_be_parseable: max-device-width < -0 -PASS expression_should_not_be_parseable: device-width < -1px -PASS expression_should_not_be_parseable: min-device-width < -1px -PASS expression_should_not_be_parseable: max-device-width < -1px -PASS expression_should_not_be_parseable: device-width < -0.00001mm -PASS expression_should_not_be_parseable: device-width < -100000em -PASS expression_should_be_parseable: device-height -PASS expression_should_not_be_parseable: min-device-height -PASS expression_should_not_be_parseable: max-device-height -PASS expression_should_be_parseable: device-height : 0 -PASS expression_should_be_parseable: device-height : 0px -PASS expression_should_be_parseable: device-height : 0em -PASS expression_should_be_parseable: device-height : -0 -PASS expression_should_be_parseable: device-height : -0cm -PASS expression_should_be_parseable: device-height : 1px -PASS expression_should_be_parseable: device-height : 0.001mm -PASS expression_should_be_parseable: device-height : 100000px -PASS expression_should_be_parseable: min-device-height : -0 -PASS expression_should_be_parseable: max-device-height : -0 -PASS expression_should_not_be_parseable: device-height : -1px -PASS expression_should_not_be_parseable: min-device-height : -1px -PASS expression_should_not_be_parseable: max-device-height : -1px -PASS expression_should_not_be_parseable: device-height : -0.00001mm -PASS expression_should_not_be_parseable: device-height : -100000em -FAIL expression_should_be_parseable: device-height > 0 assert_true: device-height > 0 expected true got false -FAIL expression_should_be_parseable: device-height > 0px assert_true: device-height > 0px expected true got false -FAIL expression_should_be_parseable: device-height > 0em assert_true: device-height > 0em expected true got false -FAIL expression_should_be_parseable: device-height > -0 assert_true: device-height > -0 expected true got false -FAIL expression_should_be_parseable: device-height > -0cm assert_true: device-height > -0cm expected true got false -FAIL expression_should_be_parseable: device-height > 1px assert_true: device-height > 1px expected true got false -FAIL expression_should_be_parseable: device-height > 0.001mm assert_true: device-height > 0.001mm expected true got false -FAIL expression_should_be_parseable: device-height > 100000px assert_true: device-height > 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-height > -0 -PASS expression_should_not_be_parseable: max-device-height > -0 -PASS expression_should_not_be_parseable: device-height > -1px -PASS expression_should_not_be_parseable: min-device-height > -1px -PASS expression_should_not_be_parseable: max-device-height > -1px -PASS expression_should_not_be_parseable: device-height > -0.00001mm -PASS expression_should_not_be_parseable: device-height > -100000em -FAIL expression_should_be_parseable: device-height >= 0 assert_true: device-height >= 0 expected true got false -FAIL expression_should_be_parseable: device-height >= 0px assert_true: device-height >= 0px expected true got false -FAIL expression_should_be_parseable: device-height >= 0em assert_true: device-height >= 0em expected true got false -FAIL expression_should_be_parseable: device-height >= -0 assert_true: device-height >= -0 expected true got false -FAIL expression_should_be_parseable: device-height >= -0cm assert_true: device-height >= -0cm expected true got false -FAIL expression_should_be_parseable: device-height >= 1px assert_true: device-height >= 1px expected true got false -FAIL expression_should_be_parseable: device-height >= 0.001mm assert_true: device-height >= 0.001mm expected true got false -FAIL expression_should_be_parseable: device-height >= 100000px assert_true: device-height >= 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-height >= -0 -PASS expression_should_not_be_parseable: max-device-height >= -0 -PASS expression_should_not_be_parseable: device-height > = 0px -PASS expression_should_not_be_parseable: device-height >= -1px -PASS expression_should_not_be_parseable: min-device-height >= -1px -PASS expression_should_not_be_parseable: max-device-height >= -1px -PASS expression_should_not_be_parseable: device-height >= -0.00001mm -PASS expression_should_not_be_parseable: device-height >= -100000em -FAIL expression_should_be_parseable: device-height = 0 assert_true: device-height = 0 expected true got false -FAIL expression_should_be_parseable: device-height = 0px assert_true: device-height = 0px expected true got false -FAIL expression_should_be_parseable: device-height = 0em assert_true: device-height = 0em expected true got false -FAIL expression_should_be_parseable: device-height = -0 assert_true: device-height = -0 expected true got false -FAIL expression_should_be_parseable: device-height = -0cm assert_true: device-height = -0cm expected true got false -FAIL expression_should_be_parseable: device-height = 1px assert_true: device-height = 1px expected true got false -FAIL expression_should_be_parseable: device-height = 0.001mm assert_true: device-height = 0.001mm expected true got false -FAIL expression_should_be_parseable: device-height = 100000px assert_true: device-height = 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-height = -0 -PASS expression_should_not_be_parseable: max-device-height = -0 -PASS expression_should_not_be_parseable: device-height = -1px -PASS expression_should_not_be_parseable: min-device-height = -1px -PASS expression_should_not_be_parseable: max-device-height = -1px -PASS expression_should_not_be_parseable: device-height = -0.00001mm -PASS expression_should_not_be_parseable: device-height = -100000em -FAIL expression_should_be_parseable: device-height <= 0 assert_true: device-height <= 0 expected true got false -FAIL expression_should_be_parseable: device-height <= 0px assert_true: device-height <= 0px expected true got false -FAIL expression_should_be_parseable: device-height <= 0em assert_true: device-height <= 0em expected true got false -FAIL expression_should_be_parseable: device-height <= -0 assert_true: device-height <= -0 expected true got false -FAIL expression_should_be_parseable: device-height <= -0cm assert_true: device-height <= -0cm expected true got false -FAIL expression_should_be_parseable: device-height <= 1px assert_true: device-height <= 1px expected true got false -FAIL expression_should_be_parseable: device-height <= 0.001mm assert_true: device-height <= 0.001mm expected true got false -FAIL expression_should_be_parseable: device-height <= 100000px assert_true: device-height <= 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-height <= -0 -PASS expression_should_not_be_parseable: max-device-height <= -0 -PASS expression_should_not_be_parseable: device-height < = 0px -PASS expression_should_not_be_parseable: device-height <= -1px -PASS expression_should_not_be_parseable: min-device-height <= -1px -PASS expression_should_not_be_parseable: max-device-height <= -1px -PASS expression_should_not_be_parseable: device-height <= -0.00001mm -PASS expression_should_not_be_parseable: device-height <= -100000em -FAIL expression_should_be_parseable: device-height < 0 assert_true: device-height < 0 expected true got false -FAIL expression_should_be_parseable: device-height < 0px assert_true: device-height < 0px expected true got false -FAIL expression_should_be_parseable: device-height < 0em assert_true: device-height < 0em expected true got false -FAIL expression_should_be_parseable: device-height < -0 assert_true: device-height < -0 expected true got false -FAIL expression_should_be_parseable: device-height < -0cm assert_true: device-height < -0cm expected true got false -FAIL expression_should_be_parseable: device-height < 1px assert_true: device-height < 1px expected true got false -FAIL expression_should_be_parseable: device-height < 0.001mm assert_true: device-height < 0.001mm expected true got false -FAIL expression_should_be_parseable: device-height < 100000px assert_true: device-height < 100000px expected true got false -PASS expression_should_not_be_parseable: min-device-height < -0 -PASS expression_should_not_be_parseable: max-device-height < -0 -PASS expression_should_not_be_parseable: device-height < -1px -PASS expression_should_not_be_parseable: min-device-height < -1px -PASS expression_should_not_be_parseable: max-device-height < -1px -PASS expression_should_not_be_parseable: device-height < -0.00001mm -PASS expression_should_not_be_parseable: device-height < -100000em -PASS should_apply: all and (width: ${value}px) -FAIL should_apply: all and (width = ${value}px) assert_true: all and (width = 117px) expected true got false -PASS should_not_apply: all and (width: ${value + 1}px) -PASS should_not_apply: all and (width: ${value - 1}px) -PASS should_not_apply: all and (width = ${value + 1}px) -PASS should_not_apply: all and (width = ${value - 1}px) -PASS should_apply: all and (min-width: ${value}px) -PASS should_not_apply: all and (min-width: ${value + 1}px) -PASS should_apply: all and (min-width: ${value - 1}px) -PASS should_apply: all and (max-width: ${value}px) -PASS should_apply: all and (max-width: ${value + 1}px) -PASS should_not_apply: all and (max-width: ${value - 1}px) -PASS should_not_apply: all and (min-width: ${Math.ceil(value/em_size) + 1}em) -PASS should_apply: all and (min-width: ${Math.floor(value/em_size) - 1}em) -PASS should_apply: all and (max-width: ${Math.ceil(value/em_size) + 1}em) -PASS should_not_apply: all and (max-width: ${Math.floor(value/em_size) - 1}em) -FAIL should_apply: (width <= ${value}px) assert_true: (width <= 117px) expected true got false -FAIL should_apply: (width >= ${value}px) assert_true: (width >= 117px) expected true got false -PASS should_not_apply: (width < ${value}px) -PASS should_not_apply: (width > ${value}px) -FAIL should_apply: (width < ${value + 1}px) assert_true: (width < 118px) expected true got false -FAIL should_apply: (width <= ${value + 1}px) assert_true: (width <= 118px) expected true got false -PASS should_not_apply: (width > ${value + 1}px) -PASS should_not_apply: (width >= ${value + 1}px) -FAIL should_apply: (width > ${value - 1}px) assert_true: (width > 116px) expected true got false -FAIL should_apply: (width >= ${value - 1}px) assert_true: (width >= 116px) expected true got false -PASS should_not_apply: (width < ${value - 1}px) -PASS should_not_apply: (width <= ${value - 1}px) -PASS should_apply: all and (height: ${value}px) -FAIL should_apply: all and (height = ${value}px) assert_true: all and (height = 76px) expected true got false -PASS should_not_apply: all and (height: ${value + 1}px) -PASS should_not_apply: all and (height: ${value - 1}px) -PASS should_not_apply: all and (height = ${value + 1}px) -PASS should_not_apply: all and (height = ${value - 1}px) -PASS should_apply: all and (min-height: ${value}px) -PASS should_not_apply: all and (min-height: ${value + 1}px) -PASS should_apply: all and (min-height: ${value - 1}px) -PASS should_apply: all and (max-height: ${value}px) -PASS should_apply: all and (max-height: ${value + 1}px) -PASS should_not_apply: all and (max-height: ${value - 1}px) -PASS should_not_apply: all and (min-height: ${Math.ceil(value/em_size) + 1}em) -PASS should_apply: all and (min-height: ${Math.floor(value/em_size) - 1}em) -PASS should_apply: all and (max-height: ${Math.ceil(value/em_size) + 1}em) -PASS should_not_apply: all and (max-height: ${Math.floor(value/em_size) - 1}em) -FAIL should_apply: (height <= ${value}px) assert_true: (height <= 76px) expected true got false -FAIL should_apply: (height >= ${value}px) assert_true: (height >= 76px) expected true got false -PASS should_not_apply: (height < ${value}px) -PASS should_not_apply: (height > ${value}px) -FAIL should_apply: (height < ${value + 1}px) assert_true: (height < 77px) expected true got false -FAIL should_apply: (height <= ${value + 1}px) assert_true: (height <= 77px) expected true got false -PASS should_not_apply: (height > ${value + 1}px) -PASS should_not_apply: (height >= ${value + 1}px) -FAIL should_apply: (height > ${value - 1}px) assert_true: (height > 75px) expected true got false -FAIL should_apply: (height >= ${value - 1}px) assert_true: (height >= 75px) expected true got false -PASS should_not_apply: (height < ${value - 1}px) -PASS should_not_apply: (height <= ${value - 1}px) -PASS should_apply: all and (device-width: ${value}px) -FAIL should_apply: all and (device-width = ${value}px) assert_true: all and (device-width = 1024px) expected true got false -PASS should_not_apply: all and (device-width: ${value + 1}px) -PASS should_not_apply: all and (device-width: ${value - 1}px) -PASS should_not_apply: all and (device-width = ${value + 1}px) -PASS should_not_apply: all and (device-width = ${value - 1}px) -PASS should_apply: all and (min-device-width: ${value}px) -PASS should_not_apply: all and (min-device-width: ${value + 1}px) -PASS should_apply: all and (min-device-width: ${value - 1}px) -PASS should_apply: all and (max-device-width: ${value}px) -PASS should_apply: all and (max-device-width: ${value + 1}px) -PASS should_not_apply: all and (max-device-width: ${value - 1}px) -PASS should_not_apply: all and (min-device-width: ${Math.ceil(value/em_size) + 1}em) -PASS should_apply: all and (min-device-width: ${Math.floor(value/em_size) - 1}em) -PASS should_apply: all and (max-device-width: ${Math.ceil(value/em_size) + 1}em) -PASS should_not_apply: all and (max-device-width: ${Math.floor(value/em_size) - 1}em) -FAIL should_apply: (device-width <= ${value}px) assert_true: (device-width <= 1024px) expected true got false -FAIL should_apply: (device-width >= ${value}px) assert_true: (device-width >= 1024px) expected true got false -PASS should_not_apply: (device-width < ${value}px) -PASS should_not_apply: (device-width > ${value}px) -FAIL should_apply: (device-width < ${value + 1}px) assert_true: (device-width < 1025px) expected true got false -FAIL should_apply: (device-width <= ${value + 1}px) assert_true: (device-width <= 1025px) expected true got false -PASS should_not_apply: (device-width > ${value + 1}px) -PASS should_not_apply: (device-width >= ${value + 1}px) -FAIL should_apply: (device-width > ${value - 1}px) assert_true: (device-width > 1023px) expected true got false -FAIL should_apply: (device-width >= ${value - 1}px) assert_true: (device-width >= 1023px) expected true got false -PASS should_not_apply: (device-width < ${value - 1}px) -PASS should_not_apply: (device-width <= ${value - 1}px) -PASS should_apply: all and (device-height: ${value}px) -FAIL should_apply: all and (device-height = ${value}px) assert_true: all and (device-height = 768px) expected true got false -PASS should_not_apply: all and (device-height: ${value + 1}px) -PASS should_not_apply: all and (device-height: ${value - 1}px) -PASS should_not_apply: all and (device-height = ${value + 1}px) -PASS should_not_apply: all and (device-height = ${value - 1}px) -PASS should_apply: all and (min-device-height: ${value}px) -PASS should_not_apply: all and (min-device-height: ${value + 1}px) -PASS should_apply: all and (min-device-height: ${value - 1}px) -PASS should_apply: all and (max-device-height: ${value}px) -PASS should_apply: all and (max-device-height: ${value + 1}px) -PASS should_not_apply: all and (max-device-height: ${value - 1}px) -PASS should_not_apply: all and (min-device-height: ${Math.ceil(value/em_size) + 1}em) -PASS should_apply: all and (min-device-height: ${Math.floor(value/em_size) - 1}em) -PASS should_apply: all and (max-device-height: ${Math.ceil(value/em_size) + 1}em) -PASS should_not_apply: all and (max-device-height: ${Math.floor(value/em_size) - 1}em) -FAIL should_apply: (device-height <= ${value}px) assert_true: (device-height <= 768px) expected true got false -FAIL should_apply: (device-height >= ${value}px) assert_true: (device-height >= 768px) expected true got false -PASS should_not_apply: (device-height < ${value}px) -PASS should_not_apply: (device-height > ${value}px) -FAIL should_apply: (device-height < ${value + 1}px) assert_true: (device-height < 769px) expected true got false -FAIL should_apply: (device-height <= ${value + 1}px) assert_true: (device-height <= 769px) expected true got false -PASS should_not_apply: (device-height > ${value + 1}px) -PASS should_not_apply: (device-height >= ${value + 1}px) -FAIL should_apply: (device-height > ${value - 1}px) assert_true: (device-height > 767px) expected true got false -FAIL should_apply: (device-height >= ${value - 1}px) assert_true: (device-height >= 767px) expected true got false -PASS should_not_apply: (device-height < ${value - 1}px) -PASS should_not_apply: (device-height <= ${value - 1}px) -PASS width = 0, height != 0: should_apply: all and (height) -PASS width = 0, height != 0: should_not_apply: all and (width) -PASS width = 0, height = 0: should_not_apply: all and (height) -PASS width = 0, height = 0: should_not_apply: all and (width) -PASS width = 0, height = 0: should_apply: all and (device-height) -PASS width = 0, height = 0: should_apply: all and (device-width) -PASS width != 0, height = 0: should_not_apply: all and (height) -PASS width != 0, height = 0: should_apply: all and (width) -PASS width != 0, height != 0: should_apply: all and (height) -PASS width != 0, height != 0: should_apply: all and (width) -PASS ratio that reduces to 59/40: expression_should_be_parseable: orientation -PASS ratio that reduces to 59/40: expression_should_be_parseable: orientation: portrait -PASS ratio that reduces to 59/40: expression_should_be_parseable: orientation: landscape -PASS ratio that reduces to 59/40: expression_should_not_be_parseable: min-orientation -PASS ratio that reduces to 59/40: expression_should_not_be_parseable: min-orientation: portrait -PASS ratio that reduces to 59/40: expression_should_not_be_parseable: min-orientation: landscape -PASS ratio that reduces to 59/40: expression_should_not_be_parseable: max-orientation -PASS ratio that reduces to 59/40: expression_should_not_be_parseable: max-orientation: portrait -PASS ratio that reduces to 59/40: expression_should_not_be_parseable: max-orientation: landscape -PASS ratio that reduces to 59/40: should_apply: (orientation) -PASS ratio that reduces to 59/40: should_apply: (orientation: landscape) -PASS ratio that reduces to 59/40: should_not_apply: (orientation: portrait) -PASS ratio that reduces to 59/40: should_apply: not all and (orientation: portrait) -PASS ratio that reduces to 59/80: should_apply: (orientation) -PASS ratio that reduces to 59/80: should_not_apply: (orientation: landscape) -PASS ratio that reduces to 59/80: should_apply: not all and (orientation: landscape) -PASS ratio that reduces to 59/80: should_apply: (orientation: portrait) -PASS should_apply: (aspect-ratio: 59/80) -PASS should_not_apply: (aspect-ratio: 58/80) -PASS should_not_apply: (aspect-ratio: 59/81) -PASS should_not_apply: (aspect-ratio: 60/80) -PASS should_not_apply: (aspect-ratio: 59/79) -PASS should_apply: (aspect-ratio: 177/240) -PASS should_apply: (aspect-ratio: 413/560) -PASS should_apply: (aspect-ratio: 5900/8000) -PASS should_not_apply: (aspect-ratio: 5901/8000) -PASS should_not_apply: (aspect-ratio: 5899/8000) -PASS should_not_apply: (aspect-ratio: 5900/8001) -PASS should_not_apply: (aspect-ratio: 5900/7999) -PASS should_apply: (aspect-ratio) -PASS should_apply: (min-aspect-ratio: 59/80) -PASS should_apply: (min-aspect-ratio: 58/80) -PASS should_apply: (min-aspect-ratio: 59/81) -PASS should_not_apply: (min-aspect-ratio: 60/80) -PASS should_not_apply: (min-aspect-ratio: 59/79) -PASS expression_should_not_be_parseable: min-aspect-ratio -PASS should_apply: (max-aspect-ratio: 59/80) -PASS should_not_apply: (max-aspect-ratio: 58/80) -PASS should_not_apply: (max-aspect-ratio: 59/81) -PASS should_apply: (max-aspect-ratio: 60/80) -PASS should_apply: (max-aspect-ratio: 59/79) -PASS expression_should_not_be_parseable: max-aspect-ratio -PASS should_apply: (device-aspect-ratio: ${real_dar}) -PASS should_apply: not all and (device-aspect-ratio: ${high_dar_1}) -PASS should_not_apply: all and (device-aspect-ratio: ${high_dar_2}) -PASS should_not_apply: all and (device-aspect-ratio: ${low_dar_1}) -PASS should_apply: not all and (device-aspect-ratio: ${low_dar_2}) -PASS should_apply: (device-aspect-ratio) -PASS should_apply: (min-device-aspect-ratio: ${real_dar}) -PASS should_not_apply: all and (min-device-aspect-ratio: ${high_dar_1}) -PASS should_apply: not all and (min-device-aspect-ratio: ${high_dar_2}) -PASS should_not_apply: not all and (min-device-aspect-ratio: ${low_dar_1}) -PASS should_apply: all and (min-device-aspect-ratio: ${low_dar_2}) -PASS expression_should_not_be_parseable: min-device-aspect-ratio -PASS should_apply: all and (max-device-aspect-ratio: ${real_dar}) -PASS should_apply: (max-device-aspect-ratio: ${high_dar_1}) -PASS should_apply: (max-device-aspect-ratio: ${high_dar_2}) -PASS should_not_apply: all and (max-device-aspect-ratio: ${low_dar_1}) -PASS should_apply: not all and (max-device-aspect-ratio: ${low_dar_2}) -PASS expression_should_not_be_parseable: max-device-aspect-ratio -PASS expression_should_be_parseable: max-aspect-ratio: 1/1 -PASS expression_should_be_parseable: max-aspect-ratio: 1 /1 -PASS expression_should_be_parseable: max-aspect-ratio: 1 / -1 -PASS expression_should_be_parseable: max-aspect-ratio: 1/\r1 -FAIL expression_should_be_parseable: max-aspect-ratio: 1 assert_true: max-aspect-ratio: 1 expected true got false -FAIL expression_should_be_parseable: max-aspect-ratio: 0.5 assert_true: max-aspect-ratio: 0.5 expected true got false -FAIL expression_should_be_parseable: max-aspect-ratio: 1.0/1 assert_true: max-aspect-ratio: 1.0/1 expected true got false -FAIL expression_should_be_parseable: max-aspect-ratio: 1/1.0 assert_true: max-aspect-ratio: 1/1.0 expected true got false -FAIL expression_should_be_parseable: max-aspect-ratio: 1.0/1.0 assert_true: max-aspect-ratio: 1.0/1.0 expected true got false -FAIL expression_should_be_parseable: max-aspect-ratio: 0/1 assert_true: max-aspect-ratio: 0/1 expected true got false -FAIL expression_should_be_parseable: max-aspect-ratio: 1/0 assert_true: max-aspect-ratio: 1/0 expected true got false -FAIL expression_should_be_parseable: max-aspect-ratio: 0/0 assert_true: max-aspect-ratio: 0/0 expected true got false -PASS expression_should_not_be_parseable: max-aspect-ratio: -1/1 -PASS expression_should_not_be_parseable: max-aspect-ratio: 1/-1 -PASS expression_should_not_be_parseable: max-aspect-ratio: -1/-1 -PASS expression_should_not_be_parseable: max-aspect-ratio: invalid -PASS expression_should_not_be_parseable: max-aspect-ratio: 1 / invalid -PASS expression_should_not_be_parseable: max-aspect-ratio: 1 invalid -PASS expression_should_be_parseable: device-aspect-ratio: 1/1 -PASS expression_should_be_parseable: device-aspect-ratio: 1 /1 -PASS expression_should_be_parseable: device-aspect-ratio: 1 / -1 -PASS expression_should_be_parseable: device-aspect-ratio: 1/\r1 -FAIL expression_should_be_parseable: device-aspect-ratio: 1 assert_true: device-aspect-ratio: 1 expected true got false -FAIL expression_should_be_parseable: device-aspect-ratio: 0.5 assert_true: device-aspect-ratio: 0.5 expected true got false -FAIL expression_should_be_parseable: device-aspect-ratio: 1.0/1 assert_true: device-aspect-ratio: 1.0/1 expected true got false -FAIL expression_should_be_parseable: device-aspect-ratio: 1/1.0 assert_true: device-aspect-ratio: 1/1.0 expected true got false -FAIL expression_should_be_parseable: device-aspect-ratio: 1.0/1.0 assert_true: device-aspect-ratio: 1.0/1.0 expected true got false -FAIL expression_should_be_parseable: device-aspect-ratio: 0/1 assert_true: device-aspect-ratio: 0/1 expected true got false -FAIL expression_should_be_parseable: device-aspect-ratio: 1/0 assert_true: device-aspect-ratio: 1/0 expected true got false -FAIL expression_should_be_parseable: device-aspect-ratio: 0/0 assert_true: device-aspect-ratio: 0/0 expected true got false -PASS expression_should_not_be_parseable: device-aspect-ratio: -1/1 -PASS expression_should_not_be_parseable: device-aspect-ratio: 1/-1 -PASS expression_should_not_be_parseable: device-aspect-ratio: -1/-1 -PASS expression_should_not_be_parseable: device-aspect-ratio: invalid -PASS expression_should_not_be_parseable: device-aspect-ratio: 1 / invalid -PASS expression_should_not_be_parseable: device-aspect-ratio: 1 invalid -PASS monochrome_and_color -PASS find_depth -PASS should_apply: all and (color:8) -PASS should_not_apply: all and (color:7) -PASS should_not_apply: all and (color:9) -PASS should_apply: all and (max-color:8) -PASS should_not_apply: all and (max-color:7) -PASS should_apply: all and (max-color:9) -PASS should_apply: all and (color) -PASS expression_should_not_be_parseable: max-color -PASS expression_should_not_be_parseable: min-color -PASS should_not_apply: all and (monochrome) -PASS expression_should_not_be_parseable: max-monochrome -PASS expression_should_not_be_parseable: min-monochrome -PASS should_apply: not all and (monochrome) -PASS should_not_apply: not all and (color) -PASS should_apply: only all and (color) -PASS should_not_apply: only all and (monochrome) -PASS expression_should_be_parseable: color: 1 -PASS expression_should_be_parseable: color: 327 -PASS expression_should_be_parseable: color: 0 -PASS expression_should_not_be_parseable: color: 1.0 -PASS expression_should_not_be_parseable: color: -1 -PASS expression_should_not_be_parseable: color: 1/1 -PASS expression_should_be_parseable: min-monochrome: 1 -PASS expression_should_be_parseable: min-monochrome: 327 -PASS expression_should_be_parseable: min-monochrome: 0 -PASS expression_should_not_be_parseable: min-monochrome: 1.0 -PASS expression_should_not_be_parseable: min-monochrome: -1 -PASS expression_should_not_be_parseable: min-monochrome: 1/1 -PASS expression_should_be_parseable: max-color-index: 1 -PASS expression_should_be_parseable: max-color-index: 327 -PASS expression_should_be_parseable: max-color-index: 0 -PASS expression_should_not_be_parseable: max-color-index: 1.0 -PASS expression_should_not_be_parseable: max-color-index: -1 -PASS expression_should_not_be_parseable: max-color-index: 1/1 -PASS should_apply: (color-index: 0) -PASS should_not_apply: (color-index: 1) -PASS should_apply: (min-color-index: 0) -PASS should_not_apply: (min-color-index: 1) -PASS should_apply: (max-color-index: 0) -PASS should_apply: (max-color-index: 1) -PASS should_apply: (max-color-index: 157) -PASS expression_should_be_parseable: resolution: 3dpi -PASS expression_should_be_parseable: resolution:3dpi -PASS expression_should_be_parseable: resolution: 3.0dpi -PASS expression_should_be_parseable: resolution: 3.4dpi -PASS expression_should_be_parseable: resolution : 120dpcm -PASS expression_should_be_parseable: resolution: 1dppx -PASS expression_should_be_parseable: resolution: 1x -PASS expression_should_be_parseable: resolution: 1.5dppx -PASS expression_should_be_parseable: resolution: 1.5x -PASS expression_should_be_parseable: resolution: 2.0dppx -PASS expression_should_not_be_parseable: resolution: 0dpi -PASS expression_should_not_be_parseable: resolution: -3dpi -PASS expression_should_not_be_parseable: resolution: 0dppx -PASS expression_should_not_be_parseable: resolution: 0x -PASS expression_should_be_parseable: min-resolution: 3dpi -PASS expression_should_be_parseable: min-resolution:3dpi -PASS expression_should_be_parseable: min-resolution: 3.0dpi -PASS expression_should_be_parseable: min-resolution: 3.4dpi -PASS expression_should_be_parseable: min-resolution : 120dpcm -PASS expression_should_be_parseable: min-resolution: 1dppx -PASS expression_should_be_parseable: min-resolution: 1x -PASS expression_should_be_parseable: min-resolution: 1.5dppx -PASS expression_should_be_parseable: min-resolution: 1.5x -PASS expression_should_be_parseable: min-resolution: 2.0dppx -PASS expression_should_not_be_parseable: min-resolution: 0dpi -PASS expression_should_not_be_parseable: min-resolution: -3dpi -PASS expression_should_not_be_parseable: min-resolution: 0dppx -PASS expression_should_not_be_parseable: min-resolution: 0x -PASS expression_should_be_parseable: max-resolution: 3dpi -PASS expression_should_be_parseable: max-resolution:3dpi -PASS expression_should_be_parseable: max-resolution: 3.0dpi -PASS expression_should_be_parseable: max-resolution: 3.4dpi -PASS expression_should_be_parseable: max-resolution : 120dpcm -PASS expression_should_be_parseable: max-resolution: 1dppx -PASS expression_should_be_parseable: max-resolution: 1x -PASS expression_should_be_parseable: max-resolution: 1.5dppx -PASS expression_should_be_parseable: max-resolution: 1.5x -PASS expression_should_be_parseable: max-resolution: 2.0dppx -PASS expression_should_not_be_parseable: max-resolution: 0dpi -PASS expression_should_not_be_parseable: max-resolution: -3dpi -PASS expression_should_not_be_parseable: max-resolution: 0dppx -PASS expression_should_not_be_parseable: max-resolution: 0x -PASS find_resolution -PASS resolution is exact: should_apply: (resolution: ${resolution}dpi) -PASS resolution is exact: should_apply: (resolution: ${Math.floor(resolution/96)}dppx) -PASS resolution is exact: should_apply: (resolution: ${Math.floor(resolution/96)}x) -PASS resolution is exact: should_not_apply: (resolution: ${resolution + 1}dpi) -PASS resolution is exact: should_not_apply: (resolution: ${resolution - 1}dpi) -PASS should_apply: (min-resolution: ${dpi_low}dpi) -PASS should_not_apply: not all and (min-resolution: ${dpi_low}dpi) -PASS should_apply: not all and (min-resolution: ${dpi_high}dpi) -PASS should_not_apply: all and (min-resolution: ${dpi_high}dpi) -PASS should_apply: (min-resolution: ${dpcm_low}dpcm) -PASS should_apply: (max-resolution: ${dpcm_high}dpcm) -PASS should_not_apply: (max-resolution: ${dpcm_low}dpcm) -PASS should_apply: not all and (min-resolution: ${dpcm_high}dpcm) -PASS expression_should_be_parseable: scan -PASS expression_should_be_parseable: scan: progressive -PASS expression_should_be_parseable: scan:interlace -PASS expression_should_not_be_parseable: min-scan:interlace -PASS expression_should_not_be_parseable: scan: 1 -PASS expression_should_not_be_parseable: max-scan -PASS expression_should_not_be_parseable: max-scan: progressive -PASS should_not_apply: (scan) -PASS should_not_apply: (scan: progressive) -PASS should_not_apply: (scan: interlace) -PASS should_apply: not all and (scan) -PASS should_apply: not all and (scan: progressive) -PASS should_apply: not all and (scan: interlace) -PASS expression_should_be_parseable: grid -PASS expression_should_be_parseable: grid: 0 -PASS expression_should_be_parseable: grid: 1 -PASS expression_should_not_be_parseable: min-grid -PASS expression_should_not_be_parseable: min-grid:0 -PASS expression_should_not_be_parseable: max-grid: 1 -PASS expression_should_not_be_parseable: grid: 2 -PASS expression_should_not_be_parseable: grid: -1 -PASS should_not_apply: (grid) -PASS should_apply: (grid: 0) -PASS should_not_apply: (grid: 1) -PASS should_not_apply: (grid: 2) -PASS should_not_apply: (grid: -1) -PASS should_apply: (orientation -PASS should_not_apply: not all and (orientation -PASS should_not_apply: (orientation: -PASS should_not_apply: (orientation:) -PASS should_not_apply: (orientation: ) -PASS should_apply: all,(orientation: -PASS should_not_apply: (orientation:,all -PASS should_apply: not all and (grid -PASS should_not_apply: only all and (grid -PASS should_not_apply: (grid -PASS should_apply: all,(grid -PASS should_not_apply: (grid,all -PASS should_apply: ,all -PASS should_apply: all, -PASS should_apply: ,all, -PASS should_apply: all,badmedium -PASS should_apply: badmedium,all -PASS should_not_apply: ,badmedium, -PASS should_apply: all,(badexpression) -PASS should_apply: (badexpression),all -PASS should_not_apply: (badexpression),badmedium -PASS should_not_apply: badmedium,(badexpression) -PASS should_apply: all,[badsyntax] -PASS should_apply: [badsyntax],all -PASS should_not_apply: badmedium,[badsyntax] -PASS should_not_apply: [badsyntax],badmedium -PASS query_should_not_be_parseable: all and color : -PASS query_should_not_be_parseable: all and color : 1 -PASS should_not_apply: all and min-color : 1 -PASS should_not_apply: (bogus) -PASS should_not_apply: not all and (bogus) -PASS should_not_apply: only all and (bogus) -FAIL expression_should_be_parseable: overflow-block assert_true: overflow-block expected true got false -FAIL expression_should_be_parseable: overflow-block: none assert_true: overflow-block: none expected true got false -FAIL expression_should_be_parseable: overflow-block: paged assert_true: overflow-block: paged expected true got false -FAIL expression_should_be_parseable: overflow-block: scroll assert_true: overflow-block: scroll expected true got false -FAIL expression_should_be_parseable: overflow-block: optional-paged assert_true: overflow-block: optional-paged expected true got false -PASS expression_should_not_be_parseable: overflow-block: some-random-invalid-thing -FAIL Sanity check for overflow-block assert_not_equals: overflow-block should be equivalent to not (overflow-block: none) got disallowed value false -FAIL expression_should_be_parseable: overflow-inline assert_true: overflow-inline expected true got false -FAIL expression_should_be_parseable: overflow-inline: none assert_true: overflow-inline: none expected true got false -FAIL expression_should_be_parseable: overflow-inline: scroll assert_true: overflow-inline: scroll expected true got false -PASS expression_should_not_be_parseable: overflow-inline: some-random-invalid-thing -FAIL Sanity check for overflow-inline assert_not_equals: overflow-inline should be equivalent to not (overflow-inline: none) got disallowed value false -PASS expression_should_be_parseable: hover -PASS expression_should_be_parseable: hover: hover -PASS expression_should_be_parseable: hover: none -PASS expression_should_be_parseable: any-hover -PASS expression_should_be_parseable: any-hover: hover -PASS expression_should_be_parseable: any-hover: none -PASS (hover) == (hover: hover) -PASS (hover) == not (hover: none) -PASS (any-hover) == (any-hover: hover) -PASS (any-hover) == not (any-hover: none) -PASS expression_should_be_parseable: pointer -PASS expression_should_be_parseable: pointer: coarse -PASS expression_should_be_parseable: pointer: fine -PASS expression_should_be_parseable: pointer: none -PASS expression_should_be_parseable: any-pointer -PASS expression_should_be_parseable: any-pointer: coarse -PASS expression_should_be_parseable: any-pointer: fine -PASS expression_should_be_parseable: any-pointer: none -PASS (pointer) == (pointer: coarse) or (pointer: fine) -PASS (pointer) == not (pointer: none) -PASS (any-pointer) == (any-pointer: coarse) or (any-pointer: fine) -PASS (any-pointer) == not (any-pointer: none) -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/wpt_internal/hid/README.md b/third_party/blink/web_tests/wpt_internal/hid/README.md new file mode 100644 index 0000000..147d8736 --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/hid/README.md
@@ -0,0 +1,19 @@ +# WebHID Testing + +Automated testing for the [WebHID API] uses [MojoJS] to override the +implementation of the [HidService] Mojo interface with a testing version in +`resources/hid-test-utils.js`. + +Most of these tests can be upstreamed to the Web Platform Tests repository by +creating an abstraction between the test cases and this Chromium-specific test +API similar to what has been done for [WebUSB] and [Web Serial]. + +Tests with the "-manual" suffix do not use the test-only interface and expect a +real hardware device to be connected. The specific characteristics of the device +are described in each test. + +[HidService]: ../../../public/mojom/hid/hid.mojom +[MojoJS]: ../../../../../docs/testing/web_platform_tests.md#mojojs +[WebHID API]: https://wicg.github.io/webhid +[WebUSB]: ../../external/wpt/webusb +[Web Serial]: ../../external/wpt/serial
diff --git a/third_party/blink/web_tests/wpt_internal/serial/README.md b/third_party/blink/web_tests/wpt_internal/serial/README.md new file mode 100644 index 0000000..ba532b19 --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/serial/README.md
@@ -0,0 +1,8 @@ +# Web Serial Testing + +This directory contains Chromium-specific tests for the [Web Serial API]. When +possible tests should be upstreamed to the +[equivalent Web Platform Tests directory] instead. + +[equivalent Web Platform Tests directory]: ../../external/wpt/serial +[Web Serial API]: https://wicg.github.io/serial
diff --git a/third_party/blink/web_tests/wpt_internal/webusb/README.md b/third_party/blink/web_tests/wpt_internal/webusb/README.md new file mode 100644 index 0000000..bd2b516b --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/webusb/README.md
@@ -0,0 +1,8 @@ +# WebUSB Testing + +This directory contains Chromium-specific tests for the [WebUSB API]. When +possible tests should be upstreamed to the +[equivalent Web Platform Tests directory] instead. + +[equivalent Web Platform Tests directory]: ../../external/wpt/webusb +[Web Serial API]: https://wicg.github.io/webusb
diff --git a/third_party/polymer/v3_0/chromium_dts.patch b/third_party/polymer/v3_0/chromium_dts.patch index 38c15b3..3712a190 100644 --- a/third_party/polymer/v3_0/chromium_dts.patch +++ b/third_party/polymer/v3_0/chromium_dts.patch
@@ -1,3 +1,23 @@ +diff --git a/components-chromium/iron-iconset-svg/iron-iconset-svg.d.ts b/components-chromium/iron-iconset-svg/iron-iconset-svg.d.ts +index 8dc9834e50cc9..68adde705cd4a 100644 +--- a/components-chromium/iron-iconset-svg/iron-iconset-svg.d.ts ++++ b/components-chromium/iron-iconset-svg/iron-iconset-svg.d.ts +@@ -104,6 +104,15 @@ interface IronIconsetSvgElement extends LegacyElementMixin, HTMLElement { + */ + applyIcon(element: Element|null, iconName: string): Element|null; + ++ /** ++ * Produce installable clone of the SVG element matching `id` in this ++ * iconset, or `undefined` if there is no matching element. ++ * @param iconName Name of the icon to apply. ++ * @param targetIsRTL Whether the target element is RTL. ++ * @return Returns an installable clone of the SVG element matching `id`. ++ */ ++ createIcon(iconName: string, targetIsRTL: boolean): Element|null; ++ + /** + * Remove an icon from the given element by undoing the changes effected + * by `applyIcon`. diff --git a/components-chromium/polymer/polymer.d.ts b/components-chromium/polymer/polymer.d.ts index a9f1aa64c5b8..a202c7fb06ba 100644 --- a/components-chromium/polymer/polymer.d.ts
diff --git a/third_party/polymer/v3_0/components-chromium/iron-iconset-svg/iron-iconset-svg.d.ts b/third_party/polymer/v3_0/components-chromium/iron-iconset-svg/iron-iconset-svg.d.ts index 8dc9834e..3f76923 100644 --- a/third_party/polymer/v3_0/components-chromium/iron-iconset-svg/iron-iconset-svg.d.ts +++ b/third_party/polymer/v3_0/components-chromium/iron-iconset-svg/iron-iconset-svg.d.ts
@@ -105,6 +105,15 @@ applyIcon(element: Element|null, iconName: string): Element|null; /** + * Produce installable clone of the SVG element matching `id` in this + * iconset, or `undefined` if there is no matching element. + * @param iconName Name of the icon to apply. + * @param targetIsRTL Whether the target element is RTL. + * @return Returns an installable clone of the SVG element matching `id`. + */ + createIcon(iconName: string, targetIsRTL: boolean): Element|null; + + /** * Remove an icon from the given element by undoing the changes effected * by `applyIcon`. *
diff --git a/tools/grit/minify_with_uglify.py b/tools/grit/minify_with_uglify.py index 5cfb04e..640e855d 100755 --- a/tools/grit/minify_with_uglify.py +++ b/tools/grit/minify_with_uglify.py
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # 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.
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml index 7161fe2..9a70073 100644 --- a/tools/metrics/histograms/enums.xml +++ b/tools/metrics/histograms/enums.xml
@@ -9076,6 +9076,11 @@ <int value="1" label="Error"/> </enum> +<enum name="BooleanEscaped"> + <int value="0" label="No Characters Escaped"/> + <int value="1" label="Escaped One or More Characters"/> +</enum> + <enum name="BooleanEverConnected"> <int value="0" label="Never connected"/> <int value="1" label="Previously connected"/> @@ -26383,6 +26388,8 @@ <int value="894" label="DeviceRestrictedManagedGuestSessionEnabled"/> <int value="895" label="PrintPostScriptMode"/> <int value="896" label="PrintPdfAsImageDefault"/> + <int value="897" label="FullRestoreEnabled"/> + <int value="898" label="GhostWindowEnabled"/> </enum> <enum name="EnterprisePolicyDeviceIdValidity"> @@ -47625,6 +47632,7 @@ label="OmniboxKeywordSpaceTriggeringSetting:disabled"/> <int value="-1898386671" label="PasswordCheck:enabled"/> <int value="-1898229093" label="WebApkGenerator:enabled"/> + <int value="-1898129939" label="U2fPermissionPrompt:enabled"/> <int value="-1897800883" label="OpenscreenCastStreamingSession:enabled"/> <int value="-1896871201" label="CrossOriginOpenerPolicyReporting:enabled"/> <int value="-1896733769" label="CheckOfflineCapability:disabled"/> @@ -47737,6 +47745,7 @@ <int value="-1827599944" label="QueryTilesLocalOrdering:enabled"/> <int value="-1826649921" label="ContextualSuggestionsButton:disabled"/> <int value="-1826309726" label="ArcCustomTabsExperiment:disabled"/> + <int value="-1824539611" label="U2fPermissionPrompt:disabled"/> <int value="-1823193038" label="QuietNotificationPrompts:disabled"/> <int value="-1823073826" label="TabGroupsSave:disabled"/> <int value="-1822825246" label="DragFromShelfToHomeOrOverview:enabled"/> @@ -84488,6 +84497,29 @@ <int value="1" label="Upload was offered for newly-seen card"/> </enum> +<enum name="URLHostEscapedChar"> + <int value="0" label="Unknown"/> + <int value="1" label="Space"/> + <int value="2" label="Bang"/> + <int value="3" label="DoubleQuote"/> + <int value="4" label="Hash"/> + <int value="5" label="Dollar"/> + <int value="6" label="Ampersand"/> + <int value="7" label="SingleQuote"/> + <int value="8" label="LeftParen"/> + <int value="9" label="RightParen"/> + <int value="10" label="Asterisk"/> + <int value="11" label="Comma"/> + <int value="12" label="LeftAngle"/> + <int value="13" label="Equals"/> + <int value="14" label="RightAngle"/> + <int value="15" label="At"/> + <int value="16" label="BackTick"/> + <int value="17" label="LeftCurly"/> + <int value="18" label="Pipe"/> + <int value="19" label="RightCurly"/> +</enum> + <enum name="URLRequestAnnotationType"> <!-- Not updated since 3/4/2018 as histogram is obsolete.-->
diff --git a/tools/metrics/histograms/metadata/chromeos/histograms.xml b/tools/metrics/histograms/metadata/chromeos/histograms.xml index 2a340ee..bec1dee 100644 --- a/tools/metrics/histograms/metadata/chromeos/histograms.xml +++ b/tools/metrics/histograms/metadata/chromeos/histograms.xml
@@ -32,6 +32,11 @@ <owner>cros-connectivity@google.com</owner> <owner>hsuregan@chromium.org</owner> </variant> + <variant name="FastPair" summary="Fast Pair"> + <owner>shanefitz@google.com</owner> + <owner>julietlevesque@google.com</owner> + <owner>chromeos-cross-device-eng@google.com</owner> + </variant> <variant name="Fingerprint" summary="fingerprint"> <owner>rsorokin@chromium.org</owner> <owner>tomhughes@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/content/histograms.xml b/tools/metrics/histograms/metadata/content/histograms.xml index 4a38126..66a0c02 100644 --- a/tools/metrics/histograms/metadata/content/histograms.xml +++ b/tools/metrics/histograms/metadata/content/histograms.xml
@@ -192,6 +192,16 @@ </summary> </histogram> +<histogram name="ContentSettings.DefaultAutoDarkWebContetntSetting" + enum="ContentSetting" expires_after="2022-06-19"> + <owner>wenyufu@chromium.org</owner> + <owner>src/components/permissions/PERMISSIONS_OWNERS</owner> + <summary> + The default auto dark web content setting at profile open. Recorded for + Android only. + </summary> +</histogram> + <histogram name="ContentSettings.DefaultAutoplaySetting" enum="ContentSetting" expires_after="2022-06-19"> <owner>engedy@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/histogram_suffixes_list.xml b/tools/metrics/histograms/metadata/histogram_suffixes_list.xml index 8a6cfc0..62bfbb90 100644 --- a/tools/metrics/histograms/metadata/histogram_suffixes_list.xml +++ b/tools/metrics/histograms/metadata/histogram_suffixes_list.xml
@@ -10310,7 +10310,11 @@ <suffix name="MostVisited" label="Loaded client-side suggestions."/> <suffix name="NewTab" label="NTP loaded on a new tab."/> <suffix name="Startup" label="NTP loaded during browser startup."/> - <suffix name="Web" label="Loaded server-side NTP."/> + <suffix name="Web" label="Loaded server-side NTP."> + <obsolete> + Removed in 09 2021. + </obsolete> + </suffix> <suffix name="WebUI3PNTP" label="Loaded 3P WebUI NTP."/> <suffix name="WebUINTP" label="Loaded WebUI NTP."/> <affected-histogram name="NewTabPage.LoadTime"/> @@ -10329,7 +10333,11 @@ Deprecated NTP replaced by WebUI NTP M91. </obsolete> </affected-histogram> - <affected-histogram name="NewTabPage.LoadTime.Web"/> + <affected-histogram name="NewTabPage.LoadTime.Web"> + <obsolete> + Removed in 09 2021. + </obsolete> + </affected-histogram> </histogram_suffixes> <histogram_suffixes name="NextTabState" separator="_"> @@ -15837,6 +15845,9 @@ </histogram_suffixes> <histogram_suffixes name="ServiceWorker_LookupRegistrationResult" separator="."> + <obsolete> + Removed in September 2021. + </obsolete> <suffix name="DoesNotExist" label="The registration doesn't exist."/> <suffix name="Error" label="Failed to look up the registration."/> <suffix name="Exists" label="The registration exists."/>
diff --git a/tools/metrics/histograms/metadata/history/histograms.xml b/tools/metrics/histograms/metadata/history/histograms.xml index a335b8e..963c13b 100644 --- a/tools/metrics/histograms/metadata/history/histograms.xml +++ b/tools/metrics/histograms/metadata/history/histograms.xml
@@ -790,7 +790,7 @@ </histogram> <histogram name="History.MonthlyURLCount" units="urls" - expires_after="2021-10-04"> + expires_after="2022-04-04"> <owner>mpearson@chromium.org</owner> <owner>sky@chromium.org</owner> <summary> @@ -936,7 +936,7 @@ </histogram> <histogram name="History.VisitTableCount" units="visits" - expires_after="2021-10-04"> + expires_after="2022-04-04"> <owner>mpearson@chromium.org</owner> <owner>sky@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/others/histograms.xml b/tools/metrics/histograms/metadata/others/histograms.xml index 6d41766..03d3724 100644 --- a/tools/metrics/histograms/metadata/others/histograms.xml +++ b/tools/metrics/histograms/metadata/others/histograms.xml
@@ -13274,7 +13274,9 @@ </histogram> <histogram name="Process.Sandbox.Launch.Error" enum="WinGetLastError" - expires_after="2021-10-04"> + expires_after="never"> +<!-- expires-never: metric needed for diagnosing sandbox issues. --> + <owner>forshaw@chromium.org</owner> <owner>wfh@chromium.org</owner> <summary> @@ -18435,6 +18437,29 @@ </summary> </histogram> +<histogram name="URL.Host.DidEscape" enum="BooleanEscaped" + expires_after="2022-09-09"> + <owner>wanderview@chromium.org</owner> + <owner>dcheng@chromium.org</owner> + <summary> + Measures whether DoSimpleHost() in url_canon_host.cc escaped any characters + in the ASCII table. This is recorded every time a URL hostname is + successfully parsed. + </summary> +</histogram> + +<histogram name="URL.Host.EscapeChar" enum="URLHostEscapedChar" + expires_after="2022-09-09"> + <owner>wanderview@chromium.org</owner> + <owner>dcheng@chromium.org</owner> + <summary> + This histogram records which ASCII characters are escaped in DoSimpleHost(). + Each escaped character is recorded separately, but only once for any + invocation of DoSimpleHost(). This can potentially be recorded every time a + URL hostname is parsed, but only if parsing escaped at least one character. + </summary> +</histogram> + <histogram name="UsageStats.Events" enum="UsageStatsEvents" expires_after="2021-11-14"> <owner>pnoland@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/service/histograms.xml b/tools/metrics/histograms/metadata/service/histograms.xml index 5f8f9f14..da3df55 100644 --- a/tools/metrics/histograms/metadata/service/histograms.xml +++ b/tools/metrics/histograms/metadata/service/histograms.xml
@@ -635,6 +635,9 @@ <histogram name="ServiceWorker.LookupRegistration.MainResource.Time" units="ms" expires_after="2022-09-20"> + <obsolete> + Removed in September 2021. + </obsolete> <owner>falken@chromium.org</owner> <owner>chrome-worker@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/software/histograms.xml b/tools/metrics/histograms/metadata/software/histograms.xml index 031d86e..b5cf64c4 100644 --- a/tools/metrics/histograms/metadata/software/histograms.xml +++ b/tools/metrics/histograms/metadata/software/histograms.xml
@@ -22,7 +22,7 @@ <histograms> <histogram name="SoftwareReporter.Cleaner.ChromePromptChannelError" - enum="SoftwareReporterChromePromptChannelError" expires_after="M95"> + enum="SoftwareReporterChromePromptChannelError" expires_after="2022-08-25"> <owner>drubery@chromium.org</owner> <owner>bdea@chromium.org</owner> <owner>chrome-safebrowsing-alerts@google.com</owner> @@ -35,7 +35,7 @@ </histogram> <histogram name="SoftwareReporter.Cleaner.CleaningTime" units="ms" - expires_after="M95"> + expires_after="2022-08-25"> <owner>drubery@chromium.org</owner> <owner>bdea@chromium.org</owner> <owner>chrome-safebrowsing-alerts@google.com</owner> @@ -49,6 +49,9 @@ <histogram name="SoftwareReporter.Cleaner.CleanupResult" enum="SoftwareReporterCleanupResult" expires_after="M95"> + <obsolete> + Removed 09-2021 + </obsolete> <owner>drubery@chromium.org</owner> <owner>bdea@chromium.org</owner> <owner>chrome-safebrowsing-alerts@google.com</owner> @@ -61,6 +64,9 @@ <histogram name="SoftwareReporter.Cleaner.DownloadStatus" enum="SoftwareReporterCleanerDownloadStatus" expires_after="M95"> + <obsolete> + Removed 09-2021 + </obsolete> <owner>drubery@chromium.org</owner> <owner>bdea@chromium.org</owner> <owner>chrome-safebrowsing-alerts@google.com</owner> @@ -72,7 +78,7 @@ </histogram> <histogram name="SoftwareReporter.Cleaner.DownloadStatusErrorCode" - enum="CombinedHttpResponseAndNetErrorCode" expires_after="M95"> + enum="CombinedHttpResponseAndNetErrorCode" expires_after="2022-08-25"> <owner>drubery@chromium.org</owner> <owner>bdea@chromium.org</owner> <owner>chrome-safebrowsing-alerts@google.com</owner> @@ -85,6 +91,9 @@ <histogram name="SoftwareReporter.Cleaner.HasRebooted" enum="BooleanRebooted" expires_after="M95"> + <obsolete> + Removed 09-2021 + </obsolete> <owner>drubery@chromium.org</owner> <owner>bdea@chromium.org</owner> <owner>chrome-safebrowsing-alerts@google.com</owner> @@ -97,6 +106,9 @@ <histogram name="SoftwareReporter.Cleaner.RebootResponse" enum="Boolean" expires_after="M95"> + <obsolete> + Removed 09-2021 + </obsolete> <owner>drubery@chromium.org</owner> <owner>bdea@chromium.org</owner> <owner>chrome-safebrowsing-alerts@google.com</owner> @@ -111,7 +123,7 @@ </histogram> <histogram name="SoftwareReporter.Cleaner.RunningTime" units="ms" - expires_after="M95"> + expires_after="2022-08-25"> <owner>drubery@chromium.org</owner> <owner>bdea@chromium.org</owner> <owner>chrome-safebrowsing-alerts@google.com</owner> @@ -123,7 +135,7 @@ </histogram> <histogram name="SoftwareReporter.Cleaner.ScanningTime" units="ms" - expires_after="M95"> + expires_after="2022-08-25"> <owner>drubery@chromium.org</owner> <owner>bdea@chromium.org</owner> <owner>chrome-safebrowsing-alerts@google.com</owner> @@ -138,6 +150,9 @@ <histogram name="SoftwareReporter.Cleaner.SettingsPageActiveOnRebootRequired" enum="SoftwareReporterCleanerSettingsPageActiveOnRebootRequired" expires_after="M95"> + <obsolete> + Removed 09-2021 + </obsolete> <owner>drubery@chromium.org</owner> <owner>bdea@chromium.org</owner> <owner>chrome-safebrowsing-alerts@google.com</owner> @@ -160,7 +175,7 @@ </histogram> <histogram name="SoftwareReporter.CleanerLogsAcceptance" enum="BooleanAccepted" - expires_after="M95"> + expires_after="2022-08-25"> <owner>drubery@chromium.org</owner> <owner>bdea@chromium.org</owner> <owner>chrome-safebrowsing-alerts@google.com</owner> @@ -175,6 +190,9 @@ <histogram name="SoftwareReporter.CleanupCard" enum="Boolean" expires_after="M95"> + <obsolete> + Removed 09-2021 + </obsolete> <owner>drubery@chromium.org</owner> <owner>bdea@chromium.org</owner> <owner>chrome-safebrowsing-alerts@google.com</owner> @@ -186,7 +204,7 @@ </histogram> <histogram name="SoftwareReporter.CleanupStarted" - enum="SoftwareReporterCleanupStarted" expires_after="M95"> + enum="SoftwareReporterCleanupStarted" expires_after="2022-08-25"> <owner>drubery@chromium.org</owner> <owner>bdea@chromium.org</owner> <owner>chrome-safebrowsing-alerts@google.com</owner> @@ -314,7 +332,7 @@ </histogram> <histogram name="SoftwareReporter.NoPromptReason" - enum="SoftwareReporterNoPromptReason" expires_after="M95"> + enum="SoftwareReporterNoPromptReason" expires_after="2022-08-25"> <owner>drubery@chromium.org</owner> <owner>bdea@chromium.org</owner> <owner>chrome-safebrowsing-alerts@google.com</owner> @@ -328,6 +346,9 @@ <histogram name="SoftwareReporter.NumberOfFilesToDelete" units="counts" expires_after="M95"> + <obsolete> + Removed 09-2021 + </obsolete> <owner>drubery@chromium.org</owner> <owner>bdea@chromium.org</owner> <owner>chrome-safebrowsing-alerts@google.com</owner>
diff --git a/tools/metrics/histograms/metadata/stability/histograms.xml b/tools/metrics/histograms/metadata/stability/histograms.xml index ac9d77d..17602af 100644 --- a/tools/metrics/histograms/metadata/stability/histograms.xml +++ b/tools/metrics/histograms/metadata/stability/histograms.xml
@@ -313,6 +313,9 @@ <histogram name="Stability.Experimental.BrowserCrash" enum="Boolean" expires_after="2021-10-31"> + <obsolete> + Removed 2021/09 + </obsolete> <owner>asvitkine@chromium.org</owner> <owner>chrome-metrics-team@google.com</owner> <summary> @@ -336,6 +339,9 @@ <histogram name="Stability.Experimental.Counts2" enum="StabilityEventType" expires_after="2021-10-31"> + <obsolete> + Removed 2021/09 + </obsolete> <owner>asvitkine@chromium.org</owner> <owner>chrome-metrics-team@google.com</owner> <summary> @@ -359,6 +365,9 @@ <histogram name="Stability.Experimental.ProcessId" units="process id" expires_after="2021-10-31"> + <obsolete> + Removed 2021/09 + </obsolete> <owner>asvitkine@chromium.org</owner> <owner>chrome-metrics-team@google.com</owner> <summary> @@ -369,6 +378,9 @@ <histogram name="Stability.Experimental.RandInt" units="random number" expires_after="2021-10-31"> + <obsolete> + Removed 2021/09 + </obsolete> <owner>asvitkine@chromium.org</owner> <owner>chrome-metrics-team@google.com</owner> <summary> @@ -378,6 +390,9 @@ <histogram name="Stability.Experimental.SessionId" units="session id" expires_after="2021-10-31"> + <obsolete> + Removed 2021/09 + </obsolete> <owner>asvitkine@chromium.org</owner> <owner>chrome-metrics-team@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/startup/histograms.xml b/tools/metrics/histograms/metadata/startup/histograms.xml index 9cdfb1b..c159615 100644 --- a/tools/metrics/histograms/metadata/startup/histograms.xml +++ b/tools/metrics/histograms/metadata/startup/histograms.xml
@@ -529,6 +529,21 @@ </summary> </histogram> +<histogram base="true" name="Startup.DoUpgradeTasks.{Status}" units="ms" + expires_after="M99"> + <owner>gab@chromium.org</owner> + <owner>etienneb@chromium.org</owner> + <summary> + Records the time it took to complete upgrade_util::DoUpgradeTasks() when + {Status}. + </summary> + <token key="Status"> + <variant name="NoRelaunch"/> + <variant name="RelaunchFailed"/> + <variant name="RelaunchSucceeded"/> + </token> +</histogram> + <histogram name="Startup.FirstWebContents.FinishReason" enum="StartupProfilingFinishReason" expires_after="never"> <!-- expires-never: used to understand user behavior shifts when Startup.FirstWebContents.NonEmptyPaint3 regresses -->
diff --git a/tools/metrics/histograms/metadata/tab/histograms.xml b/tools/metrics/histograms/metadata/tab/histograms.xml index 3697453..2d50ebe0 100644 --- a/tools/metrics/histograms/metadata/tab/histograms.xml +++ b/tools/metrics/histograms/metadata/tab/histograms.xml
@@ -113,27 +113,33 @@ <histogram name="Tab.Count.Guest" units="units" expires_after="2022-02-06"> <owner>rhalavati@chromium.org</owner> - <owner>chrome-privacy-core@google.com</owner> + <owner>chrome-incognito@google.com</owner> <summary> Number of open tabs in each guest window. Recorded once a new tab in a guest window is opened and adds one to the bucket of number of tabs in that particular window (it does not count the total number of tabs in all open guest windows). Please note that this metric double counts the lower numbers, meaning that if user opens three tabs (without closing any in - between), then buckets 1, 2, and 3 will all be incremented in turn. + between), then buckets 1, 2, and 3 will all be incremented in turn. The + metric also overcounts the tabs that are moved from one window to another as + they are recorded both when they are created in the first window and when + they are added to the second window. </summary> </histogram> <histogram name="Tab.Count.Incognito" units="units" expires_after="2022-02-06"> <owner>rhalavati@chromium.org</owner> - <owner>chrome-privacy-core@google.com</owner> + <owner>chrome-incognito@google.com</owner> <summary> Number of open tabs in each incognito window. Recorded once a new tab is opened in an incognito window and adds one to the bucket of number of tabs in that particular window (it does not count the total number of tabs in all open incognito windows). Please note that this metric double counts the lower numbers, meaning that if user opens three tabs (without closing any in - between), then buckets 1, 2, and 3 will all be incremented in turn. + between), then buckets 1, 2, and 3 will all be incremented in turn. The + metric also overcounts the tabs that are moved from one window to another as + they are recorded both when they are created in the first window and when + they are added to the second window. </summary> </histogram>
diff --git a/tools/metrics/histograms/metadata/translate/histograms.xml b/tools/metrics/histograms/metadata/translate/histograms.xml index db1eca35..e40aab8 100644 --- a/tools/metrics/histograms/metadata/translate/histograms.xml +++ b/tools/metrics/histograms/metadata/translate/histograms.xml
@@ -568,7 +568,7 @@ </histogram> <histogram name="Translate.PageLoad.AutofillAssistantDeferredTriggerDecision" - enum="BooleanDeferred" expires_after="M105"> + enum="BooleanDeferred" expires_after="2022-06-30"> <owner>curranmax@google.com</owner> <owner>megjablon@google.com</owner> <owner>chrome-language@google.com</owner> @@ -581,7 +581,7 @@ </histogram> <histogram name="Translate.PageLoad.FinalSourceLanguage" - enum="LocaleCodeISO639" expires_after="2022-02-20"> + enum="LocaleCodeISO639" expires_after="2022-06-30"> <owner>curranmax@google.com</owner> <owner>megjablon@google.com</owner> <owner>chrome-language@google.com</owner> @@ -595,7 +595,7 @@ </histogram> <histogram name="Translate.PageLoad.FinalState" enum="TranslateState" - expires_after="2022-02-20"> + expires_after="2022-06-30"> <owner>curranmax@google.com</owner> <owner>megjablon@google.com</owner> <owner>chrome-language@google.com</owner> @@ -609,7 +609,7 @@ </histogram> <histogram name="Translate.PageLoad.FinalTargetLanguage" - enum="LocaleCodeISO639" expires_after="2021-10-10"> + enum="LocaleCodeISO639" expires_after="2022-06-30"> <owner>curranmax@google.com</owner> <owner>megjablon@google.com</owner> <owner>chrome-language@google.com</owner> @@ -623,7 +623,7 @@ </histogram> <histogram name="Translate.PageLoad.HrefHint.TriggerDecision" - enum="TranslateTriggerDecision" expires_after="M105"> + enum="TranslateTriggerDecision" expires_after="2022-06-30"> <owner>curranmax@google.com</owner> <owner>megjablon@google.com</owner> <owner>chrome-language@google.com</owner> @@ -636,7 +636,7 @@ </histogram> <histogram name="Translate.PageLoad.InitialSourceLanguage" - enum="LocaleCodeISO639" expires_after="M105"> + enum="LocaleCodeISO639" expires_after="2022-06-30"> <owner>curranmax@google.com</owner> <owner>megjablon@google.com</owner> <owner>chrome-language@google.com</owner> @@ -650,7 +650,7 @@ </histogram> <histogram name="Translate.PageLoad.InitialState" enum="TranslateState" - expires_after="2022-02-20"> + expires_after="2022-06-30"> <owner>curranmax@google.com</owner> <owner>megjablon@google.com</owner> <owner>chrome-language@google.com</owner> @@ -664,7 +664,7 @@ </histogram> <histogram name="Translate.PageLoad.InitialTargetLanguage" - enum="LocaleCodeISO639" expires_after="2021-12-19"> + enum="LocaleCodeISO639" expires_after="2022-06-30"> <owner>curranmax@google.com</owner> <owner>megjablon@google.com</owner> <owner>chrome-language@google.com</owner> @@ -678,7 +678,7 @@ </histogram> <histogram name="Translate.PageLoad.InitialTargetLanguage.Origin" - enum="TranslateTargetLanguageOrigin" expires_after="M95"> + enum="TranslateTargetLanguageOrigin" expires_after="2022-06-30"> <owner>curranmax@google.com</owner> <owner>megjablon@google.com</owner> <owner>chrome-language@google.com</owner> @@ -693,7 +693,7 @@ <histogram name="Translate.PageLoad.IsInitialSourceLanguageInUsersContentLanguages" - enum="Boolean" expires_after="2021-10-31"> + enum="Boolean" expires_after="2022-06-30"> <owner>curranmax@google.com</owner> <owner>megjablon@google.com</owner> <owner>chrome-language@google.com</owner> @@ -708,7 +708,7 @@ </histogram> <histogram name="Translate.PageLoad.NumReversions" units="reversions" - expires_after="2022-02-20"> + expires_after="2022-06-30"> <owner>curranmax@google.com</owner> <owner>megjablon@google.com</owner> <owner>chrome-language@google.com</owner> @@ -721,7 +721,7 @@ </histogram> <histogram name="Translate.PageLoad.NumTargetLanguageChanges" - units="target language changes" expires_after="2021-12-12"> + units="target language changes" expires_after="2022-06-30"> <owner>curranmax@google.com</owner> <owner>megjablon@google.com</owner> <owner>chrome-language@google.com</owner> @@ -734,7 +734,7 @@ </histogram> <histogram name="Translate.PageLoad.NumTranslations" units="translations" - expires_after="2021-12-12"> + expires_after="2022-06-30"> <owner>curranmax@google.com</owner> <owner>megjablon@google.com</owner> <owner>chrome-language@google.com</owner> @@ -746,7 +746,7 @@ </histogram> <histogram name="Translate.PageLoad.Ranker.Decision" - enum="TranslateRankerDecision" expires_after="2021-12-12"> + enum="TranslateRankerDecision" expires_after="2022-06-30"> <owner>curranmax@google.com</owner> <owner>megjablon@google.com</owner> <owner>chrome-language@google.com</owner> @@ -759,7 +759,7 @@ </histogram> <histogram name="Translate.PageLoad.Ranker.Timer.ShouldOfferTranslation" - units="ms" expires_after="M95"> + units="ms" expires_after="2022-06-30"> <owner>curranmax@google.com</owner> <owner>megjablon@google.com</owner> <owner>chrome-language@google.com</owner> @@ -773,7 +773,7 @@ </histogram> <histogram name="Translate.PageLoad.Ranker.Version" units="version" - expires_after="2021-12-12"> + expires_after="2022-06-30"> <owner>curranmax@google.com</owner> <owner>megjablon@google.com</owner> <owner>chrome-language@google.com</owner> @@ -785,7 +785,7 @@ </histogram> <histogram name="Translate.PageLoad.TriggerDecision" - enum="TranslateTriggerDecision" expires_after="2022-02-20"> + enum="TranslateTriggerDecision" expires_after="2022-06-30"> <owner>curranmax@google.com</owner> <owner>megjablon@google.com</owner> <owner>chrome-language@google.com</owner> @@ -822,8 +822,8 @@ units="trigger decisions" expires_after="M92"> <obsolete> Removed M92. This histogram was used to estimate the impact of masking on - Translate.PageLoad.TriggerDecision. We found that masking w as having - minimal impact, so this histogram is no longer needed. + Translate.PageLoad.TriggerDecision. We found that masking was having minimal + impact, so this histogram is no longer needed. </obsolete> <owner>curranmax@google.com</owner> <owner>megjablon@google.com</owner> @@ -1134,7 +1134,7 @@ </histogram> <histogram name="Translate.Translation.LanguageDetection.ContentLength" - units="characters" expires_after="2021-12-12"> + units="characters" expires_after="2022-06-30"> <owner>megjablon@chromium.org</owner> <owner>chrome-language@google.com</owner> <summary> @@ -1145,7 +1145,7 @@ </histogram> <histogram name="Translate.Translation.SourceLanguage" enum="LocaleCodeISO639" - expires_after="M98"> + expires_after="2022-06-30"> <owner>curranmax@google.com</owner> <owner>megjablon@google.com</owner> <owner>chrome-language@google.com</owner> @@ -1158,7 +1158,7 @@ </histogram> <histogram name="Translate.Translation.Status" enum="TranslationStatus" - expires_after="2022-02-06"> + expires_after="2022-06-30"> <owner>curranmax@google.com</owner> <owner>megjablon@google.com</owner> <owner>chrome-language@google.com</owner> @@ -1178,7 +1178,7 @@ </histogram> <histogram name="Translate.Translation.TargetLanguage" enum="LocaleCodeISO639" - expires_after="M98"> + expires_after="2022-06-30"> <owner>curranmax@google.com</owner> <owner>megjablon@google.com</owner> <owner>chrome-language@google.com</owner> @@ -1191,7 +1191,7 @@ </histogram> <histogram name="Translate.Translation.TargetLanguage.Origin" - enum="TranslateTargetLanguageOrigin" expires_after="M95"> + enum="TranslateTargetLanguageOrigin" expires_after="2022-06-30"> <owner>curranmax@google.com</owner> <owner>megjablon@google.com</owner> <owner>chrome-language@google.com</owner> @@ -1203,7 +1203,7 @@ </histogram> <histogram name="Translate.Translation.TimeToBeReady" units="ms" - expires_after="M106"> + expires_after="2022-06-30"> <owner>curranmax@google.com</owner> <owner>megjablon@google.com</owner> <owner>chrome-language@google.com</owner> @@ -1216,7 +1216,7 @@ </histogram> <histogram name="Translate.Translation.TimeToLoad" units="ms" - expires_after="M106"> + expires_after="2022-06-30"> <owner>curranmax@google.com</owner> <owner>megjablon@google.com</owner> <owner>chrome-language@google.com</owner> @@ -1229,7 +1229,7 @@ </histogram> <histogram name="Translate.Translation.TimeToTranslate" units="ms" - expires_after="M106"> + expires_after="2022-06-30"> <owner>curranmax@google.com</owner> <owner>megjablon@google.com</owner> <owner>chrome-language@google.com</owner> @@ -1242,7 +1242,7 @@ </histogram> <histogram name="Translate.Translation.Type" enum="TranslationType" - expires_after="M98"> + expires_after="2022-06-30"> <owner>curranmax@google.com</owner> <owner>megjablon@google.com</owner> <owner>chrome-language@google.com</owner> @@ -1256,7 +1256,7 @@ </histogram> <histogram name="Translate.UiInteraction.Event" enum="TranslateUIInteraction" - expires_after="M95"> + expires_after="2022-06-30"> <owner>curranmax@google.com</owner> <owner>megjablon@google.com</owner> <owner>chrome-language@google.com</owner>
diff --git a/tools/metrics/histograms/metadata/uma/histograms.xml b/tools/metrics/histograms/metadata/uma/histograms.xml index 1687ad60..3adcb10 100644 --- a/tools/metrics/histograms/metadata/uma/histograms.xml +++ b/tools/metrics/histograms/metadata/uma/histograms.xml
@@ -284,6 +284,9 @@ <histogram name="UMA.FileMetricsProvider.MergeHistogram.{Type}" enum="HistogramNameHash" expires_after="2021-10-31"> + <obsolete> + Removed 2021/09 + </obsolete> <owner>asvitkine@chromium.org</owner> <owner>chrome-metrics-team@google.com</owner> <summary> @@ -500,6 +503,9 @@ <histogram name="UMA.MetricsService.Initialize" enum="Boolean" expires_after="2021-10-31"> + <obsolete> + Removed 2021/09 + </obsolete> <owner>rkaplow@chromium.org</owner> <owner>src/base/metrics/OWNERS</owner> <summary> @@ -577,6 +583,9 @@ <histogram name="UMA.PersistentHistograms.DriveType" enum="WindowsDriveType" expires_after="2021-10-31"> + <obsolete> + Removed 2021/09 + </obsolete> <owner>asvitkine@chromium.org</owner> <owner>chrome-metrics-team@google.com</owner> <summary> @@ -588,6 +597,9 @@ <histogram name="UMA.PersistentHistograms.HistogramsInStartupFile" enum="HistogramNameHash" expires_after="2021-10-31"> + <obsolete> + Removed 2021/09 + </obsolete> <owner>asvitkine@chromium.org</owner> <owner>chrome-metrics-team@google.com</owner> <summary>
diff --git a/tools/perf/core/perfetto_binary_roller/binary_deps.json b/tools/perf/core/perfetto_binary_roller/binary_deps.json index 1654831..d8931bc 100644 --- a/tools/perf/core/perfetto_binary_roller/binary_deps.json +++ b/tools/perf/core/perfetto_binary_roller/binary_deps.json
@@ -5,8 +5,8 @@ "remote_path": "perfetto_binaries/trace_processor_shell/linux_arm/49b4b5dcbc312d8d2c3751cf29238b8efeb4e494/trace_processor_shell" }, "win": { - "hash": "f7fee3c2e09aa645cecef22d34222162495e4043", - "remote_path": "perfetto_binaries/trace_processor_shell/win/8f0fabf54bc923165ac47bc1b7de45b9eee0ff3d/trace_processor_shell.exe" + "hash": "c0ed1dac3cbdb4125dd767839049204911a7bec0", + "remote_path": "perfetto_binaries/trace_processor_shell/win/09e840c057c0fb891c3d29168ddc656d40b56e86/trace_processor_shell.exe" }, "mac": { "hash": "8495324ae7e10a679c39808028860364fc49b90d", @@ -17,8 +17,8 @@ "remote_path": "perfetto_binaries/trace_processor_shell/linux_arm64/49b4b5dcbc312d8d2c3751cf29238b8efeb4e494/trace_processor_shell" }, "linux": { - "hash": "0a894350c17c22987d16050cfab0fa165eb98697", - "remote_path": "perfetto_binaries/trace_processor_shell/linux/8f0fabf54bc923165ac47bc1b7de45b9eee0ff3d/trace_processor_shell" + "hash": "af5144ebded815e04e9efaeec665e7b89556e34c", + "remote_path": "perfetto_binaries/trace_processor_shell/linux/09e840c057c0fb891c3d29168ddc656d40b56e86/trace_processor_shell" } }, "power_profile.sql": {
diff --git a/ui/accessibility/platform/ax_platform_node_mac.h b/ui/accessibility/platform/ax_platform_node_mac.h index 3bc41f6..bd5762a 100644 --- a/ui/accessibility/platform/ax_platform_node_mac.h +++ b/ui/accessibility/platform/ax_platform_node_mac.h
@@ -29,10 +29,10 @@ void Destroy() override; bool IsPlatformCheckable() const override; - // Sets node cooca to the platform node, which takes ownership on it. Returns - // unowned old node, the caller must take the ownership. - void SwapNodeCocoa(base::scoped_nsobject<AXPlatformNodeCocoa>& node) { - native_node_.swap(node); + AXPlatformNodeCocoa* GetNativeWrapper() const { return native_node_.get(); } + + void SetNativeWrapper(AXPlatformNodeCocoa* native_node) { + return native_node_.reset(native_node); } protected:
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn index ae61e09..e4328f0 100644 --- a/ui/base/BUILD.gn +++ b/ui/base/BUILD.gn
@@ -438,6 +438,7 @@ "//base", "//skia", "//third_party/abseil-cpp:absl", + "//ui/color:color_headers", "//ui/gfx", "//ui/gfx/geometry", ]
diff --git a/ui/base/DEPS b/ui/base/DEPS index 32d9216..753260a 100644 --- a/ui/base/DEPS +++ b/ui/base/DEPS
@@ -7,6 +7,7 @@ "+third_party/skia", "+third_party/zlib", "+ui/base/ui_base_jni_headers", + "+ui/color", "+ui/display", "+ui/events", "+ui/gfx",
diff --git a/ui/base/ime/ash/component_extension_ime_manager.cc b/ui/base/ime/ash/component_extension_ime_manager.cc index a50c7b9..3394f4e 100644 --- a/ui/base/ime/ash/component_extension_ime_manager.cc +++ b/ui/base/ime/ash/component_extension_ime_manager.cc
@@ -12,15 +12,14 @@ #include "base/trace_event/trace_event.h" #include "ui/base/ime/ash/extension_ime_util.h" -namespace chromeos { - +namespace ash { namespace { // Gets the input method category according to the given input method id. // This is used for sorting a list of input methods. int GetInputMethodCategory(const std::string& id) { const std::string engine_id = - chromeos::extension_ime_util::GetComponentIDByInputMethodID(id); + extension_ime_util::GetComponentIDByInputMethodID(id); if (base::StartsWith(engine_id, "xkb:", base::CompareCase::SENSITIVE)) return 0; if (base::StartsWith(engine_id, "vkd_", base::CompareCase::SENSITIVE)) @@ -161,4 +160,4 @@ return true; } -} // namespace chromeos +} // namespace ash
diff --git a/ui/base/ime/ash/component_extension_ime_manager.h b/ui/base/ime/ash/component_extension_ime_manager.h index a4286de..9def169 100644 --- a/ui/base/ime/ash/component_extension_ime_manager.h +++ b/ui/base/ime/ash/component_extension_ime_manager.h
@@ -17,7 +17,7 @@ class Profile; -namespace chromeos { +namespace ash { // Represents an engine in component extension IME. struct COMPONENT_EXPORT(UI_BASE_IME_ASH) ComponentExtensionEngine { @@ -103,14 +103,13 @@ std::set<std::string> input_method_id_set_; }; -} // namespace chromeos - -// TODO(https://crbug.com/1164001): remove when moved to ash. -namespace ash { -using ::chromeos::ComponentExtensionEngine; -using ::chromeos::ComponentExtensionIME; -using ::chromeos::ComponentExtensionIMEManager; -using ::chromeos::ComponentExtensionIMEManagerDelegate; } // namespace ash +// TODO(https://crbug.com/1164001): remove when the migration is finished. +namespace chromeos { +using ::ash::ComponentExtensionEngine; +using ::ash::ComponentExtensionIME; +using ::ash::ComponentExtensionIMEManager; +} // namespace chromeos + #endif // UI_BASE_IME_ASH_COMPONENT_EXTENSION_IME_MANAGER_H_
diff --git a/ui/base/ime/ash/component_extension_ime_manager_delegate.h b/ui/base/ime/ash/component_extension_ime_manager_delegate.h index e436d34..3f751faa 100644 --- a/ui/base/ime/ash/component_extension_ime_manager_delegate.h +++ b/ui/base/ime/ash/component_extension_ime_manager_delegate.h
@@ -11,8 +11,7 @@ class Profile; -namespace chromeos { - +namespace ash { struct ComponentExtensionIME; // Provides an interface to list/load/unload for component extension IME. @@ -33,11 +32,11 @@ virtual bool IsInLoginLayoutAllowlist(const std::string& layout) = 0; }; -} // namespace chromeos - -// TODO(https://crbug.com/1164001): remove when moved to ash. -namespace ash { -using ::chromeos::ComponentExtensionIMEManagerDelegate; } // namespace ash +// TODO(https://crbug.com/1164001): remove when the migration is finished. +namespace chromeos { +using ::ash::ComponentExtensionIMEManagerDelegate; +} + #endif // UI_BASE_IME_ASH_COMPONENT_EXTENSION_IME_MANAGER_DELEGATE_H_
diff --git a/ui/base/ime/ash/component_extension_ime_manager_unittest.cc b/ui/base/ime/ash/component_extension_ime_manager_unittest.cc index 1f9005fe..aa3f87c5 100644 --- a/ui/base/ime/ash/component_extension_ime_manager_unittest.cc +++ b/ui/base/ime/ash/component_extension_ime_manager_unittest.cc
@@ -12,9 +12,8 @@ #include "ui/base/ime/ash/extension_ime_util.h" #include "ui/base/ime/ash/mock_component_extension_ime_manager_delegate.h" -namespace chromeos { +namespace ash { namespace input_method { - namespace { class ComponentExtensionIMEManagerTest : public testing::Test { @@ -203,6 +202,5 @@ } } // namespace - } // namespace input_method -} // namespace chromeos +} // namespace ash
diff --git a/ui/base/ime/ash/extension_ime_util.cc b/ui/base/ime/ash/extension_ime_util.cc index 55025ef..b0d643b 100644 --- a/ui/base/ime/ash/extension_ime_util.cc +++ b/ui/base/ime/ash/extension_ime_util.cc
@@ -8,8 +8,7 @@ #include "base/strings/string_util.h" #include "build/branding_buildflags.h" -namespace chromeos { - +namespace ash { namespace { const char kExtensionIMEPrefix[] = "_ext_ime_"; @@ -179,4 +178,4 @@ } } // namespace extension_ime_util -} // namespace chromeos +} // namespace ash
diff --git a/ui/base/ime/ash/extension_ime_util.h b/ui/base/ime/ash/extension_ime_util.h index 0279e048c..475533b 100644 --- a/ui/base/ime/ash/extension_ime_util.h +++ b/ui/base/ime/ash/extension_ime_util.h
@@ -10,7 +10,7 @@ #include "base/auto_reset.h" #include "base/component_export.h" -namespace chromeos { +namespace ash { // Extension IME related utilities. namespace extension_ime_util { @@ -105,32 +105,15 @@ IsExperimentalMultilingual(const std::string& input_method_id); } // namespace extension_ime_util -} // namespace chromeos - -// TODO(https://crbug.com/1164001): remove when moved to ash. -namespace ash { -namespace extension_ime_util { -using ::chromeos::extension_ime_util::GetArcInputMethodID; -using ::chromeos::extension_ime_util::GetComponentIDByInputMethodID; -using ::chromeos::extension_ime_util::GetComponentInputMethodID; -using ::chromeos::extension_ime_util::GetExtensionIDFromInputMethodID; -using ::chromeos::extension_ime_util::GetInputMethodID; -using ::chromeos::extension_ime_util::GetInputMethodIDByEngineID; -using ::chromeos::extension_ime_util::IsArcIME; -using ::chromeos::extension_ime_util::IsComponentExtensionIME; -using ::chromeos::extension_ime_util::IsExperimentalMultilingual; -using ::chromeos::extension_ime_util::IsExtensionIME; -using ::chromeos::extension_ime_util::kBrailleImeEngineId; -using ::chromeos::extension_ime_util::kBrailleImeExtensionId; -using ::chromeos::extension_ime_util::kChineseCangjieExtensionId; -using ::chromeos::extension_ime_util::kChinesePinyinExtensionId; -using ::chromeos::extension_ime_util::kChineseZhuyinExtensionId; -using ::chromeos::extension_ime_util::kHangulExtensionId; -using ::chromeos::extension_ime_util::kM17nExtensionId; -using ::chromeos::extension_ime_util::kMozcExtensionId; -using ::chromeos::extension_ime_util::kT13nExtensionId; -using ::chromeos::extension_ime_util::kXkbExtensionId; -} // namespace extension_ime_util } // namespace ash +// TODO(https://crbug.com/1164001): remove when the migration is finished. +namespace chromeos { +namespace extension_ime_util { +using ::ash::extension_ime_util::GetInputMethodIDByEngineID; +using ::ash::extension_ime_util::kMozcExtensionId; +using ::ash::extension_ime_util::kXkbExtensionId; +} // namespace extension_ime_util +} // namespace chromeos + #endif // UI_BASE_IME_ASH_EXTENSION_IME_UTIL_H_
diff --git a/ui/base/ime/ash/extension_ime_util_unittest.cc b/ui/base/ime/ash/extension_ime_util_unittest.cc index 5defec5dc..0ee3b6c 100644 --- a/ui/base/ime/ash/extension_ime_util_unittest.cc +++ b/ui/base/ime/ash/extension_ime_util_unittest.cc
@@ -10,7 +10,7 @@ #include "build/branding_buildflags.h" #include "testing/gtest/include/gtest/gtest.h" -namespace chromeos { +namespace ash { TEST(ExtensionIMEUtilTest, GetInputMethodIDTest) { EXPECT_EQ("_ext_ime_ABCDE12345", @@ -110,4 +110,4 @@ "experimental_hello_world"}))); } -} // namespace chromeos +} // namespace ash
diff --git a/ui/base/ime/ash/fake_ime_keyboard.cc b/ui/base/ime/ash/fake_ime_keyboard.cc index 6fc6432..2eec4982 100644 --- a/ui/base/ime/ash/fake_ime_keyboard.cc +++ b/ui/base/ime/ash/fake_ime_keyboard.cc
@@ -4,7 +4,7 @@ #include "ui/base/ime/ash/fake_ime_keyboard.h" -namespace chromeos { +namespace ash { namespace input_method { FakeImeKeyboard::FakeImeKeyboard() @@ -55,4 +55,4 @@ } } // namespace input_method -} // namespace chromeos +} // namespace ash
diff --git a/ui/base/ime/ash/fake_ime_keyboard.h b/ui/base/ime/ash/fake_ime_keyboard.h index 058e675..45fb558 100644 --- a/ui/base/ime/ash/fake_ime_keyboard.h +++ b/ui/base/ime/ash/fake_ime_keyboard.h
@@ -13,7 +13,7 @@ #include "base/component_export.h" #include "base/macros.h" -namespace chromeos { +namespace ash { namespace input_method { class COMPONENT_EXPORT(UI_BASE_IME_ASH) FakeImeKeyboard : public ImeKeyboard { @@ -42,13 +42,13 @@ }; } // namespace input_method -} // namespace chromeos - -// TODO(https://crbug.com/1164001): remove when moved to ash. -namespace ash { -namespace input_method { -using ::chromeos::input_method::FakeImeKeyboard; -} // namespace input_method } // namespace ash +// TODO(https://crbug.com/1164001): remove when the migration is finished. +namespace chromeos { +namespace input_method { +using ::ash::input_method::FakeImeKeyboard; +} +} // namespace chromeos + #endif // UI_BASE_IME_ASH_FAKE_IME_KEYBOARD_H_
diff --git a/ui/base/ime/ash/fake_input_method_delegate.cc b/ui/base/ime/ash/fake_input_method_delegate.cc index 01d3ce03..8e4ee2a34 100644 --- a/ui/base/ime/ash/fake_input_method_delegate.cc +++ b/ui/base/ime/ash/fake_input_method_delegate.cc
@@ -4,7 +4,7 @@ #include "ui/base/ime/ash/fake_input_method_delegate.h" -namespace chromeos { +namespace ash { namespace input_method { FakeInputMethodDelegate::FakeInputMethodDelegate() @@ -37,4 +37,4 @@ } } // namespace input_method -} // namespace chromeos +} // namespace ash
diff --git a/ui/base/ime/ash/fake_input_method_delegate.h b/ui/base/ime/ash/fake_input_method_delegate.h index dd87305..a2af775 100644 --- a/ui/base/ime/ash/fake_input_method_delegate.h +++ b/ui/base/ime/ash/fake_input_method_delegate.h
@@ -13,7 +13,7 @@ #include "base/macros.h" #include "ui/base/ime/ash/input_method_delegate.h" -namespace chromeos { +namespace ash { namespace input_method { class COMPONENT_EXPORT(UI_BASE_IME_ASH) FakeInputMethodDelegate @@ -64,13 +64,6 @@ }; } // namespace input_method -} // namespace chromeos - -// TODO(https://crbug.com/1164001): remove when moved to ash. -namespace ash { -namespace input_method { -using ::chromeos::input_method::FakeInputMethodDelegate; -} // namespace input_method } // namespace ash #endif // UI_BASE_IME_ASH_FAKE_INPUT_METHOD_DELEGATE_H_
diff --git a/ui/base/ime/ash/ime_assistive_window_handler_interface.h b/ui/base/ime/ash/ime_assistive_window_handler_interface.h index 3ec406f..6d4c4659 100644 --- a/ui/base/ime/ash/ime_assistive_window_handler_interface.h +++ b/ui/base/ime/ash/ime_assistive_window_handler_interface.h
@@ -12,12 +12,6 @@ #include "base/component_export.h" #include "ui/gfx/geometry/rect.h" -namespace ash { -namespace input_method { -struct AssistiveWindowProperties; -} // namespace input_method -} // namespace ash - namespace ui { namespace ime { struct AssistiveWindowButton; @@ -25,7 +19,10 @@ } // namespace ime } // namespace ui -namespace chromeos { +namespace ash { +namespace input_method { +struct AssistiveWindowProperties; +} // Contains bounds for windows controlled by handler. struct Bounds { @@ -44,7 +41,7 @@ // Called when showing/hiding assistive window. virtual void SetAssistiveWindowProperties( - const ash::input_method::AssistiveWindowProperties& window) {} + const input_method::AssistiveWindowProperties& window) {} virtual void ShowSuggestion(const ui::ime::SuggestionDetails& details) {} @@ -77,12 +74,6 @@ IMEAssistiveWindowHandlerInterface() = default; }; -} // namespace chromeos - -// TODO(https://crbug.com/1164001): remove when moved to ash. -namespace ash { -using ::chromeos::Bounds; -using ::chromeos::IMEAssistiveWindowHandlerInterface; } // namespace ash #endif // UI_BASE_IME_ASH_IME_ASSISTIVE_WINDOW_HANDLER_INTERFACE_H_
diff --git a/ui/base/ime/ash/ime_bridge.cc b/ui/base/ime/ash/ime_bridge.cc index 2a1d893b..315072b 100644 --- a/ui/base/ime/ash/ime_bridge.cc +++ b/ui/base/ime/ash/ime_bridge.cc
@@ -83,24 +83,24 @@ // IMEBridge override. void SetCandidateWindowHandler( - chromeos::IMECandidateWindowHandlerInterface* handler) override { + ash::IMECandidateWindowHandlerInterface* handler) override { candidate_window_handler_ = handler; } // IMEBridge override. - chromeos::IMECandidateWindowHandlerInterface* GetCandidateWindowHandler() + ash::IMECandidateWindowHandlerInterface* GetCandidateWindowHandler() const override { return candidate_window_handler_; } // IMEBridge override. void SetAssistiveWindowHandler( - chromeos::IMEAssistiveWindowHandlerInterface* handler) override { + ash::IMEAssistiveWindowHandlerInterface* handler) override { assistive_window_handler_ = handler; } // IMEBridge override. - chromeos::IMEAssistiveWindowHandlerInterface* GetAssistiveWindowHandler() + ash::IMEAssistiveWindowHandlerInterface* GetAssistiveWindowHandler() const override { return assistive_window_handler_; } @@ -111,10 +111,8 @@ base::ObserverList<IMEBridgeObserver> observers_; IMEEngineHandlerInterface::InputContext current_input_context_; - chromeos::IMECandidateWindowHandlerInterface* candidate_window_handler_ = - nullptr; - chromeos::IMEAssistiveWindowHandlerInterface* assistive_window_handler_ = - nullptr; + ash::IMECandidateWindowHandlerInterface* candidate_window_handler_ = nullptr; + ash::IMEAssistiveWindowHandlerInterface* assistive_window_handler_ = nullptr; }; ///////////////////////////////////////////////////////////////////////////////
diff --git a/ui/base/ime/ash/ime_bridge.h b/ui/base/ime/ash/ime_bridge.h index a987541b..491fe8d 100644 --- a/ui/base/ime/ash/ime_bridge.h +++ b/ui/base/ime/ash/ime_bridge.h
@@ -73,18 +73,18 @@ // Returns current CandidateWindowHandler. This function returns nullptr if // current candidate window is not ready to use. - virtual chromeos::IMECandidateWindowHandlerInterface* - GetCandidateWindowHandler() const = 0; + virtual ash::IMECandidateWindowHandlerInterface* GetCandidateWindowHandler() + const = 0; // Updates current CandidatWindowHandler. If there is no active candidate // window service, pass nullptr for |handler|. Caller must release |handler|. virtual void SetCandidateWindowHandler( - chromeos::IMECandidateWindowHandlerInterface* handler) = 0; + ash::IMECandidateWindowHandlerInterface* handler) = 0; - virtual chromeos::IMEAssistiveWindowHandlerInterface* - GetAssistiveWindowHandler() const = 0; + virtual ash::IMEAssistiveWindowHandlerInterface* GetAssistiveWindowHandler() + const = 0; virtual void SetAssistiveWindowHandler( - chromeos::IMEAssistiveWindowHandlerInterface* handler) = 0; + ash::IMEAssistiveWindowHandlerInterface* handler) = 0; protected: IMEBridge();
diff --git a/ui/base/ime/ash/ime_candidate_window_handler_interface.h b/ui/base/ime/ash/ime_candidate_window_handler_interface.h index 037292e..d3ca53b 100644 --- a/ui/base/ime/ash/ime_candidate_window_handler_interface.h +++ b/ui/base/ime/ash/ime_candidate_window_handler_interface.h
@@ -19,7 +19,7 @@ class CandidateWindow; } // namespace ui -namespace chromeos { +namespace ash { // A interface to handle the candidate window related method call. class COMPONENT_EXPORT(UI_BASE_IME_ASH) IMECandidateWindowHandlerInterface { @@ -51,11 +51,6 @@ IMECandidateWindowHandlerInterface() = default; }; -} // namespace chromeos - -// TODO(https://crbug.com/1164001): remove when moved to ash. -namespace ash { -using ::chromeos::IMECandidateWindowHandlerInterface; } // namespace ash #endif // UI_BASE_IME_ASH_IME_CANDIDATE_WINDOW_HANDLER_INTERFACE_H_
diff --git a/ui/base/ime/ash/ime_keyboard.cc b/ui/base/ime/ash/ime_keyboard.cc index 1bf9d166..0d2fbf85 100644 --- a/ui/base/ime/ash/ime_keyboard.cc +++ b/ui/base/ime/ash/ime_keyboard.cc
@@ -6,7 +6,7 @@ #include "ui/base/ime/ash/ime_keyboard.h" -namespace chromeos { +namespace ash { namespace input_method { namespace { @@ -111,4 +111,4 @@ } } // namespace input_method -} // namespace chromeos +} // namespace ash
diff --git a/ui/base/ime/ash/ime_keyboard.h b/ui/base/ime/ash/ime_keyboard.h index c81eec1..7994dfa 100644 --- a/ui/base/ime/ash/ime_keyboard.h +++ b/ui/base/ime/ash/ime_keyboard.h
@@ -11,7 +11,7 @@ #include "base/component_export.h" #include "base/observer_list.h" -namespace chromeos { +namespace ash { namespace input_method { struct AutoRepeatRate { @@ -99,14 +99,12 @@ }; } // namespace input_method -} // namespace chromeos - -// TODO(https://crbug.com/1164001): remove when moved to ash. -namespace ash { -namespace input_method { -using ::chromeos::input_method::AutoRepeatRate; -using ::chromeos::input_method::ImeKeyboard; -} // namespace input_method } // namespace ash +namespace chromeos { +namespace input_method { +using ::ash::input_method::AutoRepeatRate; +} +} // namespace chromeos + #endif // UI_BASE_IME_ASH_IME_KEYBOARD_H_
diff --git a/ui/base/ime/ash/ime_keyboard_impl.cc b/ui/base/ime/ash/ime_keyboard_impl.cc index 70149d4..72ed054 100644 --- a/ui/base/ime/ash/ime_keyboard_impl.cc +++ b/ui/base/ime/ash/ime_keyboard_impl.cc
@@ -6,7 +6,7 @@ #include "ui/ozone/public/input_controller.h" -namespace chromeos { +namespace ash { namespace input_method { ImeKeyboardImpl::ImeKeyboardImpl(ui::InputController* input_controller) @@ -60,4 +60,4 @@ } } // namespace input_method -} // namespace chromeos +} // namespace ash
diff --git a/ui/base/ime/ash/ime_keyboard_impl.h b/ui/base/ime/ash/ime_keyboard_impl.h index 55d2f99..9946f08d 100644 --- a/ui/base/ime/ash/ime_keyboard_impl.h +++ b/ui/base/ime/ash/ime_keyboard_impl.h
@@ -13,7 +13,7 @@ class InputController; } // namespace ui -namespace chromeos { +namespace ash { namespace input_method { // Version of ImeKeyboard used when chrome is run on device. @@ -42,13 +42,6 @@ }; } // namespace input_method -} // namespace chromeos - -// TODO(https://crbug.com/1164001): remove when moved to ash. -namespace ash { -namespace input_method { -using ::chromeos::input_method::ImeKeyboardImpl; -} // namespace input_method } // namespace ash #endif // UI_BASE_IME_ASH_IME_KEYBOARD_IMPL_H_
diff --git a/ui/base/ime/ash/ime_keyboard_unittest.cc b/ui/base/ime/ash/ime_keyboard_unittest.cc index bb858db..36eb4dc1 100644 --- a/ui/base/ime/ash/ime_keyboard_unittest.cc +++ b/ui/base/ime/ash/ime_keyboard_unittest.cc
@@ -7,7 +7,7 @@ #include "testing/gtest/include/gtest/gtest.h" #include "ui/base/ime/ash/fake_ime_keyboard.h" -namespace chromeos { +namespace ash { namespace input_method { namespace { @@ -54,4 +54,4 @@ } // namespace } // namespace input_method -} // namespace chromeos +} // namespace ash
diff --git a/ui/base/ime/ash/ime_keymap.h b/ui/base/ime/ash/ime_keymap.h index 9f167b9..01d307e 100644 --- a/ui/base/ime/ash/ime_keymap.h +++ b/ui/base/ime/ash/ime_keymap.h
@@ -6,6 +6,7 @@ #define UI_BASE_IME_ASH_IME_KEYMAP_H_ #include <string> + #include "base/component_export.h" #include "ui/events/keycodes/keyboard_codes.h"
diff --git a/ui/base/ime/ash/ime_keyset.h b/ui/base/ime/ash/ime_keyset.h index a095fefd..5a2e8f86 100644 --- a/ui/base/ime/ash/ime_keyset.h +++ b/ui/base/ime/ash/ime_keyset.h
@@ -5,7 +5,7 @@ #ifndef UI_BASE_IME_ASH_IME_KEYSET_H_ #define UI_BASE_IME_ASH_IME_KEYSET_H_ -namespace chromeos { +namespace ash { namespace input_method { // Used by the virtual keyboard to represent different key layouts for @@ -19,13 +19,6 @@ }; } // namespace input_method -} // namespace chromeos - -// TODO(https://crbug.com/1164001): remove when moved to ash. -namespace ash { -namespace input_method { -using ::chromeos::input_method::ImeKeyset; -} // namespace input_method } // namespace ash #endif // UI_BASE_IME_ASH_IME_KEYSET_H_
diff --git a/ui/base/ime/ash/input_method_ash.cc b/ui/base/ime/ash/input_method_ash.cc index e28522f..b5d9659 100644 --- a/ui/base/ime/ash/input_method_ash.cc +++ b/ui/base/ime/ash/input_method_ash.cc
@@ -74,10 +74,9 @@ // For OS_CHROMEOS build of Chrome running on Linux, the IME keyboard cannot // track the Caps Lock state by itself, so need to call SetCapsLockEnabled() // method to reflect the Caps Lock state by the key event. - chromeos::input_method::InputMethodManager* manager = - chromeos::input_method::InputMethodManager::Get(); + auto* manager = ash::input_method::InputMethodManager::Get(); if (manager) { - chromeos::input_method::ImeKeyboard* keyboard = manager->GetImeKeyboard(); + ash::input_method::ImeKeyboard* keyboard = manager->GetImeKeyboard(); if (keyboard && event->type() == ET_KEY_PRESSED && event->key_code() != ui::VKEY_CAPITAL && keyboard->CapsLockIsEnabled() != event->IsCapsLockOn()) { @@ -92,7 +91,7 @@ // VKEY_CONVERT: Henkan key // VKEY_NONCONVERT: Muhenkan key // VKEY_DBE_SBCSCHAR/VKEY_DBE_DBCSCHAR: ZenkakuHankaku key - chromeos::input_method::InputMethodManager::State* state = + ash::input_method::InputMethodManager::State* state = manager->GetActiveIMEState().get(); if (event->type() == ET_KEY_PRESSED && state) { bool language_input_key = true; @@ -208,9 +207,9 @@ if (GetEngine()) GetEngine()->SetCompositionBounds(GetCompositionBounds(client)); - chromeos::IMECandidateWindowHandlerInterface* candidate_window = + ash::IMECandidateWindowHandlerInterface* candidate_window = ui::IMEBridge::Get()->GetCandidateWindowHandler(); - chromeos::IMEAssistiveWindowHandlerInterface* assistive_window = + ash::IMEAssistiveWindowHandlerInterface* assistive_window = ui::IMEBridge::Get()->GetAssistiveWindowHandler(); if (!candidate_window && !assistive_window) return; @@ -229,7 +228,7 @@ candidate_window->SetCursorBounds(caret_rect, composition_head); if (assistive_window) { - chromeos::Bounds bounds; + ash::Bounds bounds; bounds.caret = caret_rect; bounds.autocorrect = client->GetAutocorrectCharacterBounds(); client->GetCompositionCharacterBounds(0, &bounds.composition_text); @@ -282,8 +281,7 @@ } VirtualKeyboardController* InputMethodAsh::GetVirtualKeyboardController() { - chromeos::input_method::InputMethodManager* manager = - chromeos::input_method::InputMethodManager::Get(); + auto* manager = ash::input_method::InputMethodManager::Get(); if (manager) { if (auto* controller = manager->GetVirtualKeyboardController()) return controller; @@ -486,13 +484,13 @@ // Propagate the focus event to the candidate window handler which also // manages the input method mode indicator. - chromeos::IMECandidateWindowHandlerInterface* candidate_window = + ash::IMECandidateWindowHandlerInterface* candidate_window = ui::IMEBridge::Get()->GetCandidateWindowHandler(); if (candidate_window) candidate_window->FocusStateChanged(!IsPasswordOrNoneInputFieldFocused()); // Propagate focus event to assistive window handler. - chromeos::IMEAssistiveWindowHandlerInterface* assistive_window = + ash::IMEAssistiveWindowHandlerInterface* assistive_window = ui::IMEBridge::Get()->GetAssistiveWindowHandler(); if (assistive_window) assistive_window->FocusStateChanged(); @@ -715,7 +713,7 @@ return; if (!CanComposeInline()) { - chromeos::IMECandidateWindowHandlerInterface* candidate_window = + ash::IMECandidateWindowHandlerInterface* candidate_window = ui::IMEBridge::Get()->GetCandidateWindowHandler(); if (candidate_window) candidate_window->UpdatePreeditText(text.text, cursor_pos, visible);
diff --git a/ui/base/ime/ash/input_method_ash_unittest.cc b/ui/base/ime/ash/input_method_ash_unittest.cc index 7360f86f..bd8aec4 100644 --- a/ui/base/ime/ash/input_method_ash_unittest.cc +++ b/ui/base/ime/ash/input_method_ash_unittest.cc
@@ -135,7 +135,7 @@ }; class TestInputMethodManager - : public chromeos::input_method::MockInputMethodManager { + : public ash::input_method::MockInputMethodManager { class TestState : public MockInputMethodManager::State { public: TestState() { Reset(); } @@ -192,7 +192,7 @@ DISALLOW_COPY_AND_ASSIGN(TestInputMethodManager); }; -class NiceMockIMEEngine : public chromeos::MockIMEEngineHandler { +class NiceMockIMEEngine : public ash::MockIMEEngineHandler { public: MOCK_METHOD1(FocusIn, void(const InputContext&)); MOCK_METHOD0(FocusOut, void()); @@ -218,12 +218,11 @@ void SetUp() override { IMEBridge::Initialize(); - mock_ime_engine_handler_ = - std::make_unique<chromeos::MockIMEEngineHandler>(); + mock_ime_engine_handler_ = std::make_unique<ash::MockIMEEngineHandler>(); IMEBridge::Get()->SetCurrentEngineHandler(mock_ime_engine_handler_.get()); mock_ime_candidate_window_handler_ = - std::make_unique<chromeos::MockIMECandidateWindowHandler>(); + std::make_unique<ash::MockIMECandidateWindowHandler>(); IMEBridge::Get()->SetCandidateWindowHandler( mock_ime_candidate_window_handler_.get()); @@ -232,8 +231,7 @@ // InputMethodManager owns and delete it in InputMethodManager::Shutdown(). input_method_manager_ = new TestInputMethodManager(); - chromeos::input_method::InputMethodManager::Initialize( - input_method_manager_); + ash::input_method::InputMethodManager::Initialize(input_method_manager_); } void TearDown() override { @@ -245,7 +243,7 @@ mock_ime_engine_handler_.reset(); mock_ime_candidate_window_handler_.reset(); IMEBridge::Shutdown(); - chromeos::input_method::InputMethodManager::Shutdown(); + ash::input_method::InputMethodManager::Shutdown(); ResetFlags(); } @@ -369,8 +367,8 @@ gfx::Range selection_range_; std::u16string surrounding_text_; - std::unique_ptr<chromeos::MockIMEEngineHandler> mock_ime_engine_handler_; - std::unique_ptr<chromeos::MockIMECandidateWindowHandler> + std::unique_ptr<ash::MockIMEEngineHandler> mock_ime_engine_handler_; + std::unique_ptr<ash::MockIMECandidateWindowHandler> mock_ime_candidate_window_handler_; bool stop_propagation_post_ime_; @@ -570,11 +568,11 @@ const std::u16string kSampleAsciiText = u"Sample Text"; const uint32_t kCursorPos = 2UL; - CompositionText chromeos_composition_text; - chromeos_composition_text.text = kSampleAsciiText; + CompositionText ash_composition_text; + ash_composition_text.text = kSampleAsciiText; CompositionText composition_text = - ime_->ExtractCompositionText(chromeos_composition_text, kCursorPos); + ime_->ExtractCompositionText(ash_composition_text, kCursorPos); EXPECT_EQ(kSampleAsciiText, composition_text.text); // If there is no selection, |selection| represents cursor position. EXPECT_EQ(kCursorPos, composition_text.selection.start()); @@ -592,7 +590,7 @@ TEST_F(InputMethodAshTest, ExtractCompositionTextTest_SingleUnderline) { const uint32_t kCursorPos = 2UL; - // Set up chromeos composition text with one underline attribute. + // Set up Ash composition text with one underline attribute. CompositionText composition_text; composition_text.text = kSampleText; ImeTextSpan underline(ImeTextSpan::Type::kComposition, 1UL, 4UL, @@ -624,7 +622,7 @@ TEST_F(InputMethodAshTest, ExtractCompositionTextTest_DoubleUnderline) { const uint32_t kCursorPos = 2UL; - // Set up chromeos composition text with one underline attribute. + // Set up Ash composition text with one underline attribute. CompositionText composition_text; composition_text.text = kSampleText; ImeTextSpan underline(ImeTextSpan::Type::kComposition, 1UL, 4UL, @@ -656,7 +654,7 @@ TEST_F(InputMethodAshTest, ExtractCompositionTextTest_ErrorUnderline) { const uint32_t kCursorPos = 2UL; - // Set up chromeos composition text with one underline attribute. + // Set up Ash composition text with one underline attribute. CompositionText composition_text; composition_text.text = kSampleText; ImeTextSpan underline(ImeTextSpan::Type::kComposition, 1UL, 4UL, @@ -685,7 +683,7 @@ TEST_F(InputMethodAshTest, ExtractCompositionTextTest_Selection) { const uint32_t kCursorPos = 2UL; - // Set up chromeos composition text with one underline attribute. + // Set up Ash composition text with one underline attribute. CompositionText composition_text; composition_text.text = kSampleText; composition_text.selection.set_start(1UL); @@ -713,7 +711,7 @@ ExtractCompositionTextTest_SelectionStartWithCursor) { const uint32_t kCursorPos = 1UL; - // Set up chromeos composition text with one underline attribute. + // Set up Ash composition text with one underline attribute. CompositionText composition_text; composition_text.text = kSampleText; composition_text.selection.set_start(kCursorPos); @@ -744,7 +742,7 @@ TEST_F(InputMethodAshTest, ExtractCompositionTextTest_SelectionEndWithCursor) { const uint32_t kCursorPos = 4UL; - // Set up chromeos composition text with one underline attribute. + // Set up Ash composition text with one underline attribute. CompositionText composition_text; composition_text.text = kSampleText; composition_text.selection.set_start(1UL);
diff --git a/ui/base/ime/ash/input_method_delegate.h b/ui/base/ime/ash/input_method_delegate.h index af372a6..416680d 100644 --- a/ui/base/ime/ash/input_method_delegate.h +++ b/ui/base/ime/ash/input_method_delegate.h
@@ -9,7 +9,7 @@ #include "base/macros.h" -namespace chromeos { +namespace ash { namespace input_method { // Provides access to read/persist Input Method-related properties. @@ -41,13 +41,6 @@ }; } // namespace input_method -} // namespace chromeos - -// TODO(https://crbug.com/1164001): remove when moved to ash. -namespace ash { -namespace input_method { -using ::chromeos::input_method::InputMethodDelegate; -} // namespace input_method } // namespace ash #endif // UI_BASE_IME_ASH_INPUT_METHOD_DELEGATE_H_
diff --git a/ui/base/ime/ash/input_method_descriptor.cc b/ui/base/ime/ash/input_method_descriptor.cc index d940c88..8632038 100644 --- a/ui/base/ime/ash/input_method_descriptor.cc +++ b/ui/base/ime/ash/input_method_descriptor.cc
@@ -13,7 +13,7 @@ #include "ui/base/ime/ash/extension_ime_util.h" #include "url/gurl.h" -namespace chromeos { +namespace ash { namespace input_method { InputMethodDescriptor::InputMethodDescriptor( @@ -61,4 +61,4 @@ InputMethodDescriptor::~InputMethodDescriptor() = default; } // namespace input_method -} // namespace chromeos +} // namespace ash
diff --git a/ui/base/ime/ash/input_method_descriptor.h b/ui/base/ime/ash/input_method_descriptor.h index 9cb4aba33..824a9ee 100644 --- a/ui/base/ime/ash/input_method_descriptor.h +++ b/ui/base/ime/ash/input_method_descriptor.h
@@ -11,7 +11,7 @@ #include "base/component_export.h" #include "url/gurl.h" -namespace chromeos { +namespace ash { namespace input_method { // A structure which represents an input method. @@ -80,15 +80,14 @@ using InputMethodDescriptors = std::vector<InputMethodDescriptor>; } // namespace input_method -} // namespace chromeos - -// TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos -// source migration is finished. -namespace ash { -namespace input_method { -using ::chromeos::input_method::InputMethodDescriptor; -using ::chromeos::input_method::InputMethodDescriptors; -} } // namespace ash +// TODO(https://crbug.com/1164001): remove when the migration is finished. +namespace chromeos { +namespace input_method { +using ::ash::input_method::InputMethodDescriptor; +using ::ash::input_method::InputMethodDescriptors; +} // namespace input_method +} // namespace chromeos + #endif // UI_BASE_IME_ASH_INPUT_METHOD_DESCRIPTOR_H_
diff --git a/ui/base/ime/ash/input_method_descriptor_unittest.cc b/ui/base/ime/ash/input_method_descriptor_unittest.cc index 0438bc6..025655b3 100644 --- a/ui/base/ime/ash/input_method_descriptor_unittest.cc +++ b/ui/base/ime/ash/input_method_descriptor_unittest.cc
@@ -11,12 +11,12 @@ #include "testing/gtest/include/gtest/gtest.h" #include "ui/base/ime/ash/extension_ime_util.h" -using base::ASCIIToUTF16; - -namespace chromeos { +namespace ash { namespace input_method { namespace { +using ::base::ASCIIToUTF16; + InputMethodDescriptor CreateDesc(const std::string& id, const std::string& layout, const std::vector<std::string>& language_codes, @@ -82,4 +82,4 @@ } // namespace } // namespace input_method -} // namespace chromeos +} // namespace ash
diff --git a/ui/base/ime/ash/input_method_manager.cc b/ui/base/ime/ash/input_method_manager.cc index 8ac71ad..816ae1a 100644 --- a/ui/base/ime/ash/input_method_manager.cc +++ b/ui/base/ime/ash/input_method_manager.cc
@@ -6,7 +6,7 @@ #include "base/check.h" -namespace chromeos { +namespace ash { namespace input_method { namespace { @@ -41,4 +41,4 @@ } } // namespace input_method -} // namespace chromeos +} // namespace ash
diff --git a/ui/base/ime/ash/input_method_manager.h b/ui/base/ime/ash/input_method_manager.h index b0472394..e07b456 100644 --- a/ui/base/ime/ash/input_method_manager.h +++ b/ui/base/ime/ash/input_method_manager.h
@@ -26,7 +26,7 @@ class VirtualKeyboardController; } // namespace ui -namespace chromeos { +namespace ash { class ComponentExtensionIMEManager; namespace input_method { class InputMethodUtil; @@ -370,14 +370,13 @@ }; } // namespace input_method -} // namespace chromeos - -// TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos -// source migration is finished. -namespace ash { -namespace input_method { -using ::chromeos::input_method::InputMethodManager; -} } // namespace ash +// TODO(https://crbug.com/1164001): remove when the migration is finished. +namespace chromeos { +namespace input_method { +using ::ash::input_method::InputMethodManager; +} +} // namespace chromeos + #endif // UI_BASE_IME_ASH_INPUT_METHOD_MANAGER_H_
diff --git a/ui/base/ime/ash/input_method_util.cc b/ui/base/ime/ash/input_method_util.cc index 74dbd37..1be32af5 100644 --- a/ui/base/ime/ash/input_method_util.cc +++ b/ui/base/ime/ash/input_method_util.cc
@@ -26,6 +26,9 @@ #include "ui/base/l10n/l10n_util.h" #include "ui/chromeos/strings/grit/ui_chromeos_strings.h" +namespace ash { +namespace input_method { + namespace { // A mapping from an input method id to a resource id for a @@ -37,20 +40,20 @@ const char* engine_id; const int resource_id; } kMappingImeIdToMediumLenNameResourceId[] = { - { "hangul_2set", IDS_LANGUAGES_MEDIUM_LEN_NAME_KOREAN }, - { "hangul_3set390", IDS_LANGUAGES_MEDIUM_LEN_NAME_KOREAN }, - { "hangul_3setfinal", IDS_LANGUAGES_MEDIUM_LEN_NAME_KOREAN }, - { "hangul_3setnoshift", IDS_LANGUAGES_MEDIUM_LEN_NAME_KOREAN }, - { "hangul_3setromaja", IDS_LANGUAGES_MEDIUM_LEN_NAME_KOREAN }, - { "zh-t-i0-pinyin", IDS_LANGUAGES_MEDIUM_LEN_NAME_CHINESE_SIMPLIFIED}, - { "zh-t-i0-wubi-1986", IDS_LANGUAGES_MEDIUM_LEN_NAME_CHINESE_SIMPLIFIED }, - { "zh-hant-t-i0-und", IDS_LANGUAGES_MEDIUM_LEN_NAME_CHINESE_TRADITIONAL }, - { "zh-hant-t-i0-cangjie-1987", - IDS_LANGUAGES_MEDIUM_LEN_NAME_CHINESE_TRADITIONAL }, - { "zh-hant-t-i0-cangjie-1987-x-m0-simplified", - IDS_LANGUAGES_MEDIUM_LEN_NAME_CHINESE_TRADITIONAL }, - { chromeos::extension_ime_util::kBrailleImeEngineId, - IDS_LANGUAGES_MEDIUM_LEN_NAME_BRAILLE }, + {"hangul_2set", IDS_LANGUAGES_MEDIUM_LEN_NAME_KOREAN}, + {"hangul_3set390", IDS_LANGUAGES_MEDIUM_LEN_NAME_KOREAN}, + {"hangul_3setfinal", IDS_LANGUAGES_MEDIUM_LEN_NAME_KOREAN}, + {"hangul_3setnoshift", IDS_LANGUAGES_MEDIUM_LEN_NAME_KOREAN}, + {"hangul_3setromaja", IDS_LANGUAGES_MEDIUM_LEN_NAME_KOREAN}, + {"zh-t-i0-pinyin", IDS_LANGUAGES_MEDIUM_LEN_NAME_CHINESE_SIMPLIFIED}, + {"zh-t-i0-wubi-1986", IDS_LANGUAGES_MEDIUM_LEN_NAME_CHINESE_SIMPLIFIED}, + {"zh-hant-t-i0-und", IDS_LANGUAGES_MEDIUM_LEN_NAME_CHINESE_TRADITIONAL}, + {"zh-hant-t-i0-cangjie-1987", + IDS_LANGUAGES_MEDIUM_LEN_NAME_CHINESE_TRADITIONAL}, + {"zh-hant-t-i0-cangjie-1987-x-m0-simplified", + IDS_LANGUAGES_MEDIUM_LEN_NAME_CHINESE_TRADITIONAL}, + {extension_ime_util::kBrailleImeEngineId, + IDS_LANGUAGES_MEDIUM_LEN_NAME_BRAILLE}, }; // Due to asynchronous initialization of component extension manager, @@ -382,10 +385,6 @@ } // namespace -namespace chromeos { - -namespace input_method { - InputMethodUtil::InputMethodUtil(InputMethodDelegate* delegate) : delegate_(delegate) { InputMethodDescriptors default_input_methods; @@ -800,4 +799,4 @@ } } // namespace input_method -} // namespace chromeos +} // namespace ash
diff --git a/ui/base/ime/ash/input_method_util.h b/ui/base/ime/ash/input_method_util.h index 95855bd..25c9847a 100644 --- a/ui/base/ime/ash/input_method_util.h +++ b/ui/base/ime/ash/input_method_util.h
@@ -17,7 +17,7 @@ #include "base/threading/thread_checker.h" #include "ui/base/ime/ash/input_method_descriptor.h" -namespace chromeos { +namespace ash { namespace input_method { class InputMethodDelegate; @@ -199,14 +199,14 @@ }; } // namespace input_method -} // namespace chromeos - -// TODO(https://crbug.com/1164001): remove when moved to ash. -namespace ash { -namespace input_method { -using ::chromeos::input_method::InputMethodUtil; -using ::chromeos::input_method::kKeyboardLayoutsOnly; -} // namespace input_method } // namespace ash +// TODO(https://crbug.com/1164001): remove when the migration is finished. +namespace chromeos { +namespace input_method { +using ::ash::input_method::InputMethodUtil; +using ::ash::input_method::kKeyboardLayoutsOnly; +} // namespace input_method +} // namespace chromeos + #endif // UI_BASE_IME_ASH_INPUT_METHOD_UTIL_H_
diff --git a/ui/base/ime/ash/input_method_util_unittest.cc b/ui/base/ime/ash/input_method_util_unittest.cc index 1ad6ba3..bd794a3 100644 --- a/ui/base/ime/ash/input_method_util_unittest.cc +++ b/ui/base/ime/ash/input_method_util_unittest.cc
@@ -18,10 +18,7 @@ #include "ui/base/ime/ash/input_method_manager.h" #include "ui/base/l10n/l10n_util.h" -using base::ASCIIToUTF16; - -namespace chromeos { - +namespace ash { namespace input_method { namespace { @@ -377,4 +374,4 @@ } } // namespace input_method -} // namespace chromeos +} // namespace ash
diff --git a/ui/base/ime/ash/mock_component_extension_ime_manager.cc b/ui/base/ime/ash/mock_component_extension_ime_manager.cc index 11cdeed..599c5a7 100644 --- a/ui/base/ime/ash/mock_component_extension_ime_manager.cc +++ b/ui/base/ime/ash/mock_component_extension_ime_manager.cc
@@ -4,11 +4,11 @@ #include "ui/base/ime/ash/mock_component_extension_ime_manager.h" -namespace chromeos { +namespace ash { input_method::InputMethodDescriptors MockComponentExtensionIMEManager::GetXkbIMEAsInputMethodDescriptor() { return input_method::InputMethodDescriptors(); } -} // namespace chromeos +} // namespace ash
diff --git a/ui/base/ime/ash/mock_component_extension_ime_manager.h b/ui/base/ime/ash/mock_component_extension_ime_manager.h index f846374d..dd294b3 100644 --- a/ui/base/ime/ash/mock_component_extension_ime_manager.h +++ b/ui/base/ime/ash/mock_component_extension_ime_manager.h
@@ -8,7 +8,7 @@ #include "base/component_export.h" #include "ui/base/ime/ash/component_extension_ime_manager.h" -namespace chromeos { +namespace ash { class COMPONENT_EXPORT(UI_BASE_IME_ASH) MockComponentExtensionIMEManager : public ComponentExtensionIMEManager { @@ -17,6 +17,6 @@ override; }; -} // namespace chromeos +} // namespace ash #endif // UI_BASE_IME_ASH_MOCK_COMPONENT_EXTENSION_IME_MANAGER_H_
diff --git a/ui/base/ime/ash/mock_component_extension_ime_manager_delegate.cc b/ui/base/ime/ash/mock_component_extension_ime_manager_delegate.cc index 72df04c4..a9cfecf 100644 --- a/ui/base/ime/ash/mock_component_extension_ime_manager_delegate.cc +++ b/ui/base/ime/ash/mock_component_extension_ime_manager_delegate.cc
@@ -5,7 +5,7 @@ #include "ui/base/ime/ash/mock_component_extension_ime_manager_delegate.h" #include "ui/base/ime/ash/component_extension_ime_manager.h" -namespace chromeos { +namespace ash { namespace input_method { MockComponentExtensionIMEManagerDelegate:: @@ -31,4 +31,4 @@ } } // namespace input_method -} // namespace chromeos +} // namespace ash
diff --git a/ui/base/ime/ash/mock_component_extension_ime_manager_delegate.h b/ui/base/ime/ash/mock_component_extension_ime_manager_delegate.h index b8f075d..e7c28c55 100644 --- a/ui/base/ime/ash/mock_component_extension_ime_manager_delegate.h +++ b/ui/base/ime/ash/mock_component_extension_ime_manager_delegate.h
@@ -11,7 +11,7 @@ #include "base/macros.h" #include "ui/base/ime/ash/component_extension_ime_manager_delegate.h" -namespace chromeos { +namespace ash { namespace input_method { class COMPONENT_EXPORT(UI_BASE_IME_ASH) MockComponentExtensionIMEManagerDelegate @@ -46,13 +46,13 @@ }; } // namespace input_method -} // namespace chromeos - -// TODO(https://crbug.com/1164001): remove when moved to ash. -namespace ash { -namespace input_method { -using ::chromeos::input_method::MockComponentExtensionIMEManagerDelegate; -} // namespace input_method } // namespace ash +// TODO(https://crbug.com/1164001): remove when the migration is finished. +namespace chromeos { +namespace input_method { +using ::ash::input_method::MockComponentExtensionIMEManagerDelegate; +} +} // namespace chromeos + #endif // UI_BASE_IME_ASH_MOCK_COMPONENT_EXTENSION_IME_MANAGER_DELEGATE_H_
diff --git a/ui/base/ime/ash/mock_ime_candidate_window_handler.cc b/ui/base/ime/ash/mock_ime_candidate_window_handler.cc index f4c93af..3f63ec8 100644 --- a/ui/base/ime/ash/mock_ime_candidate_window_handler.cc +++ b/ui/base/ime/ash/mock_ime_candidate_window_handler.cc
@@ -4,7 +4,7 @@ #include "ui/base/ime/ash/mock_ime_candidate_window_handler.h" -namespace chromeos { +namespace ash { MockIMECandidateWindowHandler::MockIMECandidateWindowHandler() : set_cursor_bounds_call_count_(0), @@ -41,4 +41,4 @@ update_lookup_table_call_count_ = 0; } -} // namespace chromeos +} // namespace ash
diff --git a/ui/base/ime/ash/mock_ime_candidate_window_handler.h b/ui/base/ime/ash/mock_ime_candidate_window_handler.h index 8166f08..91085589 100644 --- a/ui/base/ime/ash/mock_ime_candidate_window_handler.h +++ b/ui/base/ime/ash/mock_ime_candidate_window_handler.h
@@ -12,7 +12,7 @@ #include "ui/base/ime/candidate_window.h" #include "ui/gfx/geometry/rect.h" -namespace chromeos { +namespace ash { class COMPONENT_EXPORT(UI_BASE_IME_ASH) MockIMECandidateWindowHandler : public IMECandidateWindowHandlerInterface { @@ -60,11 +60,6 @@ UpdateLookupTableArg last_update_lookup_table_arg_; }; -} // namespace chromeos - -// TODO(https://crbug.com/1164001): remove when moved to ash. -namespace ash { -using ::chromeos::MockIMECandidateWindowHandler; } // namespace ash #endif // UI_BASE_IME_ASH_MOCK_IME_CANDIDATE_WINDOW_HANDLER_H_
diff --git a/ui/base/ime/ash/mock_ime_engine_handler.cc b/ui/base/ime/ash/mock_ime_engine_handler.cc index 6390a57..446fab2 100644 --- a/ui/base/ime/ash/mock_ime_engine_handler.cc +++ b/ui/base/ime/ash/mock_ime_engine_handler.cc
@@ -5,7 +5,7 @@ #include "ui/base/ime/ash/mock_ime_engine_handler.h" #include "ui/base/ime/text_input_flags.h" -namespace chromeos { +namespace ash { MockIMEEngineHandler::MockIMEEngineHandler() : focus_in_call_count_(0), @@ -84,4 +84,4 @@ return active_component_id_; } -} // namespace chromeos +} // namespace ash
diff --git a/ui/base/ime/ash/mock_ime_engine_handler.h b/ui/base/ime/ash/mock_ime_engine_handler.h index dc2416c..26c5edc 100644 --- a/ui/base/ime/ash/mock_ime_engine_handler.h +++ b/ui/base/ime/ash/mock_ime_engine_handler.h
@@ -13,7 +13,7 @@ #include "ui/base/ime/ash/ime_engine_handler_interface.h" #include "ui/events/event.h" -namespace chromeos { +namespace ash { class COMPONENT_EXPORT(UI_BASE_IME_ASH) MockIMEEngineHandler : public ui::IMEEngineHandlerInterface { @@ -96,6 +96,6 @@ std::string active_component_id_; }; -} // namespace chromeos +} // namespace ash #endif // UI_BASE_IME_ASH_MOCK_IME_ENGINE_HANDLER_H_
diff --git a/ui/base/ime/ash/mock_input_method_manager.cc b/ui/base/ime/ash/mock_input_method_manager.cc index 9a0c81c3..010e9d56 100644 --- a/ui/base/ime/ash/mock_input_method_manager.cc +++ b/ui/base/ime/ash/mock_input_method_manager.cc
@@ -6,7 +6,7 @@ #include <utility> -namespace chromeos { +namespace ash { namespace input_method { MockInputMethodManager::State::State() = default; @@ -253,4 +253,4 @@ } } // namespace input_method -} // namespace chromeos +} // namespace ash
diff --git a/ui/base/ime/ash/mock_input_method_manager.h b/ui/base/ime/ash/mock_input_method_manager.h index 3abdb55..3072da2 100644 --- a/ui/base/ime/ash/mock_input_method_manager.h +++ b/ui/base/ime/ash/mock_input_method_manager.h
@@ -12,7 +12,7 @@ #include "ui/base/ime/ash/input_method_util.h" #include "ui/base/ime/virtual_keyboard_controller.h" -namespace chromeos { +namespace ash { namespace input_method { class ImeKeyboard; @@ -146,13 +146,6 @@ }; } // namespace input_method -} // namespace chromeos - -// TODO(https://crbug.com/1164001): remove when moved to ash. -namespace ash { -namespace input_method { -using ::chromeos::input_method::MockInputMethodManager; -} // namespace input_method } // namespace ash #endif // UI_BASE_IME_ASH_MOCK_INPUT_METHOD_MANAGER_H_
diff --git a/ui/base/ime/ash/typing_session_manager_unittest.cc b/ui/base/ime/ash/typing_session_manager_unittest.cc index 10db887a..de39d7c 100644 --- a/ui/base/ime/ash/typing_session_manager_unittest.cc +++ b/ui/base/ime/ash/typing_session_manager_unittest.cc
@@ -13,7 +13,7 @@ #include "base/test/simple_test_clock.h" #include "testing/gtest/include/gtest/gtest.h" -namespace chromeos { +namespace ash { namespace { class TypingSessionManagerTest : public testing::Test { @@ -183,5 +183,4 @@ } } // namespace - -} // namespace chromeos +} // namespace ash
diff --git a/ui/base/models/image_model.cc b/ui/base/models/image_model.cc index 392c305e..8d7c2b1 100644 --- a/ui/base/models/image_model.cc +++ b/ui/base/models/image_model.cc
@@ -7,6 +7,7 @@ #include "base/callback.h" #include "ui/base/models/image_model.h" #include "ui/base/resource/resource_bundle.h" +#include "ui/color/color_id.h" #include "ui/gfx/vector_icon_utils.h" namespace ui { @@ -14,7 +15,7 @@ VectorIconModel::VectorIconModel() = default; VectorIconModel::VectorIconModel(const gfx::VectorIcon& vector_icon, - int color_id, + ColorId color_id, int icon_size, const gfx::VectorIcon* badge_icon) : vector_icon_(&vector_icon), @@ -65,7 +66,7 @@ // static ImageModel ImageModel::FromVectorIcon(const gfx::VectorIcon& vector_icon, - int color_id, + ColorId color_id, int icon_size, const gfx::VectorIcon* badge_icon) { if (!icon_size)
diff --git a/ui/base/models/image_model.h b/ui/base/models/image_model.h index 9df2f924..da56d5f7 100644 --- a/ui/base/models/image_model.h +++ b/ui/base/models/image_model.h
@@ -9,6 +9,7 @@ #include "base/component_export.h" #include "third_party/abseil-cpp/absl/types/variant.h" #include "third_party/skia/include/core/SkColor.h" +#include "ui/color/color_id.h" #include "ui/gfx/color_palette.h" #include "ui/gfx/image/image.h" #include "ui/gfx/image/image_skia.h" @@ -19,7 +20,7 @@ namespace ui { -class NativeTheme; +class ColorProvider; // The following classes encapsulate the various ways that a model may provide // or otherwise specify an icon or image. Most notably, these are used by the @@ -47,7 +48,7 @@ const gfx::VectorIcon* vector_icon() const { return vector_icon_; } int icon_size() const { return icon_size_; } - int color_id() const { return absl::get<int>(color_); } + ColorId color_id() const { return absl::get<ColorId>(color_); } SkColor color() const { return absl::get<SkColor>(color_); } bool has_color() const { return absl::holds_alternative<SkColor>(color_); } const gfx::VectorIcon* badge_icon() const { return badge_icon_; } @@ -56,7 +57,7 @@ friend class ImageModel; VectorIconModel(const gfx::VectorIcon& vector_icon, - int color_id, + ColorId color_id, int icon_size, const gfx::VectorIcon* badge_icon); // TODO (kylixrd): This should be eventually removed once all instances of @@ -68,7 +69,7 @@ const gfx::VectorIcon* vector_icon_ = nullptr; int icon_size_ = 0; - absl::variant<int, SkColor> color_ = gfx::kPlaceholderColor; + absl::variant<ColorId, SkColor> color_ = gfx::kPlaceholderColor; const gfx::VectorIcon* badge_icon_ = nullptr; }; @@ -79,7 +80,7 @@ class COMPONENT_EXPORT(UI_BASE) ImageModel { public: using ImageGenerator = - base::RepeatingCallback<gfx::ImageSkia(const ui::NativeTheme*)>; + base::RepeatingCallback<gfx::ImageSkia(const ui::ColorProvider*)>; ImageModel(); ImageModel(const ImageModel&); @@ -88,8 +89,9 @@ ImageModel& operator=(ImageModel&&); ~ImageModel(); + // TODO(pkasting): Remove the default `color_id` or replace with kColorIcon. static ImageModel FromVectorIcon(const gfx::VectorIcon& vector_icon, - int color_id = -1, + ColorId color_id = kColorMenuIcon, int icon_size = 0, const gfx::VectorIcon* badge_icon = nullptr); static ImageModel FromVectorIcon(const gfx::VectorIcon& vector_icon, @@ -101,7 +103,7 @@ static ImageModel FromResourceId(int resource_id); // `size` must be the size of the image the `generator` returns. // NOTE: If this proves onerous, we could allow autodetection, at the cost of - // requiring `generator` to be runnable with a null NativeTheme*. + // requiring `generator` to be runnable with a null ColorProvider*. static ImageModel FromImageGenerator(ImageGenerator generator, gfx::Size size);
diff --git a/ui/base/models/image_model_unittest.cc b/ui/base/models/image_model_unittest.cc index 7b5da6d..41410f7a 100644 --- a/ui/base/models/image_model_unittest.cc +++ b/ui/base/models/image_model_unittest.cc
@@ -8,6 +8,7 @@ #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "testing/gtest/include/gtest/gtest.h" +#include "ui/color/color_id.h" #include "ui/gfx/image/image_unittest_util.h" #include "ui/gfx/paint_vector_icon.h" #include "ui/gfx/vector_icon_types.h" @@ -51,7 +52,7 @@ TEST(ImageModelTest, CheckForVectorIcon) { ImageModel image_model = - ImageModel::FromVectorIcon(GetCircleVectorIcon(), -1, 16); + ImageModel::FromVectorIcon(GetCircleVectorIcon(), ui::kColorMenuIcon, 16); EXPECT_FALSE(image_model.IsEmpty()); EXPECT_TRUE(image_model.IsVectorIcon()); @@ -67,7 +68,7 @@ TEST(ImageModelTest, CheckForImageGenerator) { ImageModel image_model = ImageModel::FromImageGenerator( - base::BindRepeating([](const ui::NativeTheme*) { + base::BindRepeating([](const ui::ColorProvider*) { return gfx::test::CreateImage(16, 16).AsImageSkia(); }), gfx::Size(16, 16)); @@ -78,13 +79,15 @@ TEST(ImageModelTest, Size) { EXPECT_EQ(gfx::Size(), ImageModel().Size()); - EXPECT_EQ(gfx::Size(16, 16), - ImageModel::FromVectorIcon(GetCircleVectorIcon(), -1, 16).Size()); + EXPECT_EQ( + gfx::Size(16, 16), + ImageModel::FromVectorIcon(GetCircleVectorIcon(), ui::kColorMenuIcon, 16) + .Size()); EXPECT_EQ(gfx::Size(16, 16), ImageModel::FromImage(gfx::test::CreateImage(16, 16)).Size()); EXPECT_EQ(gfx::Size(16, 16), ImageModel::FromImageGenerator( - base::BindRepeating([](const ui::NativeTheme*) { + base::BindRepeating([](const ui::ColorProvider*) { return gfx::test::CreateImage(16, 16).AsImageSkia(); }), gfx::Size(16, 16)) @@ -94,7 +97,8 @@ TEST(ImageModelTest, CheckAssignVectorIcon) { VectorIconModel vector_icon_model_dest; VectorIconModel vector_icon_model_src = - ImageModel::FromVectorIcon(GetCircleVectorIcon(), -1, 16).GetVectorIcon(); + ImageModel::FromVectorIcon(GetCircleVectorIcon(), ui::kColorMenuIcon, 16) + .GetVectorIcon(); EXPECT_TRUE(vector_icon_model_dest.is_empty()); EXPECT_FALSE(vector_icon_model_src.is_empty()); @@ -117,7 +121,8 @@ EXPECT_FALSE(image_model_dest.IsEmpty()); EXPECT_TRUE(image_model_dest.IsImage()); - image_model_src = ImageModel::FromVectorIcon(GetCircleVectorIcon(), -1, 16); + image_model_src = + ImageModel::FromVectorIcon(GetCircleVectorIcon(), ui::kColorMenuIcon, 16); EXPECT_TRUE(image_model_src.IsVectorIcon()); @@ -126,7 +131,7 @@ EXPECT_TRUE(image_model_dest.IsVectorIcon()); image_model_src = ImageModel::FromImageGenerator( - base::BindRepeating([](const ui::NativeTheme*) { + base::BindRepeating([](const ui::ColorProvider*) { return gfx::test::CreateImage(16, 16).AsImageSkia(); }), gfx::Size(16, 16)); @@ -153,22 +158,28 @@ image_model_src = image_model_dest; EXPECT_EQ(image_model_src, image_model_dest); - image_model_dest = ImageModel::FromVectorIcon(GetRectVectorIcon(), -1, 16); + image_model_dest = + ImageModel::FromVectorIcon(GetRectVectorIcon(), ui::kColorMenuIcon, 16); EXPECT_NE(image_model_src, image_model_dest); - image_model_src = ImageModel::FromVectorIcon(GetRectVectorIcon(), -1, 16); + image_model_src = + ImageModel::FromVectorIcon(GetRectVectorIcon(), ui::kColorMenuIcon, 16); EXPECT_EQ(image_model_src, image_model_dest); - image_model_dest = ImageModel::FromVectorIcon(GetCircleVectorIcon(), -1, 16); + image_model_dest = + ImageModel::FromVectorIcon(GetCircleVectorIcon(), ui::kColorMenuIcon, 16); EXPECT_NE(image_model_src, image_model_dest); image_model_src = image_model_dest; EXPECT_EQ(image_model_src, image_model_dest); - image_model_src = ImageModel::FromVectorIcon(GetCircleVectorIcon(), 1, 16); + image_model_src = + ImageModel::FromVectorIcon(GetCircleVectorIcon(), ui::kColorMenuIcon, 16); image_model_dest = ImageModel::FromVectorIcon(GetCircleVectorIcon(), SK_ColorMAGENTA, 16); EXPECT_NE(image_model_src, image_model_dest); - image_model_src = ImageModel::FromVectorIcon(GetCircleVectorIcon(), 1, 16); - image_model_dest = ImageModel::FromVectorIcon(GetCircleVectorIcon(), 2, 16); + image_model_src = + ImageModel::FromVectorIcon(GetCircleVectorIcon(), ui::kColorMenuIcon, 16); + image_model_dest = ImageModel::FromVectorIcon( + GetCircleVectorIcon(), ui::kColorMenuItemForeground, 16); EXPECT_NE(image_model_src, image_model_dest); image_model_src = @@ -183,7 +194,7 @@ ImageModel::FromVectorIcon(GetCircleVectorIcon(), SK_ColorMAGENTA, 2); EXPECT_NE(image_model_src, image_model_dest); - auto generator = base::BindRepeating([](const ui::NativeTheme*) { + auto generator = base::BindRepeating([](const ui::ColorProvider*) { return gfx::test::CreateImage(16, 16).AsImageSkia(); }); image_model_src = @@ -195,7 +206,7 @@ image_model_dest = ImageModel::FromImageGenerator(generator, gfx::Size(8, 8)); EXPECT_NE(image_model_src, image_model_dest); image_model_dest = ImageModel::FromImageGenerator( - base::BindRepeating([](const ui::NativeTheme*) { + base::BindRepeating([](const ui::ColorProvider*) { return gfx::test::CreateImage(8, 8).AsImageSkia(); }), gfx::Size(16, 16));
diff --git a/ui/base/models/simple_menu_model_unittest.cc b/ui/base/models/simple_menu_model_unittest.cc index 7f0829b..242563a 100644 --- a/ui/base/models/simple_menu_model_unittest.cc +++ b/ui/base/models/simple_menu_model_unittest.cc
@@ -8,6 +8,7 @@ #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "testing/gtest/include/gtest/gtest.h" +#include "ui/color/color_id.h" #include "ui/gfx/image/image_unittest_util.h" #include "ui/gfx/paint_vector_icon.h" #include "ui/gfx/vector_icon_types.h" @@ -219,7 +220,7 @@ simple_menu_model.AddItemWithIcon( /*command_id*/ 11, u"menu item", - ui::ImageModel::FromVectorIcon(circle_icon, -1, 16)); + ui::ImageModel::FromVectorIcon(circle_icon, ui::kColorMenuIcon, 16)); EXPECT_TRUE(simple_menu_model.HasIcons()); }
diff --git a/ui/chromeos/events/event_rewriter_chromeos.cc b/ui/chromeos/events/event_rewriter_chromeos.cc index 74a3c5d..12444049c 100644 --- a/ui/chromeos/events/event_rewriter_chromeos.cc +++ b/ui/chromeos/events/event_rewriter_chromeos.cc
@@ -190,8 +190,7 @@ // it's not possible to make both features work. For now, we don't remap // Mod3Mask when Neo2 is in use. // TODO(yusukes): Remove the restriction. - ::chromeos::input_method::InputMethodManager* manager = - ::chromeos::input_method::InputMethodManager::Get(); + auto* manager = ash::input_method::InputMethodManager::Get(); return manager->IsISOLevel5ShiftUsedByCurrentInputMethod(); } @@ -714,17 +713,17 @@ Delegate* delegate, EventRewriter* sticky_keys_controller, bool privacy_screen_supported) - : EventRewriterChromeOS(delegate, - sticky_keys_controller, - privacy_screen_supported, - ::chromeos::input_method::InputMethodManager::Get() - ->GetImeKeyboard()) {} + : EventRewriterChromeOS( + delegate, + sticky_keys_controller, + privacy_screen_supported, + ash::input_method::InputMethodManager::Get()->GetImeKeyboard()) {} EventRewriterChromeOS::EventRewriterChromeOS( Delegate* delegate, EventRewriter* sticky_keys_controller, bool privacy_screen_supported, - ::chromeos::input_method::ImeKeyboard* ime_keyboard) + ash::input_method::ImeKeyboard* ime_keyboard) : last_keyboard_device_id_(ED_UNKNOWN_DEVICE), delegate_(delegate), sticky_keys_controller_(sticky_keys_controller),
diff --git a/ui/chromeos/events/event_rewriter_chromeos.h b/ui/chromeos/events/event_rewriter_chromeos.h index 80b65d538..731dfc2 100644 --- a/ui/chromeos/events/event_rewriter_chromeos.h +++ b/ui/chromeos/events/event_rewriter_chromeos.h
@@ -19,11 +19,11 @@ #include "ui/events/event_rewriter.h" #include "ui/events/keycodes/dom/dom_key.h" -namespace chromeos { +namespace ash { namespace input_method { class ImeKeyboard; -} // namespace input_method -} // namespace chromeos +} +} // namespace ash namespace ui { @@ -161,11 +161,9 @@ EventRewriterChromeOS(Delegate* delegate, EventRewriter* sticky_keys_controller, bool privacy_screen_supported, - ::chromeos::input_method::ImeKeyboard* ime_keyboard); - + ash::input_method::ImeKeyboard* ime_keyboard); EventRewriterChromeOS(const EventRewriterChromeOS&) = delete; EventRewriterChromeOS& operator=(const EventRewriterChromeOS&) = delete; - ~EventRewriterChromeOS() override; // Calls KeyboardDeviceAdded. @@ -375,7 +373,7 @@ int latched_modifier_latches_; int used_modifier_latches_; - ::chromeos::input_method::ImeKeyboard* const ime_keyboard_; + ash::input_method::ImeKeyboard* const ime_keyboard_; // True if alt + key and mouse event remapping is allowed. In some scenario, // such as clicking a button in the Alt-Tab UI, this remapping undesirably
diff --git a/ui/message_center/BUILD.gn b/ui/message_center/BUILD.gn index 3a1e620..70a8f0f 100644 --- a/ui/message_center/BUILD.gn +++ b/ui/message_center/BUILD.gn
@@ -124,6 +124,7 @@ sources += [ "views/message_popup_view_mac.mm" ] } deps += [ + "//ui/color", "//ui/compositor", "//ui/events", "//ui/views", @@ -217,6 +218,7 @@ "views/relative_time_formatter_unittest.cc", ] deps += [ + "//ui/color", "//ui/display", "//ui/strings", "//ui/views",
diff --git a/ui/message_center/DEPS b/ui/message_center/DEPS index 2bdd866a..4042b78 100644 --- a/ui/message_center/DEPS +++ b/ui/message_center/DEPS
@@ -6,6 +6,7 @@ "+ui/accessibility", "+ui/aura", "+ui/base", + "+ui/color", "+ui/compositor", "+ui/display", "+ui/events",
diff --git a/ui/message_center/views/message_view.cc b/ui/message_center/views/message_view.cc index 4dc4918d..4dd8c15 100644 --- a/ui/message_center/views/message_view.cc +++ b/ui/message_center/views/message_view.cc
@@ -11,6 +11,8 @@ #include "ui/accessibility/ax_enums.mojom.h" #include "ui/accessibility/ax_node_data.h" #include "ui/base/l10n/l10n_util.h" +#include "ui/color/color_id.h" +#include "ui/color/color_provider.h" #include "ui/compositor/layer.h" #include "ui/compositor/scoped_layer_animation_settings.h" #include "ui/gfx/canvas.h" @@ -476,10 +478,10 @@ } void MessageView::UpdateBackgroundPainter() { - auto* theme = GetNativeTheme(); - SkColor background_color = theme->GetSystemColor( - is_active_ ? ui::NativeTheme::kColorId_NotificationBackgroundActive - : ui::NativeTheme::kColorId_NotificationBackground); + const auto* color_provider = GetColorProvider(); + SkColor background_color = color_provider->GetColor( + is_active_ ? ui::kColorNotificationBackgroundActive + : ui::kColorNotificationBackgroundInactive); #if BUILDFLAG(IS_CHROMEOS_ASH) if (ash::features::IsNotificationsRefreshEnabled()) @@ -494,9 +496,8 @@ void MessageView::UpdateNestedBorder() { if (!is_nested_ || !GetWidget()) return; - - SkColor border_color = GetNativeTheme()->GetSystemColor( - ui::NativeTheme::kColorId_UnfocusedBorderColor); + SkColor border_color = + GetColorProvider()->GetColor(ui::kColorFocusableBorderUnfocused); #if BUILDFLAG(IS_CHROMEOS_ASH) if (ash::features::IsNotificationsRefreshEnabled())
diff --git a/ui/message_center/views/notification_control_buttons_view.cc b/ui/message_center/views/notification_control_buttons_view.cc index b2d2818a..01a1d52f 100644 --- a/ui/message_center/views/notification_control_buttons_view.cc +++ b/ui/message_center/views/notification_control_buttons_view.cc
@@ -6,7 +6,6 @@ #include <memory> -#include "build/chromeos_buildflags.h" #include "third_party/skia/include/core/SkColor.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/metadata/metadata_impl_macros.h" @@ -23,10 +22,6 @@ #include "ui/views/background.h" #include "ui/views/layout/box_layout.h" -#if BUILDFLAG(IS_CHROMEOS_ASH) -#include "ash/constants/ash_features.h" -#endif - namespace message_center { NotificationControlButtonsView::NotificationControlButtonsView( @@ -149,17 +144,6 @@ UpdateButtonIconColors(); } -#if BUILDFLAG(IS_CHROMEOS_ASH) -void NotificationControlButtonsView::OnThemeChanged() { - View::OnThemeChanged(); - SkColor backgroundColor = GetNativeTheme()->GetSystemColor( - ui::NativeTheme::kColorId_NotificationButtonBackground); - if (ash::features::IsDarkLightModeEnabled()) - backgroundColor = SK_ColorTRANSPARENT; - SetBackground(views::CreateSolidBackground(backgroundColor)); -} -#endif - void NotificationControlButtonsView::UpdateButtonIconColors() { SkColor icon_color = DetermineButtonIconColor(); if (close_button_) {
diff --git a/ui/message_center/views/notification_control_buttons_view.h b/ui/message_center/views/notification_control_buttons_view.h index 162f7204..8f33b0f 100644 --- a/ui/message_center/views/notification_control_buttons_view.h +++ b/ui/message_center/views/notification_control_buttons_view.h
@@ -7,7 +7,6 @@ #define UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_CONTROL_BUTTONS_VIEW_H_ #include "base/macros.h" -#include "build/chromeos_buildflags.h" #include "third_party/skia/include/core/SkColor.h" #include "ui/message_center/message_center_export.h" #include "ui/message_center/views/padded_button.h" @@ -54,10 +53,6 @@ PaddedButton* settings_button() { return settings_button_; } PaddedButton* snooze_button() { return snooze_button_; } -#if BUILDFLAG(IS_CHROMEOS_ASH) - void OnThemeChanged() override; -#endif - private: // Updates the button icon colors to the value of DetermineButtonIconColor(). void UpdateButtonIconColors();
diff --git a/ui/message_center/views/notification_header_view.cc b/ui/message_center/views/notification_header_view.cc index 5e7e5e5f..26fa5d2 100644 --- a/ui/message_center/views/notification_header_view.cc +++ b/ui/message_center/views/notification_header_view.cc
@@ -15,6 +15,8 @@ #include "ui/base/l10n/l10n_util.h" #include "ui/base/metadata/metadata_header_macros.h" #include "ui/base/metadata/metadata_impl_macros.h" +#include "ui/color/color_id.h" +#include "ui/color/color_provider.h" #include "ui/gfx/color_palette.h" #include "ui/gfx/font_list.h" #include "ui/gfx/paint_vector_icon.h" @@ -118,8 +120,7 @@ void ExpandButton::OnThemeChanged() { ImageView::OnThemeChanged(); focus_painter_ = views::Painter::CreateSolidFocusPainter( - GetNativeTheme()->GetSystemColor( - ui::NativeTheme::kColorId_FocusedBorderColor), + GetColorProvider()->GetColor(ui::kColorFocusableBorderFocused), gfx::Insets(0, 0, 1, 1)); } @@ -423,8 +424,8 @@ void NotificationHeaderView::UpdateColors() { if (!GetWidget()) return; - SkColor color = accent_color_.value_or(GetNativeTheme()->GetSystemColor( - ui::NativeTheme::kColorId_NotificationDefaultAccentColor)); + SkColor color = accent_color_.value_or( + GetColorProvider()->GetColor(ui::kColorNotificationHeaderForeground)); app_name_view_->SetEnabledColor(color); summary_text_view_->SetEnabledColor(color); summary_text_divider_->SetEnabledColor(color);
diff --git a/ui/message_center/views/notification_input_container.cc b/ui/message_center/views/notification_input_container.cc index 2f19fb0..d8d86465 100644 --- a/ui/message_center/views/notification_input_container.cc +++ b/ui/message_center/views/notification_input_container.cc
@@ -5,6 +5,8 @@ #include "ui/message_center/views/notification_input_container.h" #include "base/bind.h" +#include "ui/color/color_id.h" +#include "ui/color/color_provider.h" #include "ui/compositor/layer.h" #include "ui/gfx/color_palette.h" #include "ui/gfx/paint_vector_icon.h" @@ -120,14 +122,14 @@ void NotificationInputContainer::OnThemeChanged() { View::OnThemeChanged(); - auto* theme = GetNativeTheme(); - textfield_->SetTextColor(theme->GetSystemColor( - ui::NativeTheme::kColorId_NotificationPlaceholderColor)); + const auto* color_provider = GetColorProvider(); + textfield_->SetTextColor( + color_provider->GetColor(ui::kColorNotificationInputForeground)); SetTextfieldBackground(); if (ink_drop_container_) textfield_->SetBackgroundColor(SK_ColorTRANSPARENT); - textfield_->set_placeholder_text_color(theme->GetSystemColor( - ui::NativeTheme::kColorId_NotificationPlaceholderColor)); + textfield_->set_placeholder_text_color(color_provider->GetColor( + ui::kColorNotificationInputPlaceholderForeground)); UpdateButtonImage(); } @@ -171,8 +173,8 @@ views::InkDrop::Get(this)->SetVisibleOpacity(1); views::InkDrop::Get(this)->SetBaseColorCallback(base::BindRepeating( [](views::View* host) { - return host->GetNativeTheme()->GetSystemColor( - ui::NativeTheme::kColorId_NotificationInkDropBase); + return host->GetColorProvider()->GetColor( + ui::kColorNotificationInputBackground); }, this)); @@ -199,14 +201,13 @@ if (!GetWidget()) return; - auto icon_color_id = - textfield_->GetText().empty() - ? ui::NativeTheme::kColorId_NotificationPlaceholderColor - : ui::NativeTheme::kColorId_NotificationColor; + auto icon_color_id = textfield_->GetText().empty() + ? ui::kColorNotificationInputPlaceholderForeground + : ui::kColorNotificationInputForeground; button_->SetImage( views::Button::STATE_NORMAL, gfx::CreateVectorIcon(kNotificationInlineReplyIcon, kInputReplyButtonSize, - GetNativeTheme()->GetSystemColor(icon_color_id))); + GetColorProvider()->GetColor(icon_color_id))); } } // namespace message_center
diff --git a/ui/message_center/views/notification_view_base.cc b/ui/message_center/views/notification_view_base.cc index c6a5b78..826eb9ad 100644 --- a/ui/message_center/views/notification_view_base.cc +++ b/ui/message_center/views/notification_view_base.cc
@@ -21,6 +21,8 @@ #include "ui/base/cursor/cursor.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/metadata/metadata_impl_macros.h" +#include "ui/color/color_id.h" +#include "ui/color/color_provider.h" #include "ui/events/base_event_utils.h" #include "ui/events/gesture_detection/gesture_provider_config_helper.h" #include "ui/gfx/canvas.h" @@ -263,8 +265,8 @@ void LargeImageView::OnThemeChanged() { View::OnThemeChanged(); - SetBackground(views::CreateSolidBackground(GetNativeTheme()->GetSystemColor( - ui::NativeTheme::kColorId_NotificationLargeImageBackground))); + SetBackground(views::CreateSolidBackground( + GetColorProvider()->GetColor(ui::kColorNotificationImageBackground))); } // Returns expected size of the image right after resizing. @@ -306,8 +308,8 @@ views::MdTextButton::OnThemeChanged(); SetEnabledTextColors(text_color_); label()->SetAutoColorReadabilityEnabled(true); - label()->SetBackgroundColor(GetNativeTheme()->GetSystemColor( - ui::NativeTheme::kColorId_NotificationActionsRowBackground)); + label()->SetBackgroundColor( + GetColorProvider()->GetColor(ui::kColorNotificationActionsBackground)); } void NotificationTextButton::OverrideTextColor( @@ -337,14 +339,13 @@ RadioButton::OnThemeChanged(); SetEnabledTextColors(GetTextColor()); label()->SetAutoColorReadabilityEnabled(true); - label()->SetBackgroundColor(GetNativeTheme()->GetSystemColor( - ui::NativeTheme::kColorId_NotificationBackgroundActive)); + label()->SetBackgroundColor( + GetColorProvider()->GetColor(ui::kColorNotificationBackgroundActive)); } private: SkColor GetTextColor() const { - return GetNativeTheme()->GetSystemColor( - ui::NativeTheme::kColorId_LabelEnabledColor); + return GetColorProvider()->GetColor(ui::kColorLabelForeground); } }; @@ -453,8 +454,8 @@ this)); views::InkDrop::Get(this)->SetBaseColorCallback(base::BindRepeating( [](NotificationViewBase* host) { - return host->GetNativeTheme()->GetSystemColor( - ui::NativeTheme::kColorId_NotificationBackgroundActive); + return host->GetColorProvider()->GetColor( + ui::kColorNotificationBackgroundActive); }, this)); AddChildView(ink_drop_container_); @@ -952,23 +953,20 @@ // Widget hierarchy defer updating the small icon view. if (!GetWidget()) return; - SkColor accent_color = - notification.accent_color().value_or(GetNativeTheme()->GetSystemColor( - ui::NativeTheme::kColorId_NotificationDefaultAccentColor)); + const auto* color_provider = GetColorProvider(); + SkColor accent_color = notification.accent_color().value_or( + color_provider->GetColor(ui::kColorNotificationHeaderForeground)); SkColor icon_color = color_utils::BlendForMinContrast( accent_color, GetNotificationHeaderViewBackgroundColor()) .color; - auto* theme = GetNativeTheme(); // TODO(crbug.com/768748): figure out if this has a performance impact and // cache images if so. gfx::Image masked_small_icon = notification.GenerateMaskedSmallIcon( kSmallImageSizeMD, icon_color, - theme->GetSystemColor( - ui::NativeTheme::kColorId_MessageCenterSmallImageMaskBackground), - theme->GetSystemColor( - ui::NativeTheme::kColorId_MessageCenterSmallImageMaskForeground)); + color_provider->GetColor(ui::kColorNotificationIconBackground), + color_provider->GetColor(ui::kColorNotificationIconForeground)); if (masked_small_icon.IsEmpty()) { header_row_->ClearAppIcon(); @@ -1312,10 +1310,9 @@ SkColor NotificationViewBase::GetNotificationHeaderViewBackgroundColor() const { bool inline_settings_visible = settings_row_->GetVisible(); - return GetNativeTheme()->GetSystemColor( - inline_settings_visible - ? ui::NativeTheme::kColorId_NotificationBackgroundActive - : ui::NativeTheme::kColorId_NotificationBackground); + return GetColorProvider()->GetColor( + inline_settings_visible ? ui::kColorNotificationBackgroundActive + : ui::kColorNotificationBackgroundInactive); } void NotificationViewBase::UpdateActionButtonsRowBackground() { @@ -1325,8 +1322,8 @@ action_buttons_row_->SetBackground(views::CreateBackgroundFromPainter( std::make_unique<NotificationBackgroundPainter>( /*top_radius=*/0, bottom_radius(), - GetNativeTheme()->GetSystemColor( - ui::NativeTheme::kColorId_NotificationActionsRowBackground)))); + GetColorProvider()->GetColor( + ui::kColorNotificationActionsBackground)))); } void NotificationViewBase::UpdateCornerRadius(int top_radius,
diff --git a/ui/message_center/views/notification_view_base_unittest.cc b/ui/message_center/views/notification_view_base_unittest.cc index 851b405..501a93e7 100644 --- a/ui/message_center/views/notification_view_base_unittest.cc +++ b/ui/message_center/views/notification_view_base_unittest.cc
@@ -12,6 +12,8 @@ #include "build/chromeos_buildflags.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/skia/include/core/SkColor.h" +#include "ui/color/color_id.h" +#include "ui/color/color_provider.h" #include "ui/compositor/layer.h" #include "ui/compositor/scoped_animation_duration_scale_mode.h" #include "ui/events/event_processor.h" @@ -956,18 +958,14 @@ notification_view()->ToggleExpanded(); EXPECT_TRUE(notification_view()->actions_row_->GetVisible()); - auto* theme = notification_view()->GetNativeTheme(); + const auto* color_provider = notification_view()->GetColorProvider(); auto app_icon_color_matches = [&](SkColor color) { SkBitmap expected = notification ->GenerateMaskedSmallIcon( kSmallImageSizeMD, color, - theme->GetSystemColor( - ui::NativeTheme:: - kColorId_MessageCenterSmallImageMaskBackground), - theme->GetSystemColor( - ui::NativeTheme:: - kColorId_MessageCenterSmallImageMaskForeground)) + color_provider->GetColor(ui::kColorNotificationIconBackground), + color_provider->GetColor(ui::kColorNotificationIconForeground)) .AsBitmap(); SkBitmap actual = *notification_view() ->header_row_->app_icon_view_for_testing() @@ -986,9 +984,9 @@ EXPECT_EQ( kActionButtonTextColor, notification_view()->action_buttons_[1]->enabled_color_for_testing()); - EXPECT_TRUE(app_icon_color_matches( - notification_view()->GetNativeTheme()->GetSystemColor( - ui::NativeTheme::kColorId_NotificationDefaultAccentColor))); + EXPECT_TRUE( + app_icon_color_matches(notification_view()->GetColorProvider()->GetColor( + ui::kColorNotificationHeaderForeground))); // If custom accent color is set, the header and the buttons should have the // same accent color.
diff --git a/ui/message_center/views/padded_button.cc b/ui/message_center/views/padded_button.cc index f5e3f2a..75e9c40 100644 --- a/ui/message_center/views/padded_button.cc +++ b/ui/message_center/views/padded_button.cc
@@ -6,13 +6,13 @@ #include <memory> -#include "build/chromeos_buildflags.h" #include "third_party/skia/include/core/SkColor.h" #include "ui/base/metadata/metadata_impl_macros.h" +#include "ui/color/color_id.h" +#include "ui/color/color_provider.h" #include "ui/gfx/canvas.h" #include "ui/gfx/color_utils.h" #include "ui/message_center/public/cpp/message_center_constants.h" -#include "ui/native_theme/native_theme.h" #include "ui/views/animation/ink_drop.h" #include "ui/views/animation/ink_drop_host_view.h" #include "ui/views/animation/ink_drop_impl.h" @@ -20,10 +20,6 @@ #include "ui/views/border.h" #include "ui/views/controls/button/image_button.h" -#if BUILDFLAG(IS_CHROMEOS_ASH) -#include "ash/constants/ash_features.h" -#endif - namespace message_center { PaddedButton::PaddedButton(PressedCallback callback) @@ -40,17 +36,9 @@ void PaddedButton::OnThemeChanged() { ImageButton::OnThemeChanged(); - auto* theme = GetNativeTheme(); -#if BUILDFLAG(IS_CHROMEOS_ASH) - SkColor background_color = theme->GetSystemColor( - ui::NativeTheme::kColorId_NotificationButtonBackground); - if (ash::features::IsDarkLightModeEnabled()) - background_color = SK_ColorTRANSPARENT; - SetBackground(views::CreateSolidBackground(background_color)); -#else + const auto* color_provider = GetColorProvider(); SkColor background_color = - theme->GetSystemColor(ui::NativeTheme::kColorId_WindowBackground); -#endif + color_provider->GetColor(ui::kColorWindowBackground); views::InkDrop::Get(this)->SetBaseColor( color_utils::GetColorWithMaxContrast(background_color)); }
diff --git a/ui/native_theme/common_theme.cc b/ui/native_theme/common_theme.cc index 37fe41c..cea3724 100644 --- a/ui/native_theme/common_theme.cc +++ b/ui/native_theme/common_theme.cc
@@ -10,7 +10,6 @@ #include "base/notreached.h" #include "base/strings/string_piece.h" #include "build/build_config.h" -#include "build/chromeos_buildflags.h" #include "third_party/abseil-cpp/absl/types/optional.h" #include "third_party/skia/include/core/SkCanvas.h" #include "ui/base/resource/resource_bundle.h" @@ -352,10 +351,6 @@ case NativeTheme::kColorId_NotificationBackground: return base_theme->GetUnprocessedSystemColor( NativeTheme::kColorId_WindowBackground, color_scheme); -#if BUILDFLAG(IS_CHROMEOS_ASH) - case NativeTheme::kColorId_NotificationButtonBackground: - return SkColorSetA(SK_ColorWHITE, 0.9 * 0xff); -#endif case NativeTheme::kColorId_NotificationPlaceholderColor: { const SkColor color = base_theme->GetUnprocessedSystemColor( NativeTheme::kColorId_TextOnProminentButtonColor, color_scheme);
diff --git a/ui/native_theme/native_theme_color_id.h b/ui/native_theme/native_theme_color_id.h index 84848edb..40ca58e 100644 --- a/ui/native_theme/native_theme_color_id.h +++ b/ui/native_theme/native_theme_color_id.h
@@ -5,8 +5,6 @@ #ifndef UI_NATIVE_THEME_NATIVE_THEME_COLOR_ID_H_ #define UI_NATIVE_THEME_NATIVE_THEME_COLOR_ID_H_ -#include "build/chromeos_buildflags.h" - // Clang format mangles sectioned lists like the below badly. // clang-format off #define NATIVE_THEME_CROSS_PLATFORM_COLOR_IDS \ @@ -88,7 +86,7 @@ OP(kColorId_OverlayScrollbarThumbHoveredFill), \ OP(kColorId_OverlayScrollbarThumbHoveredStroke), \ OP(kColorId_OverlayScrollbarThumbStroke), \ - /* Message Center */ \ + /* Message Center */ \ OP(kColorId_MessageCenterSmallImageMaskBackground), \ OP(kColorId_MessageCenterSmallImageMaskForeground), \ /* Notification view */ \ @@ -176,19 +174,7 @@ OP(kColorId_DisabledIconColor), \ OP(kColorId_SecondaryIconColor) -#if BUILDFLAG(IS_CHROMEOS_ASH) -#define NATIVE_THEME_CHROMEOS_COLOR_IDS \ - /* Notification view */ \ - OP(kColorId_NotificationButtonBackground) -#endif - -#if BUILDFLAG(IS_CHROMEOS_ASH) -#define NATIVE_THEME_COLOR_IDS \ - NATIVE_THEME_CROSS_PLATFORM_COLOR_IDS, \ - NATIVE_THEME_CHROMEOS_COLOR_IDS -#else #define NATIVE_THEME_COLOR_IDS NATIVE_THEME_CROSS_PLATFORM_COLOR_IDS -#endif // clang-format on
diff --git a/ui/native_theme/themed_vector_icon.cc b/ui/native_theme/themed_vector_icon.cc index 437a864..c80538f0 100644 --- a/ui/native_theme/themed_vector_icon.cc +++ b/ui/native_theme/themed_vector_icon.cc
@@ -4,6 +4,7 @@ #include "ui/native_theme/themed_vector_icon.h" +#include "ui/color/color_provider.h" #include "ui/gfx/paint_vector_icon.h" #include "ui/gfx/vector_icon_types.h" #include "ui/gfx/vector_icon_utils.h" @@ -13,7 +14,7 @@ ThemedVectorIcon::ThemedVectorIcon() = default; ThemedVectorIcon::ThemedVectorIcon(const gfx::VectorIcon* icon, - int color_id, + ColorId color_id, int icon_size, const gfx::VectorIcon* badge) : icon_(icon), icon_size_(icon_size), color_(color_id), badge_(badge) {} @@ -24,11 +25,8 @@ badge_(vector_icon_model.badge_icon()) { if (vector_icon_model.has_color()) { color_ = vector_icon_model.color(); - } else if (vector_icon_model.color_id() >= 0) { - color_ = - static_cast<ui::NativeTheme::ColorId>(vector_icon_model.color_id()); } else { - color_ = ui::NativeTheme::kColorId_MenuIconColor; + color_ = vector_icon_model.color_id(); } } @@ -47,17 +45,19 @@ ThemedVectorIcon& ThemedVectorIcon::operator=(ThemedVectorIcon&&) = default; -gfx::ImageSkia ThemedVectorIcon::GetImageSkia(const NativeTheme* theme) const { +gfx::ImageSkia ThemedVectorIcon::GetImageSkia( + const ColorProvider* color_provider) const { DCHECK(!empty()); - return GetImageSkia(theme, (icon_size_ > 0) - ? icon_size_ - : GetDefaultSizeOfVectorIcon(*icon_)); + return GetImageSkia(color_provider, (icon_size_ > 0) + ? icon_size_ + : GetDefaultSizeOfVectorIcon(*icon_)); } -gfx::ImageSkia ThemedVectorIcon::GetImageSkia(const NativeTheme* theme, - int icon_size) const { +gfx::ImageSkia ThemedVectorIcon::GetImageSkia( + const ColorProvider* color_provider, + int icon_size) const { DCHECK(!empty()); - return GetImageSkia(GetColor(theme), icon_size); + return GetImageSkia(GetColor(color_provider), icon_size); } gfx::ImageSkia ThemedVectorIcon::GetImageSkia(SkColor color) const { @@ -67,10 +67,9 @@ : GetDefaultSizeOfVectorIcon(*icon_)); } -SkColor ThemedVectorIcon::GetColor(const NativeTheme* theme) const { - return absl::holds_alternative<int>(color_) - ? theme->GetSystemColor(static_cast<ui::NativeTheme::ColorId>( - absl::get<int>(color_))) +SkColor ThemedVectorIcon::GetColor(const ColorProvider* color_provider) const { + return absl::holds_alternative<ColorId>(color_) + ? color_provider->GetColor(absl::get<ColorId>(color_)) : absl::get<SkColor>(color_); }
diff --git a/ui/native_theme/themed_vector_icon.h b/ui/native_theme/themed_vector_icon.h index 1e17e05..69747c2d 100644 --- a/ui/native_theme/themed_vector_icon.h +++ b/ui/native_theme/themed_vector_icon.h
@@ -8,7 +8,7 @@ #include "third_party/abseil-cpp/absl/types/variant.h" #include "third_party/skia/include/core/SkColor.h" #include "ui/base/models/image_model.h" -#include "ui/native_theme/native_theme.h" +#include "ui/color/color_id.h" #include "ui/native_theme/native_theme_export.h" namespace gfx { @@ -18,11 +18,13 @@ namespace ui { +class ColorProvider; + class NATIVE_THEME_EXPORT ThemedVectorIcon { public: ThemedVectorIcon(); explicit ThemedVectorIcon(const gfx::VectorIcon* icon, - int color_id = NativeTheme::kColorId_MenuIconColor, + ColorId color_id = kColorMenuIcon, int icon_size = 0, const gfx::VectorIcon* badge = nullptr); explicit ThemedVectorIcon(const VectorIconModel& vector_icon_model); @@ -41,17 +43,18 @@ void clear() { icon_ = nullptr; } bool empty() const { return !icon_; } - gfx::ImageSkia GetImageSkia(const NativeTheme* theme) const; - gfx::ImageSkia GetImageSkia(const NativeTheme* theme, int icon_size) const; + gfx::ImageSkia GetImageSkia(const ColorProvider* color_provider) const; + gfx::ImageSkia GetImageSkia(const ColorProvider* color_provider, + int icon_size) const; gfx::ImageSkia GetImageSkia(SkColor color) const; private: - SkColor GetColor(const NativeTheme* theme) const; + SkColor GetColor(const ColorProvider* color_provider) const; gfx::ImageSkia GetImageSkia(SkColor color, int icon_size) const; const gfx::VectorIcon* icon_ = nullptr; int icon_size_ = 0; - absl::variant<int, SkColor> color_ = gfx::kPlaceholderColor; + absl::variant<ColorId, SkColor> color_ = gfx::kPlaceholderColor; const gfx::VectorIcon* badge_ = nullptr; };
diff --git a/ui/ozone/platform/wayland/host/wayland_surface.cc b/ui/ozone/platform/wayland/host/wayland_surface.cc index 986db5d..aba688ea 100644 --- a/ui/ozone/platform/wayland/host/wayland_surface.cc +++ b/ui/ozone/platform/wayland/host/wayland_surface.cc
@@ -339,6 +339,14 @@ } } +void WaylandSurface::SetBlending(const bool use_blending) { + if (blending()) { + zcr_blending_v1_set_blending( + blending(), use_blending ? ZCR_BLENDING_V1_BLENDING_EQUATION_PREMULT + : ZCR_BLENDING_V1_BLENDING_EQUATION_NONE); + } +} + void WaylandSurface::SetViewportDestination(const gfx::Size& dest_size_px) { if (dest_size_px == gfx::ScaleToRoundedSize(display_size_dip_, buffer_scale_)) return;
diff --git a/ui/ozone/platform/wayland/host/wayland_surface.h b/ui/ozone/platform/wayland/host/wayland_surface.h index 99a70ee4e..5d1094c4 100644 --- a/ui/ozone/platform/wayland/host/wayland_surface.h +++ b/ui/ozone/platform/wayland/host/wayland_surface.h
@@ -120,6 +120,10 @@ // See: alpha-compositing-unstable-v1.xml void SetOpacity(const float opacity); + // Sets the blending equation of the wl_surface using + // zcr_blending_v1_set_blending. See: alpha-compositing-unstable-v1.xml + void SetBlending(const bool use_blending); + // Set the destination size of the associated wl_surface according to // |dest_size_px|, which should be in physical pixels. // Note this method sends corresponding wayland requests immediately because
diff --git a/ui/ozone/platform/wayland/host/wayland_window.cc b/ui/ozone/platform/wayland/host/wayland_window.cc index 3fe8cbe..c047d32 100644 --- a/ui/ozone/platform/wayland/host/wayland_window.cc +++ b/ui/ozone/platform/wayland/host/wayland_window.cc
@@ -799,6 +799,7 @@ (*iter)->wayland_surface()->SetViewportSource( (*overlay_iter)->crop_rect); (*iter)->wayland_surface()->SetOpacity((*overlay_iter)->opacity); + (*iter)->wayland_surface()->SetBlending((*overlay_iter)->enable_blend); (*iter)->wayland_surface()->SetViewportDestination( (*overlay_iter)->bounds_rect.size()); connection_->buffer_manager_host()->CommitBufferInternal( @@ -836,6 +837,7 @@ (*iter)->wayland_surface()->SetViewportSource( (*overlay_iter)->crop_rect); (*iter)->wayland_surface()->SetOpacity((*overlay_iter)->opacity); + (*iter)->wayland_surface()->SetBlending((*overlay_iter)->enable_blend); (*iter)->wayland_surface()->SetViewportDestination( (*overlay_iter)->bounds_rect.size()); connection_->buffer_manager_host()->CommitBufferInternal( @@ -886,6 +888,7 @@ primary_subsurface_->wayland_surface()->SetViewportSource( (*split)->crop_rect); primary_subsurface_->wayland_surface()->SetOpacity((*split)->opacity); + primary_subsurface_->wayland_surface()->SetBlending((*split)->enable_blend); primary_subsurface_->wayland_surface()->SetViewportDestination( (*split)->crop_rect == gfx::RectF(1.f, 1.f) ? gfx::Size()
diff --git a/ui/views/background.cc b/ui/views/background.cc index 364253ae..f9a8fad 100644 --- a/ui/views/background.cc +++ b/ui/views/background.cc
@@ -83,7 +83,7 @@ } void Paint(gfx::Canvas* canvas, View* view) const override { - canvas->DrawImageInt(icon_.GetImageSkia(view->GetNativeTheme()), 0, 0); + canvas->DrawImageInt(icon_.GetImageSkia(view->GetColorProvider()), 0, 0); } private:
diff --git a/ui/views/bubble/bubble_frame_view.cc b/ui/views/bubble/bubble_frame_view.cc index dea1afa7..08b703f 100644 --- a/ui/views/bubble/bubble_frame_view.cc +++ b/ui/views/bubble/bubble_frame_view.cc
@@ -295,7 +295,7 @@ gfx::ImageSkia image; if (GetWidget()->widget_delegate()->ShouldShowWindowIcon()) { image = GetImageSkiaFromImageModel( - GetWidget()->widget_delegate()->GetWindowIcon(), GetNativeTheme()); + GetWidget()->widget_delegate()->GetWindowIcon(), GetColorProvider()); } title_icon_->SetImage(&image); }
diff --git a/ui/views/controls/button/label_button.cc b/ui/views/controls/button/label_button.cc index fdc47d8..673ccbf 100644 --- a/ui/views/controls/button/label_button.cc +++ b/ui/views/controls/button/label_button.cc
@@ -68,7 +68,7 @@ gfx::ImageSkia LabelButton::GetImage(ButtonState for_state) const { for_state = ImageStateForState(for_state); return GetImageSkiaFromImageModel(button_state_image_models_[for_state], - GetNativeTheme()); + GetColorProvider()); } void LabelButton::SetImage(ButtonState for_state, const gfx::ImageSkia& image) {
diff --git a/ui/views/controls/combobox/combobox.cc b/ui/views/controls/combobox/combobox.cc index bf5eace2..565319e 100644 --- a/ui/views/controls/combobox/combobox.cc +++ b/ui/views/controls/combobox/combobox.cc
@@ -605,7 +605,7 @@ ui::ImageModel icon = GetModel()->GetIconAt(selected_index_); if (!icon.IsEmpty()) { gfx::ImageSkia icon_skia = - GetImageSkiaFromImageModel(icon, GetNativeTheme()); + GetImageSkiaFromImageModel(icon, GetColorProvider()); int icon_y = y + (contents_height - icon_skia.height()) / 2; gfx::Rect icon_bounds(x, icon_y, icon_skia.width(), icon_skia.height()); AdjustBoundsForRTLUI(&icon_bounds); @@ -715,7 +715,7 @@ if (!icon.IsEmpty()) { gfx::ImageSkia icon_skia; if (GetWidget()) - icon_skia = GetImageSkiaFromImageModel(icon, GetNativeTheme()); + icon_skia = GetImageSkiaFromImageModel(icon, GetColorProvider()); item_width += icon_skia.width() + LayoutProvider::Get()->GetDistanceMetric( DISTANCE_RELATED_LABEL_HORIZONTAL);
diff --git a/ui/views/controls/image_view.cc b/ui/views/controls/image_view.cc index 1aa81fc..bbf9ccc 100644 --- a/ui/views/controls/image_view.cc +++ b/ui/views/controls/image_view.cc
@@ -66,7 +66,7 @@ } gfx::ImageSkia ImageView::GetImage() const { - return views::GetImageSkiaFromImageModel(image_model_, GetNativeTheme()); + return views::GetImageSkiaFromImageModel(image_model_, GetColorProvider()); } ui::ImageModel ImageView::GetImageModel() const { @@ -278,7 +278,7 @@ if (image_model_.IsImage() || image_model_.IsImageGenerator()) { const gfx::ImageSkia image = - views::GetImageSkiaFromImageModel(image_model_, GetNativeTheme()); + views::GetImageSkiaFromImageModel(image_model_, GetColorProvider()); if (image.isNull()) return image; @@ -301,7 +301,7 @@ scale)); } else if (scaled_image_.isNull()) { scaled_image_ = - views::GetImageSkiaFromImageModel(image_model_, GetNativeTheme()); + views::GetImageSkiaFromImageModel(image_model_, GetColorProvider()); } return scaled_image_; }
diff --git a/ui/views/controls/menu/menu_item_view.cc b/ui/views/controls/menu/menu_item_view.cc index 9b73a8a..6bbf680 100644 --- a/ui/views/controls/menu/menu_item_view.cc +++ b/ui/views/controls/menu/menu_item_view.cc
@@ -144,11 +144,11 @@ // static int MenuItemView::pref_menu_height_; -MenuItemView::MenuItemView(MenuDelegate* delegate) : delegate_(delegate) { - // NOTE: don't check the delegate for NULL, UpdateMenuPartSizes() supplies a - // NULL delegate. - Init(nullptr, 0, Type::kSubMenu); -} +MenuItemView::MenuItemView(MenuDelegate* delegate) + : MenuItemView(/* parent */ nullptr, + /* command */ 0, + Type::kSubMenu, + delegate) {} void MenuItemView::ChildPreferredSizeChanged(View* child) { invalidate_dimensions(); @@ -820,9 +820,8 @@ MenuItemView::MenuItemView(MenuItemView* parent, int command, - MenuItemView::Type type) { - Init(parent, command, type); -} + MenuItemView::Type type) + : MenuItemView(parent, command, type, /* delegate */ nullptr) {} MenuItemView::~MenuItemView() { if (GetMenuController()) @@ -832,9 +831,6 @@ delete item; } -// Calculates all sizes that we can from the OS. -// -// This is invoked prior to Running a menu. void MenuItemView::UpdateMenuPartSizes() { const MenuConfig& config = MenuConfig::instance(); @@ -865,15 +861,16 @@ pref_menu_height_ = menu_item.GetPreferredSize().height(); } -void MenuItemView::Init(MenuItemView* parent, - int command, - MenuItemView::Type type) { - parent_menu_item_ = parent; - type_ = type; - command_ = command; +MenuItemView::MenuItemView(MenuItemView* parent, + int command, + Type type, + MenuDelegate* delegate) + : delegate_(delegate), + parent_menu_item_(parent), + type_(type), + command_(command) { // Assign our ID, this allows SubmenuItemView to find MenuItemViews. SetID(kMenuItemViewID); - has_icons_ = false; if (type_ == Type::kCheckbox || type_ == Type::kRadio) { radio_check_image_view_ = AddChildView(std::make_unique<ImageView>()); @@ -887,9 +884,6 @@ if (type_ == Type::kActionableSubMenu) vertical_separator_ = AddChildView(std::make_unique<VerticalSeparator>()); - if (submenu_arrow_image_view_) - submenu_arrow_image_view_->SetVisible(HasSubmenu()); - // Don't request enabled status from the root menu item as it is just // a container for real items. kEmpty items will be disabled. MenuDelegate* root_delegate = GetDelegate(); @@ -1139,7 +1133,7 @@ if (!minor_icon.IsEmpty()) { const gfx::ImageSkia image = - GetImageSkiaFromImageModel(minor_icon, GetNativeTheme()); + GetImageSkiaFromImageModel(minor_icon, GetColorProvider()); int image_x = GetMirroredRect(minor_text_bounds).right() - render_text->GetContentWidth() -
diff --git a/ui/views/controls/menu/menu_item_view.h b/ui/views/controls/menu/menu_item_view.h index af042b77..c325e90 100644 --- a/ui/views/controls/menu/menu_item_view.h +++ b/ui/views/controls/menu/menu_item_view.h
@@ -409,14 +409,16 @@ SkColor minor_fg_color = SK_ColorTRANSPARENT; }; + MenuItemView(MenuItemView* parent, + int command, + Type type, + MenuDelegate* delegate); + // Calculates all sizes that we can from the OS. // // This is invoked prior to Running a menu. void UpdateMenuPartSizes(); - // Called by the two constructors to initialize this menu item. - void Init(MenuItemView* parent, int command, MenuItemView::Type type); - // The RunXXX methods call into this to set up the necessary state before // running. |is_first_menu| is true if no menus are currently showing. void PrepareForRun(bool is_first_menu, @@ -550,7 +552,7 @@ // Type of menu. NOTE: MenuItemView doesn't itself represent SEPARATOR, // that is handled by an entirely different view class. - Type type_ = Type::kSubMenu; + const Type type_; // Whether we're selected. bool selected_ = false;
diff --git a/ui/views/controls/table/table_view.cc b/ui/views/controls/table/table_view.cc index 266d4c6..6eb54fa 100644 --- a/ui/views/controls/table/table_view.cc +++ b/ui/views/controls/table/table_view.cc
@@ -941,7 +941,7 @@ // Always paint the icon in the first visible column. if (j == 0 && table_type_ == ICON_AND_TEXT) { gfx::ImageSkia image = views::GetImageSkiaFromImageModel( - model_->GetIcon(model_index), GetNativeTheme()); + model_->GetIcon(model_index), GetColorProvider()); if (!image.isNull()) { int image_x = GetMirroredXWithWidthInView(text_x, ui::TableModel::kIconSize);
diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc index 06253ba..634c627 100644 --- a/ui/views/controls/textfield/textfield.cc +++ b/ui/views/controls/textfield/textfield.cc
@@ -1773,10 +1773,9 @@ TextInputClient::SubClass::kTextField); #if BUILDFLAG(IS_CHROMEOS_ASH) - auto* input_method_manager = - chromeos::input_method::InputMethodManager::Get(); + auto* input_method_manager = ash::input_method::InputMethodManager::Get(); if (input_method_manager && - chromeos::extension_ime_util::IsExperimentalMultilingual( + ash::extension_ime_util::IsExperimentalMultilingual( input_method_manager->GetActiveIMEState() ->GetCurrentInputMethod() .id())) {
diff --git a/ui/views/image_model_utils.cc b/ui/views/image_model_utils.cc index b07643f..c4264bca 100644 --- a/ui/views/image_model_utils.cc +++ b/ui/views/image_model_utils.cc
@@ -8,19 +8,20 @@ namespace views { -gfx::ImageSkia GetImageSkiaFromImageModel(const ui::ImageModel& model, - const ui::NativeTheme* native_theme) { +gfx::ImageSkia GetImageSkiaFromImageModel( + const ui::ImageModel& model, + const ui::ColorProvider* color_provider) { if (model.IsImage()) return model.GetImage().AsImageSkia(); if (model.IsVectorIcon()) { - DCHECK(native_theme); + DCHECK(color_provider); return ui::ThemedVectorIcon(model.GetVectorIcon()) - .GetImageSkia(native_theme); + .GetImageSkia(color_provider); } if (model.IsImageGenerator()) - return model.GetImageGenerator().Run(native_theme); + return model.GetImageGenerator().Run(color_provider); return gfx::ImageSkia(); }
diff --git a/ui/views/image_model_utils.h b/ui/views/image_model_utils.h index 62969bc6..243ebed 100644 --- a/ui/views/image_model_utils.h +++ b/ui/views/image_model_utils.h
@@ -9,18 +9,18 @@ #include "ui/views/views_export.h" namespace ui { +class ColorProvider; class ImageModel; -class NativeTheme; } // namespace ui namespace views { // Returns an ImageSkia representation from an ImageModel representation. -// `native_theme` must be non-null if `model` represents a vector icon. If +// `color_provider` must be non-null if `model` represents a vector icon. If // `model` is empty, it returns an empty ImageSkia. VIEWS_EXPORT gfx::ImageSkia GetImageSkiaFromImageModel( const ui::ImageModel& model, - const ui::NativeTheme* native_theme = nullptr); + const ui::ColorProvider* color_provider = nullptr); } // namespace views #endif // UI_VIEWS_IMAGE_MODEL_UTILS_H_
diff --git a/ui/views/image_model_utils_unittest.cc b/ui/views/image_model_utils_unittest.cc index f08ade7..7a7cb6d 100644 --- a/ui/views/image_model_utils_unittest.cc +++ b/ui/views/image_model_utils_unittest.cc
@@ -7,8 +7,8 @@ #include "components/vector_icons/vector_icons.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/base/models/image_model.h" +#include "ui/color/color_provider.h" #include "ui/gfx/image/image_unittest_util.h" -#include "ui/native_theme/test_native_theme.h" namespace views { @@ -18,9 +18,9 @@ } TEST(GetImageSkiaFromImageModel, ShouldConvertVectorIcon) { - ui::TestNativeTheme test_theme; + ui::ColorProvider color_provider; gfx::ImageSkia image_skia = GetImageSkiaFromImageModel( - ui::ImageModel::FromVectorIcon(vector_icons::kSyncIcon), &test_theme); + ui::ImageModel::FromVectorIcon(vector_icons::kSyncIcon), &color_provider); EXPECT_FALSE(image_skia.isNull()); }
diff --git a/ui/views/widget/widget.cc b/ui/views/widget/widget.cc index aeef5e3..5d228ecd 100644 --- a/ui/views/widget/widget.cc +++ b/ui/views/widget/widget.cc
@@ -989,7 +989,7 @@ non_client_view_->UpdateWindowIcon(); gfx::ImageSkia window_icon = GetImageSkiaFromImageModel( - widget_delegate_->GetWindowIcon(), GetNativeTheme()); + widget_delegate_->GetWindowIcon(), GetColorProvider()); // In general, icon information is read from a |widget_delegate_| and then // passed to |native_widget_|. On ChromeOS, for lacros-chrome to support the @@ -1005,7 +1005,7 @@ } gfx::ImageSkia app_icon = GetImageSkiaFromImageModel( - widget_delegate_->GetWindowAppIcon(), GetNativeTheme()); + widget_delegate_->GetWindowAppIcon(), GetColorProvider()); if (app_icon.isNull()) { const gfx::ImageSkia* icon = native_widget_->GetWindowAppIcon(); if (icon && !icon->isNull())
diff --git a/url/url_canon_host.cc b/url/url_canon_host.cc index dc867b8..42312c5 100644 --- a/url/url_canon_host.cc +++ b/url/url_canon_host.cc
@@ -2,7 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <unordered_set> + #include "base/check.h" +#include "base/metrics/histogram_macros.h" #include "url/url_canon.h" #include "url/url_canon_internal.h" @@ -129,6 +132,8 @@ bool* has_non_ascii) { *has_non_ascii = false; + std::unordered_set<char> escaped_chars_to_measure; + bool success = true; for (int i = 0; i < host_len; ++i) { unsigned int source = host[i]; @@ -156,6 +161,7 @@ } else if (replacement == kEsc) { // This character is valid but should be escaped. AppendEscapedChar(source, output); + escaped_chars_to_measure.insert(source); } else { // Common case, the given character is valid in a hostname, the lookup // table tells us the canonical representation of that character (lower @@ -170,6 +176,16 @@ *has_non_ascii = true; } } + if (success) { + bool did_escape = !escaped_chars_to_measure.empty(); + UMA_HISTOGRAM_BOOLEAN("URL.Host.DidEscape", did_escape); + if (did_escape) { + for (char c : escaped_chars_to_measure) { + UMA_HISTOGRAM_ENUMERATION("URL.Host.EscapeChar", + EscapedHostCharToEnum(c)); + } + } + } return success; }
diff --git a/url/url_canon_internal.cc b/url/url_canon_internal.cc index 3050ba5..802b8da 100644 --- a/url/url_canon_internal.cc +++ b/url/url_canon_internal.cc
@@ -435,4 +435,49 @@ #endif // !WIN32 +EscapedHostChar EscapedHostCharToEnum(char c) { + switch (c) { + case ' ': + return EscapedHostChar::kSpace; + case '!': + return EscapedHostChar::kBang; + case '"': + return EscapedHostChar::kDoubleQuote; + case '#': + return EscapedHostChar::kHash; + case '$': + return EscapedHostChar::kDollar; + case '&': + return EscapedHostChar::kAmpersand; + case '\'': + return EscapedHostChar::kSingleQuote; + case '(': + return EscapedHostChar::kLeftParen; + case ')': + return EscapedHostChar::kRightParen; + case '*': + return EscapedHostChar::kAsterisk; + case ',': + return EscapedHostChar::kComma; + case '<': + return EscapedHostChar::kLeftAngle; + case '=': + return EscapedHostChar::kEquals; + case '>': + return EscapedHostChar::kRightAngle; + case '@': + return EscapedHostChar::kAt; + case '`': + return EscapedHostChar::kBackTick; + case '{': + return EscapedHostChar::kLeftCurly; + case '|': + return EscapedHostChar::kPipe; + case '}': + return EscapedHostChar::kRightCurly; + default: + return EscapedHostChar::kUnknown; + } +} + } // namespace url
diff --git a/url/url_canon_internal.h b/url/url_canon_internal.h index b486673..f7125cad 100644 --- a/url/url_canon_internal.h +++ b/url/url_canon_internal.h
@@ -456,6 +456,35 @@ #endif // WIN32 +// These values are logged to UMA. Entries should not be renumbered and +// numeric values should never be reused. Please keep in sync with +// "URLHostEscapedHostChar" in src/tools/metrics/histograms/enums.xml. +enum class EscapedHostChar { + kUnknown = 0, + kSpace = 1, + kBang = 2, + kDoubleQuote = 3, + kHash = 4, + kDollar = 5, + kAmpersand = 6, + kSingleQuote = 7, + kLeftParen = 8, + kRightParen = 9, + kAsterisk = 10, + kComma = 11, + kLeftAngle = 12, + kEquals = 13, + kRightAngle = 14, + kAt = 15, + kBackTick = 16, + kLeftCurly = 17, + kPipe = 18, + kRightCurly = 19, + kMaxValue = kRightCurly, +}; + +COMPONENT_EXPORT(URL) EscapedHostChar EscapedHostCharToEnum(char c); + } // namespace url #endif // URL_URL_CANON_INTERNAL_H_
diff --git a/url/url_canon_unittest.cc b/url/url_canon_unittest.cc index 9596375a..f7c5358 100644 --- a/url/url_canon_unittest.cc +++ b/url/url_canon_unittest.cc
@@ -9,6 +9,7 @@ #include "base/strings/string_piece.h" #include "base/strings/utf_string_conversions.h" #include "base/test/gtest_util.h" +#include "base/test/metrics/histogram_tester.h" #include "testing/gtest/include/gtest/gtest.h" #include "url/third_party/mozilla/url_parse.h" #include "url/url_canon.h" @@ -2603,4 +2604,49 @@ output.set_length(0); } +TEST(URLCanonTest, EscapedHostCharToEnum) { + EXPECT_EQ(EscapedHostChar::kSpace, EscapedHostCharToEnum(' ')); + EXPECT_EQ(EscapedHostChar::kBang, EscapedHostCharToEnum('!')); + EXPECT_EQ(EscapedHostChar::kDoubleQuote, EscapedHostCharToEnum('"')); + EXPECT_EQ(EscapedHostChar::kHash, EscapedHostCharToEnum('#')); + EXPECT_EQ(EscapedHostChar::kDollar, EscapedHostCharToEnum('$')); + EXPECT_EQ(EscapedHostChar::kAmpersand, EscapedHostCharToEnum('&')); + EXPECT_EQ(EscapedHostChar::kSingleQuote, EscapedHostCharToEnum('\'')); + EXPECT_EQ(EscapedHostChar::kLeftParen, EscapedHostCharToEnum('(')); + EXPECT_EQ(EscapedHostChar::kRightParen, EscapedHostCharToEnum(')')); + EXPECT_EQ(EscapedHostChar::kAsterisk, EscapedHostCharToEnum('*')); + EXPECT_EQ(EscapedHostChar::kComma, EscapedHostCharToEnum(',')); + EXPECT_EQ(EscapedHostChar::kLeftAngle, EscapedHostCharToEnum('<')); + EXPECT_EQ(EscapedHostChar::kEquals, EscapedHostCharToEnum('=')); + EXPECT_EQ(EscapedHostChar::kRightAngle, EscapedHostCharToEnum('>')); + EXPECT_EQ(EscapedHostChar::kAt, EscapedHostCharToEnum('@')); + EXPECT_EQ(EscapedHostChar::kBackTick, EscapedHostCharToEnum('`')); + EXPECT_EQ(EscapedHostChar::kLeftCurly, EscapedHostCharToEnum('{')); + EXPECT_EQ(EscapedHostChar::kPipe, EscapedHostCharToEnum('|')); + EXPECT_EQ(EscapedHostChar::kRightCurly, EscapedHostCharToEnum('}')); + + EXPECT_EQ(EscapedHostChar::kUnknown, EscapedHostCharToEnum('a')); + EXPECT_EQ(EscapedHostChar::kUnknown, EscapedHostCharToEnum('\\')); +} + +TEST(URLCanonTest, EscapedHostCharHistograms) { + std::string input("foo <bar>"); + + Component in_comp(0, input.size()); + Component out_comp; + std::string out_str; + StdStringCanonOutput output(&out_str); + + base::HistogramTester histogram_tester; + bool success = CanonicalizeHost(input.data(), in_comp, &output, &out_comp); + ASSERT_TRUE(success); + histogram_tester.ExpectBucketCount("URL.Host.DidEscape", 1, 1); + histogram_tester.ExpectBucketCount("URL.Host.EscapeChar", + EscapedHostChar::kSpace, 1); + histogram_tester.ExpectBucketCount("URL.Host.EscapeChar", + EscapedHostChar::kLeftAngle, 1); + histogram_tester.ExpectBucketCount("URL.Host.EscapeChar", + EscapedHostChar::kRightAngle, 1); +} + } // namespace url