pre-upload: Add a check for FilePath::FromUTF8Unsafe stuff

FromUTF8Unsafe() and AsUTF8Unsafe() are not necessary in places
like platform2 since it's safe to assume file names are UTF-8 on
Chrome OS. We can use FilePath() and value() instead.

BUG=chromium:870621
TEST=./pre-upload_unittest.py

Change-Id: I688b893a8b7477ec4499dd4b093a7733a3f9dc5d
Reviewed-on: https://chromium-review.googlesource.com/1166273
Commit-Ready: Satoru Takabayashi <satorux@google.com>
Tested-by: Satoru Takabayashi <satorux@google.com>
Reviewed-by: Dan Erat <derat@chromium.org>
2 files changed