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

Unified Diff: sync/sessions/model_type_registry.h

Issue 254473008: sync: Introduce classes for per-type counters (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/sessions/directory_type_debug_info_emitter.cc ('k') | sync/sessions/model_type_registry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/sessions/model_type_registry.h
diff --git a/sync/sessions/model_type_registry.h b/sync/sessions/model_type_registry.h
index 71d304f92a1630e57807fa5aec60ec1a673bfb43..3ee36c7b3f1ce68c158ebb646f014fd31babd1bd 100644
--- a/sync/sessions/model_type_registry.h
+++ b/sync/sessions/model_type_registry.h
@@ -13,6 +13,7 @@
#include "sync/base/sync_export.h"
#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/engine/model_safe_worker.h"
+#include "sync/internal_api/public/sessions/type_debug_info_observer.h"
namespace syncer {
@@ -103,6 +104,14 @@ class SYNC_EXPORT_PRIVATE ModelTypeRegistry {
// The set of enabled directory types.
ModelTypeSet enabled_directory_types_;
+ // The set of observers of per-type debug info.
+ //
+ // Each of the DirectoryTypeDebugInfoEmitters needs such a list. There's
+ // a lot of them, and their lifetimes are unpredictable, so it makes the
+ // book-keeping easier if we just store the list here. That way it's
+ // guaranteed to live as long as this sync backend.
+ ObserverList<TypeDebugInfoObserver> type_debug_info_observers_;
+
DISALLOW_COPY_AND_ASSIGN(ModelTypeRegistry);
};
« no previous file with comments | « sync/sessions/directory_type_debug_info_emitter.cc ('k') | sync/sessions/model_type_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698