Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(945)

Unified Diff: chrome/browser/ui/views/tabs/tab_strip.cc

Issue 2014733003: Removing parsing of text from pasteboard. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: moving url parsing up the hierarchy Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/tabs/tab_strip.cc
diff --git a/chrome/browser/ui/views/tabs/tab_strip.cc b/chrome/browser/ui/views/tabs/tab_strip.cc
index 1303b262410f73ae1ef9986eb74151b4aec637f8..bc231b71a5d42fa8a3b8d3774487dccb194e1e75 100644
--- a/chrome/browser/ui/views/tabs/tab_strip.cc
+++ b/chrome/browser/ui/views/tabs/tab_strip.cc
@@ -1614,9 +1614,12 @@ void TabStrip::OnDragEntered(const DropTargetEvent& event) {
GURL url;
base::string16 title;
+ // todo: move PasteAndGo logic from browser_view to tab_strip, so
+ // it has identical behavior in all cases.
// Check whether the event data includes supported drop data.
- if (event.data().GetURLAndTitle(
- ui::OSExchangeData::CONVERT_FILENAMES, &url, &title) &&
+ if (event.data().GetURLAndTitle(ui::OSExchangeData::CONVERT_FILENAMES,
+ ui::OSExchangeData::PARSE_TEXT_AS_URL, &url,
+ &title) &&
url.is_valid()) {
drop_info_->url = url;
@@ -1657,8 +1660,9 @@ int TabStrip::OnPerformDrop(const DropTargetEvent& event) {
GURL url;
base::string16 title;
if (!file_supported ||
- !event.data().GetURLAndTitle(
- ui::OSExchangeData::CONVERT_FILENAMES, &url, &title) ||
+ !event.data().GetURLAndTitle(ui::OSExchangeData::CONVERT_FILENAMES,
+ ui::OSExchangeData::DO_NOT_PARSE_TEXT_AS_URL,
+ &url, &title) ||
!url.is_valid())
return ui::DragDropTypes::DRAG_NONE;

Powered by Google App Engine
This is Rietveld 408576698