summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/glue
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-29 00:45:28 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-29 00:45:28 +0000
commit44063b4e3ea781d1f9cbfd392e2cec56a8f54509 (patch)
treec582c8bbd42e37dd07534273882ca05719d9f78e /chrome/browser/sync/glue
parent969894aba3265e77edafbc6556941ea693485cd8 (diff)
downloadchromium_src-44063b4e3ea781d1f9cbfd392e2cec56a8f54509.zip
chromium_src-44063b4e3ea781d1f9cbfd392e2cec56a8f54509.tar.gz
chromium_src-44063b4e3ea781d1f9cbfd392e2cec56a8f54509.tar.bz2
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
Diffstat (limited to 'chrome/browser/sync/glue')
-rw-r--r--chrome/browser/sync/glue/bookmark_change_processor.cc2
-rw-r--r--chrome/browser/sync/glue/bookmark_model_associator.cc5
2 files changed, 4 insertions, 3 deletions
diff --git a/chrome/browser/sync/glue/bookmark_change_processor.cc b/chrome/browser/sync/glue/bookmark_change_processor.cc
index 03cce0b..6fcdf69 100644
--- a/chrome/browser/sync/glue/bookmark_change_processor.cc
+++ b/chrome/browser/sync/glue/bookmark_change_processor.cc
@@ -51,7 +51,7 @@ void BookmarkChangeProcessor::UpdateSyncNodeProperties(
const BookmarkNode* src, BookmarkModel* model, sync_api::WriteNode* dst) {
// Set the properties of the item.
dst->SetIsFolder(src->is_folder());
- dst->SetTitle(src->GetTitle());
+ dst->SetTitle(UTF16ToWideHack(src->GetTitleAsString16()));
if (!src->is_folder())
dst->SetURL(src->GetURL());
SetSyncNodeFavicon(src, model, dst);
diff --git a/chrome/browser/sync/glue/bookmark_model_associator.cc b/chrome/browser/sync/glue/bookmark_model_associator.cc
index 6d9d96aa..b52932e 100644
--- a/chrome/browser/sync/glue/bookmark_model_associator.cc
+++ b/chrome/browser/sync/glue/bookmark_model_associator.cc
@@ -54,7 +54,8 @@ class BookmarkComparer {
if (node1->is_folder() != node2->is_folder())
return node1->is_folder();
- int result = node1->GetTitle().compare(node2->GetTitle());
+ int result =
+ node1->GetTitleAsString16().compare(node2->GetTitleAsString16());
if (result != 0)
return result < 0;
@@ -257,7 +258,7 @@ bool BookmarkModelAssociator::SyncModelHasUserCreatedNodes(bool* has_nodes) {
bool BookmarkModelAssociator::NodesMatch(const BookmarkNode* bookmark,
const sync_api::BaseNode* sync_node) const {
- if (bookmark->GetTitle() != sync_node->GetTitle())
+ if (bookmark->GetTitleAsString16() != WideToUTF16Hack(sync_node->GetTitle()))
return false;
if (bookmark->is_folder() != sync_node->GetIsFolder())
return false;