• Marc Treib's avatar
    Introduce syncer::StartupController::State enum · cbfb84c5
    Marc Treib authored
    This adds a State enum to StartupController and exposes it via GetState().
    It's not strictly required right now, but
    a) it'll help with sanitizing ProfileSyncService's state,
    b) it makes the tests a bit nicer, now they can use the enum instead of
       relying on debug strings, and
    c) it lets us move GetEngineInitializationStateString from
       StartupController to ProfileSyncService, where it's slightly less
       out of place (bonus: extra DCHECKs for consistent state).
    
    Other semi-related test cleanups: don't call SetFirstSetupComplete from
    FakeStartBackend (no idea why that call was there), and don't check for
    the kSyncDisableDeferredStartup cmdline flag (if you run the tests with
    a custom flag, it's your own fault if they fail).
    
    Bug: 839834
    Change-Id: I16f83be8ee828024329cbce899be4723241323db
    Reviewed-on: https://chromium-review.googlesource.com/1109939
    Commit-Queue: Marc Treib <treib@chromium.org>
    Reviewed-by: default avatarJan Krcal <jkrcal@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#569273}
    cbfb84c5
startup_controller_unittest.cc 5.99 KB