In the initial implementation of DeviceInfoService, we check to see if there's any metadata present, and intelligently decide if we want to create a processor or not. Things however get messy when the processor is later set. We're currently using a boolean flag to track if the metadata was ever loaded, and if so, on proc set, we know that there must not have been any metadata so we pass the proc empty metadata. This OnChangeProcessorSet override and awkward tracking of state would need to be duplicated on every service. Alternatively the service could just always re-load the metadata, which is inefficient.
Instead, if we just always have a processor, then we can always load the metadata upon startup and this simplifies lifecycles and state tracking. The main ramification is that now instead of checking if our processor accessor returns nullptr or not, we'll need to call into the processor and have it tell us if we should skip Put/Delete calls.
Comment 1 by bugdroid1@chromium.org
, Oct 13 2016