sync_chrome: Make directories as non-root user.

After osutils.SafeMakedirsNonRoot is hardened to try to create non-root
directories under various root owned paths (e.g.: by CL:404152).
sync_chrome might decide to clobber the chrome checkout if it is
inaccessible because a prefix of the path is owned by root. In that
case, *NonRoot variant to successfully fix the path ownership.

BUG=chromium:658504
TEST=pre-cq, factory branches can finally build...

Change-Id: I11018fed2bec6c5f17ec432c90ef81119cdcf022
Reviewed-on: https://chromium-review.googlesource.com/410285
Commit-Ready: YH Lin <yueherngl@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: YH Lin <yueherngl@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
1 file changed