OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/invalidation/unacked_invalidation_set_test_util.h" | 5 #include "components/invalidation/unacked_invalidation_set_test_util.h" |
6 | 6 |
7 #include "base/json/json_string_value_serializer.h" | 7 #include "base/json/json_string_value_serializer.h" |
8 #include "components/invalidation/object_id_invalidation_map.h" | 8 #include "components/invalidation/object_id_invalidation_map.h" |
9 #include "testing/gmock/include/gmock/gmock-matchers.h" | 9 #include "testing/gmock/include/gmock/gmock-matchers.h" |
10 | 10 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 | 81 |
82 // We're done declaring UnackedInvalidationSetEqMatcher. Everything else can | 82 // We're done declaring UnackedInvalidationSetEqMatcher. Everything else can |
83 // go into the null namespace. | 83 // go into the null namespace. |
84 namespace { | 84 namespace { |
85 | 85 |
86 ObjectIdInvalidationMap UnackedInvalidationsMapToObjectIdInvalidationMap( | 86 ObjectIdInvalidationMap UnackedInvalidationsMapToObjectIdInvalidationMap( |
87 const UnackedInvalidationsMap& state_map) { | 87 const UnackedInvalidationsMap& state_map) { |
88 ObjectIdInvalidationMap object_id_invalidation_map; | 88 ObjectIdInvalidationMap object_id_invalidation_map; |
89 for (UnackedInvalidationsMap::const_iterator it = state_map.begin(); | 89 for (UnackedInvalidationsMap::const_iterator it = state_map.begin(); |
90 it != state_map.end(); ++it) { | 90 it != state_map.end(); ++it) { |
91 it->second.ExportInvalidations(syncer::WeakHandle<AckHandler>(), | 91 it->second.ExportInvalidations( |
92 &object_id_invalidation_map); | 92 base::WeakPtr<AckHandler>(), |
| 93 scoped_refptr<base::SingleThreadTaskRunner>(), |
| 94 &object_id_invalidation_map); |
93 } | 95 } |
94 return object_id_invalidation_map; | 96 return object_id_invalidation_map; |
95 } | 97 } |
96 | 98 |
97 class UnackedInvalidationsMapEqMatcher | 99 class UnackedInvalidationsMapEqMatcher |
98 : public testing::MatcherInterface<const UnackedInvalidationsMap&> { | 100 : public testing::MatcherInterface<const UnackedInvalidationsMap&> { |
99 public: | 101 public: |
100 explicit UnackedInvalidationsMapEqMatcher( | 102 explicit UnackedInvalidationsMapEqMatcher( |
101 const UnackedInvalidationsMap& expected); | 103 const UnackedInvalidationsMap& expected); |
102 | 104 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 } | 174 } |
173 | 175 |
174 Matcher<const UnackedInvalidationsMap&> Eq( | 176 Matcher<const UnackedInvalidationsMap&> Eq( |
175 const UnackedInvalidationsMap& expected) { | 177 const UnackedInvalidationsMap& expected) { |
176 return MakeMatcher(new UnackedInvalidationsMapEqMatcher(expected)); | 178 return MakeMatcher(new UnackedInvalidationsMapEqMatcher(expected)); |
177 } | 179 } |
178 | 180 |
179 } // namespace test_util | 181 } // namespace test_util |
180 | 182 |
181 }; | 183 }; |
OLD | NEW |