Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(439)

Unified Diff: extensions/browser/api/document_scan/document_scan_api.cc

Issue 2950263003: Use ContainsValue() instead of std::find() in extensions/ (Closed)
Patch Set: Rebase patch. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: extensions/browser/api/document_scan/document_scan_api.cc
diff --git a/extensions/browser/api/document_scan/document_scan_api.cc b/extensions/browser/api/document_scan/document_scan_api.cc
index a89dbb7f19ed11723bd124e02bcf8508ca2be675..317199fdd088a29e64fb93564e299b5c7d8cf046 100644
--- a/extensions/browser/api/document_scan/document_scan_api.cc
+++ b/extensions/browser/api/document_scan/document_scan_api.cc
@@ -4,8 +4,7 @@
#include "extensions/browser/api/document_scan/document_scan_api.h"
-#include <algorithm>
-
+#include "base/stl_util.h"
#include "content/public/browser/browser_thread.h"
#include "extensions/browser/extension_system.h"
@@ -67,8 +66,7 @@ void DocumentScanScanFunction::OnScannerListReceived(
if (params_->options.mime_types) {
std::vector<std::string>& mime_types = *params_->options.mime_types;
for (; scanner_i != scanner_descriptions.end(); ++scanner_i) {
- if (std::find(mime_types.begin(), mime_types.end(),
- scanner_i->image_mime_type) != mime_types.end()) {
+ if (base::ContainsValue(mime_types, scanner_i->image_mime_type)) {
break;
}
}

Powered by Google App Engine
This is Rietveld 408576698