| 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/invalidator_registrar.h" | 5 #include "components/invalidation/invalidator_registrar.h" |
| 6 | 6 |
| 7 #include <cstddef> | 7 #include <cstddef> |
| 8 #include <iterator> | 8 #include <iterator> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "components/invalidation/object_id_invalidation_map.h" | 12 #include "components/invalidation/base/object_id_invalidation_map.h" |
| 13 | 13 |
| 14 namespace syncer { | 14 namespace syncer { |
| 15 | 15 |
| 16 InvalidatorRegistrar::InvalidatorRegistrar() | 16 InvalidatorRegistrar::InvalidatorRegistrar() |
| 17 : state_(DEFAULT_INVALIDATION_ERROR) {} | 17 : state_(DEFAULT_INVALIDATION_ERROR) {} |
| 18 | 18 |
| 19 InvalidatorRegistrar::~InvalidatorRegistrar() { | 19 InvalidatorRegistrar::~InvalidatorRegistrar() { |
| 20 DCHECK(thread_checker_.CalledOnValidThread()); | 20 DCHECK(thread_checker_.CalledOnValidThread()); |
| 21 CHECK(handler_to_ids_map_.empty()); | 21 CHECK(handler_to_ids_map_.empty()); |
| 22 } | 22 } |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 DCHECK(thread_checker_.CalledOnValidThread()); | 141 DCHECK(thread_checker_.CalledOnValidThread()); |
| 142 return handlers_.HasObserver(handler); | 142 return handlers_.HasObserver(handler); |
| 143 } | 143 } |
| 144 | 144 |
| 145 void InvalidatorRegistrar::DetachFromThreadForTest() { | 145 void InvalidatorRegistrar::DetachFromThreadForTest() { |
| 146 DCHECK(thread_checker_.CalledOnValidThread()); | 146 DCHECK(thread_checker_.CalledOnValidThread()); |
| 147 thread_checker_.DetachFromThread(); | 147 thread_checker_.DetachFromThread(); |
| 148 } | 148 } |
| 149 | 149 |
| 150 } // namespace syncer | 150 } // namespace syncer |
| OLD | NEW |