| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/reading_list/ios/reading_list_model.h" | 5 #include "components/reading_list/ios/reading_list_model.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #import "base/test/ios/wait_util.h" | 9 #import "base/test/ios/wait_util.h" |
| 10 #include "components/reading_list/ios/reading_list_model_impl.h" | 10 #include "components/reading_list/ios/reading_list_model_impl.h" |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 return std::unique_ptr<ScopedBatchUpdate>(); | 103 return std::unique_ptr<ScopedBatchUpdate>(); |
| 104 } | 104 } |
| 105 | 105 |
| 106 // Syncing is not used in this test class. | 106 // Syncing is not used in this test class. |
| 107 std::unique_ptr<syncer::MetadataChangeList> CreateMetadataChangeList() | 107 std::unique_ptr<syncer::MetadataChangeList> CreateMetadataChangeList() |
| 108 override { | 108 override { |
| 109 NOTREACHED(); | 109 NOTREACHED(); |
| 110 return std::unique_ptr<syncer::MetadataChangeList>(); | 110 return std::unique_ptr<syncer::MetadataChangeList>(); |
| 111 } | 111 } |
| 112 | 112 |
| 113 syncer::ModelError MergeSyncData( | 113 base::Optional<syncer::ModelError> MergeSyncData( |
| 114 std::unique_ptr<syncer::MetadataChangeList> metadata_change_list, | 114 std::unique_ptr<syncer::MetadataChangeList> metadata_change_list, |
| 115 syncer::EntityDataMap entity_data_map) override { | 115 syncer::EntityDataMap entity_data_map) override { |
| 116 NOTREACHED(); | 116 NOTREACHED(); |
| 117 return syncer::ModelError(); | 117 return {}; |
| 118 } | 118 } |
| 119 | 119 |
| 120 syncer::ModelError ApplySyncChanges( | 120 base::Optional<syncer::ModelError> ApplySyncChanges( |
| 121 std::unique_ptr<syncer::MetadataChangeList> metadata_change_list, | 121 std::unique_ptr<syncer::MetadataChangeList> metadata_change_list, |
| 122 syncer::EntityChangeList entity_changes) override { | 122 syncer::EntityChangeList entity_changes) override { |
| 123 NOTREACHED(); | 123 NOTREACHED(); |
| 124 return syncer::ModelError(); | 124 return {}; |
| 125 } | 125 } |
| 126 | 126 |
| 127 void GetData(StorageKeyList storage_keys, DataCallback callback) override { | 127 void GetData(StorageKeyList storage_keys, DataCallback callback) override { |
| 128 NOTREACHED(); | 128 NOTREACHED(); |
| 129 return; | 129 return; |
| 130 } | 130 } |
| 131 | 131 |
| 132 void GetAllData(DataCallback callback) override { | 132 void GetAllData(DataCallback callback) override { |
| 133 NOTREACHED(); | 133 NOTREACHED(); |
| 134 return; | 134 return; |
| (...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 637 } | 637 } |
| 638 | 638 |
| 639 // Tests that ReadingListModel calls CallbackModelBeingDeleted when destroyed. | 639 // Tests that ReadingListModel calls CallbackModelBeingDeleted when destroyed. |
| 640 TEST_F(ReadingListModelTest, CallbackModelBeingDeleted) { | 640 TEST_F(ReadingListModelTest, CallbackModelBeingDeleted) { |
| 641 AssertObserverCount(1, 0, 0, 0, 0, 0, 0, 0, 0); | 641 AssertObserverCount(1, 0, 0, 0, 0, 0, 0, 0, 0); |
| 642 model_.reset(); | 642 model_.reset(); |
| 643 AssertObserverCount(1, 0, 0, 1, 0, 0, 0, 0, 0); | 643 AssertObserverCount(1, 0, 0, 1, 0, 0, 0, 0, 0); |
| 644 } | 644 } |
| 645 | 645 |
| 646 } // namespace | 646 } // namespace |
| OLD | NEW |