From 44063b4e3ea781d1f9cbfd392e2cec56a8f54509 Mon Sep 17 00:00:00 2001 From: "viettrungluu@chromium.org" Date: Sun, 29 Aug 2010 00:45:28 +0000 Subject: Remove wstrings from bookmarks, part 17. This converts lots of (wstring) GetTitle()s to (string16) GetTitleAsString16(). Soon, I'll be able to delete the former, and rename the latter (s/AsString16//). BUG=23581 TEST=builds and passes tests Review URL: http://codereview.chromium.org/3226004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57800 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/importer/profile_writer.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'chrome/browser/importer') diff --git a/chrome/browser/importer/profile_writer.cc b/chrome/browser/importer/profile_writer.cc index 671b860..0f89283 100644 --- a/chrome/browser/importer/profile_writer.cc +++ b/chrome/browser/importer/profile_writer.cc @@ -101,7 +101,7 @@ void ProfileWriter::AddBookmarkEntry( const BookmarkNode* node = parent->GetChild(index); if ((node->type() == BookmarkNode::BOOKMARK_BAR || node->type() == BookmarkNode::FOLDER) && - node->GetTitle() == folder_name) { + node->GetTitleAsString16() == WideToUTF16Hack(folder_name)) { child = node; break; } @@ -286,7 +286,7 @@ std::wstring ProfileWriter::GenerateUniqueFolderName( for (int i = 0, child_count = other->GetChildCount(); i < child_count; ++i) { const BookmarkNode* node = other->GetChild(i); if (node->is_folder()) - other_folder_names.insert(node->GetTitle()); + other_folder_names.insert(UTF16ToWideHack(node->GetTitleAsString16())); } if (other_folder_names.find(folder_name) == other_folder_names.end()) @@ -314,7 +314,7 @@ bool ProfileWriter::DoesBookmarkExist( for (size_t i = 0; i < nodes_with_same_url.size(); ++i) { const BookmarkNode* node = nodes_with_same_url[i]; - if (entry.title != node->GetTitle()) + if (WideToUTF16Hack(entry.title) != node->GetTitleAsString16()) continue; // Does the path match? -- cgit v1.1