 Chromium Code Reviews
 Chromium Code Reviews Issue 1715683002:
  chrome: Use base's ContainsValue helper function instead of std::find  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 1715683002:
  chrome: Use base's ContainsValue helper function instead of std::find  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| 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..40cbd9a603e4c9fb4c840db56c077bd9bab7e3d2 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,8 +424,7 @@ 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)) { | 
| 
sky
2016/03/02 17:19:34
nit: no {}
 
chakshu
2016/03/07 08:10:46
Done.
 | 
| continue; | 
| } | 
| } |