Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: sync/notifier/invalidator_registrar.cc

Issue 159773006: [invalidations] Added table with registered objectsIds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@about_invalidations_clean
Patch Set: Change constness of iterators for android clang Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sync/notifier/invalidator_registrar.h ('k') | sync/notifier/non_blocking_invalidator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/invalidator_registrar.h" 5 #include "sync/notifier/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
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 state_ = state; 116 state_ = state;
117 FOR_EACH_OBSERVER(InvalidationHandler, handlers_, 117 FOR_EACH_OBSERVER(InvalidationHandler, handlers_,
118 OnInvalidatorStateChange(state)); 118 OnInvalidatorStateChange(state));
119 } 119 }
120 120
121 InvalidatorState InvalidatorRegistrar::GetInvalidatorState() const { 121 InvalidatorState InvalidatorRegistrar::GetInvalidatorState() const {
122 DCHECK(thread_checker_.CalledOnValidThread()); 122 DCHECK(thread_checker_.CalledOnValidThread());
123 return state_; 123 return state_;
124 } 124 }
125 125
126 std::map<std::string, ObjectIdSet>
127 InvalidatorRegistrar::GetSanitizedHandlersIdsMap() {
128 DCHECK(thread_checker_.CalledOnValidThread());
129 std::map<std::string, ObjectIdSet> clean_handlers_to_ids;
130 for (HandlerIdsMap::const_iterator it = handler_to_ids_map_.begin();
131 it != handler_to_ids_map_.end();
132 ++it) {
133 clean_handlers_to_ids[it->first->GetOwnerName()] = ObjectIdSet(it->second);
134 }
135 return clean_handlers_to_ids;
136 }
137
126 bool InvalidatorRegistrar::IsHandlerRegisteredForTest( 138 bool InvalidatorRegistrar::IsHandlerRegisteredForTest(
127 InvalidationHandler* handler) const { 139 InvalidationHandler* handler) const {
128 DCHECK(thread_checker_.CalledOnValidThread()); 140 DCHECK(thread_checker_.CalledOnValidThread());
129 return handlers_.HasObserver(handler); 141 return handlers_.HasObserver(handler);
130 } 142 }
131 143
132 void InvalidatorRegistrar::DetachFromThreadForTest() { 144 void InvalidatorRegistrar::DetachFromThreadForTest() {
133 DCHECK(thread_checker_.CalledOnValidThread()); 145 DCHECK(thread_checker_.CalledOnValidThread());
134 thread_checker_.DetachFromThread(); 146 thread_checker_.DetachFromThread();
135 } 147 }
136 148
137 } // namespace syncer 149 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/notifier/invalidator_registrar.h ('k') | sync/notifier/non_blocking_invalidator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698