[Spellcheck, Security] Filter against invalid locales.

Prevents passing up of garbage strings from renderer (and thus, prevents opening of arbitrary files)

BUG=167122


Review URL: https://chromiumcodereview.appspot.com/11618046

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174304 0039d316-1c4b-4281-b951-d872f2087c98
2 files changed