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

Issue 125111: Do not write a profile path on a BookmarkDragData object... (Closed)

Created:
11 years, 6 months ago by Yusuke Sato
Modified:
9 years, 7 months ago
Reviewers:
sky
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Do not write a profile path on a BookmarkDragData object since a dragged url (javascript:...) on a web page does not belong to (the profile's) bookmark model. Currently the following function returns DRAG_NONE and thus the drop operation is not accepted. The reason for the return value is because ops becomes DragDropTypes::DRAG_MOVE (since data.profile_path_ is not empty()) but event.GetSourceOperations() returns DragDropTypes::DRAG_COPY | DragDropTypes::DRAG_LINK. int BookmarkBarView::CalculateDropOperation(const DropTargetEvent& event, ... int ops = data.GetFirstNode(profile_) ? DragDropTypes::DRAG_MOVE : DragDropTypes::DRAG_COPY | DragDropTypes::DRAG_LINK; return bookmark_utils::PreferredDropOperation(event.GetSourceOperations(), ops); BUG=12290 TEST=Open http://delicious.com/help/bookmarklets page and drag the "Bookmark on Delicious" link on "Google Chrome" section to the bookmark bar. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=18584

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 2

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -2 lines) Patch
M chrome/browser/tab_contents/tab_contents_view_win.cc View 1 2 2 chunks +5 lines, -2 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Yusuke Sato
Hi Scott, Could you review this?
11 years, 6 months ago (2009-06-14 16:39:20 UTC) #1
sky
Can you add a comment describing why you're explicitly using NULL here. LGTM with a ...
11 years, 6 months ago (2009-06-15 16:01:28 UTC) #2
Yusuke Sato
Thanks. I've added some comments. Could you take another look? --Yusuke
11 years, 6 months ago (2009-06-16 02:35:23 UTC) #3
sky
http://codereview.chromium.org/125111/diff/5/6 File chrome/browser/tab_contents/tab_contents_view_win.cc (right): http://codereview.chromium.org/125111/diff/5/6#newcode159 Line 159: bm_drag_data.Write(NULL, data); Might I suggest a slightly different ...
11 years, 6 months ago (2009-06-16 14:36:57 UTC) #4
Yusuke Sato
http://codereview.chromium.org/125111/diff/5/6 File chrome/browser/tab_contents/tab_contents_view_win.cc (right): http://codereview.chromium.org/125111/diff/5/6#newcode159 Line 159: bm_drag_data.Write(NULL, data); On 2009/06/16 14:36:57, sky wrote: > ...
11 years, 6 months ago (2009-06-16 16:12:44 UTC) #5
sky
11 years, 6 months ago (2009-06-16 16:39:22 UTC) #6
LGTM

Powered by Google App Engine
This is Rietveld 408576698