DCHECK the IdentityManager when local sync is not enabled

ProfileSyncService lacked a check on identity_manager_ not being nullptr
because that could be the case when local syncing was enabled. Make a proper
DCHECK by also verifying whether local sync is enabled.

Change-Id: I7d48ad2be17d06c4285473e245e7c44092c4fb68
Reviewed-on: https://chromium-review.googlesource.com/c/1424801
Commit-Queue: Henrique Ferreiro <hferreiro@igalia.com>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#630762}
2 files changed