summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync
diff options
context:
space:
mode:
authorarv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-09 21:27:55 +0000
committerarv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-09 21:27:55 +0000
commite548660e28fb368fdf34629d0b229b6a7814fd0f (patch)
treecfa426e539ef4bffe523654ea19ab4eab135c255 /chrome/browser/sync
parentb3b5a01d7ca4fb06cf4a93c9426e77e12ff47bf3 (diff)
downloadchromium_src-e548660e28fb368fdf34629d0b229b6a7814fd0f.zip
chromium_src-e548660e28fb368fdf34629d0b229b6a7814fd0f.tar.gz
chromium_src-e548660e28fb368fdf34629d0b229b6a7814fd0f.tar.bz2
Implement BookmarkModel::SetUrl
BUG=10603 TEST=*_test.exe --gtest_filter=*Bookmark* Also manually tested changing the URL through the bookmarks extension API, bookmark manager, bookmark bar and saw it update in all places and correctly sync to another chrome instance. Review URL: http://codereview.chromium.org/582022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38509 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync')
-rw-r--r--chrome/browser/sync/glue/bookmark_change_processor.cc17
1 files changed, 4 insertions, 13 deletions
diff --git a/chrome/browser/sync/glue/bookmark_change_processor.cc b/chrome/browser/sync/glue/bookmark_change_processor.cc
index 4b45a74..2bf9516 100644
--- a/chrome/browser/sync/glue/bookmark_change_processor.cc
+++ b/chrome/browser/sync/glue/bookmark_change_processor.cc
@@ -452,19 +452,10 @@ const BookmarkNode* BookmarkChangeProcessor::CreateOrUpdateBookmarkNode(
// Handle reparenting and/or repositioning.
model->Move(dst, parent, index);
- // Handle title update and URL changes due to possible conflict resolution
- // that can happen if both a local user change and server change occur
- // within a sufficiently small time interval.
- const BookmarkNode* old_dst = dst;
- dst = bookmark_utils::ApplyEditsWithNoGroupChange(model, parent,
- BookmarkEditor::EditDetails(dst),
- src->GetTitle(),
- src->GetIsFolder() ? GURL() : src->GetURL(),
- NULL); // NULL because we don't need a BookmarkEditor::Handler.
- if (dst != old_dst) { // dst was replaced with a new node with new URL.
- model_associator_->Disassociate(src->GetId());
- model_associator_->Associate(dst, src->GetId());
- }
+ if (!src->GetIsFolder())
+ model->SetURL(dst, src->GetURL());
+ model->SetTitle(dst, src->GetTitle());
+
SetBookmarkFavicon(src, dst, model->profile());
}