Index: chrome/browser/spellchecker/spellcheck_service.cc |
diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc |
index 7360f061548efc9d4258c6ee0d3eac1bec9a3719..9b0b9962f51ef9827c185ede2cd9391df29774b6 100644 |
--- a/chrome/browser/spellchecker/spellcheck_service.cc |
+++ b/chrome/browser/spellchecker/spellcheck_service.cc |
@@ -7,6 +7,7 @@ |
#include <set> |
#include "base/logging.h" |
+#include "base/stl_util.h" |
#include "base/strings/string_split.h" |
#include "base/supports_user_data.h" |
#include "base/synchronization/waitable_event.h" |
@@ -354,8 +355,7 @@ void SpellcheckService::OnAcceptLanguagesChanged() { |
std::vector<std::string> filtered_dictionaries; |
for (const auto& dictionary : dictionaries) { |
sky
2016/03/02 17:19:34
Isn't this std::set_intersection?
chakshu
2016/03/07 08:10:46
Yes, probably it is. Made the changes using set_in
|
- if (std::find(accept_languages.begin(), accept_languages.end(), |
- dictionary) != accept_languages.end()) { |
+ if (ContainsValue(accept_languages, dictionary)) { |
sky
2016/03/02 17:19:34
nit: no {}
chakshu
2016/03/07 08:10:46
Done.
|
filtered_dictionaries.push_back(dictionary); |
} |
} |