Commit 84ea488b authored by Evan Stade's avatar Evan Stade Committed by Chromium LUCI CQ

Revert changes to location bar on Linux.

This reverts commits d4449153 and
79cee575 which are no longer necessary
after f6658bc4

Bug: 1161143
Change-Id: I0893d147bb4a6384204198738df7a46cd855a932
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2640378Reviewed-by: default avatarJustin Donnelly <jdonnelly@chromium.org>
Commit-Queue: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#845719}
parent 2c3d1a4a
......@@ -1242,16 +1242,8 @@ void LocationBarView::OnLocationIconPressed(const ui::MouseEvent& event) {
ui::Clipboard::IsSupportedClipboardBuffer(
ui::ClipboardBuffer::kSelection)) {
base::string16 text;
// Since ReadText() runs a nested message loop, |this| may be deleted before
// it returns. See https://crbug.com/1161143
auto weak_this = weak_factory_.GetWeakPtr();
ui::Clipboard::GetForCurrentThread()->ReadText(
ui::ClipboardBuffer::kSelection, /* data_dst = */ nullptr, &text);
if (!weak_this) {
return;
}
text = OmniboxView::SanitizeTextForPaste(text);
if (!GetOmniboxView()->model()->CanPasteAndGo(text)) {
......
......@@ -77,10 +77,9 @@ bool LocationIconView::IsBubbleShowing() const {
}
bool LocationIconView::OnMousePressed(const ui::MouseEvent& event) {
IconLabelBubbleView::OnMousePressed(event);
delegate_->OnLocationIconPressed(event);
// Since OnLocationIconPressed() runs a nested message loop on Linux, |this|
// may be deleted by now.
IconLabelBubbleView::OnMousePressed(event);
return true;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment