| 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 "chrome/browser/sync/glue/invalidation_helper.h" | 10 #include "chrome/browser/sync/glue/invalidation_helper.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 } | 23 } |
| 24 | 24 |
| 25 FakeServerInvalidationService::~FakeServerInvalidationService() { | 25 FakeServerInvalidationService::~FakeServerInvalidationService() { |
| 26 } | 26 } |
| 27 | 27 |
| 28 void FakeServerInvalidationService::RegisterInvalidationHandler( | 28 void FakeServerInvalidationService::RegisterInvalidationHandler( |
| 29 syncer::InvalidationHandler* handler) { | 29 syncer::InvalidationHandler* handler) { |
| 30 invalidator_registrar_.RegisterHandler(handler); | 30 invalidator_registrar_.RegisterHandler(handler); |
| 31 } | 31 } |
| 32 | 32 |
| 33 void FakeServerInvalidationService::UpdateRegisteredInvalidationIds( | 33 bool FakeServerInvalidationService::UpdateRegisteredInvalidationIds( |
| 34 syncer::InvalidationHandler* handler, | 34 syncer::InvalidationHandler* handler, |
| 35 const syncer::ObjectIdSet& ids) { | 35 const syncer::ObjectIdSet& ids) { |
| 36 invalidator_registrar_.UpdateRegisteredIds(handler, ids); | 36 return invalidator_registrar_.UpdateRegisteredIds(handler, ids); |
| 37 } | 37 } |
| 38 | 38 |
| 39 void FakeServerInvalidationService::UnregisterInvalidationHandler( | 39 void FakeServerInvalidationService::UnregisterInvalidationHandler( |
| 40 syncer::InvalidationHandler* handler) { | 40 syncer::InvalidationHandler* handler) { |
| 41 invalidator_registrar_.UnregisterHandler(handler); | 41 invalidator_registrar_.UnregisterHandler(handler); |
| 42 } | 42 } |
| 43 | 43 |
| 44 syncer::InvalidatorState FakeServerInvalidationService::GetInvalidatorState() | 44 syncer::InvalidatorState FakeServerInvalidationService::GetInvalidatorState() |
| 45 const { | 45 const { |
| 46 return invalidator_registrar_.GetInvalidatorState(); | 46 return invalidator_registrar_.GetInvalidatorState(); |
| (...skipping 38 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 |