Index: chrome/browser/extensions/api/language_settings_private/language_settings_private_api.cc |
diff --git a/chrome/browser/extensions/api/language_settings_private/language_settings_private_api.cc b/chrome/browser/extensions/api/language_settings_private/language_settings_private_api.cc |
index 935a058bfcb07ccd447bf58a0522e106fe4d50d2..fdac68151482ef59183cc1ab3d8482f6ba7b34bd 100644 |
--- a/chrome/browser/extensions/api/language_settings_private/language_settings_private_api.cc |
+++ b/chrome/browser/extensions/api/language_settings_private/language_settings_private_api.cc |
@@ -14,6 +14,7 @@ |
#include "base/i18n/rtl.h" |
#include "base/memory/ptr_util.h" |
+#include "base/stl_util.h" |
#include "base/strings/string16.h" |
#include "base/strings/string_split.h" |
#include "base/strings/string_util.h" |
@@ -138,8 +139,7 @@ std::vector<std::string> GetSortedExtensionIMEs( |
auto it = descriptors.begin(); |
while (it != descriptors.end() && descriptors.size()) { |
if (extension_ime_set.count(it->id()) && |
- std::find(it->language_codes().begin(), it->language_codes().end(), |
- language) != it->language_codes().end()) { |
+ base::ContainsValue(it->language_codes(), language)) { |
extension_ime_list.push_back(it->id()); |
// Remove the added descriptor from the candidate list. |
it = descriptors.erase(it); |
@@ -266,8 +266,7 @@ LanguageSettingsPrivateEnableLanguageFunction::Run() { |
std::vector<std::string> languages; |
translate_prefs->GetLanguageList(&languages); |
- if (std::find(languages.begin(), languages.end(), language_code) != |
- languages.end()) { |
+ if (base::ContainsValue(languages, language_code)) { |
LOG(ERROR) << "Language " << language_code << " already enabled"; |
return RespondNow(NoArguments()); |
} |