Remove extraneous GetValidLocales calls.
commit0db5da63004e13f458c5a76391da1b309222d71e
authorsydli <sydli@google.com>
Tue, 18 Aug 2015 05:12:31 +0000 (17 22:12 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 18 Aug 2015 05:13:09 +0000 (18 05:13 +0000)
tree97b7fd7fa1ed4f54202ed5719fade4626bc343cd
parent7a694fe11fb4602ddd56edfa34a1b48f26049f63
Remove extraneous GetValidLocales calls.

GetValidLocales is already called on first extension install. There's no need to check the locales again (i.e. on extension loading) until a new install. GetValidLocales can be costly since it stats all subdirectories and messages.json of an extension's _locales subfolder.

BUG=516745

Review URL: https://codereview.chromium.org/1281523005

Cr-Commit-Position: refs/heads/master@{#343805}
extensions/common/extension_l10n_util.cc
extensions/common/extension_l10n_util.h
extensions/common/extension_l10n_util_unittest.cc
extensions/common/file_util.cc