| Index: chrome/browser/tab_contents/tab_contents_view_win.cc
|
| ===================================================================
|
| --- chrome/browser/tab_contents/tab_contents_view_win.cc (revision 18152)
|
| +++ chrome/browser/tab_contents/tab_contents_view_win.cc (working copy)
|
| @@ -144,7 +144,8 @@
|
| if (drop_data.url.SchemeIs(chrome::kJavaScriptScheme)) {
|
| // We don't want to allow javascript URLs to be dragged to the desktop,
|
| // but we do want to allow them to be added to the bookmarks bar
|
| - // (bookmarklets).
|
| + // (bookmarklets). So we create a fake bookmark entry (BookmarkDragData
|
| + // object) which explorer.exe cannot handle, and write the entry to data.
|
| BookmarkDragData::Element bm_elt;
|
| bm_elt.is_url = true;
|
| bm_elt.url = drop_data.url;
|
| @@ -153,7 +154,9 @@
|
| BookmarkDragData bm_drag_data;
|
| bm_drag_data.elements.push_back(bm_elt);
|
|
|
| - bm_drag_data.Write(tab_contents()->profile(), data);
|
| + // Pass in NULL as the profile so that the bookmark always adds the url
|
| + // rather than trying to move an existing url.
|
| + bm_drag_data.Write(NULL, data);
|
| } else {
|
| data->SetURL(drop_data.url, drop_data.url_title);
|
| }
|
|
|