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

Unified Diff: chrome/browser/ui/views/omnibox/omnibox_view_views.cc

Issue 208313009: Fix the HTML5 drag and drop demos on Linux and CrOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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/omnibox/omnibox_view_views.cc
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
index 538d386de3322ea57b9ef5a4efb83bd48ab7abf8..1f42a4f4168704f00f95f255686e3246f43df94e 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
@@ -937,7 +937,6 @@ void OmniboxViewViews::OnWriteDragData(ui::OSExchangeData* data) {
base::string16 selected_text = GetSelectedText();
model()->AdjustTextForCopy(GetSelectedRange().GetMin(), is_all_selected,
&selected_text, &url, &write_url);
- data->SetString(selected_text);
if (write_url) {
gfx::Image favicon;
base::string16 title = selected_text;
@@ -945,7 +944,10 @@ void OmniboxViewViews::OnWriteDragData(ui::OSExchangeData* data) {
model()->GetDataForURLExport(&url, &title, &favicon);
button_drag_utils::SetURLAndDragImage(url, title, favicon.AsImageSkia(),
NULL, data, GetWidget());
+ // Setting the URL also sets the string.
Peter Kasting 2014/06/20 20:45:36 This comment needs to say why it's important that
pkotwicz 2014/06/20 22:12:01 I removed the comment because as you mentioned it
data->SetURL(url, title);
+ } else {
+ data->SetString(selected_text);
}
}

Powered by Google App Engine
This is Rietveld 408576698