OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 // TODO(akalin): This file is basically just a unit test for | 5 // TODO(akalin): This file is basically just a unit test for |
6 // BookmarkChangeProcessor. Write unit tests for | 6 // BookmarkChangeProcessor. Write unit tests for |
7 // BookmarkModelAssociator separately. | 7 // BookmarkModelAssociator separately. |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <queue> | 10 #include <queue> |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 | 213 |
214 // The transaction on which everything happens. | 214 // The transaction on which everything happens. |
215 syncer::WriteTransaction *trans_; | 215 syncer::WriteTransaction *trans_; |
216 | 216 |
217 // The change list we construct. | 217 // The change list we construct. |
218 syncer::ChangeRecordList changes_; | 218 syncer::ChangeRecordList changes_; |
219 }; | 219 }; |
220 | 220 |
221 class ExtensiveChangesBookmarkModelObserver : public BaseBookmarkModelObserver { | 221 class ExtensiveChangesBookmarkModelObserver : public BaseBookmarkModelObserver { |
222 public: | 222 public: |
223 explicit ExtensiveChangesBookmarkModelObserver() | 223 ExtensiveChangesBookmarkModelObserver() |
224 : started_count_(0), | 224 : started_count_(0), |
225 completed_count_at_started_(0), | 225 completed_count_at_started_(0), |
226 completed_count_(0) {} | 226 completed_count_(0) {} |
227 | 227 |
228 virtual void ExtensiveBookmarkChangesBeginning( | 228 virtual void ExtensiveBookmarkChangesBeginning( |
229 BookmarkModel* model) OVERRIDE { | 229 BookmarkModel* model) OVERRIDE { |
230 ++started_count_; | 230 ++started_count_; |
231 completed_count_at_started_ = completed_count_; | 231 completed_count_at_started_ = completed_count_; |
232 } | 232 } |
233 | 233 |
(...skipping 1512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1746 new_versions[changed_bookmark->id()]); | 1746 new_versions[changed_bookmark->id()]); |
1747 initial_versions.erase(changed_bookmark->id()); | 1747 initial_versions.erase(changed_bookmark->id()); |
1748 ExpectTransactionVersionMatch(model_->bookmark_bar_node(), initial_versions); | 1748 ExpectTransactionVersionMatch(model_->bookmark_bar_node(), initial_versions); |
1749 ExpectTransactionVersionMatch(model_->other_node(), initial_versions); | 1749 ExpectTransactionVersionMatch(model_->other_node(), initial_versions); |
1750 ExpectTransactionVersionMatch(model_->mobile_node(), initial_versions); | 1750 ExpectTransactionVersionMatch(model_->mobile_node(), initial_versions); |
1751 } | 1751 } |
1752 | 1752 |
1753 } // namespace | 1753 } // namespace |
1754 | 1754 |
1755 } // namespace browser_sync | 1755 } // namespace browser_sync |
OLD | NEW |