libchromeos: Move time zone creation from session_manager.
Create the /var/lib/timezone/localtime symlink in
libchromeos's ChromiumCommandBuilder class instead of in
session_manager-specific code.
Also, when base::PathExists() claims that the symlink
doesn't exist, explicitly delete the path anyway before
creating a new default symlink. PathExists() dereferences
symlinks, so there may still be a dangling symlink lying
around.
BUG=chromium:393755
TEST=wrote a test
Change-Id: Icd905bfbb52a0b85e315bec045cfffd808c3044c
Reviewed-on: https://chromium-review.googlesource.com/208100
Reviewed-by: Chris Masone <cmasone@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Commit-Queue: Daniel Erat <derat@chromium.org>
Tested-by: Daniel Erat <derat@chromium.org>
3 files changed