[tracing] Fix MemoryDumpManager to support startup tracing
This CL simplifies a lot the design of the MemoryDumpManager (MDM)
initialization (\o/). Before this change the MDM had a two-stage
initialization: 1. Initialize() that was registering to the
TraceLog enabled stateobserver; 2. SetDelegate() that was setting
the inversion-of-control delegate.
This design was fragile as it required to think about the two possible
sequences of events (1 -> 2 or 2 -> 1) and not really necessary.
The simplification herein introduced consists in:
- Drop the IsCoordinatorProcess() method from the delegate. That
information is not supposed to change over time and is known
at MDM initialization time.
- Merge the SetDelegate() into the Initialize() call. There is no
point allowing to initialize the MDM without a delegate, so
why bother? Moved all the initialization to the point where the
delegate (concretelly the TracingControllerImpl) is ready.
As a side effect, startup tracing now works properly (tests are
coming in a separate CL).
BUG=524057
TEST=--trace-startup=-*,disabled-by-default-memory-infra --trace-startup-file=/tmp/startup.json
Review URL: https://codereview.chromium.org/
1333873002
Cr-Commit-Position: refs/heads/master@{#348168}