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 "chrome/browser/sync/test/integration/fake_server_invalidation_service.
h" | 5 #include "chrome/browser/sync/test/integration/fake_server_invalidation_service.
h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "components/invalidation/impl/invalidation_service_util.h" | 10 #include "components/invalidation/impl/invalidation_service_util.h" |
11 #include "components/invalidation/public/invalidation.h" | 11 #include "components/invalidation/public/invalidation.h" |
12 #include "components/invalidation/public/object_id_invalidation_map.h" | 12 #include "components/invalidation/public/object_id_invalidation_map.h" |
13 #include "components/sync/base/model_type.h" | 13 #include "components/sync/base/model_type.h" |
14 #include "components/sync_driver/invalidation_helper.h" | 14 #include "components/sync/driver/invalidation_helper.h" |
15 | 15 |
16 namespace fake_server { | 16 namespace fake_server { |
17 | 17 |
18 FakeServerInvalidationService::FakeServerInvalidationService() | 18 FakeServerInvalidationService::FakeServerInvalidationService() |
19 : client_id_(invalidation::GenerateInvalidatorClientId()), | 19 : client_id_(invalidation::GenerateInvalidatorClientId()), |
20 self_notify_(true), | 20 self_notify_(true), |
21 identity_provider_(&token_service_) { | 21 identity_provider_(&token_service_) { |
22 invalidator_registrar_.UpdateInvalidatorState(syncer::INVALIDATIONS_ENABLED); | 22 invalidator_registrar_.UpdateInvalidatorState(syncer::INVALIDATIONS_ENABLED); |
23 } | 23 } |
24 | 24 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 // invalidating all items of a given type. | 85 // invalidating all items of a given type. |
86 | 86 |
87 if (self_notify_ || client_id_ != committer_id) { | 87 if (self_notify_ || client_id_ != committer_id) { |
88 invalidation_map.Insert(syncer::Invalidation::InitUnknownVersion(*it)); | 88 invalidation_map.Insert(syncer::Invalidation::InitUnknownVersion(*it)); |
89 } | 89 } |
90 } | 90 } |
91 invalidator_registrar_.DispatchInvalidationsToHandlers(invalidation_map); | 91 invalidator_registrar_.DispatchInvalidationsToHandlers(invalidation_map); |
92 } | 92 } |
93 | 93 |
94 } // namespace fake_server | 94 } // namespace fake_server |
OLD | NEW |