See isherman@'s comment on https://crrev.com/c/1175486
It might be cleaner to have some object representing a NetworkConnectionTracker registration that will automatically unregister itself upon destruction.
Most classes that use NetworkConnectionTracker register in the constructor and unregister in the destructor, though there are a few that deregister outside the destructor (ForceSigninVerifier, NetworkStatusListenerImpl, AutoEnrollmentClientImpl). Several classes register outside of the constructor, either in a Start method or on a another thread posted to by the constructor.
Comment 1 by xunji...@chromium.org
, Aug 17