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

Side by Side Diff: sync/sessions/model_type_registry.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
« no previous file with comments | « sync/sessions/model_type_registry.h ('k') | ui/app_list/app_list_model_unittest.cc » ('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 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 "sync/sessions/model_type_registry.h" 5 #include "sync/sessions/model_type_registry.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/observer_list.h" 8 #include "base/observer_list.h"
9 #include "base/thread_task_runner_handle.h" 9 #include "base/thread_task_runner_handle.h"
10 #include "sync/engine/directory_commit_contributor.h" 10 #include "sync/engine/directory_commit_contributor.h"
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 if (!type_debug_info_observers_.HasObserver(observer)) 276 if (!type_debug_info_observers_.HasObserver(observer))
277 type_debug_info_observers_.AddObserver(observer); 277 type_debug_info_observers_.AddObserver(observer);
278 } 278 }
279 279
280 void ModelTypeRegistry::UnregisterDirectoryTypeDebugInfoObserver( 280 void ModelTypeRegistry::UnregisterDirectoryTypeDebugInfoObserver(
281 syncer::TypeDebugInfoObserver* observer) { 281 syncer::TypeDebugInfoObserver* observer) {
282 type_debug_info_observers_.RemoveObserver(observer); 282 type_debug_info_observers_.RemoveObserver(observer);
283 } 283 }
284 284
285 bool ModelTypeRegistry::HasDirectoryTypeDebugInfoObserver( 285 bool ModelTypeRegistry::HasDirectoryTypeDebugInfoObserver(
286 syncer::TypeDebugInfoObserver* observer) { 286 const syncer::TypeDebugInfoObserver* observer) const {
287 return type_debug_info_observers_.HasObserver(observer); 287 return type_debug_info_observers_.HasObserver(observer);
288 } 288 }
289 289
290 void ModelTypeRegistry::RequestEmitDebugInfo() { 290 void ModelTypeRegistry::RequestEmitDebugInfo() {
291 for (DirectoryTypeDebugInfoEmitterMap::iterator it = 291 for (DirectoryTypeDebugInfoEmitterMap::iterator it =
292 directory_type_debug_info_emitter_map_.begin(); 292 directory_type_debug_info_emitter_map_.begin();
293 it != directory_type_debug_info_emitter_map_.end(); ++it) { 293 it != directory_type_debug_info_emitter_map_.end(); ++it) {
294 it->second->EmitCommitCountersUpdate(); 294 it->second->EmitCommitCountersUpdate();
295 it->second->EmitUpdateCountersUpdate(); 295 it->second->EmitUpdateCountersUpdate();
296 it->second->EmitStatusCountersUpdate(); 296 it->second->EmitStatusCountersUpdate();
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 for (ScopedVector<ModelTypeSyncWorkerImpl>::const_iterator it = 354 for (ScopedVector<ModelTypeSyncWorkerImpl>::const_iterator it =
355 model_type_sync_workers_.begin(); 355 model_type_sync_workers_.begin();
356 it != model_type_sync_workers_.end(); 356 it != model_type_sync_workers_.end();
357 ++it) { 357 ++it) {
358 enabled_off_thread_types.Put((*it)->GetModelType()); 358 enabled_off_thread_types.Put((*it)->GetModelType());
359 } 359 }
360 return enabled_off_thread_types; 360 return enabled_off_thread_types;
361 } 361 }
362 362
363 } // namespace syncer 363 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/sessions/model_type_registry.h ('k') | ui/app_list/app_list_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698