summaryrefslogtreecommitdiffstats
path: root/chrome/browser/bookmarks/bookmark_drag_data.cc
diff options
context:
space:
mode:
authorsky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-07 17:53:09 +0000
committersky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-07 17:53:09 +0000
commitfafc8a4203d4308251f17fc18a61cfec71a9a27c (patch)
treedfee81ebce10c148f4dfa13b4621bc8fd40473fb /chrome/browser/bookmarks/bookmark_drag_data.cc
parent8bc886faa6a178f51bf094efe491ab1da9595d14 (diff)
downloadchromium_src-fafc8a4203d4308251f17fc18a61cfec71a9a27c.zip
chromium_src-fafc8a4203d4308251f17fc18a61cfec71a9a27c.tar.gz
chromium_src-fafc8a4203d4308251f17fc18a61cfec71a9a27c.tar.bz2
Adds cut/copy/paste support to the bookmark manager tree/table and
context menus. BUG=4186 TEST=try cut/copy/paste from table/tree in the bookmark manager as well as context menus in bookmark manager. Review URL: http://codereview.chromium.org/9481 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4993 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/bookmarks/bookmark_drag_data.cc')
-rw-r--r--chrome/browser/bookmarks/bookmark_drag_data.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/browser/bookmarks/bookmark_drag_data.cc b/chrome/browser/bookmarks/bookmark_drag_data.cc
index c55d24f..2e7285a 100644
--- a/chrome/browser/bookmarks/bookmark_drag_data.cc
+++ b/chrome/browser/bookmarks/bookmark_drag_data.cc
@@ -92,7 +92,7 @@ void BookmarkDragData::Write(Profile* profile, OSExchangeData* data) const {
}
Pickle data_pickle;
- data_pickle.WriteWString(profile->GetPath());
+ data_pickle.WriteWString(profile ? profile->GetPath() : std::wstring());
data_pickle.WriteSize(elements.size());
for (size_t i = 0; i < elements.size(); ++i)
@@ -162,5 +162,6 @@ BookmarkNode* BookmarkDragData::GetFirstNode(Profile* profile) const {
}
bool BookmarkDragData::IsFromProfile(Profile* profile) const {
- return (profile->GetPath() == profile_path_);
+ // An empty path means the data is not associated with any profile.
+ return (!profile_path_.empty() && profile->GetPath() == profile_path_);
}