Make profile directory creation always synchronous.

This requires allowing IO on the main thread for two lightweight I/O
operations (PathExists + CreateDirectory). The tradeoff is worth it as
it ensures the directory is up before any of the asynchronous I/O from
every service starts touching their portion of the profile directory.
Sequencing all of these operations on the directory creation would be a
herculian task and isn't worth it.

R=rch@chromium.org

NOPRESUBMIT=True (for intentional ScopedAllowIO usage)

Bug: 755157, 689520
Change-Id: I81498d20e91cae79ea3a1948b3d84d255adb6bd6
Reviewed-on: https://chromium-review.googlesource.com/613683
Reviewed-by: Anthony Vallee-Dubois <anthonyvd@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#494517}
2 files changed