summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgbillock@chromium.org <gbillock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-16 00:52:18 +0000
committergbillock@chromium.org <gbillock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-16 00:52:18 +0000
commit2a39d61f95c032c9802da6a7eb6f977c8002568d (patch)
treeb007cfd9be57e36adbecc444a6b5ffb670eeb652
parent85d63d28ae1ce458ecf694ab7333a9b3ba4fa7dd (diff)
downloadchromium_src-2a39d61f95c032c9802da6a7eb6f977c8002568d.zip
chromium_src-2a39d61f95c032c9802da6a7eb6f977c8002568d.tar.gz
chromium_src-2a39d61f95c032c9802da6a7eb6f977c8002568d.tar.bz2
Revert 92744 - Add support for text/html to bookmarks gtk drag/drop.
R=estade@chromium.org BUG=none TEST=BookmarkUtilsGtkTest.WriteBookmarkToSelectionHTML Review URL: http://codereview.chromium.org/7377003 TBR=gbillock@chromium.org Review URL: http://codereview.chromium.org/7390019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92774 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk.cc13
-rw-r--r--chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk_unittest.cc15
2 files changed, 0 insertions, 28 deletions
diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk.cc b/chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk.cc
index 53cd58a..4da5a62 100644
--- a/chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk.cc
+++ b/chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk.cc
@@ -290,7 +290,6 @@ int GetCodeMask(bool folder) {
int rv = ui::CHROME_BOOKMARK_ITEM;
if (!folder) {
rv |= ui::TEXT_URI_LIST |
- ui::TEXT_HTML |
ui::TEXT_PLAIN |
ui::NETSCAPE_URL;
}
@@ -352,18 +351,6 @@ void WriteBookmarksToSelection(const std::vector<const BookmarkNode*>& nodes,
free(uris);
break;
}
- case ui::TEXT_HTML: {
- std::string utf8_title = UTF16ToUTF8(nodes[0]->GetTitle());
- std::string utf8_html = StringPrintf("<a href=\"%s\">%s</a>",
- nodes[0]->GetURL().spec().c_str(),
- utf8_title.c_str());
- gtk_selection_data_set(selection_data,
- GetAtomForTarget(ui::TEXT_HTML),
- kBitsInAByte,
- reinterpret_cast<const guchar*>(utf8_html.data()),
- utf8_html.size());
- break;
- }
case ui::TEXT_PLAIN: {
gtk_selection_data_set_text(selection_data,
nodes[0]->GetURL().spec().c_str(), -1);
diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk_unittest.cc b/chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk_unittest.cc
index 37acead..fa790fc 100644
--- a/chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk_unittest.cc
+++ b/chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk_unittest.cc
@@ -2,11 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include <string>
-#include "base/utf_string_conversions.h"
-#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk.h"
-#include "googleurl/src/gurl.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/dragdrop/gtk_dnd_util.h"
@@ -40,14 +36,3 @@ TEST(BookmarkUtilsGtkTest, GetNodesFromSelectionInvalid) {
ui::CHROME_BOOKMARK_ITEM, NULL, NULL, NULL);
EXPECT_EQ(0u, nodes.size());
}
-
-TEST(BookmarkUtilsGtkTest, WriteBookmarkToSelectionHTML) {
- BookmarkNode x(GURL("http://www.google.com"));
- x.set_title(string16(ASCIIToUTF16("Google")));
- GtkSelectionData data;
- data.data = NULL;
- data.length = 0;
- bookmark_utils::WriteBookmarkToSelection(&x, &data, ui::TEXT_HTML, NULL);
- std::string selection(reinterpret_cast<char*>(data.data), data.length);
- EXPECT_EQ("<a href=\"http://www.google.com/\">Google</a>", selection);
-}