Index: chrome/browser/predictors/autocomplete_action_predictor.cc |
diff --git a/chrome/browser/predictors/autocomplete_action_predictor.cc b/chrome/browser/predictors/autocomplete_action_predictor.cc |
index 6e63728012885931e61e700bab1e480398774c10..edf387246cffb1eb9caa3ca957dbdb1858ed40c3 100644 |
--- a/chrome/browser/predictors/autocomplete_action_predictor.cc |
+++ b/chrome/browser/predictors/autocomplete_action_predictor.cc |
@@ -14,6 +14,7 @@ |
#include "base/i18n/case_conversion.h" |
#include "base/macros.h" |
#include "base/metrics/histogram.h" |
+#include "base/stl_util.h" |
#include "base/strings/string_util.h" |
#include "base/strings/stringprintf.h" |
#include "base/strings/utf_string_conversions.h" |
@@ -127,12 +128,9 @@ void AutocompleteActionPredictor::RegisterTransitionalMatches( |
transitional_match); |
} |
- for (const auto& i : result) { |
- if (std::find(match_it->urls.begin(), match_it->urls.end(), |
- i.destination_url) == match_it->urls.end()) { |
+ for (const auto& i : result) |
sky
2016/04/04 15:39:00
keep the {} here.
chakshu
2016/04/05 05:03:36
Done.
|
+ if (!ContainsValue(match_it->urls, i.destination_url)) |
match_it->urls.push_back(i.destination_url); |
- } |
- } |
} |
void AutocompleteActionPredictor::ClearTransitionalMatches() { |