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 |
454 // We are now ready to hear about bookmarks changes again. | 457 // We are now ready to hear about bookmarks changes again. |
455 model->AddObserver(this); | 458 model->AddObserver(this); |
456 } | 459 } |
457 | 460 |
458 // Create a bookmark node corresponding to |src| if one is not already | 461 // Create a bookmark node corresponding to |src| if one is not already |
459 // associated with |src|. | 462 // associated with |src|. |
460 const BookmarkNode* BookmarkChangeProcessor::CreateOrUpdateBookmarkNode( | 463 const BookmarkNode* BookmarkChangeProcessor::CreateOrUpdateBookmarkNode( |
461 sync_api::BaseNode* src, | 464 sync_api::BaseNode* src, |
462 BookmarkModel* model) { | 465 BookmarkModel* model) { |
463 const BookmarkNode* parent = | 466 const BookmarkNode* parent = |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 const BookmarkNode* bookmark_node, | 567 const BookmarkNode* bookmark_node, |
565 BookmarkModel* model, | 568 BookmarkModel* model, |
566 sync_api::WriteNode* sync_node) { | 569 sync_api::WriteNode* sync_node) { |
567 std::vector<unsigned char> favicon_bytes; | 570 std::vector<unsigned char> favicon_bytes; |
568 EncodeFavicon(bookmark_node, model, &favicon_bytes); | 571 EncodeFavicon(bookmark_node, model, &favicon_bytes); |
569 if (!favicon_bytes.empty()) | 572 if (!favicon_bytes.empty()) |
570 sync_node->SetFaviconBytes(favicon_bytes); | 573 sync_node->SetFaviconBytes(favicon_bytes); |
571 } | 574 } |
572 | 575 |
573 } // namespace browser_sync | 576 } // namespace browser_sync |
OLD | NEW |