| 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/non_blocking_invalidator.h" | 5 #include "sync/notifier/non_blocking_invalidator.h" |
| 6 | 6 |
| 7 #include <cstddef> | 7 #include <cstddef> |
| 8 | 8 |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 const std::string& token) { | 232 const std::string& token) { |
| 233 DCHECK(parent_task_runner_->BelongsToCurrentThread()); | 233 DCHECK(parent_task_runner_->BelongsToCurrentThread()); |
| 234 if (!network_task_runner_->PostTask( | 234 if (!network_task_runner_->PostTask( |
| 235 FROM_HERE, | 235 FROM_HERE, |
| 236 base::Bind(&NonBlockingInvalidator::Core::UpdateCredentials, | 236 base::Bind(&NonBlockingInvalidator::Core::UpdateCredentials, |
| 237 core_.get(), email, token))) { | 237 core_.get(), email, token))) { |
| 238 NOTREACHED(); | 238 NOTREACHED(); |
| 239 } | 239 } |
| 240 } | 240 } |
| 241 | 241 |
| 242 void NonBlockingInvalidator::SendNotification(ModelTypeSet changed_types) { | 242 void NonBlockingInvalidator::SendNotification( |
| 243 const ObjectIdStateMap& id_state_map) { |
| 243 DCHECK(parent_task_runner_->BelongsToCurrentThread()); | 244 DCHECK(parent_task_runner_->BelongsToCurrentThread()); |
| 244 // InvalidationClient doesn't implement SendNotification(), so no | 245 // InvalidationClient doesn't implement SendNotification(), so no |
| 245 // need to forward on the call. | 246 // need to forward on the call. |
| 246 } | 247 } |
| 247 | 248 |
| 248 void NonBlockingInvalidator::OnNotificationsEnabled() { | 249 void NonBlockingInvalidator::OnNotificationsEnabled() { |
| 249 DCHECK(parent_task_runner_->BelongsToCurrentThread()); | 250 DCHECK(parent_task_runner_->BelongsToCurrentThread()); |
| 250 registrar_.EmitOnNotificationsEnabled(); | 251 registrar_.EmitOnNotificationsEnabled(); |
| 251 } | 252 } |
| 252 | 253 |
| 253 void NonBlockingInvalidator::OnNotificationsDisabled( | 254 void NonBlockingInvalidator::OnNotificationsDisabled( |
| 254 NotificationsDisabledReason reason) { | 255 NotificationsDisabledReason reason) { |
| 255 DCHECK(parent_task_runner_->BelongsToCurrentThread()); | 256 DCHECK(parent_task_runner_->BelongsToCurrentThread()); |
| 256 registrar_.EmitOnNotificationsDisabled(reason); | 257 registrar_.EmitOnNotificationsDisabled(reason); |
| 257 } | 258 } |
| 258 | 259 |
| 259 void NonBlockingInvalidator::OnIncomingNotification( | 260 void NonBlockingInvalidator::OnIncomingNotification( |
| 260 const ObjectIdStateMap& id_state_map, | 261 const ObjectIdStateMap& id_state_map, |
| 261 IncomingNotificationSource source) { | 262 IncomingNotificationSource source) { |
| 262 DCHECK(parent_task_runner_->BelongsToCurrentThread()); | 263 DCHECK(parent_task_runner_->BelongsToCurrentThread()); |
| 263 registrar_.DispatchInvalidationsToHandlers(id_state_map, source); | 264 registrar_.DispatchInvalidationsToHandlers(id_state_map, source); |
| 264 } | 265 } |
| 265 | 266 |
| 266 } // namespace syncer | 267 } // namespace syncer |
| OLD | NEW |