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

Side by Side Diff: components/invalidation/invalidator_registrar.cc

Issue 697953002: ObserverList::HasObserver now takes a const pointer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile errors (ChromeOS unit tests). Created 6 years, 1 month 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
OLDNEW
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
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 std::map<std::string, ObjectIdSet> clean_handlers_to_ids; 128 std::map<std::string, ObjectIdSet> clean_handlers_to_ids;
129 for (HandlerIdsMap::const_iterator it = handler_to_ids_map_.begin(); 129 for (HandlerIdsMap::const_iterator it = handler_to_ids_map_.begin();
130 it != handler_to_ids_map_.end(); 130 it != handler_to_ids_map_.end();
131 ++it) { 131 ++it) {
132 clean_handlers_to_ids[it->first->GetOwnerName()] = ObjectIdSet(it->second); 132 clean_handlers_to_ids[it->first->GetOwnerName()] = ObjectIdSet(it->second);
133 } 133 }
134 return clean_handlers_to_ids; 134 return clean_handlers_to_ids;
135 } 135 }
136 136
137 bool InvalidatorRegistrar::IsHandlerRegisteredForTest( 137 bool InvalidatorRegistrar::IsHandlerRegisteredForTest(
138 InvalidationHandler* handler) const { 138 const InvalidationHandler* handler) const {
139 DCHECK(thread_checker_.CalledOnValidThread()); 139 DCHECK(thread_checker_.CalledOnValidThread());
140 return handlers_.HasObserver(handler); 140 return handlers_.HasObserver(handler);
141 } 141 }
142 142
143 void InvalidatorRegistrar::DetachFromThreadForTest() { 143 void InvalidatorRegistrar::DetachFromThreadForTest() {
144 DCHECK(thread_checker_.CalledOnValidThread()); 144 DCHECK(thread_checker_.CalledOnValidThread());
145 thread_checker_.DetachFromThread(); 145 thread_checker_.DetachFromThread();
146 } 146 }
147 147
148 } // namespace syncer 148 } // namespace syncer
OLDNEW
« no previous file with comments | « components/invalidation/invalidator_registrar.h ('k') | content/browser/appcache/appcache_group.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698