Index: ios/chrome/browser/reading_list/url_downloader.cc |
diff --git a/ios/chrome/browser/reading_list/url_downloader.cc b/ios/chrome/browser/reading_list/url_downloader.cc |
index 35c09342b2c8d572cb6c0f2589827ed64ee1651f..ddf99e64f44e7cb43aed156aaa6f68b2a34ba956 100644 |
--- a/ios/chrome/browser/reading_list/url_downloader.cc |
+++ b/ios/chrome/browser/reading_list/url_downloader.cc |
@@ -11,6 +11,7 @@ |
#include "base/files/file_util.h" |
#include "base/memory/ptr_util.h" |
#include "base/path_service.h" |
+#include "base/stl_util.h" |
#include "components/reading_list/core/offline_url_utils.h" |
#include "ios/chrome/browser/chrome_paths.h" |
#include "ios/chrome/browser/dom_distiller/distiller_viewer.h" |
@@ -80,8 +81,7 @@ void URLDownloader::RemoveOfflineURL(const GURL& url) { |
} |
void URLDownloader::DownloadOfflineURL(const GURL& url) { |
- if (std::find(tasks_.begin(), tasks_.end(), std::make_pair(DOWNLOAD, url)) == |
- tasks_.end()) { |
+ if (!base::ContainsValue(tasks_, std::make_pair(DOWNLOAD, url))) { |
tasks_.push_back(std::make_pair(DOWNLOAD, url)); |
HandleNextTask(); |
} |