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

Unified Diff: chrome/browser/chromeos/extensions/quick_unlock_private/quick_unlock_private_api_unittest.cc

Issue 2934043002: Use ContainsValue() instead of std::find() in chrome/browser/chromeos (Closed)
Patch Set: Removed #include<algorithm> when not required. 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: chrome/browser/chromeos/extensions/quick_unlock_private/quick_unlock_private_api_unittest.cc
diff --git a/chrome/browser/chromeos/extensions/quick_unlock_private/quick_unlock_private_api_unittest.cc b/chrome/browser/chromeos/extensions/quick_unlock_private/quick_unlock_private_api_unittest.cc
index 13cbf2d989828ed76abc232bf2888e19a5e651d5..c5aef512261997a90f7178283e318227256f1c8e 100644
--- a/chrome/browser/chromeos/extensions/quick_unlock_private/quick_unlock_private_api_unittest.cc
+++ b/chrome/browser/chromeos/extensions/quick_unlock_private/quick_unlock_private_api_unittest.cc
@@ -6,10 +6,9 @@
#include "chrome/browser/chromeos/extensions/quick_unlock_private/quick_unlock_private_api.h"
-#include <algorithm>
-
#include "base/bind.h"
#include "base/memory/ptr_util.h"
+#include "base/stl_util.h"
#include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_factory.h"
#include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_storage.h"
#include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.h"
@@ -145,8 +144,7 @@ class QuickUnlockPrivateUnitTest : public ExtensionApiUnittest {
// Returns true if |problem| is contained in |problems|.
bool HasProblem(CredentialProblem problem,
achuithb 2017/06/13 20:58:23 nit: we can eliminate this function entirely by in
Tripta 2017/06/14 07:36:17 Done.
const std::vector<CredentialProblem> problems) {
- return std::find(problems.begin(), problems.end(), problem) !=
- problems.end();
+ return base::ContainsValue(problems, problem);
}
bool HasFlag(int outcome, int flag) { return (outcome & flag) != 0; }

Powered by Google App Engine
This is Rietveld 408576698