Index: chrome/browser/android/offline_pages/offline_page_utils.cc |
diff --git a/chrome/browser/android/offline_pages/offline_page_utils.cc b/chrome/browser/android/offline_pages/offline_page_utils.cc |
index 645041f9ca8f1005a1554293d4d742aa7cde0a5e..60573176593072e036ba258adb747b4bd00fba27 100644 |
--- a/chrome/browser/android/offline_pages/offline_page_utils.cc |
+++ b/chrome/browser/android/offline_pages/offline_page_utils.cc |
@@ -7,6 +7,7 @@ |
#include "base/bind.h" |
#include "base/location.h" |
#include "base/metrics/histogram_macros.h" |
+#include "base/stl_util.h" |
#include "base/strings/string_number_conversions.h" |
#include "base/strings/string_piece.h" |
#include "base/strings/string_util.h" |
@@ -45,10 +46,8 @@ void OnGetPagesByURLDone( |
std::string tab_id_str = base::IntToString(tab_id); |
for (const auto& page : pages) { |
- auto result = std::find(namespaces_to_show_in_original_tab.begin(), |
- namespaces_to_show_in_original_tab.end(), |
- page.client_id.name_space); |
- if (result != namespaces_to_show_in_original_tab.end() && |
+ if (base::ContainsValue(namespaces_to_show_in_original_tab, |
+ page.client_id.name_space) && |
page.client_id.id != tab_id_str) { |
continue; |
} |