OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/sync_bookmarks/bookmark_change_processor.h" | 5 #include "components/sync_bookmarks/bookmark_change_processor.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <stack> | 8 #include <stack> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
726 } | 726 } |
727 | 727 |
728 // Clean up the temporary node. | 728 // Clean up the temporary node. |
729 if (foster_parent) { | 729 if (foster_parent) { |
730 // There should be no nodes left under the foster parent. | 730 // There should be no nodes left under the foster parent. |
731 DCHECK_EQ(foster_parent->child_count(), 0); | 731 DCHECK_EQ(foster_parent->child_count(), 0); |
732 model->Remove(foster_parent); | 732 model->Remove(foster_parent); |
733 foster_parent = NULL; | 733 foster_parent = NULL; |
734 } | 734 } |
735 | 735 |
736 // The visibility of the mobile node may need to change. | |
737 model_associator_->UpdatePermanentNodeVisibility(); | |
738 | |
739 // Notify UI intensive observers of BookmarkModel that all updates have been | 736 // Notify UI intensive observers of BookmarkModel that all updates have been |
740 // applied, and that they may now be consumed. This prevents issues like the | 737 // applied, and that they may now be consumed. This prevents issues like the |
741 // one described in crbug.com/281562, where old and new items on the bookmarks | 738 // one described in crbug.com/281562, where old and new items on the bookmarks |
742 // bar would overlap. | 739 // bar would overlap. |
743 model->EndExtensiveChanges(); | 740 model->EndExtensiveChanges(); |
744 | 741 |
745 // We are now ready to hear about bookmarks changes again. | 742 // We are now ready to hear about bookmarks changes again. |
746 model->AddObserver(this); | 743 model->AddObserver(this); |
747 | 744 |
748 // All changes are applied in bookmark model. Set transaction version on | 745 // All changes are applied in bookmark model. Set transaction version on |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
963 updated_specifics.set_icon_url(bookmark_node->icon_url().spec()); | 960 updated_specifics.set_icon_url(bookmark_node->icon_url().spec()); |
964 sync_node->SetBookmarkSpecifics(updated_specifics); | 961 sync_node->SetBookmarkSpecifics(updated_specifics); |
965 } | 962 } |
966 } | 963 } |
967 | 964 |
968 bool BookmarkChangeProcessor::CanSyncNode(const BookmarkNode* node) { | 965 bool BookmarkChangeProcessor::CanSyncNode(const BookmarkNode* node) { |
969 return bookmark_model_->client()->CanSyncNode(node); | 966 return bookmark_model_->client()->CanSyncNode(node); |
970 } | 967 } |
971 | 968 |
972 } // namespace browser_sync | 969 } // namespace browser_sync |
OLD | NEW |