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

Unified Diff: chrome/browser/chromeos/platform_keys/platform_keys_service.cc

Issue 1715683002: chrome: Use base's ContainsValue helper function instead of std::find (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated as per latest code Created 4 years, 8 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: chrome/browser/chromeos/platform_keys/platform_keys_service.cc
diff --git a/chrome/browser/chromeos/platform_keys/platform_keys_service.cc b/chrome/browser/chromeos/platform_keys/platform_keys_service.cc
index 0eae654ef03c8f8b49b1539f55ac8948ec9dd924..a41cd8d7c2506b2e3b17fa1d3d57f3f58b18317a 100644
--- a/chrome/browser/chromeos/platform_keys/platform_keys_service.cc
+++ b/chrome/browser/chromeos/platform_keys/platform_keys_service.cc
@@ -12,6 +12,7 @@
#include "base/bind_helpers.h"
#include "base/callback.h"
#include "base/macros.h"
+#include "base/stl_util.h"
#include "base/values.h"
#include "chrome/browser/chromeos/platform_keys/platform_keys.h"
#include "content/public/browser/browser_thread.h"
@@ -423,10 +424,8 @@ class PlatformKeysService::SelectTask : public Task {
certificate->os_cert_handle(), &unused_key_size, &actual_key_type);
const std::vector<net::X509Certificate::PublicKeyType>& accepted_types =
request_.certificate_key_types;
- if (std::find(accepted_types.begin(), accepted_types.end(),
- actual_key_type) == accepted_types.end()) {
+ if (!ContainsValue(accepted_types, actual_key_type))
continue;
- }
}
matches_.push_back(std::move(certificate));

Powered by Google App Engine
This is Rietveld 408576698