From 36ce5c0fe1c6e2dbc49c1a1b9aeb5d46a25c8b7e Mon Sep 17 00:00:00 2001 From: Claudio DeSouza Date: Mon, 9 Dec 2024 14:56:31 +0000 Subject: [PATCH] [cr133] `ClipboardFormatType::GetType` renamed `ClipboardFormatType::CustomPlatformType` is now being used as a more appropriate name. Chromium change: https://chromium.googlesource.com/chromium/src/+/feb09ab1c553ae89237fd8d3ad5f24941b2e6bde commit feb09ab1c553ae89237fd8d3ad5f24941b2e6bde Author: Daniel Cheng Date: Fri Dec 6 18:57:16 2024 +0000 Deprecate ClipboardFormatType::GetType() - ClipboardFormatType::CustomPlatformType() is another synonym and is more descriptive. - Strengthen the DCHECK to a CHECK and improve method comments. - Leave a forwarding stub for GetType() for now. It will be removed in a followup. Change-Id: Ie6ef15f5f9fada25416333e73ca6db0689477ae6 --- browser/ui/views/sidebar/sidebar_items_scroll_view.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/browser/ui/views/sidebar/sidebar_items_scroll_view.cc b/browser/ui/views/sidebar/sidebar_items_scroll_view.cc index fe10645b292e..f22184a84456 100644 --- a/browser/ui/views/sidebar/sidebar_items_scroll_view.cc +++ b/browser/ui/views/sidebar/sidebar_items_scroll_view.cc @@ -468,7 +468,8 @@ bool SidebarItemsScrollView::IsInVisibleContentsViewBounds( bool SidebarItemsScrollView::GetDropFormats( int* formats, std::set* format_types) { - format_types->insert(ui::ClipboardFormatType::GetType(kSidebarItemDragType)); + format_types->insert( + ui::ClipboardFormatType::CustomPlatformType(kSidebarItemDragType)); return true; } @@ -480,7 +481,7 @@ bool SidebarItemsScrollView::CanDrop(const OSExchangeData& data) { } return data.HasCustomFormat( - ui::ClipboardFormatType::GetType(kSidebarItemDragType)); + ui::ClipboardFormatType::CustomPlatformType(kSidebarItemDragType)); } void SidebarItemsScrollView::OnDragExited() { @@ -543,8 +544,9 @@ void SidebarItemsScrollView::WriteDragDataForView(views::View* sender, item_view->GetImage(views::Button::STATE_NORMAL), press_pt.OffsetFromOrigin()); - data->SetPickledData(ui::ClipboardFormatType::GetType(kSidebarItemDragType), - base::Pickle()); + data->SetPickledData( + ui::ClipboardFormatType::CustomPlatformType(kSidebarItemDragType), + base::Pickle()); } int SidebarItemsScrollView::GetDragOperationsForView(views::View* sender,