sync: Introduce classes for per-type counters
Introduces the classes required to support per-type debug information. This system will eventually replace much of the StatusController and ModelNeutralState. Adds three counter objects. There is one for counters incremented during a GetUpdates, one for counters incremented during a commit, and one for "status" indicators like the total number of sync entities. Adds the DirectoryTypeDebugInfoEmitter, which will manage these counters. There will be one instance of this object per enabled directory-style sync ModelType. It owns the counters that will be updated by the CommitContributors and UpdateHandlers. It also collaborates with the ModelTypeRegistry to allow these CommitContributors and UpdateHandlers to notify observers of updated counter state. Adds the TypeDebugInfoObserver, the interface for classes that listen for counter updates. At the moment, this code won't actually do much. The counters are never incrememnted, no observers register for counter change events, and no such events are generated. Those pieces will be added in future commits. BUG=328606 Review URL: https://codereview.chromium.org/254473008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266991 0039d316-1c4b-4281-b951-d872f2087c98
Showing
Please register or sign in to comment