| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/sync/glue/bookmark_change_processor.h" | 5 #include "chrome/browser/sync/glue/bookmark_change_processor.h" |
| 6 | 6 |
| 7 #include <stack> | 7 #include <stack> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 } | 444 } |
| 445 // Clean up the temporary node. | 445 // Clean up the temporary node. |
| 446 if (foster_parent) { | 446 if (foster_parent) { |
| 447 // There should be no nodes left under the foster parent. | 447 // There should be no nodes left under the foster parent. |
| 448 DCHECK_EQ(foster_parent->child_count(), 0); | 448 DCHECK_EQ(foster_parent->child_count(), 0); |
| 449 model->Remove(foster_parent->parent(), | 449 model->Remove(foster_parent->parent(), |
| 450 foster_parent->parent()->GetIndexOf(foster_parent)); | 450 foster_parent->parent()->GetIndexOf(foster_parent)); |
| 451 foster_parent = NULL; | 451 foster_parent = NULL; |
| 452 } | 452 } |
| 453 | 453 |
| 454 // The visibility of the mobile node may need to change. | |
| 455 model_associator_->UpdateMobileNodeVisibility(); | |
| 456 | |
| 457 // We are now ready to hear about bookmarks changes again. | 454 // We are now ready to hear about bookmarks changes again. |
| 458 model->AddObserver(this); | 455 model->AddObserver(this); |
| 459 } | 456 } |
| 460 | 457 |
| 461 // Create a bookmark node corresponding to |src| if one is not already | 458 // Create a bookmark node corresponding to |src| if one is not already |
| 462 // associated with |src|. | 459 // associated with |src|. |
| 463 const BookmarkNode* BookmarkChangeProcessor::CreateOrUpdateBookmarkNode( | 460 const BookmarkNode* BookmarkChangeProcessor::CreateOrUpdateBookmarkNode( |
| 464 sync_api::BaseNode* src, | 461 sync_api::BaseNode* src, |
| 465 BookmarkModel* model) { | 462 BookmarkModel* model) { |
| 466 const BookmarkNode* parent = | 463 const BookmarkNode* parent = |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 567 const BookmarkNode* bookmark_node, | 564 const BookmarkNode* bookmark_node, |
| 568 BookmarkModel* model, | 565 BookmarkModel* model, |
| 569 sync_api::WriteNode* sync_node) { | 566 sync_api::WriteNode* sync_node) { |
| 570 std::vector<unsigned char> favicon_bytes; | 567 std::vector<unsigned char> favicon_bytes; |
| 571 EncodeFavicon(bookmark_node, model, &favicon_bytes); | 568 EncodeFavicon(bookmark_node, model, &favicon_bytes); |
| 572 if (!favicon_bytes.empty()) | 569 if (!favicon_bytes.empty()) |
| 573 sync_node->SetFaviconBytes(favicon_bytes); | 570 sync_node->SetFaviconBytes(favicon_bytes); |
| 574 } | 571 } |
| 575 | 572 |
| 576 } // namespace browser_sync | 573 } // namespace browser_sync |
| OLD | NEW |