OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/string16.h" | 10 #include "base/string16.h" |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 // current state onto the stack. | 121 // current state onto the stack. |
122 DCHECK_LT(index, node->GetChildCount()); | 122 DCHECK_LT(index, node->GetChildCount()); |
123 index_stack.push(index); | 123 index_stack.push(index); |
124 node = node->GetChild(index); | 124 node = node->GetChild(index); |
125 index = 0; | 125 index = 0; |
126 } | 126 } |
127 } | 127 } |
128 DCHECK(index_stack.empty()); // Nothing should be left on the stack. | 128 DCHECK(index_stack.empty()); // Nothing should be left on the stack. |
129 } | 129 } |
130 | 130 |
| 131 void BookmarkChangeProcessor::Loaded(BookmarkModel* model) { |
| 132 NOTREACHED(); |
| 133 } |
| 134 |
131 void BookmarkChangeProcessor::BookmarkModelBeingDeleted( | 135 void BookmarkChangeProcessor::BookmarkModelBeingDeleted( |
132 BookmarkModel* model) { | 136 BookmarkModel* model) { |
133 DCHECK(!running()) << "BookmarkModel deleted while ChangeProcessor running."; | 137 DCHECK(!running()) << "BookmarkModel deleted while ChangeProcessor running."; |
134 bookmark_model_ = NULL; | 138 bookmark_model_ = NULL; |
135 } | 139 } |
136 | 140 |
137 void BookmarkChangeProcessor::BookmarkNodeAdded(BookmarkModel* model, | 141 void BookmarkChangeProcessor::BookmarkNodeAdded(BookmarkModel* model, |
138 const BookmarkNode* parent, | 142 const BookmarkNode* parent, |
139 int index) { | 143 int index) { |
140 DCHECK(running()); | 144 DCHECK(running()); |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 const BookmarkNode* bookmark_node, | 546 const BookmarkNode* bookmark_node, |
543 BookmarkModel* model, | 547 BookmarkModel* model, |
544 sync_api::WriteNode* sync_node) { | 548 sync_api::WriteNode* sync_node) { |
545 std::vector<unsigned char> favicon_bytes; | 549 std::vector<unsigned char> favicon_bytes; |
546 EncodeFavicon(bookmark_node, model, &favicon_bytes); | 550 EncodeFavicon(bookmark_node, model, &favicon_bytes); |
547 if (!favicon_bytes.empty()) | 551 if (!favicon_bytes.empty()) |
548 sync_node->SetFaviconBytes(favicon_bytes); | 552 sync_node->SetFaviconBytes(favicon_bytes); |
549 } | 553 } |
550 | 554 |
551 } // namespace browser_sync | 555 } // namespace browser_sync |
OLD | NEW |