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

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

Issue 135633002: Don't populate URL data in WebDropData when dragging files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Blink style enums Created 6 years, 11 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 779415ce34d41946ac09a825f11c921ae7da7485..42c1c657f22652debd48d580e0913fec724436f1 100644
--- a/chrome/browser/ui/views/tabs/tab_strip.cc
+++ b/chrome/browser/ui/views/tabs/tab_strip.cc
@@ -1410,7 +1410,9 @@ void TabStrip::OnDragEntered(const DropTargetEvent& event) {
base::string16 title;
// Check whether the event data includes supported drop data.
- if (event.data().GetURLAndTitle(&url, &title) && url.is_valid()) {
+ if (event.data().GetURLAndTitle(
+ ui::OSExchangeData::CONVERT_FILENAMES, &url, &title) &&
+ url.is_valid()) {
drop_info_->url = url;
// For file:// URLs, kick off a MIME type request in case they're dropped.
@@ -1450,7 +1452,9 @@ int TabStrip::OnPerformDrop(const DropTargetEvent& event) {
GURL url;
base::string16 title;
if (!file_supported ||
- !event.data().GetURLAndTitle(&url, &title) || !url.is_valid())
+ !event.data().GetURLAndTitle(
+ ui::OSExchangeData::CONVERT_FILENAMES, &url, &title) ||
+ !url.is_valid())
return ui::DragDropTypes::DRAG_NONE;
controller()->PerformDrop(drop_before, drop_index, url);
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_view_views.cc ('k') | chrome/browser/ui/views/toolbar/home_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698