| 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 #include "sync/notifier/invalidation_notifier.h" | 5 #include "sync/notifier/invalidation_notifier.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/message_loop_proxy.h" | 9 #include "base/message_loop_proxy.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 initial_max_invalidation_versions_, | 93 initial_max_invalidation_versions_, |
| 94 invalidation_state_tracker_, | 94 invalidation_state_tracker_, |
| 95 this); | 95 this); |
| 96 invalidation_state_.clear(); | 96 invalidation_state_.clear(); |
| 97 state_ = STARTED; | 97 state_ = STARTED; |
| 98 } | 98 } |
| 99 invalidation_listener_.UpdateCredentials(email, token); | 99 invalidation_listener_.UpdateCredentials(email, token); |
| 100 } | 100 } |
| 101 | 101 |
| 102 void InvalidationNotifier::SendInvalidation( | 102 void InvalidationNotifier::SendInvalidation( |
| 103 const ObjectIdStateMap& id_state_map) { | 103 const ObjectIdInvalidationMap& invalidation_map) { |
| 104 DCHECK(CalledOnValidThread()); | 104 DCHECK(CalledOnValidThread()); |
| 105 // Do nothing. | 105 // Do nothing. |
| 106 } | 106 } |
| 107 | 107 |
| 108 void InvalidationNotifier::OnInvalidate(const ObjectIdStateMap& id_state_map) { | 108 void InvalidationNotifier::OnInvalidate( |
| 109 const ObjectIdInvalidationMap& invalidation_map) { |
| 109 DCHECK(CalledOnValidThread()); | 110 DCHECK(CalledOnValidThread()); |
| 110 registrar_.DispatchInvalidationsToHandlers(id_state_map, REMOTE_INVALIDATION); | 111 registrar_.DispatchInvalidationsToHandlers(invalidation_map, |
| 112 REMOTE_INVALIDATION); |
| 111 } | 113 } |
| 112 | 114 |
| 113 void InvalidationNotifier::OnInvalidatorStateChange(InvalidatorState state) { | 115 void InvalidationNotifier::OnInvalidatorStateChange(InvalidatorState state) { |
| 114 DCHECK(CalledOnValidThread()); | 116 DCHECK(CalledOnValidThread()); |
| 115 registrar_.UpdateInvalidatorState(state); | 117 registrar_.UpdateInvalidatorState(state); |
| 116 } | 118 } |
| 117 | 119 |
| 118 } // namespace syncer | 120 } // namespace syncer |
| OLD | NEW |